Commit 13e65b74 authored by Ryan Eastridge's avatar Ryan Eastridge

update thorax

parent 561b501e
......@@ -1107,14 +1107,7 @@ Thorax.CollectionView = Thorax.HelperView.extend({
} else {
//use last() as appendItem can accept multiple nodes from a template
var last = this.$el.find('[' + modelCidAttributeName + '="' + previousModel.cid + '"]').last();
if (last.length) {
last.after(itemElement);
} else {
//TODO: this is a hack to make item filtering work since the previous
//query may not find an element if it was filtered, should re-write
//filtering and tests to use hide/show
this.$el.prepend(itemElement);
}
last.after(itemElement);
}
this._appendViews(null, function(el) {
el.setAttribute(modelCidAttributeName, model.cid);
......@@ -1125,6 +1118,7 @@ Thorax.CollectionView = Thorax.HelperView.extend({
if (!options.silent) {
this.parent.trigger('rendered:item', this, this.collection, model, itemElement, index);
}
applyItemVisiblityFilter.call(this, model);
}
return itemView;
},
......@@ -1162,6 +1156,7 @@ Thorax.CollectionView = Thorax.HelperView.extend({
}, this);
}
this.parent.trigger('rendered:collection', this, this.collection);
applyVisibilityFilter.call(this);
}
++this._renderCount;
},
......@@ -1324,7 +1319,6 @@ Thorax.View.on({
if (collectionView.$el.length) {
var index = collection.indexOf(model);
collectionView.appendItem(model, index);
applyItemVisiblityFilter.call(collectionView, model);
}
},
remove: function(collectionView, model, collection) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment