You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/UI/Settings/Notifications/CollectionView.js

22 lines
881 B

'use strict';
define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddView'], function () {
NzbDrone.Settings.Notifications.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Settings.Notifications.ItemView,
itemViewContainer : 'tbody',
template : 'Settings/Notifications/CollectionTemplate',
events: {
'click .x-add': 'openSchemaModal'
},
openSchemaModal: function () {
12 years ago
var schemaCollection = new NzbDrone.Settings.Notifications.Collection();
schemaCollection.url = '/api/notification/schema';
schemaCollection.fetch();
12 years ago
var view = new NzbDrone.Settings.Notifications.AddView({ collection: schemaCollection});
NzbDrone.modalRegion.show(view);
}
});
});