Browse Source

[search] Support multi series refresh in timeline

Romain Rigaux 10 years ago
parent
commit
d4288a5c22
1 changed files with 3 additions and 1 deletions
  1. 3 1
      apps/search/src/search/static/search/js/search.ko.js

+ 3 - 1
apps/search/src/search/static/search/js/search.ko.js

@@ -1222,9 +1222,11 @@ var SearchViewModel = function (collection_json, query_json, initial_json) {
     	for(var h = 0; h < histograms.length; h++){ // Do not use $.each here
     	for(var h = 0; h < histograms.length; h++){ // Do not use $.each here
           var histoFacetId = histograms[h].id();
           var histoFacetId = histograms[h].id();
           var histoFacet = self.getFacetFromQuery(histoFacetId);
           var histoFacet = self.getFacetFromQuery(histoFacetId);
+          var _series = [];
           for (var i = 1; i < arguments.length; i++) {
           for (var i = 1; i < arguments.length; i++) {
-            histoFacet.extraSeries.push(arguments[i][0]['series']);
+            _series.push(arguments[i][0]['series']);
           }
           }
+          histoFacet.extraSeries(_series);
         };
         };
         self.response.valueHasMutated();
         self.response.valueHasMutated();
       }
       }