summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-07-14 15:28:02 +0000
committerDries Buytaert <dries@buytaert.net>2007-07-14 15:28:02 +0000
commitcd8690fb85937fe381f7ea7429772037168ae4aa (patch)
treed72e49d0cd29ba7ae47972078b4b6485ca241626
parent834eab503f9b877cbee0cc94d4b951dc5ac2844e (diff)
downloadbrdo-cd8690fb85937fe381f7ea7429772037168ae4aa.tar.gz
brdo-cd8690fb85937fe381f7ea7429772037168ae4aa.tar.bz2
- Patch #158790 by kkaefer: usability improvement: automatically select proper radio button.
-rw-r--r--modules/node/node.js12
-rw-r--r--modules/node/node.module2
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/node/node.js b/modules/node/node.js
new file mode 100644
index 000000000..b8b352000
--- /dev/null
+++ b/modules/node/node.js
@@ -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);
+ });
+ });
+}
diff --git a/modules/node/node.module b/modules/node/node.module
index 8876001f0..e90788a00 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1524,6 +1524,8 @@ function node_filter_form() {
$form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
}
+ drupal_add_js(drupal_get_path('module', 'node') .'/node.js');
+
return $form;
}