diff options
author | Duda Dornelles <dudassdornelles@gmail.com> | 2015-01-07 11:36:43 -0200 |
---|---|---|
committer | Duda Dornelles <dudassdornelles@gmail.com> | 2015-01-07 11:36:43 -0200 |
commit | 2bcc7203073d71814483b0d6ba797c187048fc1e (patch) | |
tree | 082eaf4f95433a229a99d22969a56bd90211a4fa /web-ui/app/js/search | |
parent | b4bd74e59313cb40638d954a2369a0c9650d75f7 (diff) | |
parent | b0720edaa0d51ee9e807495fa536d890d332c50d (diff) |
Merge pull request #223 from pixelated-project/refactoring-events
Refactoring events on web-ui left-pane
Diffstat (limited to 'web-ui/app/js/search')
-rw-r--r-- | web-ui/app/js/search/search_trigger.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/web-ui/app/js/search/search_trigger.js b/web-ui/app/js/search/search_trigger.js index 8f5bbb86..9f2dd45e 100644 --- a/web-ui/app/js/search/search_trigger.js +++ b/web-ui/app/js/search/search_trigger.js @@ -46,16 +46,14 @@ define( var value = input.val(); input.blur(); if(!_.isEmpty(value)){ - this.trigger(document, events.ui.tag.select, { tag: 'all', skipMailListRefresh: true }); this.trigger(document, events.search.perform, { query: value }); } else { - this.trigger(document, events.ui.tag.select, { tag: 'all'}); this.trigger(document, events.search.empty); } }; - this.clearInput = function(event, data) { - if (!data.skipMailListRefresh) { this.select('input').val(''); } + this.clearInput = function() { + this.select('input').val(''); }; this.showOnlySearchTerms = function(event){ @@ -77,6 +75,7 @@ define( this.on(this.select('input'), 'focus', this.showOnlySearchTerms); this.on(this.select('input'), 'blur', this.showSearchTermsAndPlaceHolder); this.on(document, events.ui.tag.selected, this.clearInput); + this.on(document, events.ui.tag.select, this.clearInput); }); } } |