|
@@ -449,6 +449,7 @@ var Collection = function (vm, collection) {
|
|
|
self.name = ko.mapping.fromJS(collection.name);
|
|
self.name = ko.mapping.fromJS(collection.name);
|
|
|
self.label = ko.mapping.fromJS(collection.label);
|
|
self.label = ko.mapping.fromJS(collection.label);
|
|
|
self.description = ko.observable(typeof collection.description != "undefined" && collection.description != null ? collection.description : "");
|
|
self.description = ko.observable(typeof collection.description != "undefined" && collection.description != null ? collection.description : "");
|
|
|
|
|
+ self.suggest = ko.mapping.fromJS(collection.suggest);
|
|
|
self.enabled = ko.mapping.fromJS(collection.enabled);
|
|
self.enabled = ko.mapping.fromJS(collection.enabled);
|
|
|
self.autorefresh = ko.mapping.fromJS(collection.autorefresh);
|
|
self.autorefresh = ko.mapping.fromJS(collection.autorefresh);
|
|
|
self.autorefreshSeconds = ko.mapping.fromJS(collection.autorefreshSeconds || 60);
|
|
self.autorefreshSeconds = ko.mapping.fromJS(collection.autorefreshSeconds || 60);
|
|
@@ -459,7 +460,7 @@ var Collection = function (vm, collection) {
|
|
|
});
|
|
});
|
|
|
self.timeFilter.from.subscribe(function () {
|
|
self.timeFilter.from.subscribe(function () {
|
|
|
vm.search();
|
|
vm.search();
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
self.timeFilter.to.subscribe(function () {
|
|
self.timeFilter.to.subscribe(function () {
|
|
|
vm.search();
|
|
vm.search();
|
|
|
});
|
|
});
|
|
@@ -684,7 +685,7 @@ var Collection = function (vm, collection) {
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
self.addFacet = function (facet_json) {
|
|
self.addFacet = function (facet_json) {
|
|
|
self.removeFacet(function(){return facet_json.widget_id});
|
|
self.removeFacet(function(){return facet_json.widget_id});
|
|
|
logGA('add_facet/' + facet_json.widgetType);
|
|
logGA('add_facet/' + facet_json.widgetType);
|
|
@@ -970,7 +971,7 @@ var Collection = function (vm, collection) {
|
|
|
syncArray(self.fields, data.collection.collection.fields, false);
|
|
syncArray(self.fields, data.collection.collection.fields, false);
|
|
|
}
|
|
}
|
|
|
// After sync the dynamic fields
|
|
// After sync the dynamic fields
|
|
|
- self.syncDynamicFields()
|
|
|
|
|
|
|
+ self.syncDynamicFields();
|
|
|
}).fail(function (xhr, textStatus, errorThrown) {});
|
|
}).fail(function (xhr, textStatus, errorThrown) {});
|
|
|
};
|
|
};
|
|
|
|
|
|