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