2013-03-07 08:01:18 +00:00
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
define([
|
2013-03-29 23:28:58 +00:00
|
|
|
|
'app',
|
2013-06-19 01:02:23 +00:00
|
|
|
|
'marionette',
|
2013-03-29 23:28:58 +00:00
|
|
|
|
'Settings/Quality/Profile/EditQualityProfileView'
|
2013-03-07 08:01:18 +00:00
|
|
|
|
|
2013-06-19 01:02:23 +00:00
|
|
|
|
], function (App, Marionette, EditProfileView) {
|
2013-03-07 08:01:18 +00:00
|
|
|
|
|
2013-06-19 01:02:23 +00:00
|
|
|
|
return Marionette.ItemView.extend({
|
2013-03-09 01:55:47 +00:00
|
|
|
|
template: 'Settings/Quality/Profile/QualityProfileTemplate',
|
2013-03-29 23:28:58 +00:00
|
|
|
|
tagName : 'tr',
|
2013-03-07 08:01:18 +00:00
|
|
|
|
|
|
|
|
|
ui: {
|
|
|
|
|
'progressbar': '.progress .bar'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
2013-05-21 06:16:19 +00:00
|
|
|
|
'click .x-edit' : 'edit',
|
2013-05-23 02:39:28 +00:00
|
|
|
|
'click .x-remove': 'removeQuality'
|
2013-03-07 08:01:18 +00:00
|
|
|
|
},
|
|
|
|
|
|
2013-05-21 06:16:19 +00:00
|
|
|
|
edit: function () {
|
2013-06-19 01:02:23 +00:00
|
|
|
|
var view = new EditProfileView({ model: this.model});
|
|
|
|
|
App.modalRegion.show(view);
|
2013-03-07 08:01:18 +00:00
|
|
|
|
},
|
|
|
|
|
|
2013-05-23 02:39:28 +00:00
|
|
|
|
removeQuality: function () {
|
2013-03-07 08:01:18 +00:00
|
|
|
|
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
2013-05-15 01:17:24 +00:00
|
|
|
|
NzbDrone.modalRegion.show(view);
|
2013-03-07 08:01:18 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|