diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index fd512cba60..09eca0de0d 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -82,13 +82,12 @@ return new Promise(function (resolve, reject) { require(['paper-checkbox', 'paper-input', 'emby-collapsible'], function () { - renderFormInternal(options); - resolve(); + renderFormInternal(options, resolve); }); }); } - function renderFormInternal(options) { + function renderFormInternal(options, resolve) { var elem = options.elem; var dialogOptions = options.dialogOptions; @@ -189,7 +188,7 @@ $('#selectSyncTarget', elem).on('change', function () { - loadQualityOptions(elem, this.value, options.dialogOptionsFn); + loadQualityOptions(elem, this.value, options.dialogOptionsFn).then(resolve); }).trigger('change'); @@ -383,9 +382,9 @@ function loadQualityOptions(form, targetId, dialogOptionsFn) { - dialogOptionsFn(targetId).then(function (options) { + return dialogOptionsFn(targetId).then(function (options) { - renderTargetDialogOptions(form, options); + return renderTargetDialogOptions(form, options); }); } diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js index 39a11d88cd..1c13ab60df 100644 --- a/dashboard-ui/scripts/syncactivity.js +++ b/dashboard-ui/scripts/syncactivity.js @@ -412,7 +412,9 @@ }).on('pageshow', ".syncActivityPage", function () { - LibraryMenu.setTabs('syncadmin', 0, getTabs); + if (this.id == 'syncActivityPage') { + LibraryMenu.setTabs('syncadmin', 0, getTabs); + } var page = this; Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) { diff --git a/dashboard-ui/scripts/syncjob.js b/dashboard-ui/scripts/syncjob.js index da6c6331af..668242da17 100644 --- a/dashboard-ui/scripts/syncjob.js +++ b/dashboard-ui/scripts/syncjob.js @@ -1,4 +1,4 @@ -define(['jQuery'], function ($) { +define(['jQuery', 'paper-progress', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button'], function ($) { function renderJob(page, job, dialogOptions) { @@ -335,7 +335,7 @@ function loadJobInfo(page, job, jobItems) { - renderJob(page, job, _jobOptions); + //renderJob(page, job, _jobOptions); renderJobItems(page, jobItems); Dashboard.hideLoadingMsg(); }