소스 검색

fixe @koala-prepend

Bachir Soussi Chiadmi 11 년 전
부모
커밋
90c6d5e6e9
2개의 변경된 파일12개의 추가작업 그리고 5개의 파일을 삭제
  1. 12 5
      js/materio_search_api_ajax.js
  2. 0 0
      js/materio_search_api_ajax.min.js

+ 12 - 5
js/materio_search_api_ajax.js

@@ -1,5 +1,5 @@
 // @codekit-prepend "gui.js"
-// @koala-prepend "gui.js"
+// @koala-prepend "gui_ck_fw/gui.js"
 
 (function($) {
 
@@ -35,7 +35,10 @@ MaterioSearchApiAjax = function(){
     // /!\ AUTOCOMPLETE SELECT EVENT need a patch http://drupal.org/node/365241#comment-5374686
     $("#edit-searchfield")
       .bind('autocompleteSelect', function(event) {
-        $(this).parents('.form').trigger('submit');
+        // $(this).parents('.form').trigger('submit');
+        setTimeout(function(){
+          loadResults(getSearchKeys(), "taxonomy");
+        },10);
       })
       .bind('focus', function(event){
         $(this).select();
@@ -63,11 +66,15 @@ MaterioSearchApiAjax = function(){
     return $('#materio-search-api-search-form').find('input[name*="searchfield"]').val();
   };
 
-  function loadResults(keys){
-    trace('keys', keys);
+  function loadResults(keys, searchmode){
+    //trace('keys', keys);
     if(keys !== undefined && keys !== ''  && keys.length >= 2){
       keys = keys.replace('/', ' ');
 
+      // define mode
+      searchmode = searchmode || "fulltext";
+
+      // record the "node type filter" form item
       var types = {}, stringTypes = [];
       $('#edit-bundles-filter', '#materio-search-api-search-form').find('input[type*="checkbox"]').each(function(i){
         $this = $(this);
@@ -85,7 +92,7 @@ MaterioSearchApiAjax = function(){
         // trace('window.location.href',window.location.href);
         // TODO:  record ajax path in a variable from materio_search_api_ajax_init
         $.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_search_api_ajax/search/', 
-          {'types':types,'current_path':document.location.href, keys:keys},
+          {'types':types,'current_path':document.location.href, 'keys':keys, 'searchmode':searchmode},
           function(json){
             //trace('json', json);
             

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
js/materio_search_api_ajax.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.