mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-25 22:46:31 -04:00
Moved source code under src folder - massive change
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'app',
|
||||
'marionette',
|
||||
'Settings/Notifications/EditView',
|
||||
'Settings/Notifications/DeleteView'
|
||||
|
||||
], function (App, Marionette, EditView, DeleteView) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Settings/Notifications/ItemTemplate',
|
||||
tagName : 'li',
|
||||
|
||||
events: {
|
||||
'click .x-edit' : '_editNotification',
|
||||
'click .x-delete': '_deleteNotification'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(this.model, 'sync', this.render);
|
||||
},
|
||||
|
||||
_editNotification: function () {
|
||||
var view = new EditView({ model: this.model, notificationCollection: this.model.collection});
|
||||
App.modalRegion.show(view);
|
||||
},
|
||||
|
||||
_deleteNotification: function () {
|
||||
var view = new DeleteView({ model: this.model});
|
||||
App.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user