Sorting on all series views is now working

New: Sorting is now persisted on a per page and browser basis
New: Series lists now support sorting on all views
This commit is contained in:
Mark McDowall
2013-12-27 00:31:34 -08:00
parent 4d6d477947
commit 6ba17782aa
13 changed files with 414 additions and 123 deletions

View File

@@ -11,6 +11,14 @@ define(
'click': 'onClick'
},
_originalInit: Backgrid.HeaderCell.prototype.initialize,
initialize: function (options) {
this._originalInit.call(this, options);
this.listenTo(this.collection, 'drone:sort', this.render);
},
render: function () {
this.$el.empty();
this.$el.append(this.column.get('label'));
@@ -37,6 +45,10 @@ define(
if (key === this.column.get('name')) {
this._setSortIcon(order);
}
else {
this._removeSortIcon();
}
}
return this;