2013-06-22 06:24:24 +00:00
|
|
|
|
'use strict';
|
2013-06-19 01:02:23 +00:00
|
|
|
|
|
|
|
|
|
define([
|
|
|
|
|
'app',
|
|
|
|
|
'marionette',
|
|
|
|
|
'Settings/Notifications/EditView'
|
|
|
|
|
], function (App, Marionette, EditView) {
|
|
|
|
|
|
|
|
|
|
return Marionette.ItemView.extend({
|
|
|
|
|
template: 'Settings/Notifications/AddItemTemplate',
|
|
|
|
|
tagName : 'li',
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
'click': 'addNotification'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
|
this.notificationCollection = options.notificationCollection;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addNotification: function () {
|
|
|
|
|
this.model.set('id', undefined);
|
|
|
|
|
var editView = new EditView({ model: this.model, notificationCollection: this.notificationCollection });
|
|
|
|
|
App.modalRegion.show(editView);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|