2013-05-20 04:19:54 +00:00
|
|
|
|
'use strict';
|
2013-05-25 06:38:43 +00:00
|
|
|
|
define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddView'], function () {
|
2013-05-20 04:19:54 +00:00
|
|
|
|
NzbDrone.Settings.Notifications.CollectionView = Backbone.Marionette.CompositeView.extend({
|
|
|
|
|
itemView : NzbDrone.Settings.Notifications.ItemView,
|
2013-05-21 06:16:19 +00:00
|
|
|
|
itemViewContainer : 'tbody',
|
2013-05-25 06:38:43 +00:00
|
|
|
|
template : 'Settings/Notifications/CollectionTemplate',
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
'click .x-add': function () {
|
|
|
|
|
var schema = new NzbDrone.Settings.Notifications.Collection();
|
|
|
|
|
schema.url = '/api/notification/schema';
|
|
|
|
|
schema.fetch();
|
|
|
|
|
|
|
|
|
|
var view = new NzbDrone.Settings.Notifications.AddView({ collection: schema});
|
|
|
|
|
NzbDrone.modalRegion.show(view);
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-05-20 04:19:54 +00:00
|
|
|
|
});
|
|
|
|
|
});
|