|
|
@ -17,7 +17,8 @@ define(
|
|
|
|
'Cells/SeriesStatusCell',
|
|
|
|
'Cells/SeriesStatusCell',
|
|
|
|
'Series/Index/FooterView',
|
|
|
|
'Series/Index/FooterView',
|
|
|
|
'Series/Index/FooterModel',
|
|
|
|
'Series/Index/FooterModel',
|
|
|
|
'Shared/Toolbar/ToolbarLayout'
|
|
|
|
'Shared/Toolbar/ToolbarLayout',
|
|
|
|
|
|
|
|
'Mixins/backbone.signalr.mixin'
|
|
|
|
], function (_,
|
|
|
|
], function (_,
|
|
|
|
Marionette,
|
|
|
|
Marionette,
|
|
|
|
Backgrid,
|
|
|
|
Backgrid,
|
|
|
@ -130,27 +131,23 @@ define(
|
|
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
initialize: function () {
|
|
|
|
this.seriesCollection = SeriesCollection.clone();
|
|
|
|
this.seriesCollection = SeriesCollection.clone();
|
|
|
|
|
|
|
|
this.seriesCollection.shadowCollection.bindSignalR();
|
|
|
|
|
|
|
|
|
|
|
|
this.listenTo(SeriesCollection, 'sync', function (model, collection, options) {
|
|
|
|
this.listenTo(this.seriesCollection.shadowCollection, 'sync', function (model, collection, options) {
|
|
|
|
this.seriesCollection.shadowCollection.add(model, options);
|
|
|
|
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this._renderView();
|
|
|
|
this._renderView();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.listenTo(SeriesCollection, 'add', function (model, collection, options) {
|
|
|
|
this.listenTo(this.seriesCollection.shadowCollection, 'add', function (model, collection, options) {
|
|
|
|
this.seriesCollection.shadowCollection.add(model, options);
|
|
|
|
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this._renderView();
|
|
|
|
this._renderView();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.listenTo(SeriesCollection, 'remove', function (model, collection, options) {
|
|
|
|
this.listenTo(this.seriesCollection.shadowCollection, 'remove', function (model, collection, options) {
|
|
|
|
this.seriesCollection.shadowCollection.remove(model, options);
|
|
|
|
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this.seriesCollection.fullCollection.resetFiltered();
|
|
|
|
this._renderView();
|
|
|
|
this._renderView();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.sortingOptions = {
|
|
|
|
this.sortingOptions = {
|
|
|
|
type : 'sorting',
|
|
|
|
type : 'sorting',
|
|
|
|
storeState : false,
|
|
|
|
storeState : false,
|
|
|
|