mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 08:33:58 -07:00
Notifications wired up
This commit is contained in:
parent
e4410d8cb7
commit
1d007be8fd
11 changed files with 174 additions and 64 deletions
|
@ -14,10 +14,14 @@ define([
|
|||
'click': 'addNotification'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.notificationCollection = options.notificationCollection;
|
||||
},
|
||||
|
||||
addNotification: function () {
|
||||
this.model.set('id', undefined);
|
||||
this.model.set('name', '');
|
||||
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
|
||||
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model, notificationCollection: this.notificationCollection });
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
|
@ -25,6 +29,16 @@ define([
|
|||
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView : NzbDrone.Settings.Notifications.AddItemView,
|
||||
itemViewContainer : '.notifications .items',
|
||||
template : 'Settings/Notifications/AddTemplate'
|
||||
template : 'Settings/Notifications/AddTemplate',
|
||||
|
||||
itemViewOptions: function () {
|
||||
return {
|
||||
notificationCollection: this.notificationCollection
|
||||
};
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.notificationCollection = options.notificationCollection;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue