فهرست منبع

[search] Fix for a parse problem with a generalized JSON.bigdataParse approach

Enrico Berti 10 سال پیش
والد
کامیت
0d0cf3c
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 1
      apps/search/src/search/static/search/js/search.ko.js
  2. 0 2
      apps/search/src/search/templates/search.mako

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

@@ -1327,6 +1327,7 @@ var SearchViewModel = function (collection_json, query_json, initial_json) {
         query: ko.mapping.toJSON(self.query),
         layout: ko.mapping.toJSON(self.columns)
       }, function (data) {
+        data = JSON.bigdataParse(data);
 
         if (typeof callback != undefined && callback != null){
           callback(data);
@@ -1410,7 +1411,8 @@ var SearchViewModel = function (collection_json, query_json, initial_json) {
           }
           self.resultsHash = _resultsHash;
         }
-      })
+      },
+      "text")
       ].concat(multiQs)
     )
     .done(function() {

+ 0 - 2
apps/search/src/search/templates/search.mako

@@ -1906,8 +1906,6 @@ ${ dashboard.import_charts() }
 
 <script type="text/javascript" charset="utf-8">
 
-JSON.parse = JSON.bigdataParse; // this is to avoid problems with hue Solr IDs
-
 var viewModel;
 
 nv.dev = false;