1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Settings/Notifications/AddView.js

31 lines
915 B
JavaScript
Raw Normal View History

2013-05-25 09:38:43 +03:00
"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: {
2013-05-26 03:36:12 +03:00
'click': 'addNotification'
2013-05-25 09:38:43 +03:00
},
2013-05-26 03:36:12 +03:00
addNotification: function () {
2013-05-25 09:38:43 +03:00
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'
});
});