Radarr/UI/Settings/Notifications/AddView.js

31 lines
925 B
JavaScript
Raw Normal View History

2013-05-25 06:38:43 +00:00
"use strict";
define([
'app',
'Settings/Notifications/Model'
], function () {
NzbDrone.Settings.Notifications.AddItemView = Backbone.Marionette.ItemView.extend({
template : 'Settings/Notifications/AddItemTemplate',
2013-05-27 05:27:33 +00:00
tagName : 'li',
2013-05-25 06:38:43 +00:00
events: {
2013-05-26 00:36:12 +00:00
'click': 'addNotification'
2013-05-25 06:38:43 +00:00
},
2013-05-26 00:36:12 +00:00
addNotification: function () {
2013-05-25 06:38:43 +00:00
this.model.set('id', undefined);
2013-05-27 05:27:33 +00:00
this.model.set('name', '');
2013-05-25 06:38:43 +00:00
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,
2013-05-27 05:27:33 +00:00
itemViewContainer : '.notifications .items',
2013-05-25 06:38:43 +00:00
template : 'Settings/Notifications/AddTemplate'
});
});