increase toolbox search delay

log search terms
This commit is contained in:
Martin Cech
2015-03-02 16:39:48 -05:00
parent 86db9034e5
commit 2bf52fe2f9
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -385,13 +385,15 @@ var ToolSearch = Backbone.Model.extend({
$("#search-clear-btn").hide();
$("#search-spinner").show();
var self = this;
// log the search to analytics
ga( 'send', 'pageview', galaxy_config.root + '?q=' + q );
this.timer = setTimeout(function () {
$.get(self.attributes.search_url, { query: q }, function (data) {
self.set("results", data);
$("#search-spinner").hide();
$("#search-clear-btn").show();
}, "json" );
}, 200 );
}, 400 );
},
clear_search: function() {
+3 -1
View File
@@ -385,13 +385,15 @@ var ToolSearch = Backbone.Model.extend({
$("#search-clear-btn").hide();
$("#search-spinner").show();
var self = this;
// log the search to analytics
ga( 'send', 'pageview', galaxy_config.root + '?q=' + q );
this.timer = setTimeout(function () {
$.get(self.attributes.search_url, { query: q }, function (data) {
self.set("results", data);
$("#search-spinner").hide();
$("#search-clear-btn").show();
}, "json" );
}, 200 );
}, 400 );
},
clear_search: function() {
File diff suppressed because one or more lines are too long