1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/NzbDrone.Web/Scripts/backbone/views/qualityProfiles.js
2012-11-24 00:03:38 -08:00

33 lines
1015 B
JavaScript

QualityProfileView = Backbone.Marionette.ItemView.extend({
tagName: "div",
className: "quality-profile",
template: "#QualityProfileTemplate",
events: {
'click .quality-selectee': 'toggleAllowed'
},
toggleAllowed: function (e) {
//Add to cutoff
//Update model
var checked = $(e.target).attr('checked') != undefined;
this.model.set({ });
}
});
QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({
tagName: "div",
id: "quality-profile-collection",
itemView: QualityProfileView,
template: QualityProfileApp.Constants.Templates.QualityProfileCollection,
//appendHtml: function (collectionView, itemView) {
// collectionView.$('#collection').append(itemView.el);
//},
initialize: function () {
_.bindAll(this, 'render');
this.collection = new QualityProfileCollection();
this.collection.fetch();
this.collection.bind('reset', this.render);
}
});