From b332b9fd3ff16c0b184e19c4f010fa82ff234840 Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Tue, 25 Mar 2014 10:38:15 -0400 Subject: [PATCH 1/2] Don't show the placeholder when there's entered text. Otherwise the text overlaps with the placeholder. --- build-min/visualsearch.js | 4 ++-- build-min/visualsearch.js.gz | Bin 8410 -> 8437 bytes build/visualsearch.js | 3 ++- lib/js/views/search_box.js | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build-min/visualsearch.js b/build-min/visualsearch.js index 33bd88c..8a95f17 100644 --- a/build-min/visualsearch.js +++ b/build-min/visualsearch.js @@ -1,11 +1,11 @@ (function(){var $=jQuery;if(!window.VS)window.VS={};if(!VS.app)VS.app={};if(!VS.ui)VS.ui={};if(!VS.model)VS.model={};if(!VS.utils)VS.utils={};VS.VERSION='0.5.0';VS.VisualSearch=function(options){var defaults={container:'',query:'',autosearch:true,unquotable:[],remainder:'text',showFacets:true,readOnly:false,callbacks:{search:$.noop,focus:$.noop,blur:$.noop,facetMatches:$.noop,valueMatches:$.noop,clearSearch:$.noop,removedFacet:$.noop}};this.options=_.extend({},defaults,options);this.options.callbacks=_.extend({},defaults.callbacks,options.callbacks);VS.app.hotkeys.initialize();this.searchQuery=new VS.model.SearchQuery();this.searchBox=new VS.ui.SearchBox({app:this,showFacets:this.options.showFacets});if(options.container){var searchBox=this.searchBox.render().el;$(this.options.container).html(searchBox);} this.searchBox.value(this.options.query||'');$(window).bind('unload',function(e){});return this;};VS.init=function(options){return new VS.VisualSearch(options);};})();(function(){var $=jQuery;VS.ui.SearchBox=Backbone.View.extend({id:'search',events:{'click .VS-cancel-search-box':'clearSearch','mousedown .VS-search-box':'maybeFocusSearch','dblclick .VS-search-box':'highlightSearch','click .VS-search-box':'maybeTripleClick'},initialize:function(options){this.options=_.extend({},this.options,options);this.app=this.options.app;this.flags={allSelected:false};this.facetViews=[];this.inputViews=[];_.bindAll(this,'renderFacets','_maybeDisableFacets','disableFacets','deselectAllFacets','addedFacet','removedFacet','changedFacet');this.app.searchQuery.bind('reset',this.renderFacets).bind('add',this.addedFacet).bind('remove',this.removedFacet).bind('change',this.changedFacet);$(document).bind('keydown',this._maybeDisableFacets);},render:function(){$(this.el).append(JST['search_box']({readOnly:this.app.options.readOnly}));$(document.body).setMode('no','search');return this;},value:function(query){if(query==null)return this.serialize();return this.setQuery(query);},serialize:function(){var query=[];var inputViewsCount=this.inputViews.length;this.app.searchQuery.each(_.bind(function(facet,i){query.push(this.inputViews[i].value());query.push(facet.serialize());},this));if(inputViewsCount){query.push(this.inputViews[inputViewsCount-1].value());} -return _.compact(query).join(' ');},selected:function(){return _.select(this.facetViews,function(view){return view.modes.editing=='is'||view.modes.selected=='is';});},selectedModels:function(){return _.pluck(this.selected(),'model');},setQuery:function(query){this.currentQuery=query;VS.app.SearchParser.parse(this.app,query);},viewPosition:function(view){var views=view.type=='facet'?this.facetViews:this.inputViews;var position=_.indexOf(views,view);if(position==-1)position=0;return position;},searchEvent:function(e){var query=this.value();this.focusSearch(e);this.value(query);this.app.options.callbacks.search(query,this.app.searchQuery);},addFacet:function(category,initialQuery,position){category=VS.utils.inflector.trim(category);initialQuery=VS.utils.inflector.trim(initialQuery||'');if(!category)return;var model=new VS.model.SearchFacet({category:category,value:initialQuery||'',app:this.app});this.app.searchQuery.add(model,{at:position});},addedFacet:function(model){this.renderFacets();var facetView=_.detect(this.facetViews,function(view){if(view.model==model)return true;});_.defer(function(){facetView.enableEdit();});},changedFacet:function(){this.renderFacets();},removedFacet:function(facet,query,options){this.app.options.callbacks.removedFacet(facet,query,options);},renderFacets:function(){this.facetViews=[];this.inputViews=[];this.$('.VS-search-inner').empty();this.app.searchQuery.each(_.bind(this.renderFacet,this));this.renderSearchInput();this.renderPlaceholder();},renderFacet:function(facet,position){var view=new VS.ui.SearchFacet({app:this.app,model:facet,order:position});this.renderSearchInput();this.facetViews.push(view);this.$('.VS-search-inner').children().eq(position*2).after(view.render().el);view.calculateSize();_.defer(_.bind(view.calculateSize,view));return view;},renderSearchInput:function(){var input=new VS.ui.SearchInput({position:this.inputViews.length,app:this.app,showFacets:this.options.showFacets});this.$('.VS-search-inner').append(input.render().el);this.inputViews.push(input);},renderPlaceholder:function(){var $placeholder=this.$('.VS-placeholder');if(this.app.searchQuery.length){$placeholder.addClass("VS-hidden");}else{$placeholder.removeClass("VS-hidden").text(this.app.options.placeholder);}},clearSearch:function(e){if(this.app.options.readOnly)return;var actualClearSearch=_.bind(function(){this.disableFacets();this.value('');this.flags.allSelected=false;this.searchEvent(e);this.focusSearch(e);},this);if(this.app.options.callbacks.clearSearch!=$.noop){this.app.options.callbacks.clearSearch(actualClearSearch);}else{actualClearSearch();}},selectAllFacets:function(){this.flags.allSelected=true;$(document).one('click.selectAllFacets',this.deselectAllFacets);_.each(this.facetViews,function(facetView,i){facetView.selectFacet();});_.each(this.inputViews,function(inputView,i){inputView.selectText();});},allSelected:function(deselect){if(deselect)this.flags.allSelected=false;return this.flags.allSelected;},deselectAllFacets:function(e){this.disableFacets();if(this.$(e.target).is('.category,input')){var el=$(e.target).closest('.search_facet,.search_input');var view=_.detect(this.facetViews.concat(this.inputViews),function(v){return v.el==el[0];});if(view.type=='facet'){view.selectFacet();}else if(view.type=='input'){_.defer(function(){view.enableEdit(true);});}}},disableFacets:function(keepView){_.each(this.inputViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();}});_.each(this.facetViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();view.deselectFacet();}});this.flags.allSelected=false;this.removeFocus();$(document).unbind('click.selectAllFacets');},resizeFacets:function(view){_.each(this.facetViews,function(facetView,i){if(!view||facetView==view){facetView.resize();}});},_maybeDisableFacets:function(e){if(this.flags.allSelected&&VS.app.hotkeys.key(e)=='backspace'){e.preventDefault();this.clearSearch(e);return false;}else if(this.flags.allSelected&&VS.app.hotkeys.printable(e)){this.clearSearch(e);}},focusNextFacet:function(currentView,direction,options){options=options||{};var viewCount=this.facetViews.length;var viewPosition=options.viewPosition||this.viewPosition(currentView);if(!options.skipToFacet){if(currentView.type=='text'&&direction>0)direction-=1;if(currentView.type=='facet'&&direction<0)direction+=1;}else if(options.skipToFacet&¤tView.type=='text'&&viewCount==viewPosition&&direction>=0){return false;} +return _.compact(query).join(' ');},selected:function(){return _.select(this.facetViews,function(view){return view.modes.editing=='is'||view.modes.selected=='is';});},selectedModels:function(){return _.pluck(this.selected(),'model');},setQuery:function(query){this.currentQuery=query;VS.app.SearchParser.parse(this.app,query);},viewPosition:function(view){var views=view.type=='facet'?this.facetViews:this.inputViews;var position=_.indexOf(views,view);if(position==-1)position=0;return position;},searchEvent:function(e){var query=this.value();this.focusSearch(e);this.value(query);this.app.options.callbacks.search(query,this.app.searchQuery);},addFacet:function(category,initialQuery,position){category=VS.utils.inflector.trim(category);initialQuery=VS.utils.inflector.trim(initialQuery||'');if(!category)return;var model=new VS.model.SearchFacet({category:category,value:initialQuery||'',app:this.app});this.app.searchQuery.add(model,{at:position});},addedFacet:function(model){this.renderFacets();var facetView=_.detect(this.facetViews,function(view){if(view.model==model)return true;});_.defer(function(){facetView.enableEdit();});},changedFacet:function(){this.renderFacets();},removedFacet:function(facet,query,options){this.app.options.callbacks.removedFacet(facet,query,options);},renderFacets:function(){this.facetViews=[];this.inputViews=[];this.$('.VS-search-inner').empty();this.app.searchQuery.each(_.bind(this.renderFacet,this));this.renderSearchInput();this.renderPlaceholder();},renderFacet:function(facet,position){var view=new VS.ui.SearchFacet({app:this.app,model:facet,order:position});this.renderSearchInput();this.facetViews.push(view);this.$('.VS-search-inner').children().eq(position*2).after(view.render().el);view.calculateSize();_.defer(_.bind(view.calculateSize,view));return view;},renderSearchInput:function(){var input=new VS.ui.SearchInput({position:this.inputViews.length,app:this.app,showFacets:this.options.showFacets});this.$('.VS-search-inner').append(input.render().el);this.inputViews.push(input);},renderPlaceholder:function(){var $placeholder=this.$('.VS-placeholder');if(this.app.searchQuery.length||_.any(this.inputViews,function(view){return view.value()!="";})){$placeholder.addClass("VS-hidden");}else{$placeholder.removeClass("VS-hidden").text(this.app.options.placeholder);}},clearSearch:function(e){if(this.app.options.readOnly)return;var actualClearSearch=_.bind(function(){this.disableFacets();this.value('');this.flags.allSelected=false;this.searchEvent(e);this.focusSearch(e);},this);if(this.app.options.callbacks.clearSearch!=$.noop){this.app.options.callbacks.clearSearch(actualClearSearch);}else{actualClearSearch();}},selectAllFacets:function(){this.flags.allSelected=true;$(document).one('click.selectAllFacets',this.deselectAllFacets);_.each(this.facetViews,function(facetView,i){facetView.selectFacet();});_.each(this.inputViews,function(inputView,i){inputView.selectText();});},allSelected:function(deselect){if(deselect)this.flags.allSelected=false;return this.flags.allSelected;},deselectAllFacets:function(e){this.disableFacets();if(this.$(e.target).is('.category,input')){var el=$(e.target).closest('.search_facet,.search_input');var view=_.detect(this.facetViews.concat(this.inputViews),function(v){return v.el==el[0];});if(view.type=='facet'){view.selectFacet();}else if(view.type=='input'){_.defer(function(){view.enableEdit(true);});}}},disableFacets:function(keepView){_.each(this.inputViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();}});_.each(this.facetViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();view.deselectFacet();}});this.flags.allSelected=false;this.removeFocus();$(document).unbind('click.selectAllFacets');},resizeFacets:function(view){_.each(this.facetViews,function(facetView,i){if(!view||facetView==view){facetView.resize();}});},_maybeDisableFacets:function(e){if(this.flags.allSelected&&VS.app.hotkeys.key(e)=='backspace'){e.preventDefault();this.clearSearch(e);return false;}else if(this.flags.allSelected&&VS.app.hotkeys.printable(e)){this.clearSearch(e);}},focusNextFacet:function(currentView,direction,options){options=options||{};var viewCount=this.facetViews.length;var viewPosition=options.viewPosition||this.viewPosition(currentView);if(!options.skipToFacet){if(currentView.type=='text'&&direction>0)direction-=1;if(currentView.type=='facet'&&direction<0)direction+=1;}else if(options.skipToFacet&¤tView.type=='text'&&viewCount==viewPosition&&direction>=0){return false;} var view,next=Math.min(viewCount,viewPosition+direction);if(currentView.type=='text'){if(next>=0&&next=viewCount||next<0){view=_.last(this.inputViews);view.enableEdit();}else{view=this.facetViews[next];view.enableEdit();view.setCursorAtEnd(direction||options.startAtEnd);}}else{view=this.inputViews[next];view.enableEdit();}} if(options.selectText)view.selectText();this.resizeFacets();return true;},maybeFocusSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){this.focusSearch(e);}},focusSearch:function(e,selectText){if(this.app.options.readOnly)return;var view=this.inputViews[this.inputViews.length-1];view.enableEdit(selectText);if(!selectText)view.setCursorAtEnd(-1);if(e.type=='keydown'){view.keydown(e);view.box.trigger('keydown');} -_.defer(_.bind(function(){if(!this.$('input:focus').length){view.enableEdit(selectText);}},this));},highlightSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){var lastinput=this.inputViews[this.inputViews.length-1];lastinput.startTripleClickTimer();this.focusSearch(e,true);}},maybeTripleClick:function(e){var lastinput=this.inputViews[this.inputViews.length-1];return lastinput.maybeTripleClick(e);},addFocus:function(){if(this.app.options.readOnly)return;this.app.options.callbacks.focus();this.$('.VS-search-box').addClass('VS-focus');},removeFocus:function(){this.app.options.callbacks.blur();var focus=_.any(this.facetViews.concat(this.inputViews),function(view){return view.isFocused();});if(!focus)this.$('.VS-search-box').removeClass('VS-focus');},showFacetCategoryMenu:function(e){e.preventDefault();e.stopPropagation();if(this.facetCategoryMenu&&this.facetCategoryMenu.modes.open=='is'){return this.facetCategoryMenu.close();} +_.defer(_.bind(function(){if(!this.$('input:focus').length){view.enableEdit(selectText);}},this));},highlightSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){var lastinput=this.inputViews[this.inputViews.length-1];lastinput.startTripleClickTimer();this.focusSearch(e,true);}},maybeTripleClick:function(e){var lastinput=this.inputViews[this.inputViews.length-1];return lastinput.maybeTripleClick(e);},addFocus:function(){if(this.app.options.readOnly)return;this.app.options.callbacks.focus();this.$('.VS-search-box').addClass('VS-focus');},removeFocus:function(){this.app.options.callbacks.blur();var focus=_.any(this.facetViews.concat(this.inputViews),function(view){return view.isFocused();});if(!focus)this.$('.VS-search-box').removeClass('VS-focus');this.renderPlaceholder();},showFacetCategoryMenu:function(e){e.preventDefault();e.stopPropagation();if(this.facetCategoryMenu&&this.facetCategoryMenu.modes.open=='is'){return this.facetCategoryMenu.close();} var items=[{title:'Account',onClick:_.bind(this.addFacet,this,'account','')},{title:'Project',onClick:_.bind(this.addFacet,this,'project','')},{title:'Filter',onClick:_.bind(this.addFacet,this,'filter','')},{title:'Access',onClick:_.bind(this.addFacet,this,'access','')}];var menu=this.facetCategoryMenu||(this.facetCategoryMenu=new dc.ui.Menu({items:items,standalone:true}));this.$('.VS-icon-search').after(menu.render().open().content);return false;}});})();(function(){var $=jQuery;VS.ui.SearchFacet=Backbone.View.extend({type:'facet',className:'search_facet',events:{'click .category':'selectFacet','keydown input':'keydown','mousedown input':'enableEdit','mouseover .VS-icon-cancel':'showDelete','mouseout .VS-icon-cancel':'hideDelete','click .VS-icon-cancel':'remove'},initialize:function(options){this.options=_.extend({},this.options,options);this.flags={canClose:false};_.bindAll(this,'set','keydown','deselectFacet','deferDisableEdit');this.app=this.options.app;},render:function(){$(this.el).html(JST['search_facet']({model:this.model,readOnly:this.app.options.readOnly}));this.setMode('not','editing');this.setMode('not','selected');this.box=this.$('input');this.box.val(this.model.label());this.box.bind('blur',this.deferDisableEdit);this.box.bind('input propertychange',this.keydown);this.setupAutocomplete();return this;},calculateSize:function(){this.box.autoGrowInput();this.box.unbind('updated.autogrow');this.box.bind('updated.autogrow',_.bind(this.moveAutocomplete,this));},resize:function(e){this.box.trigger('resize.autogrow',e);},setupAutocomplete:function(){this.box.autocomplete({source:_.bind(this.autocompleteValues,this),minLength:0,delay:0,autoFocus:true,position:{offset:"0 5"},create:_.bind(function(e,ui){$(this.el).find('.ui-autocomplete-input').css('z-index','auto');},this),select:_.bind(function(e,ui){e.preventDefault();var originalValue=this.model.get('value');this.set(ui.item.value);if(originalValue!=ui.item.value||this.box.val()!=ui.item.value){if(this.app.options.autosearch){this.search(e);}else{this.app.searchBox.renderFacets();this.app.searchBox.focusNextFacet(this,1,{viewPosition:this.options.order});}} return false;},this),open:_.bind(function(e,ui){var box=this.box;this.box.autocomplete('widget').find('.ui-menu-item').each(function(){var $value=$(this),autoCompleteData=$value.data('item.autocomplete')||$value.data('ui-autocomplete-item');if(autoCompleteData['value']==box.val()&&box.data('ui-autocomplete').menu.activate){box.data('ui-autocomplete').menu.activate(new $.Event("mouseover"),$value);}});},this)});this.box.autocomplete('widget').addClass('VS-interface');},moveAutocomplete:function(){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete){autocomplete.menu.element.position({my:"left top",at:"left bottom",of:this.box.data('ui-autocomplete').element,collision:"flip",offset:"0 5"});}},searchAutocomplete:function(e){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete){var menu=autocomplete.menu.element;autocomplete.search();menu.outerWidth(Math.max(menu.width('').outerWidth(),autocomplete.element.outerWidth()));}},closeAutocomplete:function(){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete)autocomplete.close();},autocompleteValues:function(req,resp){var category=this.model.get('category');var value=this.model.get('value');var searchTerm=req.term;this.app.options.callbacks.valueMatches(category,searchTerm,function(matches,options){options=options||{};matches=matches||[];if(searchTerm&&value!=searchTerm){if(options.preserveMatches){resp(matches);}else{var re=VS.utils.inflector.escapeRegExp(searchTerm||'');var matcher=new RegExp('\\b'+re,'i');matches=$.grep(matches,function(item){return matcher.test(item)||matcher.test(item.value)||matcher.test(item.label);});}} if(options.preserveOrder){resp(matches);}else{resp(_.sortBy(matches,function(match){if(match==value||match.value==value)return'';else return match;}));}});},set:function(value){if(!value)return;this.model.set({'value':value});},search:function(e,direction){if(!direction)direction=1;this.closeAutocomplete();this.app.searchBox.searchEvent(e);_.defer(_.bind(function(){this.app.searchBox.focusNextFacet(this,direction,{viewPosition:this.options.order});},this));},enableEdit:function(){if(this.app.options.readOnly)return;if(this.modes.editing!='is'){this.setMode('is','editing');this.deselectFacet();if(this.box.val()==''){this.box.val(this.model.get('value'));}} diff --git a/build-min/visualsearch.js.gz b/build-min/visualsearch.js.gz index 8b0339a4ada673d92c6e1702d8f4851ad85fa866..34bb68c8146c477a04aecca06c218d74ea0e56ec 100644 GIT binary patch literal 8437 zcmVCc17(584%h|Zj%UKw$Zqh|( zKl%0V%WU!fD4&LVZ}Zutd^`C0I8wio)rP8mJ|3j=dBlH=!et)Ozedq@ImwDh{xD(d zyr?4i11sS7&o6&E{`S=mNiZCIHW&s}lvm5NIL^|=_$pE3E$8^B;$cs+X}TIMF>XqVwuIu*>B6TPA`gVbaECivTJBE!8UdFt`6ers(kxR zI?n2f!53LNc{MBEkEUr+W$`#Iii>porW&mT(*41#Ea&mG94{;Ra8WE5ssfRHpVs56 zOx53{#WHis#s%Ozws6AW%A0IL!x3eh%~5@oR|7$Uv97RTzbfBJ$Yn0T zpe$TLMr#=qQM3H4TI&ZDAP$0D<;mO6%2oo)yu`KgIJDe6Ci0loG#!5 z!OU%;V4(db0vfmOYlqUwSFpAhtl327 zms=o&*7Y4Huh$?oCv#D9w>k*NRh*luC=vR`=mPHX6O#tgc30J$kW;x0z z0JVY~IeVT_19#zr=C>E+a#kk}6Ap@Oc3EHfnIKC+!Z3?!xk5Z0=h2F~8O)c}Rp=l+ z$W}FHmSZr-KcVD-Sg{z6|Hrb* z5%0*EJTlh}$uXK`{eGUo+=y7gbBAyvXZeUT=K?WEVN}B2y_yo{ih3o6P!P$%VWb|0 za$m?2q5{t5C7xI#^N`isfkq%$LVZsT?M;nn zoYvW82~ETiMWC^qN3@dliByh(GE-djaxthE`L#j-pP)rofWT?ID&591>*Ha<~9tLh2)4rS(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cN diff --git a/build/visualsearch.js b/build/visualsearch.js index 6d03e18..8d51a5f 100644 --- a/build/visualsearch.js +++ b/build/visualsearch.js @@ -278,7 +278,7 @@ VS.ui.SearchBox = Backbone.View.extend({ // Handles showing/hiding the placeholder text renderPlaceholder : function() { var $placeholder = this.$('.VS-placeholder'); - if (this.app.searchQuery.length) { + if (this.app.searchQuery.length || _.any(this.inputViews, function(view) { return view.value() != ""; })) { $placeholder.addClass("VS-hidden"); } else { $placeholder.removeClass("VS-hidden") @@ -508,6 +508,7 @@ VS.ui.SearchBox = Backbone.View.extend({ return view.isFocused(); }); if (!focus) this.$('.VS-search-box').removeClass('VS-focus'); + this.renderPlaceholder(); }, // Show a menu which adds pre-defined facets to the search box. This is unused for now. diff --git a/lib/js/views/search_box.js b/lib/js/views/search_box.js index 2af7213..8d0f7ba 100644 --- a/lib/js/views/search_box.js +++ b/lib/js/views/search_box.js @@ -197,7 +197,7 @@ VS.ui.SearchBox = Backbone.View.extend({ // Handles showing/hiding the placeholder text renderPlaceholder : function() { var $placeholder = this.$('.VS-placeholder'); - if (this.app.searchQuery.length) { + if (this.app.searchQuery.length || _.any(this.inputViews, function(view) { return view.value() != ""; })) { $placeholder.addClass("VS-hidden"); } else { $placeholder.removeClass("VS-hidden") @@ -427,6 +427,7 @@ VS.ui.SearchBox = Backbone.View.extend({ return view.isFocused(); }); if (!focus) this.$('.VS-search-box').removeClass('VS-focus'); + this.renderPlaceholder(); }, // Show a menu which adds pre-defined facets to the search box. This is unused for now. From a7f50f4bfd02800e71f5480a1b25f23ec14911d5 Mon Sep 17 00:00:00 2001 From: Dan Le Date: Thu, 25 Sep 2014 16:59:27 -0400 Subject: [PATCH 2/2] Hide cancel(clear) button when search box empty --- build-min/visualsearch-datauri.css | 2 +- build-min/visualsearch-datauri.css.gz | Bin 2750 -> 2759 bytes build-min/visualsearch.css | 2 +- build-min/visualsearch.css.gz | Bin 1741 -> 1763 bytes build-min/visualsearch.js | 6 +++--- build-min/visualsearch.js.gz | Bin 8437 -> 8497 bytes build-min/visualsearch_templates.js | 2 +- build-min/visualsearch_templates.js.gz | Bin 368 -> 374 bytes build/visualsearch-datauri.css | 3 ++- build/visualsearch.css | 7 ++++--- build/visualsearch.js | 17 +++++++++++++++-- lib/css/workspace.css | 3 ++- lib/js/templates/search_box.jst | 4 ++-- lib/js/templates/templates.js | 2 +- lib/js/views/search_box.js | 15 ++++++++++++++- 15 files changed, 46 insertions(+), 17 deletions(-) diff --git a/build-min/visualsearch-datauri.css b/build-min/visualsearch-datauri.css index 51f2a32..10fd65b 100644 --- a/build-min/visualsearch-datauri.css +++ b/build-min/visualsearch-datauri.css @@ -1 +1 @@ -.VS-search .VS-icon{background-repeat:no-repeat;background-position:center center;vertical-align:middle;width:16px;height:16px}.VS-search .VS-icon-cancel{width:11px;height:11px;background-position:center 0;background-image:url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAWCAYAAAAW5GZjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAb9JREFUeNqUUr1qAkEQ3j0khQp6kihaeGgEEa18gTQR0iRY+BaBSMDGwidIEUKqFL6BopgqBAJ5AMFGjUU0d4WHEvwJarvZ77gRIzGYgb1hZr+Z75vZ40IIzqTNZrPj8Xicn0wmmcViEXS73aaqqq+BQODG6/W+A8MBNk3zfDAY3C6Xy0O2ZS6X6zMSiVwHg8FHLjtq7Xb7RQKj7BeTzVCgJ5PJU2U0GhUk7REuMpkMi8fjFggeMeecrVYrFRId0CgTAgDDMFg4HLbA8IjJgHNgGEr0er0fQIphUmZAwdSUADUB4RFDsz3oSMF6CLzZkQqgGebz+Z75dDqNdTqdp13bgDmdTj2VSp0oWHg0Gr2UNH2Z/9o+yMv7K4/HY/C/XhDUfr//jl7QQVT9fp/V63VWqVRYt9tliUSCZbPZg1wux9Lp9PqFeK1Wu9A0DdXz7YM87i0FrVZLs4Fi1wmFQh/NZjOmVKvVgq7rR/QflMtlixGedjwcDlUpMQ9tbzalkAAB2/R297mNW+sT2wUbUnA//V/nYrH4QOBNABUQuFQq3TNMuc82sDVrz41G42yvPeODAwZQ0QzwiJEnzLcAAwBJ6WXlwoBgZAAAAABJRU5ErkJggg==");cursor:pointer}.VS-search .VS-icon-cancel:hover{background-position:center -11px}.VS-search .VS-icon-search{width:12px;height:12px;background-image:url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUZJREFUeNpUUM2qgmAQzS8NiUgLzTIXLZQW1QuI9AY9QPSW9gQ9QiriwpJQEBVrVWT2d7p2L9xZzDdzZs7M+YYqy/J8Ptu2vd/v4zgeDAaqqk4mE47jar9GnU6nzWbjOA5FUa/Xq0Jns9l8Pud5vkpp58cwAOzhcBhFkeu6GNztdg3D+Db5vo9nOp2iiWGYTqdDCMFe4LquI0aVpGmKR9M0lmUbjQY8YiBJklTb4YkoilBzOBzq9TogeMQIJEmqmlAlo9EIyXa7tSyrKAp4xEBkWUb5q2k8Hh+PR8/zwjCEgufz+aESstvtoKnVan2GgY31kBkEAfT1ej1FUZDiNIIgrFYr9H1ug3teLpfH43G/3/FBUJGu1+s8z8FZLpc0mmiabrfbf5fEumazuVgsTNO8Xq+3242qRNT+G0CMz7IMzH6//xZgAA60tj6rqzxpAAAAAElFTkSuQmCC")}.VS-search div,.VS-search span,.VS-search a,.VS-search img,.VS-search ul,.VS-search li,.VS-search form,.VS-search label,.VS-interface ul,.VS-interface li,.VS-interface{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}.VS-search :focus{outline:0}.VS-search{line-height:1;color:black}.VS-search ol,.VS-search ul{list-style:none}.VS-search{font-family:Arial,sans-serif;color:#373737;font-size:12px}.VS-search input{display:block;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;outline:none;margin:0;padding:4px;background:transparent;font-size:16px;line-height:20px;width:100%}.VS-interface,.VS-search .dialog,.VS-search input{font-family:"Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,sans-serif!important;line-height:1.1em}.VS-search .VS-search-box{cursor:text;position:relative;background:transparent;border:2px solid #ccc;border-radius:16px;-webkit-border-radius:16px;-moz-border-radius:16px;background-color:#fafafa;-webkit-box-shadow:inset 0 0 3px #ccc;-moz-box-shadow:inset 0 0 3px #ccc;box-shadow:inset 0 0 3px #ccc;min-height:28px;height:auto}.VS-search.VS-readonly .VS-search-box{cursor:default}.VS-search .VS-search-box.VS-focus{border-color:#acf;-webkit-box-shadow:inset 0 0 3px #acf;-moz-box-shadow:inset 0 0 3px #acf;box-shadow:inset 0 0 3px #acf}.VS-search .VS-placeholder{position:absolute;top:7px;left:4px;margin:0 20px 0 22px;color:#808080;font-size:14px}.VS-search .VS-search-box.VS-focus .VS-placeholder,.VS-search .VS-search-box .VS-placeholder.VS-hidden{display:none}.VS-search .VS-search-inner{position:relative;margin:0 20px 0 22px;overflow:hidden}.VS-search input{width:100px}.VS-search input,.VS-search .VS-input-width-tester{padding:6px 0;float:left;color:#808080;font:13px/17px Helvetica,Arial}.VS-search.VS-focus input{color:#606060}.VS-search .VS-icon-search{position:absolute;left:9px;top:8px}.VS-search .VS-icon-cancel{position:absolute;right:9px;top:8px}.VS-search.VS-readonly .VS-icon-cancel{display:none}.VS-search .search_facet{float:left;margin:0;padding:0 0 0 14px;position:relative;border:1px solid transparent;height:20px;margin:3px -3px 3px 0}.VS-search.VS-readonly .search_facet{padding-left:0}.VS-search .search_facet.is_selected{margin-left:-3px;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;background-color:#d2e6fd;background-image:-moz-linear-gradient(top,#d2e6fd,#b0d1f9);background-image:-webkit-gradient(linear,left top,left bottom,from(#d2e6fd),to(#b0d1f9));background-image:linear-gradient(top,#d2e6fd,#b0d1f9);border:1px solid #6eadf5}.VS-search .search_facet .category{float:left;text-transform:uppercase;font-weight:bold;font-size:10px;color:#808080;padding:8px 0 5px;line-height:13px;cursor:pointer;padding:4px 0 0}.VS-search.VS-readonly .search_facet .category{cursor:default}.VS-search .search_facet.is_selected .category{margin-left:3px}.VS-search .search_facet .search_facet_input_container{float:left}.VS-search .search_facet input{margin:0;padding:0;color:#000;font-size:13px;line-height:16px;padding:5px 0 5px 4px;height:16px;width:auto;z-index:100;position:relative;padding-top:1px;padding-bottom:2px;padding-right:3px}.VS-search .search_facet.is_editing input,.VS-search .search_facet.is_selected input{color:#000}.VS-search.VS-readonly .search_facet .search_facet_remove{display:none}.VS-search .search_facet .search_facet_remove{position:absolute;left:0;top:4px}.VS-search .search_facet.is_selected .search_facet_remove{opacity:.4;left:3px;filter:alpha(opacity=40);background-position:center -11px}.VS-search .search_facet .search_facet_remove:hover{opacity:1}.VS-search .search_facet.is_editing .category,.VS-search .search_facet.is_selected .category{color:#000}.VS-search .search_facet.search_facet_maybe_delete .category,.VS-search .search_facet.search_facet_maybe_delete input{color:darkred}.VS-search .search_input{height:28px;float:left;margin-left:-1px}.VS-search .search_input input{padding:6px 3px 6px 2px;line-height:10px;height:22px;margin-top:-4px;width:10px;z-index:100;min-width:4px;position:relative}.VS-search .search_input.is_editing input{color:#202020}.ui-helper-hidden-accessible{display:none}.VS-interface.ui-autocomplete{position:absolute;border:1px solid #C0C0C0;border-top:1px solid #D9D9D9;background-color:#F6F6F6;cursor:pointer;z-index:10000;padding:0;margin:0;width:auto;min-width:80px;max-width:220px;max-height:240px;overflow-y:auto;overflow-x:hidden;font-size:13px;top:5px;opacity:.97;box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5);-webkit-box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5);-moz-box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5)}.VS-interface.ui-autocomplete .ui-autocomplete-category{text-transform:capitalize;font-size:11px;padding:4px 4px 4px;border-top:1px solid #A2A2A2;border-bottom:1px solid #A2A2A2;background-color:#B7B7B7;text-shadow:0 -1px 0 #999;font-weight:bold;color:white;cursor:default}.VS-interface.ui-autocomplete .ui-menu-item{float:none}.VS-interface.ui-autocomplete .ui-menu-item a{color:#000;outline:none;display:block;padding:3px 4px 5px;border-radius:none;line-height:1;background-color:#F8F8F8;background-image:-moz-linear-gradient(top,#F8F8F8,#F3F3F3);background-image:-webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#F3F3F3));background-image:linear-gradient(top,#F8F8F8,#F3F3F3);border-top:1px solid #FAFAFA;border-bottom:1px solid #f0f0f0}.VS-interface.ui-autocomplete .ui-menu-item a:active{outline:none}.VS-interface.ui-autocomplete .ui-menu-item .ui-state-hover,.VS-interface.ui-autocomplete .ui-menu-item .ui-state-focus{background-color:#6483F7;background-image:-moz-linear-gradient(top,#648bF5,#2465f3);background-image:-webkit-gradient(linear,left top,left bottom,from(#648bF5),to(#2465f3));background-image:linear-gradient(top,#648bF5,#2465f3);border-top:1px solid #5b83ec;border-bottom:1px solid #1459e9;border-left:none;border-right:none;color:white;margin:0}.VS-interface.ui-autocomplete .ui-corner-all{border-radius:0}.VS-interface.ui-autocomplete li{list-style:none;width:auto} \ No newline at end of file +.VS-search .VS-icon{background-repeat:no-repeat;background-position:center center;vertical-align:middle;width:16px;height:16px}.VS-search .VS-icon-cancel{width:11px;height:11px;background-position:center 0;background-image:url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAWCAYAAAAW5GZjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAb9JREFUeNqUUr1qAkEQ3j0khQp6kihaeGgEEa18gTQR0iRY+BaBSMDGwidIEUKqFL6BopgqBAJ5AMFGjUU0d4WHEvwJarvZ77gRIzGYgb1hZr+Z75vZ40IIzqTNZrPj8Xicn0wmmcViEXS73aaqqq+BQODG6/W+A8MBNk3zfDAY3C6Xy0O2ZS6X6zMSiVwHg8FHLjtq7Xb7RQKj7BeTzVCgJ5PJU2U0GhUk7REuMpkMi8fjFggeMeecrVYrFRId0CgTAgDDMFg4HLbA8IjJgHNgGEr0er0fQIphUmZAwdSUADUB4RFDsz3oSMF6CLzZkQqgGebz+Z75dDqNdTqdp13bgDmdTj2VSp0oWHg0Gr2UNH2Z/9o+yMv7K4/HY/C/XhDUfr//jl7QQVT9fp/V63VWqVRYt9tliUSCZbPZg1wux9Lp9PqFeK1Wu9A0DdXz7YM87i0FrVZLs4Fi1wmFQh/NZjOmVKvVgq7rR/QflMtlixGedjwcDlUpMQ9tbzalkAAB2/R297mNW+sT2wUbUnA//V/nYrH4QOBNABUQuFQq3TNMuc82sDVrz41G42yvPeODAwZQ0QzwiJEnzLcAAwBJ6WXlwoBgZAAAAABJRU5ErkJggg==");cursor:pointer}.VS-search .VS-icon-cancel:hover{background-position:center -11px}.VS-search .VS-icon-search{width:12px;height:12px;background-image:url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUZJREFUeNpUUM2qgmAQzS8NiUgLzTIXLZQW1QuI9AY9QPSW9gQ9QiriwpJQEBVrVWT2d7p2L9xZzDdzZs7M+YYqy/J8Ptu2vd/v4zgeDAaqqk4mE47jar9GnU6nzWbjOA5FUa/Xq0Jns9l8Pud5vkpp58cwAOzhcBhFkeu6GNztdg3D+Db5vo9nOp2iiWGYTqdDCMFe4LquI0aVpGmKR9M0lmUbjQY8YiBJklTb4YkoilBzOBzq9TogeMQIJEmqmlAlo9EIyXa7tSyrKAp4xEBkWUb5q2k8Hh+PR8/zwjCEgufz+aESstvtoKnVan2GgY31kBkEAfT1ej1FUZDiNIIgrFYr9H1ug3teLpfH43G/3/FBUJGu1+s8z8FZLpc0mmiabrfbf5fEumazuVgsTNO8Xq+3242qRNT+G0CMz7IMzH6//xZgAA60tj6rqzxpAAAAAElFTkSuQmCC")}.VS-search div,.VS-search span,.VS-search a,.VS-search img,.VS-search ul,.VS-search li,.VS-search form,.VS-search label,.VS-interface ul,.VS-interface li,.VS-interface{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}.VS-search :focus{outline:0}.VS-search{line-height:1;color:black}.VS-search ol,.VS-search ul{list-style:none}.VS-search{font-family:Arial,sans-serif;color:#373737;font-size:12px}.VS-search input{display:block;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;outline:none;margin:0;padding:4px;background:transparent;font-size:16px;line-height:20px;width:100%}.VS-interface,.VS-search .dialog,.VS-search input{font-family:"Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,sans-serif!important;line-height:1.1em}.VS-search .VS-search-box{cursor:text;position:relative;background:transparent;border:2px solid #ccc;border-radius:16px;-webkit-border-radius:16px;-moz-border-radius:16px;background-color:#fafafa;-webkit-box-shadow:inset 0 0 3px #ccc;-moz-box-shadow:inset 0 0 3px #ccc;box-shadow:inset 0 0 3px #ccc;min-height:28px;height:auto}.VS-search.VS-readonly .VS-search-box{cursor:default}.VS-search .VS-search-box.VS-focus{border-color:#acf;-webkit-box-shadow:inset 0 0 3px #acf;-moz-box-shadow:inset 0 0 3px #acf;box-shadow:inset 0 0 3px #acf}.VS-search .VS-placeholder{position:absolute;top:7px;left:4px;margin:0 20px 0 22px;color:#808080;font-size:14px}.VS-search .VS-search-box.VS-focus .VS-placeholder,.VS-search .VS-search-box .VS-placeholder.VS-hidden,.VS-search .VS-search-box .VS-cancel-search-box.VS-hidden{display:none}.VS-search .VS-search-inner{position:relative;margin:0 20px 0 22px;overflow:hidden}.VS-search input{width:100px}.VS-search input,.VS-search .VS-input-width-tester{padding:6px 0;float:left;color:#808080;font:13px/17px Helvetica,Arial}.VS-search.VS-focus input{color:#606060}.VS-search .VS-icon-search{position:absolute;left:9px;top:8px}.VS-search .VS-icon-cancel{position:absolute;right:9px;top:8px}.VS-search.VS-readonly .VS-icon-cancel{display:none}.VS-search .search_facet{float:left;margin:0;padding:0 0 0 14px;position:relative;border:1px solid transparent;height:20px;margin:3px -3px 3px 0}.VS-search.VS-readonly .search_facet{padding-left:0}.VS-search .search_facet.is_selected{margin-left:-3px;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;background-color:#d2e6fd;background-image:-moz-linear-gradient(top,#d2e6fd,#b0d1f9);background-image:-webkit-gradient(linear,left top,left bottom,from(#d2e6fd),to(#b0d1f9));background-image:linear-gradient(top,#d2e6fd,#b0d1f9);border:1px solid #6eadf5}.VS-search .search_facet .category{float:left;text-transform:uppercase;font-weight:bold;font-size:10px;color:#808080;padding:8px 0 5px;line-height:13px;cursor:pointer;padding:4px 0 0}.VS-search.VS-readonly .search_facet .category{cursor:default}.VS-search .search_facet.is_selected .category{margin-left:3px}.VS-search .search_facet .search_facet_input_container{float:left}.VS-search .search_facet input{margin:0;padding:0;color:#000;font-size:13px;line-height:16px;padding:5px 0 5px 4px;height:16px;width:auto;z-index:100;position:relative;padding-top:1px;padding-bottom:2px;padding-right:3px}.VS-search .search_facet.is_editing input,.VS-search .search_facet.is_selected input{color:#000}.VS-search.VS-readonly .search_facet .search_facet_remove{display:none}.VS-search .search_facet .search_facet_remove{position:absolute;left:0;top:4px}.VS-search .search_facet.is_selected .search_facet_remove{opacity:.4;left:3px;filter:alpha(opacity=40);background-position:center -11px}.VS-search .search_facet .search_facet_remove:hover{opacity:1}.VS-search .search_facet.is_editing .category,.VS-search .search_facet.is_selected .category{color:#000}.VS-search .search_facet.search_facet_maybe_delete .category,.VS-search .search_facet.search_facet_maybe_delete input{color:darkred}.VS-search .search_input{height:28px;float:left;margin-left:-1px}.VS-search .search_input input{padding:6px 3px 6px 2px;line-height:10px;height:22px;margin-top:-4px;width:10px;z-index:100;min-width:4px;position:relative}.VS-search .search_input.is_editing input{color:#202020}.ui-helper-hidden-accessible{display:none}.VS-interface.ui-autocomplete{position:absolute;border:1px solid #C0C0C0;border-top:1px solid #D9D9D9;background-color:#F6F6F6;cursor:pointer;z-index:10000;padding:0;margin:0;width:auto;min-width:80px;max-width:220px;max-height:240px;overflow-y:auto;overflow-x:hidden;font-size:13px;top:5px;opacity:.97;box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5);-webkit-box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5);-moz-box-shadow:3px 4px 5px -2px rgba(0,0,0,0.5)}.VS-interface.ui-autocomplete .ui-autocomplete-category{text-transform:capitalize;font-size:11px;padding:4px 4px 4px;border-top:1px solid #A2A2A2;border-bottom:1px solid #A2A2A2;background-color:#B7B7B7;text-shadow:0 -1px 0 #999;font-weight:bold;color:white;cursor:default}.VS-interface.ui-autocomplete .ui-menu-item{float:none}.VS-interface.ui-autocomplete .ui-menu-item a{color:#000;outline:none;display:block;padding:3px 4px 5px;border-radius:none;line-height:1;background-color:#F8F8F8;background-image:-moz-linear-gradient(top,#F8F8F8,#F3F3F3);background-image:-webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#F3F3F3));background-image:linear-gradient(top,#F8F8F8,#F3F3F3);border-top:1px solid #FAFAFA;border-bottom:1px solid #f0f0f0}.VS-interface.ui-autocomplete .ui-menu-item a:active{outline:none}.VS-interface.ui-autocomplete .ui-menu-item .ui-state-hover,.VS-interface.ui-autocomplete .ui-menu-item .ui-state-focus{background-color:#6483F7;background-image:-moz-linear-gradient(top,#648bF5,#2465f3);background-image:-webkit-gradient(linear,left top,left bottom,from(#648bF5),to(#2465f3));background-image:linear-gradient(top,#648bF5,#2465f3);border-top:1px solid #5b83ec;border-bottom:1px solid #1459e9;border-left:none;border-right:none;color:white;margin:0}.VS-interface.ui-autocomplete .ui-corner-all{border-radius:0}.VS-interface.ui-autocomplete li{list-style:none;width:auto} \ No newline at end of file diff --git a/build-min/visualsearch-datauri.css.gz b/build-min/visualsearch-datauri.css.gz index 937ea1e8bb39ddbc08165c0ac3b7673aa81a9a13..d699e99a699348ed3e852e3fc983510a0fde0622 100644 GIT binary patch literal 2759 zcm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(%{M diff --git a/build-min/visualsearch.js b/build-min/visualsearch.js index 8a95f17..e8e1f77 100644 --- a/build-min/visualsearch.js +++ b/build-min/visualsearch.js @@ -1,11 +1,11 @@ (function(){var $=jQuery;if(!window.VS)window.VS={};if(!VS.app)VS.app={};if(!VS.ui)VS.ui={};if(!VS.model)VS.model={};if(!VS.utils)VS.utils={};VS.VERSION='0.5.0';VS.VisualSearch=function(options){var defaults={container:'',query:'',autosearch:true,unquotable:[],remainder:'text',showFacets:true,readOnly:false,callbacks:{search:$.noop,focus:$.noop,blur:$.noop,facetMatches:$.noop,valueMatches:$.noop,clearSearch:$.noop,removedFacet:$.noop}};this.options=_.extend({},defaults,options);this.options.callbacks=_.extend({},defaults.callbacks,options.callbacks);VS.app.hotkeys.initialize();this.searchQuery=new VS.model.SearchQuery();this.searchBox=new VS.ui.SearchBox({app:this,showFacets:this.options.showFacets});if(options.container){var searchBox=this.searchBox.render().el;$(this.options.container).html(searchBox);} this.searchBox.value(this.options.query||'');$(window).bind('unload',function(e){});return this;};VS.init=function(options){return new VS.VisualSearch(options);};})();(function(){var $=jQuery;VS.ui.SearchBox=Backbone.View.extend({id:'search',events:{'click .VS-cancel-search-box':'clearSearch','mousedown .VS-search-box':'maybeFocusSearch','dblclick .VS-search-box':'highlightSearch','click .VS-search-box':'maybeTripleClick'},initialize:function(options){this.options=_.extend({},this.options,options);this.app=this.options.app;this.flags={allSelected:false};this.facetViews=[];this.inputViews=[];_.bindAll(this,'renderFacets','_maybeDisableFacets','disableFacets','deselectAllFacets','addedFacet','removedFacet','changedFacet');this.app.searchQuery.bind('reset',this.renderFacets).bind('add',this.addedFacet).bind('remove',this.removedFacet).bind('change',this.changedFacet);$(document).bind('keydown',this._maybeDisableFacets);},render:function(){$(this.el).append(JST['search_box']({readOnly:this.app.options.readOnly}));$(document.body).setMode('no','search');return this;},value:function(query){if(query==null)return this.serialize();return this.setQuery(query);},serialize:function(){var query=[];var inputViewsCount=this.inputViews.length;this.app.searchQuery.each(_.bind(function(facet,i){query.push(this.inputViews[i].value());query.push(facet.serialize());},this));if(inputViewsCount){query.push(this.inputViews[inputViewsCount-1].value());} -return _.compact(query).join(' ');},selected:function(){return _.select(this.facetViews,function(view){return view.modes.editing=='is'||view.modes.selected=='is';});},selectedModels:function(){return _.pluck(this.selected(),'model');},setQuery:function(query){this.currentQuery=query;VS.app.SearchParser.parse(this.app,query);},viewPosition:function(view){var views=view.type=='facet'?this.facetViews:this.inputViews;var position=_.indexOf(views,view);if(position==-1)position=0;return position;},searchEvent:function(e){var query=this.value();this.focusSearch(e);this.value(query);this.app.options.callbacks.search(query,this.app.searchQuery);},addFacet:function(category,initialQuery,position){category=VS.utils.inflector.trim(category);initialQuery=VS.utils.inflector.trim(initialQuery||'');if(!category)return;var model=new VS.model.SearchFacet({category:category,value:initialQuery||'',app:this.app});this.app.searchQuery.add(model,{at:position});},addedFacet:function(model){this.renderFacets();var facetView=_.detect(this.facetViews,function(view){if(view.model==model)return true;});_.defer(function(){facetView.enableEdit();});},changedFacet:function(){this.renderFacets();},removedFacet:function(facet,query,options){this.app.options.callbacks.removedFacet(facet,query,options);},renderFacets:function(){this.facetViews=[];this.inputViews=[];this.$('.VS-search-inner').empty();this.app.searchQuery.each(_.bind(this.renderFacet,this));this.renderSearchInput();this.renderPlaceholder();},renderFacet:function(facet,position){var view=new VS.ui.SearchFacet({app:this.app,model:facet,order:position});this.renderSearchInput();this.facetViews.push(view);this.$('.VS-search-inner').children().eq(position*2).after(view.render().el);view.calculateSize();_.defer(_.bind(view.calculateSize,view));return view;},renderSearchInput:function(){var input=new VS.ui.SearchInput({position:this.inputViews.length,app:this.app,showFacets:this.options.showFacets});this.$('.VS-search-inner').append(input.render().el);this.inputViews.push(input);},renderPlaceholder:function(){var $placeholder=this.$('.VS-placeholder');if(this.app.searchQuery.length||_.any(this.inputViews,function(view){return view.value()!="";})){$placeholder.addClass("VS-hidden");}else{$placeholder.removeClass("VS-hidden").text(this.app.options.placeholder);}},clearSearch:function(e){if(this.app.options.readOnly)return;var actualClearSearch=_.bind(function(){this.disableFacets();this.value('');this.flags.allSelected=false;this.searchEvent(e);this.focusSearch(e);},this);if(this.app.options.callbacks.clearSearch!=$.noop){this.app.options.callbacks.clearSearch(actualClearSearch);}else{actualClearSearch();}},selectAllFacets:function(){this.flags.allSelected=true;$(document).one('click.selectAllFacets',this.deselectAllFacets);_.each(this.facetViews,function(facetView,i){facetView.selectFacet();});_.each(this.inputViews,function(inputView,i){inputView.selectText();});},allSelected:function(deselect){if(deselect)this.flags.allSelected=false;return this.flags.allSelected;},deselectAllFacets:function(e){this.disableFacets();if(this.$(e.target).is('.category,input')){var el=$(e.target).closest('.search_facet,.search_input');var view=_.detect(this.facetViews.concat(this.inputViews),function(v){return v.el==el[0];});if(view.type=='facet'){view.selectFacet();}else if(view.type=='input'){_.defer(function(){view.enableEdit(true);});}}},disableFacets:function(keepView){_.each(this.inputViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();}});_.each(this.facetViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();view.deselectFacet();}});this.flags.allSelected=false;this.removeFocus();$(document).unbind('click.selectAllFacets');},resizeFacets:function(view){_.each(this.facetViews,function(facetView,i){if(!view||facetView==view){facetView.resize();}});},_maybeDisableFacets:function(e){if(this.flags.allSelected&&VS.app.hotkeys.key(e)=='backspace'){e.preventDefault();this.clearSearch(e);return false;}else if(this.flags.allSelected&&VS.app.hotkeys.printable(e)){this.clearSearch(e);}},focusNextFacet:function(currentView,direction,options){options=options||{};var viewCount=this.facetViews.length;var viewPosition=options.viewPosition||this.viewPosition(currentView);if(!options.skipToFacet){if(currentView.type=='text'&&direction>0)direction-=1;if(currentView.type=='facet'&&direction<0)direction+=1;}else if(options.skipToFacet&¤tView.type=='text'&&viewCount==viewPosition&&direction>=0){return false;} +return _.compact(query).join(' ');},selected:function(){return _.select(this.facetViews,function(view){return view.modes.editing=='is'||view.modes.selected=='is';});},selectedModels:function(){return _.pluck(this.selected(),'model');},setQuery:function(query){this.currentQuery=query;VS.app.SearchParser.parse(this.app,query);},viewPosition:function(view){var views=view.type=='facet'?this.facetViews:this.inputViews;var position=_.indexOf(views,view);if(position==-1)position=0;return position;},searchEvent:function(e){var query=this.value();this.focusSearch(e);this.value(query);this.app.options.callbacks.search(query,this.app.searchQuery);},addFacet:function(category,initialQuery,position){category=VS.utils.inflector.trim(category);initialQuery=VS.utils.inflector.trim(initialQuery||'');if(!category)return;var model=new VS.model.SearchFacet({category:category,value:initialQuery||'',app:this.app});this.app.searchQuery.add(model,{at:position});},addedFacet:function(model){this.renderFacets();var facetView=_.detect(this.facetViews,function(view){if(view.model==model)return true;});_.defer(function(){facetView.enableEdit();});},changedFacet:function(){this.renderFacets();},removedFacet:function(facet,query,options){this.app.options.callbacks.removedFacet(facet,query,options);},renderFacets:function(){this.facetViews=[];this.inputViews=[];this.$('.VS-search-inner').empty();this.app.searchQuery.each(_.bind(this.renderFacet,this));this.renderSearchInput();this.renderCancel();this.renderPlaceholder();},renderFacet:function(facet,position){var view=new VS.ui.SearchFacet({app:this.app,model:facet,order:position});this.renderSearchInput();this.facetViews.push(view);this.$('.VS-search-inner').children().eq(position*2).after(view.render().el);view.calculateSize();_.defer(_.bind(view.calculateSize,view));return view;},renderSearchInput:function(){var input=new VS.ui.SearchInput({position:this.inputViews.length,app:this.app,showFacets:this.options.showFacets});this.$('.VS-search-inner').append(input.render().el);this.inputViews.push(input);},_isSearchEmpty:function(){var hasSearchInputs=_.any(this.inputViews,function(view){return view.value().length});return this.app.searchQuery.length||hasSearchInputs;},renderPlaceholder:function(){var $placeholder=this.$('.VS-placeholder');if(this._isSearchEmpty()){$placeholder.addClass("VS-hidden");}else{$placeholder.removeClass("VS-hidden").text(this.app.options.placeholder);}},renderCancel:function(){var hideCancel=!this._isSearchEmpty();this.$('.VS-cancel-search-box').toggleClass("VS-hidden",hideCancel);},clearSearch:function(e){if(this.app.options.readOnly)return;var actualClearSearch=_.bind(function(){this.disableFacets();this.value('');this.flags.allSelected=false;this.searchEvent(e);this.focusSearch(e);},this);if(this.app.options.callbacks.clearSearch!=$.noop){this.app.options.callbacks.clearSearch(actualClearSearch);}else{actualClearSearch();}},selectAllFacets:function(){this.flags.allSelected=true;$(document).one('click.selectAllFacets',this.deselectAllFacets);_.each(this.facetViews,function(facetView,i){facetView.selectFacet();});_.each(this.inputViews,function(inputView,i){inputView.selectText();});},allSelected:function(deselect){if(deselect)this.flags.allSelected=false;return this.flags.allSelected;},deselectAllFacets:function(e){this.disableFacets();if(this.$(e.target).is('.category,input')){var el=$(e.target).closest('.search_facet,.search_input');var view=_.detect(this.facetViews.concat(this.inputViews),function(v){return v.el==el[0];});if(view.type=='facet'){view.selectFacet();}else if(view.type=='input'){_.defer(function(){view.enableEdit(true);});}}},disableFacets:function(keepView){_.each(this.inputViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();}});_.each(this.facetViews,function(view){if(view&&view!=keepView&&(view.modes.editing=='is'||view.modes.selected=='is')){view.disableEdit();view.deselectFacet();}});this.flags.allSelected=false;this.removeFocus();$(document).unbind('click.selectAllFacets');},resizeFacets:function(view){_.each(this.facetViews,function(facetView,i){if(!view||facetView==view){facetView.resize();}});},_maybeDisableFacets:function(e){if(this.flags.allSelected&&VS.app.hotkeys.key(e)=='backspace'){e.preventDefault();this.clearSearch(e);return false;}else if(this.flags.allSelected&&VS.app.hotkeys.printable(e)){this.clearSearch(e);}},focusNextFacet:function(currentView,direction,options){options=options||{};var viewCount=this.facetViews.length;var viewPosition=options.viewPosition||this.viewPosition(currentView);if(!options.skipToFacet){if(currentView.type=='text'&&direction>0)direction-=1;if(currentView.type=='facet'&&direction<0)direction+=1;}else if(options.skipToFacet&¤tView.type=='text'&&viewCount==viewPosition&&direction>=0){return false;} var view,next=Math.min(viewCount,viewPosition+direction);if(currentView.type=='text'){if(next>=0&&next=viewCount||next<0){view=_.last(this.inputViews);view.enableEdit();}else{view=this.facetViews[next];view.enableEdit();view.setCursorAtEnd(direction||options.startAtEnd);}}else{view=this.inputViews[next];view.enableEdit();}} if(options.selectText)view.selectText();this.resizeFacets();return true;},maybeFocusSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){this.focusSearch(e);}},focusSearch:function(e,selectText){if(this.app.options.readOnly)return;var view=this.inputViews[this.inputViews.length-1];view.enableEdit(selectText);if(!selectText)view.setCursorAtEnd(-1);if(e.type=='keydown'){view.keydown(e);view.box.trigger('keydown');} -_.defer(_.bind(function(){if(!this.$('input:focus').length){view.enableEdit(selectText);}},this));},highlightSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){var lastinput=this.inputViews[this.inputViews.length-1];lastinput.startTripleClickTimer();this.focusSearch(e,true);}},maybeTripleClick:function(e){var lastinput=this.inputViews[this.inputViews.length-1];return lastinput.maybeTripleClick(e);},addFocus:function(){if(this.app.options.readOnly)return;this.app.options.callbacks.focus();this.$('.VS-search-box').addClass('VS-focus');},removeFocus:function(){this.app.options.callbacks.blur();var focus=_.any(this.facetViews.concat(this.inputViews),function(view){return view.isFocused();});if(!focus)this.$('.VS-search-box').removeClass('VS-focus');this.renderPlaceholder();},showFacetCategoryMenu:function(e){e.preventDefault();e.stopPropagation();if(this.facetCategoryMenu&&this.facetCategoryMenu.modes.open=='is'){return this.facetCategoryMenu.close();} +_.defer(_.bind(function(){if(!this.$('input:focus').length){view.enableEdit(selectText);}},this));},highlightSearch:function(e){if(this.app.options.readOnly)return;if($(e.target).is('.VS-search-box')||$(e.target).is('.VS-search-inner')||e.type=='keydown'){var lastinput=this.inputViews[this.inputViews.length-1];lastinput.startTripleClickTimer();this.focusSearch(e,true);}},maybeTripleClick:function(e){var lastinput=this.inputViews[this.inputViews.length-1];return lastinput.maybeTripleClick(e);},addFocus:function(){if(this.app.options.readOnly)return;this.app.options.callbacks.focus();this.$('.VS-search-box').addClass('VS-focus');},removeFocus:function(){this.app.options.callbacks.blur();var focus=_.any(this.facetViews.concat(this.inputViews),function(view){return view.isFocused();});if(!focus)this.$('.VS-search-box').removeClass('VS-focus');this.renderCancel();this.renderPlaceholder();},showFacetCategoryMenu:function(e){e.preventDefault();e.stopPropagation();if(this.facetCategoryMenu&&this.facetCategoryMenu.modes.open=='is'){return this.facetCategoryMenu.close();} var items=[{title:'Account',onClick:_.bind(this.addFacet,this,'account','')},{title:'Project',onClick:_.bind(this.addFacet,this,'project','')},{title:'Filter',onClick:_.bind(this.addFacet,this,'filter','')},{title:'Access',onClick:_.bind(this.addFacet,this,'access','')}];var menu=this.facetCategoryMenu||(this.facetCategoryMenu=new dc.ui.Menu({items:items,standalone:true}));this.$('.VS-icon-search').after(menu.render().open().content);return false;}});})();(function(){var $=jQuery;VS.ui.SearchFacet=Backbone.View.extend({type:'facet',className:'search_facet',events:{'click .category':'selectFacet','keydown input':'keydown','mousedown input':'enableEdit','mouseover .VS-icon-cancel':'showDelete','mouseout .VS-icon-cancel':'hideDelete','click .VS-icon-cancel':'remove'},initialize:function(options){this.options=_.extend({},this.options,options);this.flags={canClose:false};_.bindAll(this,'set','keydown','deselectFacet','deferDisableEdit');this.app=this.options.app;},render:function(){$(this.el).html(JST['search_facet']({model:this.model,readOnly:this.app.options.readOnly}));this.setMode('not','editing');this.setMode('not','selected');this.box=this.$('input');this.box.val(this.model.label());this.box.bind('blur',this.deferDisableEdit);this.box.bind('input propertychange',this.keydown);this.setupAutocomplete();return this;},calculateSize:function(){this.box.autoGrowInput();this.box.unbind('updated.autogrow');this.box.bind('updated.autogrow',_.bind(this.moveAutocomplete,this));},resize:function(e){this.box.trigger('resize.autogrow',e);},setupAutocomplete:function(){this.box.autocomplete({source:_.bind(this.autocompleteValues,this),minLength:0,delay:0,autoFocus:true,position:{offset:"0 5"},create:_.bind(function(e,ui){$(this.el).find('.ui-autocomplete-input').css('z-index','auto');},this),select:_.bind(function(e,ui){e.preventDefault();var originalValue=this.model.get('value');this.set(ui.item.value);if(originalValue!=ui.item.value||this.box.val()!=ui.item.value){if(this.app.options.autosearch){this.search(e);}else{this.app.searchBox.renderFacets();this.app.searchBox.focusNextFacet(this,1,{viewPosition:this.options.order});}} return false;},this),open:_.bind(function(e,ui){var box=this.box;this.box.autocomplete('widget').find('.ui-menu-item').each(function(){var $value=$(this),autoCompleteData=$value.data('item.autocomplete')||$value.data('ui-autocomplete-item');if(autoCompleteData['value']==box.val()&&box.data('ui-autocomplete').menu.activate){box.data('ui-autocomplete').menu.activate(new $.Event("mouseover"),$value);}});},this)});this.box.autocomplete('widget').addClass('VS-interface');},moveAutocomplete:function(){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete){autocomplete.menu.element.position({my:"left top",at:"left bottom",of:this.box.data('ui-autocomplete').element,collision:"flip",offset:"0 5"});}},searchAutocomplete:function(e){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete){var menu=autocomplete.menu.element;autocomplete.search();menu.outerWidth(Math.max(menu.width('').outerWidth(),autocomplete.element.outerWidth()));}},closeAutocomplete:function(){var autocomplete=this.box.data('ui-autocomplete');if(autocomplete)autocomplete.close();},autocompleteValues:function(req,resp){var category=this.model.get('category');var value=this.model.get('value');var searchTerm=req.term;this.app.options.callbacks.valueMatches(category,searchTerm,function(matches,options){options=options||{};matches=matches||[];if(searchTerm&&value!=searchTerm){if(options.preserveMatches){resp(matches);}else{var re=VS.utils.inflector.escapeRegExp(searchTerm||'');var matcher=new RegExp('\\b'+re,'i');matches=$.grep(matches,function(item){return matcher.test(item)||matcher.test(item.value)||matcher.test(item.label);});}} if(options.preserveOrder){resp(matches);}else{resp(_.sortBy(matches,function(match){if(match==value||match.value==value)return'';else return match;}));}});},set:function(value){if(!value)return;this.model.set({'value':value});},search:function(e,direction){if(!direction)direction=1;this.closeAutocomplete();this.app.searchBox.searchEvent(e);_.defer(_.bind(function(){this.app.searchBox.focusNextFacet(this,direction,{viewPosition:this.options.order});},this));},enableEdit:function(){if(this.app.options.readOnly)return;if(this.modes.editing!='is'){this.setMode('is','editing');this.deselectFacet();if(this.box.val()==''){this.box.val(this.model.get('value'));}} @@ -33,4 +33,4 @@ if(category&&value){var searchFacet=new VS.model.SearchFacet({category:category, if(originalQuery==query)break;} return facets;},_extractNextField:function(query){var textRe=new RegExp('^\\s*(\\S+)\\s+(?='+QUOTES_RE+FREETEXT_RE+')');var textMatch=query.match(textRe);if(textMatch&&textMatch.length>=1){return textMatch[1];}else{return this._extractFirstField(query);}},_extractFirstField:function(query){var fields=query.match(this.ALL_FIELDS);return fields&&fields.length&&fields[0];},_extractSearchText:function(query){query=query||'';var text=VS.utils.inflector.trim(query.replace(this.ALL_FIELDS,''));return text;}};})();(function(){var $=jQuery;VS.model.SearchFacet=Backbone.Model.extend({serialize:function(){var category=this.quoteCategory(this.get('category'));var value=VS.utils.inflector.trim(this.get('value'));var remainder=this.get("app").options.remainder;if(!value)return'';if(!_.contains(this.get("app").options.unquotable||[],category)&&category!=remainder){value=this.quoteValue(value);} if(category!=remainder){category=category+': ';}else{category="";} -return category+value;},quoteCategory:function(category){var hasDoubleQuote=(/"/).test(category);var hasSingleQuote=(/'/).test(category);var hasSpace=(/\s/).test(category);if(hasDoubleQuote&&!hasSingleQuote){return"'"+category+"'";}else if(hasSpace||(hasSingleQuote&&!hasDoubleQuote)){return'"'+category+'"';}else{return category;}},quoteValue:function(value){var hasDoubleQuote=(/"/).test(value);var hasSingleQuote=(/'/).test(value);if(hasDoubleQuote&&!hasSingleQuote){return"'"+value+"'";}else{return'"'+value+'"';}},label:function(){return this.get('label')||this.get('value');}});})();(function(){var $=jQuery;VS.model.SearchQuery=Backbone.Collection.extend({model:VS.model.SearchFacet,serialize:function(){return this.map(function(facet){return facet.serialize();}).join(' ');},facets:function(){return this.map(function(facet){var value={};value[facet.get('category')]=facet.get('value');return value;});},find:function(category){var facet=this.detect(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();});return facet&&facet.get('value');},count:function(category){return this.select(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();}).length;},values:function(category){var facets=this.select(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();});return _.map(facets,function(facet){return facet.get('value');});},has:function(category,value){return this.any(function(facet){var categoryMatched=facet.get('category').toLowerCase()==category.toLowerCase();if(!value)return categoryMatched;return categoryMatched&&facet.get('value')==value;});},withoutCategory:function(){var categories=_.map(_.toArray(arguments),function(cat){return cat.toLowerCase();});return this.map(function(facet){if(!_.include(categories,facet.get('category').toLowerCase())){return facet.serialize();};}).join(' ');}});})();(function(){window.JST=window.JST||{};window.JST['search_box']=_.template('');window.JST['search_facet']=_.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
');window.JST['search_input']=_.template('disabled="disabled"<% } %> />');})(); \ No newline at end of file +return category+value;},quoteCategory:function(category){var hasDoubleQuote=(/"/).test(category);var hasSingleQuote=(/'/).test(category);var hasSpace=(/\s/).test(category);if(hasDoubleQuote&&!hasSingleQuote){return"'"+category+"'";}else if(hasSpace||(hasSingleQuote&&!hasDoubleQuote)){return'"'+category+'"';}else{return category;}},quoteValue:function(value){var hasDoubleQuote=(/"/).test(value);var hasSingleQuote=(/'/).test(value);if(hasDoubleQuote&&!hasSingleQuote){return"'"+value+"'";}else{return'"'+value+'"';}},label:function(){return this.get('label')||this.get('value');}});})();(function(){var $=jQuery;VS.model.SearchQuery=Backbone.Collection.extend({model:VS.model.SearchFacet,serialize:function(){return this.map(function(facet){return facet.serialize();}).join(' ');},facets:function(){return this.map(function(facet){var value={};value[facet.get('category')]=facet.get('value');return value;});},find:function(category){var facet=this.detect(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();});return facet&&facet.get('value');},count:function(category){return this.select(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();}).length;},values:function(category){var facets=this.select(function(facet){return facet.get('category').toLowerCase()==category.toLowerCase();});return _.map(facets,function(facet){return facet.get('value');});},has:function(category,value){return this.any(function(facet){var categoryMatched=facet.get('category').toLowerCase()==category.toLowerCase();if(!value)return categoryMatched;return categoryMatched&&facet.get('value')==value;});},withoutCategory:function(){var categories=_.map(_.toArray(arguments),function(cat){return cat.toLowerCase();});return this.map(function(facet){if(!_.include(categories,facet.get('category').toLowerCase())){return facet.serialize();};}).join(' ');}});})();(function(){window.JST=window.JST||{};window.JST['search_box']=_.template('\n');window.JST['search_facet']=_.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
');window.JST['search_input']=_.template('disabled="disabled"<% } %> />');})(); \ No newline at end of file diff --git a/build-min/visualsearch.js.gz b/build-min/visualsearch.js.gz index 34bb68c8146c477a04aecca06c218d74ea0e56ec..e78312958a9a17e84612c199f0f60675e32f59e4 100644 GIT binary patch literal 8497 zcmV-1A&TCEpk6tUd8j) zZuHyV7s>o)m`?ni>ogx1*S!yif&3LM*Hrc4uour}0sEsBF4BPh)rzLYILQL>Lx-)> ztPI2ttbpGi4&EQWefM+Z^?OfxeUFOLauH{TNjx82MsmEx4F8mD*yCgpFR}`djEcO9 z(>$3EJTLr&Q^6ncqAE&4FsSB>BwXa57DW}GXUX9BG@K_>Xfnn&Rr0y=!t%1XeiM(9 zs$}5vBp$!Zvzx&r&dMYl#aVV9k3N=zB}cm3%Zp+bPKwc@6c6XwVlFEX*-vpbx=dvK zRh%snt8A13zC!~i46e9J#xxvWwq6gb%e3rq5=3V`7j9AzSR;Wl?=hZpvPor&Stf>Aw=6cfyE4{1fHLbxW*y?@(2kus;-^1>_>-U{K~S zp`!u98B3v0M3t`tWGFdavHpxPR5xa?y?KHQ?gzaj8}9lhjUL}XGJ{rLdnEQu!P~ylWH-~TZm;yn*d4c;B*eh38rrg z2?Ood0noT{Ut5%pet@+-FY*M?CD)QA((%A!lk~#mD#?NROK+5=qmL~R0(+x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sv<{*wI%t4Yy>=*HZ1< z$?)^wnY=zYRQ9=XRhfBL+14v&?7N0MF>D0r!Zztfo{jI`KLzw9txhMjwBgX-ILFrp zV)a@{uczNNF@oHNgr~_v9Q``8z@<;lu93h~HDt-@+7d$DmSbxS$;lJ#z{9qZ%MEUAxC#Z_h?8w{$n? z_SKZ&LCbsD#d;muO&OPgT!jyUZlICDgDoQTi#vj7Kie6HhDdKGmysLMPAh%!=^d!R zjzUEOV@g~@^V!6dfYs&^r_DkTc#CIa|Lk^^cH^V-S{Q&?Aq{9L5%_LppA7MTTG<>f z+G=*+5l`xwMl1w~Nm%^8gO3ko8_w~ZBp)&*_l$FqANh-Y{37mq z#K5EH;)!;3V9~IF6S^V_S2+`OY*mwAFTlJ$dJUX%hI}i`P|ND<6?=yW7T`S z1MQ-1a>bD>J`pM0RDU~uo#>zRlA(T7@2=wqHqL-1b#^_+3)Dr}QM`YuKE%;^`e!)i zI-$zX@2on1eg@T8P(lIJZ=j_6>~z-Ycv0ZDJPt4hInNdytCSlxn&H<0I`$VCy26R& zg*QHax)sj+R?SvGYXJP20(|6O=J-4Gp^KzT-;C=thbn(b51ely#Qp#FQZUi^u!3zI zo+_p}1qGAVz@@i-MfmBTla9WG%4!PjMru&Ja;G!+Y2dLgB?VSG1$&SMa`|_=CER_)& X>x{+p?lX}\n \n');window.JST['search_facet']=_.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
');window.JST['search_input']=_.template('disabled="disabled"<% } %> />');})(); \ No newline at end of file +(function(){window.JST=window.JST||{};window.JST['search_box']=_.template('\n');window.JST['search_facet']=_.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
');window.JST['search_input']=_.template('disabled="disabled"<% } %> />');})(); \ No newline at end of file diff --git a/build-min/visualsearch_templates.js.gz b/build-min/visualsearch_templates.js.gz index d1309fd30fe99b91c746e72adf29983d8f1a4649..a3dc4686c0516ed09289a21fd7855a986b2e9ac2 100644 GIT binary patch delta 356 zcmV-q0h|8t0`>w3ABzY8c7P;Qkq8}s?1flz>?m<~2>ADIUgZ_2)RWh{Gv3)9zxb=l z2&b&^gTq!CX}9CI#Yc1wkH^DldcJ;nCGtX~$L zu*Jb_1Zo9-fn2^Dy$|33qdAr9grx-4Pn2Qv*Z>SZ5mKvgTkt%`05is&NZxdjKgIMbJ{$=&q^6d;OKwx)>V@ zFW$M7l_--}E}@k;u9^)tU7IXZxP4B;JKQ<;mACdal$iDsVA>@XS}mJehC+~ z7ET%+M!U7txmge2W*^Bp-0ydX@%j1{RLHGZW^=O%zLRX|uqYLG7zUGEu0SYWRSEl? z#U2Nf0mub}7J2@z)i#1145m~*CJZI0exMASrW&C4iI`f&Ys5e9Uh0)NS zEt*XyBLel~Nx#6QQ90VDxVEv>`VZih0Kv6Db-eoMQa?E96edh4%E7(VF7js(^%=1s z@$S|Nzx2Z7sD?{kg=rwD@MG*Y4I=Ns?Y=tz^&ceQsXyqhsl zm$l1i4UWrZYfaZC3vOG|=ngkcjy>i=E#m@p-K{~w`PTY?7pFyboAqu1MFD}1zB*X&%06g8RZ2$lO diff --git a/build/visualsearch-datauri.css b/build/visualsearch-datauri.css index 54e39ac..3ff0e90 100644 --- a/build/visualsearch-datauri.css +++ b/build/visualsearch-datauri.css @@ -111,7 +111,8 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ font-size: 14px; } .VS-search .VS-search-box.VS-focus .VS-placeholder, - .VS-search .VS-search-box .VS-placeholder.VS-hidden { + .VS-search .VS-search-box .VS-placeholder.VS-hidden, + .VS-search .VS-search-box .VS-cancel-search-box.VS-hidden { display: none; } .VS-search .VS-search-inner { diff --git a/build/visualsearch.css b/build/visualsearch.css index 06083fe..2191089 100644 --- a/build/visualsearch.css +++ b/build/visualsearch.css @@ -7,7 +7,7 @@ .VS-search .VS-icon-cancel { width: 11px; height: 11px; background-position: center 0; - background-image: url(../images/embed/icons/cancel_search.png?1311104738); + background-image: url(../images/embed/icons/cancel_search.png?1411660636); cursor: pointer; } .VS-search .VS-icon-cancel:hover { @@ -15,7 +15,7 @@ } .VS-search .VS-icon-search { width: 12px; height: 12px; - background-image: url(../images/embed/icons/search_glyph.png?1311104738); + background-image: url(../images/embed/icons/search_glyph.png?1411660636); } /*------------------------------ RESET + DEFAULT STYLES ---------------------------------*/ @@ -111,7 +111,8 @@ Source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ font-size: 14px; } .VS-search .VS-search-box.VS-focus .VS-placeholder, - .VS-search .VS-search-box .VS-placeholder.VS-hidden { + .VS-search .VS-search-box .VS-placeholder.VS-hidden, + .VS-search .VS-search-box .VS-cancel-search-box.VS-hidden { display: none; } .VS-search .VS-search-inner { diff --git a/build/visualsearch.js b/build/visualsearch.js index 8d51a5f..ce3a0a7 100644 --- a/build/visualsearch.js +++ b/build/visualsearch.js @@ -242,6 +242,7 @@ VS.ui.SearchBox = Backbone.View.extend({ // Add on an n+1 empty search input on the very end. this.renderSearchInput(); + this.renderCancel(); this.renderPlaceholder(); }, @@ -275,10 +276,15 @@ VS.ui.SearchBox = Backbone.View.extend({ this.inputViews.push(input); }, + _isSearchEmpty : function() { + var hasSearchInputs = _.any(this.inputViews, function(view) { return view.value().length }); + return this.app.searchQuery.length || hasSearchInputs; + }, + // Handles showing/hiding the placeholder text renderPlaceholder : function() { var $placeholder = this.$('.VS-placeholder'); - if (this.app.searchQuery.length || _.any(this.inputViews, function(view) { return view.value() != ""; })) { + if (this._isSearchEmpty()) { $placeholder.addClass("VS-hidden"); } else { $placeholder.removeClass("VS-hidden") @@ -286,6 +292,12 @@ VS.ui.SearchBox = Backbone.View.extend({ } }, + // Handles showing/hiding the search box cancel/clear button + renderCancel : function() { + var hideCancel = !this._isSearchEmpty(); + this.$('.VS-cancel-search-box').toggleClass("VS-hidden", hideCancel); + }, + // # Modifying Facets # // Clears out the search box. Command+A + delete can trigger this, as can a cancel button. @@ -508,6 +520,7 @@ VS.ui.SearchBox = Backbone.View.extend({ return view.isFocused(); }); if (!focus) this.$('.VS-search-box').removeClass('VS-focus'); + this.renderCancel(); this.renderPlaceholder(); }, @@ -1964,7 +1977,7 @@ VS.model.SearchQuery = Backbone.Collection.extend({ (function(){ window.JST = window.JST || {}; -window.JST['search_box'] = _.template(''); +window.JST['search_box'] = _.template('\n'); window.JST['search_facet'] = _.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
'); window.JST['search_input'] = _.template('disabled="disabled"<% } %> />'); })(); \ No newline at end of file diff --git a/lib/css/workspace.css b/lib/css/workspace.css index 498d6ff..1e18174 100644 --- a/lib/css/workspace.css +++ b/lib/css/workspace.css @@ -60,7 +60,8 @@ font-size: 14px; } .VS-search .VS-search-box.VS-focus .VS-placeholder, - .VS-search .VS-search-box .VS-placeholder.VS-hidden { + .VS-search .VS-search-box .VS-placeholder.VS-hidden, + .VS-search .VS-search-box .VS-cancel-search-box.VS-hidden { display: none; } .VS-search .VS-search-inner { diff --git a/lib/js/templates/search_box.jst b/lib/js/templates/search_box.jst index 137075f..df709b3 100644 --- a/lib/js/templates/search_box.jst +++ b/lib/js/templates/search_box.jst @@ -3,6 +3,6 @@
- + - \ No newline at end of file + diff --git a/lib/js/templates/templates.js b/lib/js/templates/templates.js index 9c3e33b..5f0173c 100644 --- a/lib/js/templates/templates.js +++ b/lib/js/templates/templates.js @@ -1,7 +1,7 @@ (function(){ window.JST = window.JST || {}; -window.JST['search_box'] = _.template(''); +window.JST['search_box'] = _.template('\n'); window.JST['search_facet'] = _.template('<% if (model.has(\'category\')) { %>\n
<%= model.get(\'category\') %>:
\n<% } %>\n\n
\n disabled="disabled"<% } %> />\n
\n\n
'); window.JST['search_input'] = _.template('disabled="disabled"<% } %> />'); })(); \ No newline at end of file diff --git a/lib/js/views/search_box.js b/lib/js/views/search_box.js index 8d0f7ba..f751da9 100644 --- a/lib/js/views/search_box.js +++ b/lib/js/views/search_box.js @@ -161,6 +161,7 @@ VS.ui.SearchBox = Backbone.View.extend({ // Add on an n+1 empty search input on the very end. this.renderSearchInput(); + this.renderCancel(); this.renderPlaceholder(); }, @@ -194,10 +195,15 @@ VS.ui.SearchBox = Backbone.View.extend({ this.inputViews.push(input); }, + _isSearchEmpty : function() { + var hasSearchInputs = _.any(this.inputViews, function(view) { return view.value().length }); + return this.app.searchQuery.length || hasSearchInputs; + }, + // Handles showing/hiding the placeholder text renderPlaceholder : function() { var $placeholder = this.$('.VS-placeholder'); - if (this.app.searchQuery.length || _.any(this.inputViews, function(view) { return view.value() != ""; })) { + if (this._isSearchEmpty()) { $placeholder.addClass("VS-hidden"); } else { $placeholder.removeClass("VS-hidden") @@ -205,6 +211,12 @@ VS.ui.SearchBox = Backbone.View.extend({ } }, + // Handles showing/hiding the search box cancel/clear button + renderCancel : function() { + var hideCancel = !this._isSearchEmpty(); + this.$('.VS-cancel-search-box').toggleClass("VS-hidden", hideCancel); + }, + // # Modifying Facets # // Clears out the search box. Command+A + delete can trigger this, as can a cancel button. @@ -427,6 +439,7 @@ VS.ui.SearchBox = Backbone.View.extend({ return view.isFocused(); }); if (!focus) this.$('.VS-search-box').removeClass('VS-focus'); + this.renderCancel(); this.renderPlaceholder(); },