You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Settings/Notifications/AddItemView.js

38 lines
1001 B

'use strict';
define([
'AppLayout',
'marionette',
'Settings/Notifications/EditView'
], function (AppLayout, 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 (this.$(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 });
AppLayout.modalRegion.show(editView);
}
});
});