settings is fully moved to required.

This commit is contained in:
Keivan Beigi 2013-06-18 18:02:23 -07:00
parent 73f3459264
commit 6f8c73771d
54 changed files with 533 additions and 439 deletions

View file

@ -1,34 +1,14 @@
"use strict";
define([
'app',
'Settings/Notifications/Model'
'marionette',
'Settings/Notifications/AddItemView'
], function (Marionette, AddItemView) {
], function () {
NzbDrone.Settings.Notifications.AddItemView = Backbone.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 view = new NzbDrone.Settings.Notifications.EditView({ model: this.model, notificationCollection: this.notificationCollection });
NzbDrone.modalRegion.show(view);
}
});
NzbDrone.Settings.Notifications.AddView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Settings.Notifications.AddItemView,
itemViewContainer : '.notifications .items',
template : 'Settings/Notifications/AddTemplate',
return Marionette.CompositeView.extend({
itemView : AddItemView,
itemViewContainer: '.notifications .items',
template : 'Settings/Notifications/AddTemplate',
itemViewOptions: function () {
return {