Browse Source

[search] Fix loading spinner on Text facet

Enrico Berti 11 years ago
parent
commit
b6cf638

+ 1 - 1
apps/search/src/search/templates/search2.mako

@@ -253,7 +253,7 @@ ${ commonheader(_('Search'), "search", user, "60px") | n,unicode }
 
   <!-- ko if: $root.getFacetFromQuery(id()) -->
   <div class="row-fluid" data-bind="with: $root.getFacetFromQuery(id())">
-    <div data-bind="visible: $root.isEditing, with: $root.collection.getFacetById($parent.id())" style="margin-bottom: 20px">      
+    <div data-bind="visible: $root.isEditing, template: {data: $root.collection.getFacetById($parent.id()), afterRender: function(){ $parent.isLoading(false);}}" style="margin-bottom: 20px">
       <span data-bind="template: { name: 'facet-toggle' }">
       </span>
     </div>

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

@@ -83,7 +83,7 @@ var Widget = function (size, id, name, widgetType, properties, offset) {
   self.widgetType = ko.observable(typeof widgetType != "undefined" && widgetType != null ? widgetType : "empty-widget");
   self.properties = ko.observable(typeof properties != "undefined" && properties != null ? properties : {});
   self.offset = ko.observable(typeof offset != "undefined" && offset != null ? offset : 0).extend({ numeric: 0 });
-  self.isLoading = ko.observable(false);
+  self.isLoading = ko.observable(true);
 
 
   self.klass = ko.computed(function () {