- Patch #158790 by kkaefer: usability improvement: automatically select proper radio button.

6.x
Dries Buytaert 2007-07-14 15:28:02 +00:00
parent 834eab503f
commit cd8690fb85
2 changed files with 14 additions and 0 deletions

12
modules/node/node.js Normal file
View File

@ -0,0 +1,12 @@
// $Id$
if (Drupal.jsEnabled) {
$(function() {
// Automatically selects the right radio button in the filter section of
// the admin content list.
$('#node-admin-filter select').change(function() {
$('#node-admin-filter input:radio[@value="'+ this.id.substr(5) +'"]')
.attr('checked', true);
});
});
}

View File

@ -1524,6 +1524,8 @@ function node_filter_form() {
$form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset')); $form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
} }
drupal_add_js(drupal_get_path('module', 'node') .'/node.js');
return $form; return $form;
} }