mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Notification Schema in UI
This commit is contained in:
30
UI/Settings/Notifications/AddView.js
Normal file
30
UI/Settings/Notifications/AddView.js
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
define([
|
||||
'app',
|
||||
'Settings/Notifications/Model'
|
||||
|
||||
], function () {
|
||||
|
||||
NzbDrone.Settings.Notifications.AddItemView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Settings/Notifications/AddItemTemplate',
|
||||
tagName : 'button',
|
||||
className: 'btn',
|
||||
|
||||
events: {
|
||||
'click': 'add'
|
||||
},
|
||||
|
||||
add: function () {
|
||||
this.model.set('id', undefined);
|
||||
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
|
||||
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView : NzbDrone.Settings.Notifications.AddItemView,
|
||||
itemViewContainer : '#notifications-to-add',
|
||||
template : 'Settings/Notifications/AddTemplate'
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user