apply suggestion
This commit is contained in:
parent
3e583fcf21
commit
cf931d429a
8 changed files with 14 additions and 14 deletions
|
@ -218,8 +218,8 @@ import 'flexStyles';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class CollectionEditor {
|
export class showEditor {
|
||||||
show(options) {
|
constructor(options) {
|
||||||
|
|
||||||
const items = options.items || {};
|
const items = options.items || {};
|
||||||
currentServerId = options.serverId;
|
currentServerId = options.serverId;
|
||||||
|
@ -285,4 +285,4 @@ import 'flexStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
export default CollectionEditor;
|
export default showEditor;
|
||||||
|
|
|
@ -319,7 +319,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 'addtocollection':
|
case 'addtocollection':
|
||||||
require(['collectionEditor'], function (collectionEditor) {
|
require(['collectionEditor'], function (collectionEditor) {
|
||||||
new collectionEditor.default().show({
|
new collectionEditor.showEditor({
|
||||||
items: [itemId],
|
items: [itemId],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||||
|
@ -327,7 +327,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||||
break;
|
break;
|
||||||
case 'addtoplaylist':
|
case 'addtoplaylist':
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
new playlistEditor.default().show({
|
new playlistEditor.showEditor({
|
||||||
items: [itemId],
|
items: [itemId],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||||
|
|
|
@ -255,7 +255,7 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 'addtocollection':
|
case 'addtocollection':
|
||||||
require(['collectionEditor'], function (collectionEditor) {
|
require(['collectionEditor'], function (collectionEditor) {
|
||||||
new collectionEditor.default().show({
|
new collectionEditor.showEditor({
|
||||||
items: items,
|
items: items,
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
@ -265,7 +265,7 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo
|
||||||
break;
|
break;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
new playlistEditor.default().show({
|
new playlistEditor.showEditor({
|
||||||
items: items,
|
items: items,
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
|
|
@ -216,8 +216,8 @@ import 'emby-button';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class PlaylistEditor {
|
export class showEditor {
|
||||||
show(options) {
|
constructor(options) {
|
||||||
const items = options.items || {};
|
const items = options.items || {};
|
||||||
currentServerId = options.serverId;
|
currentServerId = options.serverId;
|
||||||
|
|
||||||
|
@ -276,4 +276,4 @@ import 'emby-button';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
export default PlaylistEditor;
|
export default showEditor;
|
||||||
|
|
|
@ -589,7 +589,7 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
getSaveablePlaylistItems().then(function (items) {
|
getSaveablePlaylistItems().then(function (items) {
|
||||||
var serverId = items.length ? items[0].ServerId : ApiClient.serverId();
|
var serverId = items.length ? items[0].ServerId : ApiClient.serverId();
|
||||||
new playlistEditor.default().show({
|
new playlistEditor.showEditor({
|
||||||
items: items.map(function (i) {
|
items: items.map(function (i) {
|
||||||
return i.Id;
|
return i.Id;
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -386,7 +386,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
||||||
var instance = this;
|
var instance = this;
|
||||||
|
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
new playlistEditor.default().show({
|
new playlistEditor.showEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: instance.params.serverId
|
serverId: instance.params.serverId
|
||||||
});
|
});
|
||||||
|
|
|
@ -242,7 +242,7 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
tabContent.querySelector('.btnNewCollection').addEventListener('click', function () {
|
tabContent.querySelector('.btnNewCollection').addEventListener('click', function () {
|
||||||
require(['collectionEditor'], function (collectionEditor) {
|
require(['collectionEditor'], function (collectionEditor) {
|
||||||
var serverId = ApiClient.serverInfo().Id;
|
var serverId = ApiClient.serverInfo().Id;
|
||||||
new collectionEditor.default().show({
|
new collectionEditor.showEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
|
|
@ -184,7 +184,7 @@ define(['loading', 'listView', 'cardBuilder', 'libraryMenu', 'libraryBrowser', '
|
||||||
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
var serverId = ApiClient.serverInfo().Id;
|
var serverId = ApiClient.serverInfo().Id;
|
||||||
new playlistEditor.default().show({
|
new playlistEditor.showEditor({
|
||||||
items: [],
|
items: [],
|
||||||
serverId: serverId
|
serverId: serverId
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue