From 38a88db58d8c4768e5b38e87878cd96e4d77aacb Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 1 Mar 2013 18:57:11 -0500 Subject: [PATCH] Patch Suggest to accept type param for Search --- main/webapp/modules/core/externals/suggest/suggest-4_1.js | 2 +- main/webapp/modules/core/externals/suggest/suggest-4_1.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/webapp/modules/core/externals/suggest/suggest-4_1.js b/main/webapp/modules/core/externals/suggest/suggest-4_1.js index a93a44eb8..ad1547b5d 100644 --- a/main/webapp/modules/core/externals/suggest/suggest-4_1.js +++ b/main/webapp/modules/core/externals/suggest/suggest-4_1.js @@ -87,7 +87,7 @@ var SEARCH_PARAMS = { key:1, filter:1, spell:1, exact:1, lang:1, scoring:1, prefixed:1, stemmed:1, format:1, mql_output:1, - output:1 + output:1, type:1 }; $.suggest = function(name, prototype) { diff --git a/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js b/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js index b5d275589..4ef28c2dd 100644 --- a/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js +++ b/main/webapp/modules/core/externals/suggest/suggest-4_1.min.js @@ -34,7 +34,7 @@ * */ (function(c,q){if(!("console"in window)){var o=window.console={};o.log=o.warn=o.error=o.debug=function(){}}c(function(){var a=c("
");c(document.body).append(a);var b=setTimeout(function(){if(c.cleanData){var a=c.cleanData;c.cleanData=function(b){for(var e=0,g;null!=(g=b[e]);e++)c(g).triggerHandler("remove");a(b)}}else{var b=c.fn.remove;c.fn.remove=function(a,f){return this.each(function(){f||(!a||c.filter(a,[this]).length)&&c("*",this).add([this]).each(function(){c(this).triggerHandler("remove")}); -return b.call(c(this),a,f)})}}},1);a.bind("remove",function(){clearTimeout(b)});a.remove()});var p={key:1,filter:1,spell:1,exact:1,lang:1,scoring:1,prefixed:1,stemmed:1,format:1,mql_output:1,output:1};c.suggest=function(a,b){c.fn[a]=function(b){this.length||console.warn("Suggest: invoked on empty element set");return this.each(function(){this.nodeName&&("INPUT"===this.nodeName.toUpperCase()?this.type&&"TEXT"!==this.type.toUpperCase()&&console.warn("Suggest: unsupported INPUT type: "+this.type):console.warn("Suggest: unsupported DOM element: "+ +return b.call(c(this),a,f)})}}},1);a.bind("remove",function(){clearTimeout(b)});a.remove()});var p={key:1,filter:1,spell:1,exact:1,lang:1,scoring:1,prefixed:1,stemmed:1,format:1,mql_output:1,output:1,type:1};c.suggest=function(a,b){c.fn[a]=function(b){this.length||console.warn("Suggest: invoked on empty element set");return this.each(function(){this.nodeName&&("INPUT"===this.nodeName.toUpperCase()?this.type&&"TEXT"!==this.type.toUpperCase()&&console.warn("Suggest: unsupported INPUT type: "+this.type):console.warn("Suggest: unsupported DOM element: "+ this.nodeName));var g=c.data(this,a);g&&g._destroy();c.data(this,a,new c.suggest[a](this,b))._init()})};c.suggest[a]=function(b,g){var d=this,e=this.options=c.extend(!0,{},c.suggest.defaults,c.suggest[a].defaults,g),j=e.css_prefix=e.css_prefix||"",h=e.css;this.name=a;c.each(h,function(a){h[a]=j+h[a]});e.ac_param={};c.each(p,function(a){var b=e[a];null===b||""===b||(e.ac_param[a]=b)});e.flyout_lang=null;if(e.ac_param.lang){var i=e.ac_param.lang;"string"===c.type(i)&&(i=i.split(","));if(c.isArray(i)&& i.length&&(i=c.trim(i[0])))e.flyout_lang=i}this._status={START:"",LOADING:"",SELECT:"",ERROR:""};e.status&&(e.status instanceof Array&&3<=e.status.length)&&(this._status.START=e.status[0]||"",this._status.LOADING=e.status[1]||"",this._status.SELECT=e.status[2]||"",4===e.status.length&&(this._status.ERROR=e.status[3]||""));var i=this.status=c('
').addClass(h.status),k=this.list=c("
    ").addClass(h.list),l=this.pane=c('