1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Series/Index started in backbone

This commit is contained in:
Mark McDowall
2013-02-09 02:04:18 -08:00
committed by kay.one
parent ace7910f2a
commit eb18d1c4a1
20 changed files with 204 additions and 42 deletions
@@ -0,0 +1,30 @@
'use strict';
/*global NzbDrone, Backbone*/
/// <reference path="../../app.js" />
/// <reference path="../SeriesModel.js" />
/// <reference path="../SeriesCollection.js" />
NzbDrone.Series.Index.SeriesItemView = Backbone.Marionette.ItemView.extend({
template: 'Series/Index/SeriesItemTemplate',
tagName: 'tr',
events: {
'click .x-remove': 'removeSeries',
},
onRender: function () {
NzbDrone.ModelBinder.bind(this.model, this.el);
},
removeSeries: function () {
this.model.destroy({ wait: true });
this.model.collection.remove(this.model);
},
});
NzbDrone.Series.Index.SeriesCollectionView = Backbone.Marionette.CompositeView.extend({
itemView: NzbDrone.Series.Index.SeriesItemView,
template: 'Series/Index/SeriesCollectionTemplate',
tagName: 'table',
className: 'table table-hover',
});