mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
UI dependency graph cleanup
This commit is contained in:
parent
86ea33b638
commit
4948d0608b
87 changed files with 1119 additions and 735 deletions
|
@ -1,7 +1,8 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'vent',
|
||||
'AppLayout',
|
||||
'underscore',
|
||||
'marionette',
|
||||
'Quality/QualityProfileCollection',
|
||||
|
@ -12,7 +13,7 @@ define(
|
|||
'Shared/Messenger',
|
||||
'Mixins/AsValidatedView',
|
||||
'jquery.dotdotdot'
|
||||
], function (App, _, Marionette, QualityProfiles, RootFolders, RootFolderLayout, SeriesCollection, Config, Messenger, AsValidatedView) {
|
||||
], function (vent, AppLayout, _, Marionette, QualityProfiles, RootFolders, RootFolderLayout, SeriesCollection, Config, Messenger, AsValidatedView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
|
||||
|
@ -41,7 +42,7 @@ define(
|
|||
this.templateHelpers = {};
|
||||
this._configureTemplateHelpers();
|
||||
|
||||
this.listenTo(App.vent, Config.Events.ConfigUpdatedEvent, this._onConfigUpdated);
|
||||
this.listenTo(vent, Config.Events.ConfigUpdatedEvent, this._onConfigUpdated);
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
this.listenTo(RootFolders, 'all', this.render);
|
||||
|
||||
|
@ -105,7 +106,7 @@ define(
|
|||
_rootFolderChanged: function () {
|
||||
var rootFolderValue = this.ui.rootFolder.val();
|
||||
if (rootFolderValue === 'addNew') {
|
||||
App.modalRegion.show(this.rootFolderLayout);
|
||||
AppLayout.modalRegion.show(this.rootFolderLayout);
|
||||
}
|
||||
else {
|
||||
Config.setValue(Config.Keys.DefaultRootFolderId, rootFolderValue);
|
||||
|
@ -113,7 +114,7 @@ define(
|
|||
},
|
||||
|
||||
_setRootFolder: function (options) {
|
||||
App.vent.trigger(App.Commands.CloseModalCommand);
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
this.ui.rootFolder.val(options.model.id);
|
||||
this._rootFolderChanged();
|
||||
},
|
||||
|
@ -145,7 +146,7 @@ define(
|
|||
message: 'Added: ' + self.model.get('title')
|
||||
});
|
||||
|
||||
App.vent.trigger(App.Events.SeriesAdded, { series: self.model });
|
||||
vent.trigger(vent.Events.SeriesAdded, { series: self.model });
|
||||
});
|
||||
|
||||
promise.fail(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue