/[drupal]/contributions/modules/dynosearcho/dynosearcho.js
ViewVC logotype

Diff of /contributions/modules/dynosearcho/dynosearcho.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Wed Dec 5 19:46:00 2007 UTC revision 1.2, Sun Jan 20 17:19:43 2008 UTC
# Line 60  dts.jsAC.prototype.onkeypress = function Line 60  dts.jsAC.prototype.onkeypress = function
60      case 13: // enter      case 13: // enter
61        input.blur();        input.blur();
62        e.preventDefault();        e.preventDefault();
63    
64          //----- If the search module is installed, and the config option is checked, then pass the search terms
65          //-----   along to the search module if the "enter" key is pressed.
66          var delta = $(input).parent().siblings('#edit-dynosearcho-delta').val();
67          var searchon = $('#edit-dynosearcho-integrated-search-' + delta).val();
68          if (searchon == 1) {
69                  //----- figure out the correct path to the Drupal search
70                  var basepath = $('#edit-dynosearcho-basepath-' + delta).val();
71                  var useq = $('form#dynosearcho_search_form_' + delta).attr('action');
72                  if (useq.indexOf("?q=") > 0) {
73                    window.location.href = basepath + "?q=search/node/" + Drupal.encodeURIComponent(this.input.value);
74                  } else {
75                    window.location.href = basepath + "search/node/" + Drupal.encodeURIComponent(this.input.value);
76                  }
77                }
78    }    }
79  }  }
80    
   
81  /**  /**
82   * Handler for the "keyup" event   * Handler for the "keyup" event
83   */   */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2