1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 20:42:37 +01:00
Radarr/UI/Settings/Notifications/AddItemView.js
Mark McDowall e1272b4f34 Notification and Indexer settings are enabled by default on add
NzbClub and omgwtfnzbs are off by default
2013-08-01 08:25:09 -07:00

38 lines
978 B
JavaScript

'use strict';
define([
'app',
'marionette',
'Settings/Notifications/EditView'
], function (App, Marionette, EditView) {
return Marionette.ItemView.extend({
template: 'Settings/Notifications/AddItemTemplate',
tagName : 'li',
events: {
'click': 'addNotification'
},
initialize: function (options) {
this.notificationCollection = options.notificationCollection;
},
addNotification: function (e) {
if ($(e.target).hasClass('icon-info-sign')) {
return;
}
this.model.set({
id: undefined,
name: this.model.get('implementationName'),
onGrab: true,
onDownload: true
});
var editView = new EditView({ model: this.model, notificationCollection: this.notificationCollection });
App.modalRegion.show(editView);
}
});
});