2012-11-09 19:28:59 +03:00
|
|
|
QualityProfileView = Backbone.Marionette.ItemView.extend({
|
|
|
|
tagName: "div",
|
|
|
|
className: "quality-profile",
|
2012-11-24 11:03:38 +03:00
|
|
|
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({ });
|
|
|
|
}
|
2012-11-07 03:41:34 +03:00
|
|
|
});
|
|
|
|
|
2012-11-09 19:28:59 +03:00
|
|
|
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);
|
|
|
|
//},
|
|
|
|
|
2012-11-07 03:41:34 +03:00
|
|
|
initialize: function () {
|
2012-11-09 19:28:59 +03:00
|
|
|
_.bindAll(this, 'render');
|
|
|
|
this.collection = new QualityProfileCollection();
|
|
|
|
this.collection.fetch();
|
|
|
|
this.collection.bind('reset', this.render);
|
2012-11-07 03:41:34 +03:00
|
|
|
}
|
|
|
|
});
|