mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
rjs -> webpack
This commit is contained in:
@@ -1,37 +1,29 @@
|
||||
'use strict';
|
||||
var Marionette = require('marionette');
|
||||
var DownloadClientCollection = require('./DownloadClientCollection');
|
||||
var DownloadClientCollectionView = require('./DownloadClientCollectionView');
|
||||
var DownloadHandlingView = require('./DownloadHandling/DownloadHandlingView');
|
||||
var DroneFactoryView = require('./DroneFactory/DroneFactoryView');
|
||||
var RemotePathMappingCollection = require('./RemotePathMapping/RemotePathMappingCollection');
|
||||
var RemotePathMappingCollectionView = require('./RemotePathMapping/RemotePathMappingCollectionView');
|
||||
|
||||
define([
|
||||
'marionette',
|
||||
'Settings/DownloadClient/DownloadClientCollection',
|
||||
'Settings/DownloadClient/DownloadClientCollectionView',
|
||||
'Settings/DownloadClient/DownloadHandling/DownloadHandlingView',
|
||||
'Settings/DownloadClient/DroneFactory/DroneFactoryView',
|
||||
'Settings/DownloadClient/RemotePathMapping/RemotePathMappingCollection',
|
||||
'Settings/DownloadClient/RemotePathMapping/RemotePathMappingCollectionView'
|
||||
], function (Marionette, DownloadClientCollection, DownloadClientCollectionView, DownloadHandlingView, DroneFactoryView, RemotePathMappingCollection, RemotePathMappingCollectionView) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template : 'Settings/DownloadClient/DownloadClientLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
downloadClients : '#x-download-clients-region',
|
||||
downloadHandling : '#x-download-handling-region',
|
||||
droneFactory : '#x-dronefactory-region',
|
||||
remotePathMappings : '#x-remotepath-mapping-region'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.downloadClientsCollection = new DownloadClientCollection();
|
||||
this.downloadClientsCollection.fetch();
|
||||
this.remotePathMappingCollection = new RemotePathMappingCollection();
|
||||
this.remotePathMappingCollection.fetch();
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.downloadClients.show(new DownloadClientCollectionView({ collection: this.downloadClientsCollection }));
|
||||
this.downloadHandling.show(new DownloadHandlingView({ model: this.model }));
|
||||
this.droneFactory.show(new DroneFactoryView({ model: this.model }));
|
||||
this.remotePathMappings.show(new RemotePathMappingCollectionView({ collection: this.remotePathMappingCollection }));
|
||||
}
|
||||
});
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'Settings/DownloadClient/DownloadClientLayoutTemplate',
|
||||
regions : {
|
||||
downloadClients : '#x-download-clients-region',
|
||||
downloadHandling : '#x-download-handling-region',
|
||||
droneFactory : '#x-dronefactory-region',
|
||||
remotePathMappings : '#x-remotepath-mapping-region'
|
||||
},
|
||||
initialize : function(){
|
||||
this.downloadClientsCollection = new DownloadClientCollection();
|
||||
this.downloadClientsCollection.fetch();
|
||||
this.remotePathMappingCollection = new RemotePathMappingCollection();
|
||||
this.remotePathMappingCollection.fetch();
|
||||
},
|
||||
onShow : function(){
|
||||
this.downloadClients.show(new DownloadClientCollectionView({collection : this.downloadClientsCollection}));
|
||||
this.downloadHandling.show(new DownloadHandlingView({model : this.model}));
|
||||
this.droneFactory.show(new DroneFactoryView({model : this.model}));
|
||||
this.remotePathMappings.show(new RemotePathMappingCollectionView({collection : this.remotePathMappingCollection}));
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user