+ /**
+ * Get an object which represents this collection's criteria
+ * as a live model. Any changes to the model will be applied
+ * to the collection, and the collection will be refreshed.
+ *
+ * @param criteriaModelClass
+ */
+ setCriteriaModel: function(criteriaModel) {
+ var collection = this;
+ this.crmCriteria = criteriaModel.toJSON();
+ this.listenTo(criteriaModel, 'change', function() {
+ collection.crmCriteria = criteriaModel.toJSON();
+ collection.debouncedFetch();
+ });
+ },
+
+ debouncedFetch: _.debounce(function() {
+ this.fetch({reset: true});
+ }, 100),
+