diff --git a/client/chromez-behaviors.js b/client/chromez-behaviors.js index 854d1d4..45acb53 100644 --- a/client/chromez-behaviors.js +++ b/client/chromez-behaviors.js @@ -16,6 +16,7 @@ ChromeZBehaviors.AJAXBehavior = { } } this.push('searchQueries', { + query: clone(query), callbacks: [callback], params: params, key: queryKey, @@ -28,17 +29,17 @@ ChromeZBehaviors.AJAXBehavior = { } }, handleResponse: function(data) { - var query = this.searchQueries[data.model.index]; + var searchQuery = this.searchQueries[data.model.index]; var result = data.detail.response; if (this.onResponse) - result = this.onResponse(result); - if (query.dataCache && JSON.stringify(query.dataCache) == JSON.stringify(result)) { + result = this.onResponse(result, searchQuery.query); + if (searchQuery.dataCache && JSON.stringify(searchQuery.dataCache) == JSON.stringify(result)) { return; } - query.dataCache = result; - query.element = data.target; - for (var i = 0; i < query.callbacks.length; i++) - query.callbacks[i](clone(result)); + searchQuery.dataCache = result; + searchQuery.element = data.target; + for (var i = 0; i < searchQuery.callbacks.length; i++) + searchQuery.callbacks[i](clone(result)); }, } diff --git a/client/cz-component-dash.html b/client/cz-component-dash.html index a0b5c36..bcc6d10 100644 --- a/client/cz-component-dash.html +++ b/client/cz-component-dash.html @@ -44,16 +44,16 @@ text-decoration: none; } - - + +
Owned by us
-