mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
apply suggestion
This commit is contained in:
parent
c5e2bbf87f
commit
daedd3a61d
3 changed files with 58 additions and 62 deletions
|
@ -194,9 +194,8 @@ import 'flexStyles';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export class editor {
|
export class showEditor {
|
||||||
constructor() {
|
constructor(options) {
|
||||||
this.show = options => {
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
currentOptions = options;
|
currentOptions = options;
|
||||||
currentResolve = resolve;
|
currentResolve = resolve;
|
||||||
|
@ -224,7 +223,6 @@ export class editor {
|
||||||
initLibraryOptions(dlg);
|
initLibraryOptions(dlg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,4 +233,4 @@ export class editor {
|
||||||
let isCreating = false;
|
let isCreating = false;
|
||||||
|
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
export default editor;
|
export default showEditor;
|
||||||
|
|
|
@ -209,9 +209,8 @@ import 'flexStyles';
|
||||||
currentDeferred.resolveWith(null, [hasChanges]);
|
currentDeferred.resolveWith(null, [hasChanges]);
|
||||||
}
|
}
|
||||||
|
|
||||||
export class editor {
|
export class showEditor {
|
||||||
constructor() {
|
constructor(options) {
|
||||||
this.show = options => {
|
|
||||||
const deferred = jQuery.Deferred();
|
const deferred = jQuery.Deferred();
|
||||||
currentOptions = options;
|
currentOptions = options;
|
||||||
currentDeferred = deferred;
|
currentDeferred = deferred;
|
||||||
|
@ -238,7 +237,6 @@ export class editor {
|
||||||
refreshLibraryFromServer(dlg);
|
refreshLibraryFromServer(dlg);
|
||||||
});
|
});
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,4 +246,4 @@ export class editor {
|
||||||
let isCreating = false;
|
let isCreating = false;
|
||||||
|
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
export default editor;
|
export default showEditor;
|
||||||
|
|
|
@ -3,7 +3,7 @@ define(['jQuery', 'apphost', 'scripts/taskbutton', 'loading', 'libraryMenu', 'gl
|
||||||
|
|
||||||
function addVirtualFolder(page) {
|
function addVirtualFolder(page) {
|
||||||
require(['medialibrarycreator'], function (medialibrarycreator) {
|
require(['medialibrarycreator'], function (medialibrarycreator) {
|
||||||
new medialibrarycreator.default().show({
|
new medialibrarycreator.showEditor({
|
||||||
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
|
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
|
||||||
return !f.hidden;
|
return !f.hidden;
|
||||||
}),
|
}),
|
||||||
|
@ -18,7 +18,7 @@ define(['jQuery', 'apphost', 'scripts/taskbutton', 'loading', 'libraryMenu', 'gl
|
||||||
|
|
||||||
function editVirtualFolder(page, virtualFolder) {
|
function editVirtualFolder(page, virtualFolder) {
|
||||||
require(['medialibraryeditor'], function (medialibraryeditor) {
|
require(['medialibraryeditor'], function (medialibraryeditor) {
|
||||||
new medialibraryeditor.default().show({
|
new medialibraryeditor.showEditor({
|
||||||
refresh: shouldRefreshLibraryAfterChanges(page),
|
refresh: shouldRefreshLibraryAfterChanges(page),
|
||||||
library: virtualFolder
|
library: virtualFolder
|
||||||
}).then(function (hasChanges) {
|
}).then(function (hasChanges) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue