Index: jump.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jump/Attic/jump.install,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 jump.install
--- jump.install	29 Sep 2009 20:34:02 -0000	1.1.2.2
+++ jump.install	29 Sep 2009 23:36:25 -0000
@@ -6,6 +6,7 @@
  */
 function jump_uninstall() {
   db_query("DELETE from {variable} WHERE name LIKE 'jump_activepageinmenu%'");
+  variable_del('jump_enabled_js_click');
 }
 
 /**
Index: jump.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jump/jump.module,v
retrieving revision 1.1.4.3
diff -u -p -r1.1.4.3 jump.module
--- jump.module	28 Sep 2009 21:50:54 -0000	1.1.4.3
+++ jump.module	29 Sep 2009 23:36:26 -0000
@@ -37,6 +37,13 @@ function jump_settings() {
     '#description' => t('This setting will force the jump menu to show the current page as the default selection in the jump menu when checked.  If you have a menu option that you would always like displayed at the top of the menu, like <em>Select a menu item</em>, you will want to uncheck this. This setting controls this behavior for all jump menus sitewide.  You can override this setting on a block-by-block basis.'),
   );
 
+  $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);
 }
 
@@ -61,6 +68,12 @@ function jump_block($op = 'list', $delta
     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-
Index: jump.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jump/Attic/jump.test,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 jump.test
--- jump.test	28 Sep 2009 21:50:54 -0000	1.1.2.1
+++ jump.test	29 Sep 2009 23:36:26 -0000
@@ -26,7 +26,7 @@ class JumpTestCase extends DrupalWebTest
     parent::setUp('jump', 'path', 'taxonomy', 'devel');
 
     // Create a user to perform tests.
-    $this->web_user = $this->drupalCreateUser(array (
+    $this->web_user = $this->drupalCreateUser(array(
       'administer blocks',
       'administer menu',
       'access content',
@@ -153,7 +153,7 @@ class JumpTestCase extends DrupalWebTest
     preg_match($re, $this->drupalGetContent(), $matches);
     $fail = 0;
     foreach ($matches as $select) {
-      if (preg_match('/selected="selected"/',$select)) {
+      if (preg_match('/selected="selected"/', $select)) {
         $fail=1;
         break;
       }
@@ -217,7 +217,7 @@ class JumpTestCase extends DrupalWebTest
     preg_match_all($re, $this->drupalGetContent(), $matches);
     $fail = 0;
     foreach ($matches[0] as $select) {
-      if (preg_match('/selected="selected"/',$select)) {
+      if (preg_match('/selected="selected"/', $select)) {
         $fail++;
       }
     }
@@ -230,9 +230,9 @@ class JumpTestCase extends DrupalWebTest
    */
   public function testJumpTaxonomyTerm() {
     // Add a vocbulary.
-    $vName = $this->randomName(8);
+    $v_name = $this->randomName(8);
     $edit = array(
-      'name' => $vName
+      'name' => $v_name
     );
     $this->drupalPost(
       'admin/content/taxonomy/add/vocabulary',
@@ -241,7 +241,7 @@ class JumpTestCase extends DrupalWebTest
     $vocabularies = taxonomy_get_vocabularies();
     $vocabulary = new stdClass();
     foreach ($vocabularies as $vocabulary) {
-      if ($vocabulary->name == $vName) {
+      if ($vocabulary->name == $v_name) {
         break;
       }
     }
@@ -251,18 +251,18 @@ class JumpTestCase extends DrupalWebTest
     }
 
     // Add a term.
-    $tName = $this->randomName(8);
+    $t_name = $this->randomName(8);
     $edit = array(
-      'name' => $tName
+      'name' => $t_name
     );
     $this->drupalPost(
       'admin/content/taxonomy/'. $vocabulary->vid .'/add/term',
       $edit, 'Save'
     );
-    $terms = taxonomy_get_term_by_name($tName);
+    $terms = taxonomy_get_term_by_name($t_name);
     $term = new stdClass();
     foreach ($terms as $term) {
-      if ($term->name == $tName) {
+      if ($term->name == $t_name) {
         break;
       }
     }
@@ -274,7 +274,7 @@ class JumpTestCase extends DrupalWebTest
     // Add the term to the menu.
     $edit = array(
       'menu[link_path]' => 'taxonomy/term/'. $term->tid,
-      'menu[link_title]' => $tName,
+      'menu[link_title]' => $t_name,
     );
     $this->drupalPost(
       'admin/build/menu-customize/menu-'. $this->menu_name .'/add',
@@ -359,14 +359,63 @@ class JumpTestCase extends DrupalWebTest
     $this->assertPattern('/class="jump-quickly".*<select.*<option value="node\/'. $node->nid .'" selected="selected"/s', t('Verified that the node we jumped to is selected in the jump form.'));
   }
 
+  /**
+   * Verifies that the "Jump without go button" feature works [#270924].
+   *
+   * This method is limited by the fact that we can not actually test the
+   * functionality of the included javascript until javascript unit testing
+   * is integrated into Drupal Simpletest.
+   */
+  public function testJumpWithOutGoButton() {
+    variable_set('jump_enabled_js_click', 1);
+
+    // Add a node.
+    $settings = array('type' => 'story');
+    $node = $this->drupalCreateNode($settings);
+
+    // Add the node to the menu.
+    $edit = array(
+      'menu[link_path]' => 'node/'. $node->nid,
+      'menu[link_title]' => $node->title,
+    );
+    $this->drupalPost(
+      '/admin/build/menu-customize/menu-'. $this->menu_name .'/add',
+      $edit, 'Save'
+    );
+    $this->assertRaw($node->title, 'Test story added to menu');
+
+    // Jump to it.
+    $jump_edit = array(
+      'jump_goto' => $edit['menu[link_path]'],
+    );
+    $this->drupalPost('', $jump_edit, 'Go');
+
+    // Verify the the jump javascript is included.
+    $jump_js_path = '/'. drupal_get_path('module', 'jump') .'/js/jump_on_click.js';
+    $jump_js_path = addcslashes($jump_js_path, '[\^$.|?*+()/'); 
+    $re = '/<script[^>]*src="'. $jump_js_path .'/';
+    $found = preg_match($re, $this->drupalGetContent());
+    $this->assertTrue($found, t('The jump on click javascript was added when the jump_enabled_js_click variable is set. $re: '. htmlentities($re)));
+
+    variable_set('jump_enabled_js_click', 0);
+
+    // Verify that the javascript is not included now.
+    $jump_edit = array(
+      'jump_goto' => $edit['menu[link_path]'],
+    );
+    $this->drupalPost('', $jump_edit, 'Go');
+    $found = preg_match($re, $this->drupalGetContent());
+    $this->assertTrue(!$found, t('The jump on click javascript was not added when the jump_enabled_js_click variable is not set.'));
+  }
+
   private function outputScreenContents($description, $basename) {
     // This is a hack to get a directory that won't be cleaned up by simpletest
-    $file_dir = file_directory_path().'/../simpletest_output_pages';
+    $file_dir = file_directory_path() .'/../simpletest_output_pages';
     if (!is_dir($file_dir)) {
       mkdir($file_dir, 0777, TRUE);
     }
-    $output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
+    $output_path = "$file_dir/$basename.". $this->randomName(10) .'.html';
     $rv = file_put_contents($output_path, $this->drupalGetContent());
-    $this->pass("$description: Contents of result page are ".l('here',$output_path));
+    $this->pass("$description: Contents of result page are ". l('here', $output_path));
   }
 }
Index: js/jump_on_click.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jump/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	29 Sep 2009 23:40:07 -0000
@@ -0,0 +1,23 @@
+/* $Id:$ */
+
+/**
+ * @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) {
+  // 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();
+};
