diff --git a/src/UI/Settings/Indexers/DeleteView.js b/src/UI/Settings/Indexers/DeleteView.js new file mode 100644 index 000000000..b230684eb --- /dev/null +++ b/src/UI/Settings/Indexers/DeleteView.js @@ -0,0 +1,23 @@ +'use strict'; +define( + [ + 'vent', + 'marionette' + ], function (vent, Marionette) { + return Marionette.ItemView.extend({ + template: 'Settings/Indexers/DeleteViewTemplate', + + events: { + 'click .x-confirm-delete': '_removeNotification' + }, + + _removeNotification: function () { + this.model.destroy({ + wait : true, + success: function () { + vent.trigger(vent.Commands.CloseModalCommand); + } + }); + } + }); + }); diff --git a/src/UI/Settings/Indexers/DeleteTemplate.html b/src/UI/Settings/Indexers/DeleteViewTemplate.html similarity index 100% rename from src/UI/Settings/Indexers/DeleteTemplate.html rename to src/UI/Settings/Indexers/DeleteViewTemplate.html diff --git a/src/UI/Settings/Indexers/ItemView.js b/src/UI/Settings/Indexers/ItemView.js index 4f940cfc3..23ab0d00b 100644 --- a/src/UI/Settings/Indexers/ItemView.js +++ b/src/UI/Settings/Indexers/ItemView.js @@ -4,7 +4,7 @@ define( [ 'AppLayout', 'marionette', - 'Settings/Notifications/DeleteView', + 'Settings/Indexers/DeleteView', 'Mixins/AsModelBoundView', 'Mixins/AsValidatedView' ], function (AppLayout, Marionette, DeleteView, AsModelBoundView, AsValidatedView) {