Index: jump.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jump/jump.module,v
retrieving revision 1.1.4.1
diff -u -p -r1.1.4.1 jump.module
--- jump.module	30 May 2008 03:51:23 -0000	1.1.4.1
+++ jump.module	10 Sep 2009 11:47:47 -0000
@@ -8,29 +8,71 @@
  */
 
 /**
+ * Implementation of hook_perm().
+  */
+function jump_perm() {
+    return array('administer jump settings');
+}
+
+/**
+ * Implementation of hook_menu().
+ */
+function jump_menu() { 
+  $items = array();
+  $admin_access = array('administer jump settings');
+
+  $items['admin/build/jump'] = array(
+    'title' => 'Jump Menu Settings',
+    'description' => 'Administer the jump menu settings for this site.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('jump_admin_settings'),
+    'access arguments' => $admin_access,
+  );
+
+  return $items;
+}
+
+function jump_admin_settings() {
+  $form['jump_enabled_js_click'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable single click jumps with javascript'),
+    '#default_value' => variable_get('jump_enabled_js_click', 0),
+    '#description' => t('This option will disable the submit button for jump menus and jump to the selected page when selected by enabling additional javascript.')
+  );
+
+  return system_settings_form($form);
+}
+
+/**
  * Implementation of hook_block().
  */
 function jump_block($op = 'list', $delta = 0, $edit = array()) {
   if ($op == 'list') {
     $blocks = array();
     foreach (menu_get_menus() as $name => $title) {
-      $blocks['menu:'. $name] = array(
+      $blocks['menu-'. $name] = array(
         'info' => t('Jump menu: !menu', array('!menu' => $name))
       );
     }
     
     $vocs = taxonomy_get_vocabularies();
     foreach ($vocs as $vid => $vocabulary) {
-      $blocks['taxo:'. $vid] = array(
+      $blocks['taxo-'. $vid] = array(
         'info' => t('Jump menu: !voc', array('!voc' => $vocabulary->name))
       );
     }
     return $blocks;
   }
   else if ($op == 'view') {
+    // Include the on click submit javascript if it is enabled.
+    if (variable_get('jump_enabled_js_click', 0)) {
+      drupal_add_js(
+        drupal_get_path('module', 'jump') .'/js/jump_on_click.js'); 
+    }
+
     // The first 5 characters of $delta should be one of:
-    //    menu:
-    //    taxo:
+    //    menu-
+    //    taxo-
     $jumpmenu_type = substr($delta, 0, 4);
     $jumpmenu_name = substr($delta, 5);
     if ($jumpmenu_type == 'menu') {
Index: js/jump_on_click.js
===================================================================
RCS file: js/jump_on_click.js
diff -N js/jump_on_click.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ js/jump_on_click.js	10 Sep 2009 11:48:02 -0000
@@ -0,0 +1,22 @@
+/**
+ * @file jump_on_click.js
+ *
+ * Handles menu clicks for the jump module.
+ */
+
+/**
+ * Set click handlers for all jump module menues and disable the submit button.
+ */
+Drupal.behaviors.jumpOnClick = function(context) {
+  console.log('jumpOnClick');
+  // For each jump block option set a click handler
+  $('.block-jump select option').each(function() {
+    $(this).bind('click', function() {
+      window.location.replace(Drupal.settings.basePath + $(this).attr('value'));
+      return false;
+    });
+  });
+
+  // Hide the submit button.
+  $('.block-jump input.form-submit').hide();
+};
