mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07:00
More notificationUI changes, start notification updates
This commit is contained in:
parent
c5376319fe
commit
63f2ba7f77
16 changed files with 188 additions and 78 deletions
|
@ -2,32 +2,28 @@
|
|||
|
||||
define([
|
||||
'app',
|
||||
'Settings/Notifications/Collection'
|
||||
'Settings/Notifications/Collection',
|
||||
'Settings/Notifications/EditView'
|
||||
|
||||
], function () {
|
||||
|
||||
NzbDrone.Settings.Notifications.ItemView = Backbone.Marionette.ItemView.extend({
|
||||
template : 'Settings/Notifications/ItemTemplate',
|
||||
initialize: function () {
|
||||
NzbDrone.vent.on(NzbDrone.Commands.SaveSettings, this.saveSettings, this);
|
||||
tagName: 'tr',
|
||||
|
||||
events: {
|
||||
'click .x-edit' : 'edit',
|
||||
'click .x-remove': 'remove'
|
||||
},
|
||||
|
||||
saveSettings: function () {
|
||||
|
||||
//this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings"));
|
||||
edit: function () {
|
||||
var view = new NzbDrone.Settings.Notifications.EditView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
},
|
||||
|
||||
|
||||
syncNotification: function (success, error) {
|
||||
return {
|
||||
success: function () {
|
||||
window.alert(success);
|
||||
},
|
||||
|
||||
error: function () {
|
||||
window.alert(error);
|
||||
}
|
||||
};
|
||||
remove: function () {
|
||||
var view = new NzbDrone.Settings.Notifications.DeleteView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue