mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
rjs -> webpack
This commit is contained in:
parent
344f3d66ef
commit
428a1439e5
399 changed files with 11591 additions and 16139 deletions
|
@ -1,67 +1,40 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'AppLayout',
|
||||
'marionette',
|
||||
'AddSeries/RootFolders/RootFolderLayout',
|
||||
'AddSeries/Existing/AddExistingSeriesCollectionView',
|
||||
'AddSeries/AddSeriesView',
|
||||
'Profile/ProfileCollection',
|
||||
'AddSeries/RootFolders/RootFolderCollection',
|
||||
'Series/SeriesCollection'
|
||||
], function (vent,
|
||||
AppLayout,
|
||||
Marionette,
|
||||
RootFolderLayout,
|
||||
ExistingSeriesCollectionView,
|
||||
AddSeriesView,
|
||||
ProfileCollection,
|
||||
RootFolderCollection) {
|
||||
var vent = require('../vent');
|
||||
var AppLayout = require('../AppLayout');
|
||||
var Marionette = require('marionette');
|
||||
var RootFolderLayout = require('./RootFolders/RootFolderLayout');
|
||||
var ExistingSeriesCollectionView = require('./Existing/AddExistingSeriesCollectionView');
|
||||
var AddSeriesView = require('./AddSeriesView');
|
||||
var ProfileCollection = require('../Profile/ProfileCollection');
|
||||
var RootFolderCollection = require('./RootFolders/RootFolderCollection');
|
||||
require('../Series/SeriesCollection');
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'AddSeries/AddSeriesLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
workspace: '#add-series-workspace'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-import': '_importSeries',
|
||||
'click .x-add-new': '_addSeries'
|
||||
},
|
||||
|
||||
attributes: {
|
||||
id: 'add-series-screen'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
ProfileCollection.fetch();
|
||||
RootFolderCollection.fetch()
|
||||
.done(function () {
|
||||
RootFolderCollection.synced = true;
|
||||
});
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.workspace.show(new AddSeriesView());
|
||||
},
|
||||
|
||||
_folderSelected: function (options) {
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
|
||||
this.workspace.show(new ExistingSeriesCollectionView({model: options.model}));
|
||||
},
|
||||
|
||||
_importSeries: function () {
|
||||
this.rootFolderLayout = new RootFolderLayout();
|
||||
this.listenTo(this.rootFolderLayout, 'folderSelected', this._folderSelected);
|
||||
AppLayout.modalRegion.show(this.rootFolderLayout);
|
||||
},
|
||||
|
||||
_addSeries: function () {
|
||||
this.workspace.show(new AddSeriesView());
|
||||
}
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'AddSeries/AddSeriesLayoutTemplate',
|
||||
regions : {workspace : '#add-series-workspace'},
|
||||
events : {
|
||||
'click .x-import' : '_importSeries',
|
||||
'click .x-add-new' : '_addSeries'
|
||||
},
|
||||
attributes : {id : 'add-series-screen'},
|
||||
initialize : function(){
|
||||
ProfileCollection.fetch();
|
||||
RootFolderCollection.fetch().done(function(){
|
||||
RootFolderCollection.synced = true;
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
onShow : function(){
|
||||
this.workspace.show(new AddSeriesView());
|
||||
},
|
||||
_folderSelected : function(options){
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
this.workspace.show(new ExistingSeriesCollectionView({model : options.model}));
|
||||
},
|
||||
_importSeries : function(){
|
||||
this.rootFolderLayout = new RootFolderLayout();
|
||||
this.listenTo(this.rootFolderLayout, 'folderSelected', this._folderSelected);
|
||||
AppLayout.modalRegion.show(this.rootFolderLayout);
|
||||
},
|
||||
_addSeries : function(){
|
||||
this.workspace.show(new AddSeriesView());
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue