1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 16:02:29 +01:00
Sonarr/UI/Settings/Notifications/CollectionView.js

22 lines
841 B
JavaScript
Raw Normal View History

2013-05-20 06:19:54 +02:00
'use strict';
2013-05-25 08:38:43 +02:00
define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddView'], function () {
2013-05-20 06:19:54 +02:00
NzbDrone.Settings.Notifications.CollectionView = Backbone.Marionette.CompositeView.extend({
itemView : NzbDrone.Settings.Notifications.ItemView,
itemViewContainer : 'tbody',
2013-05-25 08:38:43 +02:00
template : 'Settings/Notifications/CollectionTemplate',
events: {
2013-05-26 02:36:12 +02:00
'click .x-add': 'openSchemaModal'
},
2013-05-25 08:38:43 +02:00
2013-05-26 02:36:12 +02:00
openSchemaModal: 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-25 08:38:43 +02:00
}
2013-05-20 06:19:54 +02:00
});
});