mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
8cac7ed1cd
Notification ImplementationType was added for showing in UI (Humanized/Title cased of Implementation)
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
"use strict";
|
|
|
|
define([
|
|
'app',
|
|
'Settings/Notifications/Model'
|
|
|
|
], function () {
|
|
|
|
NzbDrone.Settings.Notifications.AddItemView = Backbone.Marionette.ItemView.extend({
|
|
template : 'Settings/Notifications/AddItemTemplate',
|
|
tagName : 'li',
|
|
|
|
events: {
|
|
'click': 'addNotification'
|
|
},
|
|
|
|
initialize: function (options) {
|
|
this.notificationCollection = options.notificationCollection;
|
|
},
|
|
|
|
addNotification: function () {
|
|
this.model.set('id', undefined);
|
|
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model, notificationCollection: this.notificationCollection });
|
|
NzbDrone.modalRegion.show(view);
|
|
}
|
|
});
|
|
|
|
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
|
|
itemView : NzbDrone.Settings.Notifications.AddItemView,
|
|
itemViewContainer : '.notifications .items',
|
|
template : 'Settings/Notifications/AddTemplate',
|
|
|
|
itemViewOptions: function () {
|
|
return {
|
|
notificationCollection: this.notificationCollection
|
|
};
|
|
},
|
|
|
|
initialize: function (options) {
|
|
this.notificationCollection = options.notificationCollection;
|
|
}
|
|
});
|
|
});
|