Fixed notifications re GH feedback.

This commit is contained in:
Mark McDowall 2013-05-25 17:36:12 -07:00
parent 3b09cc1240
commit 9ed187202a
2 changed files with 11 additions and 9 deletions

View File

@ -12,10 +12,10 @@ define([
className: 'btn', className: 'btn',
events: { events: {
'click': 'add' 'click': 'addNotification'
}, },
add: function () { addNotification: function () {
this.model.set('id', undefined); this.model.set('id', undefined);
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model}); var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
NzbDrone.modalRegion.show(view); NzbDrone.modalRegion.show(view);

View File

@ -6,7 +6,10 @@ define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddVie
template : 'Settings/Notifications/CollectionTemplate', template : 'Settings/Notifications/CollectionTemplate',
events: { events: {
'click .x-add': function () { 'click .x-add': 'openSchemaModal'
},
openSchemaModal: function () {
var schema = new NzbDrone.Settings.Notifications.Collection(); var schema = new NzbDrone.Settings.Notifications.Collection();
schema.url = '/api/notification/schema'; schema.url = '/api/notification/schema';
schema.fetch(); schema.fetch();
@ -14,6 +17,5 @@ define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddVie
var view = new NzbDrone.Settings.Notifications.AddView({ collection: schema}); var view = new NzbDrone.Settings.Notifications.AddView({ collection: schema});
NzbDrone.modalRegion.show(view); NzbDrone.modalRegion.show(view);
} }
}
}); });
}); });