move the logging to the timer function

This commit is contained in:
Martin Cech
2015-03-04 11:04:14 -05:00
parent d2f8172804
commit a5a64c648d
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -385,9 +385,9 @@ 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 () {
// log the search to analytics
ga( 'send', 'pageview', galaxy_config.root + '?q=' + q );
$.get(self.attributes.search_url, { query: q }, function (data) {
self.set("results", data);
$("#search-spinner").hide();
+2 -2
View File
@@ -385,9 +385,9 @@ 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 () {
// log the search to analytics
ga( 'send', 'pageview', galaxy_config.root + '?q=' + q );
$.get(self.attributes.search_url, { query: q }, function (data) {
self.set("results", data);
$("#search-spinner").hide();
File diff suppressed because one or more lines are too long