mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-27 10:58:34 +01:00
25 lines
658 B
JavaScript
25 lines
658 B
JavaScript
var Marionette = require('marionette');
|
|
var ItemView = require('./NetImportItemView');
|
|
var SchemaModal = require('./Add/IndexerSchemaModal');
|
|
|
|
module.exports = Marionette.CompositeView.extend({
|
|
itemView : ItemView,
|
|
itemViewContainer : '.list-list',
|
|
template : 'Settings/NetImport/NetImportCollectionViewTemplate',
|
|
|
|
ui : {
|
|
'addCard' : '.x-add-card'
|
|
},
|
|
|
|
events : {
|
|
'click .x-add-card' : '_openSchemaModal'
|
|
},
|
|
|
|
appendHtml : function(collectionView, itemView, index) {
|
|
collectionView.ui.addCard.parent('li').before(itemView.el);
|
|
},
|
|
|
|
_openSchemaModal : function() {
|
|
SchemaModal.open(this.collection);
|
|
}
|
|
});
|