Notifications wired up

This commit is contained in:
Mark McDowall 2013-05-28 19:49:17 -07:00
parent e4410d8cb7
commit 1d007be8fd
11 changed files with 174 additions and 64 deletions

View file

@ -3,7 +3,8 @@
define([
'app',
'Settings/Notifications/Collection',
'Settings/Notifications/EditView'
'Settings/Notifications/EditView',
'Settings/Notifications/DeleteView'
], function () {
@ -13,15 +14,15 @@ define([
events: {
'click .x-edit' : 'edit',
'click .x-remove': 'removeNotification'
'click .x-delete': 'deleteNotification'
},
edit: function () {
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model, notificationCollection: this.model.collection});
NzbDrone.modalRegion.show(view);
},
removeNotification: function () {
deleteNotification: function () {
var view = new NzbDrone.Settings.Notifications.DeleteView({ model: this.model});
NzbDrone.modalRegion.show(view);
}