Purdy Add Notifications

This commit is contained in:
Mark McDowall 2013-05-26 22:27:33 -07:00
parent 8dee1e00e5
commit ff29ab9150
6 changed files with 38 additions and 7 deletions

View file

@ -8,8 +8,7 @@ define([
NzbDrone.Settings.Notifications.AddItemView = Backbone.Marionette.ItemView.extend({
template : 'Settings/Notifications/AddItemTemplate',
tagName : 'button',
className: 'btn',
tagName : 'li',
events: {
'click': 'addNotification'
@ -17,6 +16,7 @@ define([
addNotification: function () {
this.model.set('id', undefined);
this.model.set('name', '');
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
NzbDrone.modalRegion.show(view);
}
@ -24,7 +24,7 @@ define([
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Settings.Notifications.AddItemView,
itemViewContainer : '#notifications-to-add',
itemViewContainer : '.notifications .items',
template : 'Settings/Notifications/AddTemplate'
});
});