diff --git a/dashboard-ui/components/directorybrowser/directorybrowser.js b/dashboard-ui/components/directorybrowser/directorybrowser.js index 62df414672..c92e788cc9 100644 --- a/dashboard-ui/components/directorybrowser/directorybrowser.js +++ b/dashboard-ui/components/directorybrowser/directorybrowser.js @@ -217,7 +217,10 @@ var dlg = PaperDialogHelper.createDialog({ theme: 'a', - size: 'medium' + size: 'medium', + + // In (at least) chrome this is causing the text field to not be editable + modal: false }); dlg.classList.add('directoryPicker'); diff --git a/dashboard-ui/components/paperdialoghelper.js b/dashboard-ui/components/paperdialoghelper.js index 13a84a1ef4..fa9a8f8a81 100644 --- a/dashboard-ui/components/paperdialoghelper.js +++ b/dashboard-ui/components/paperdialoghelper.js @@ -93,7 +93,9 @@ // but skip it in IE because it's causing the entire browser to hang // Also have to disable for firefox because it's causing select elements to not be clickable if (!$.browser.msie && !$.browser.mozilla) { - dlg.setAttribute('modal', 'modal'); + if (options.modal !== false) { + dlg.setAttribute('modal', 'modal'); + } } //// seeing max call stack size exceeded in the debugger with this diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index c7a53db878..ec40cf5f4f 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -8,13 +8,6 @@ }); } - function processOperationResult(result) { - - var page = $($.mobile.activePage)[0]; - - reloadLibrary(page); - } - function addVirtualFolder(page) { require(['medialibrarycreator'], function (medialibrarycreator) { @@ -22,7 +15,7 @@ new medialibrarycreator().show({ collectionTypeOptions: getCollectionTypeOptions(), - refresh: shouldRefreshLibraryAfterChanges() + refresh: shouldRefreshLibraryAfterChanges(page) }).done(function (hasChanges) { @@ -39,7 +32,7 @@ new medialibraryeditor().show({ - refresh: shouldRefreshLibraryAfterChanges(), + refresh: shouldRefreshLibraryAfterChanges(page), library: virtualFolder }).done(function (hasChanges) { @@ -64,9 +57,11 @@ if (confirmResult) { - var refreshAfterChange = shouldRefreshLibraryAfterChanges(); + var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); - ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).done(processOperationResult); + ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).done(function () { + reloadLibrary(page); + }); } }); @@ -83,9 +78,11 @@ if (newName && newName != virtualFolder.Name) { - var refreshAfterChange = shouldRefreshLibraryAfterChanges(); + var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); - ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).done(processOperationResult); + ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).done(function () { + reloadLibrary(page); + }); } } }); @@ -164,9 +161,9 @@ }); } - function shouldRefreshLibraryAfterChanges() { + function shouldRefreshLibraryAfterChanges(page) { - return $($.mobile.activePage).is('#mediaLibraryPage'); + return $(page).is('#mediaLibraryPage'); } function reloadVirtualFolders(page, virtualFolders) { @@ -187,7 +184,7 @@ var virtualFolder = virtualFolders[i]; - html += getVirtualFolderHtml(virtualFolder, i); + html += getVirtualFolderHtml(page, virtualFolder, i); } var divVirtualFolders = page.querySelector('#divVirtualFolders'); @@ -275,13 +272,13 @@ } } - function getVirtualFolderHtml(virtualFolder, index) { + function getVirtualFolderHtml(page, virtualFolder, index) { var html = ''; var style = ""; - if ($($.mobile.activePage)[0].classList.contains('wizardPage')) { + if (page.classList.contains('wizardPage')) { style += "min-width:33.3%;"; } diff --git a/dashboard-ui/strings/html/en-US.json b/dashboard-ui/strings/html/en-US.json index 4d4cf42f55..1084ecd901 100644 --- a/dashboard-ui/strings/html/en-US.json +++ b/dashboard-ui/strings/html/en-US.json @@ -102,7 +102,7 @@ "FolderTypeInherit": "Inherit", "LabelContentType": "Content type:", "TitleScheduledTasks": "Scheduled Tasks", - "HeaderSetupLibrary": "Setup your media library", + "HeaderSetupLibrary": "Setup your media libraries", "ButtonAddMediaFolder": "Add media folder", "LabelFolderType": "Folder type:", "ReferToMediaLibraryWiki": "Refer to the media library wiki.", diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index f850ced555..b9a36d7d2e 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -102,7 +102,7 @@ "FolderTypeInherit": "Inherit", "LabelContentType": "Content type:", "TitleScheduledTasks": "Scheduled Tasks", - "HeaderSetupLibrary": "Setup your media library", + "HeaderSetupLibrary": "Setup your media libraries", "ButtonAddMediaFolder": "Add media folder", "LabelFolderType": "Folder type:", "ReferToMediaLibraryWiki": "Refer to the media library wiki.",