2013-03-14 03:26:30 +03:00
|
|
|
'use strict';
|
|
|
|
define(['app', 'Quality/QualityProfileModel'], function () {
|
|
|
|
|
|
|
|
NzbDrone.Settings.Quality.Profile.EditQualityProfileView = Backbone.Marionette.ItemView.extend({
|
2013-03-30 02:28:58 +03:00
|
|
|
template : 'Settings/Quality/Profile/EditQualityProfileTemplate',
|
2013-03-14 03:26:30 +03:00
|
|
|
|
|
|
|
events: {
|
2013-04-08 02:15:04 +03:00
|
|
|
'click .x-save': 'saveQualityProfile'
|
2013-03-14 03:26:30 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
saveQualityProfile: function () {
|
|
|
|
//Todo: Make sure model is updated with Allowed, Cutoff, Name
|
|
|
|
|
|
|
|
this.model.save();
|
|
|
|
this.trigger('saved');
|
2013-05-29 09:24:45 +03:00
|
|
|
NzbDrone.modalRegion.closeModal();
|
2013-04-08 02:15:04 +03:00
|
|
|
}
|
2013-03-14 03:26:30 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|