This patch adds an autoselection of the corresponding radio button on the node listing page in the admin section.

On said page, you can find a “Show only items where” filter at the top. There are various select lists with corresponding radio buttons. However, you have to select for example “type” with a radio button, choose a type from the dropdown list and click on “Filter”. This patch removes the need to click the radio button by automatically selecting the corresponding radio button when the user makes a change in a dropdown field (i.e. selects something).

CommentFileSizeAuthor
node-filter-autoselect.patch1.18 KBkkaefer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AjK’s picture

Status: Needs review » Reviewed & tested by the community

Installs clean against HEAD as of now (at review time).

Does exactly what it says on the tin and is a real useful feature.

Stefan Nagtegaal’s picture

Well, it does work indeed.
But what I was thinking was this, wouldn't it be better if the radio buttons were merged into 1 selectbox.
Then when the first selectbox is being changed, the second selectbox is enabled and updated with the correct options.

Doesn't that sound easier to use? (I didn't think of this myself, it is a basic implementation OS X has, and would be really nice to see implemented in drupal).

yched’s picture

Big +1 on the patch - I've mumbled about that numerous times, and had planned to work on a patch myself :-)
Tested, works perfectly fine. I'm no jQuery guru, but code looks rather straightforward, so +1 on RTBC as well.

-1 on Stefan's suggestion : the current UI allows you to quickly see all the filtering options available. Plus this would require 2 clicks to select a filter, instead of 1 with kkaefer's patch

Dries’s picture

Status: Reviewed & tested by the community » Fixed

I've tested this patch and it works as advertised, and the code looks good. Committed.

yched’s picture

Cool - Doesn't this call for a similar treatment of user admin overview ?
(and maybe comments ?) :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)