startup wizard fixes

This commit is contained in:
Luke Pulverenti 2015-10-26 14:12:20 -04:00
parent 25b182603e
commit 2f160fcaa0
5 changed files with 24 additions and 22 deletions

View File

@ -217,7 +217,10 @@
var dlg = PaperDialogHelper.createDialog({ var dlg = PaperDialogHelper.createDialog({
theme: 'a', 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'); dlg.classList.add('directoryPicker');

View File

@ -93,7 +93,9 @@
// but skip it in IE because it's causing the entire browser to hang // 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 // Also have to disable for firefox because it's causing select elements to not be clickable
if (!$.browser.msie && !$.browser.mozilla) { 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 //// seeing max call stack size exceeded in the debugger with this

View File

@ -8,13 +8,6 @@
}); });
} }
function processOperationResult(result) {
var page = $($.mobile.activePage)[0];
reloadLibrary(page);
}
function addVirtualFolder(page) { function addVirtualFolder(page) {
require(['medialibrarycreator'], function (medialibrarycreator) { require(['medialibrarycreator'], function (medialibrarycreator) {
@ -22,7 +15,7 @@
new medialibrarycreator().show({ new medialibrarycreator().show({
collectionTypeOptions: getCollectionTypeOptions(), collectionTypeOptions: getCollectionTypeOptions(),
refresh: shouldRefreshLibraryAfterChanges() refresh: shouldRefreshLibraryAfterChanges(page)
}).done(function (hasChanges) { }).done(function (hasChanges) {
@ -39,7 +32,7 @@
new medialibraryeditor().show({ new medialibraryeditor().show({
refresh: shouldRefreshLibraryAfterChanges(), refresh: shouldRefreshLibraryAfterChanges(page),
library: virtualFolder library: virtualFolder
}).done(function (hasChanges) { }).done(function (hasChanges) {
@ -64,9 +57,11 @@
if (confirmResult) { 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) { 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) { function reloadVirtualFolders(page, virtualFolders) {
@ -187,7 +184,7 @@
var virtualFolder = virtualFolders[i]; var virtualFolder = virtualFolders[i];
html += getVirtualFolderHtml(virtualFolder, i); html += getVirtualFolderHtml(page, virtualFolder, i);
} }
var divVirtualFolders = page.querySelector('#divVirtualFolders'); var divVirtualFolders = page.querySelector('#divVirtualFolders');
@ -275,13 +272,13 @@
} }
} }
function getVirtualFolderHtml(virtualFolder, index) { function getVirtualFolderHtml(page, virtualFolder, index) {
var html = ''; var html = '';
var style = ""; var style = "";
if ($($.mobile.activePage)[0].classList.contains('wizardPage')) { if (page.classList.contains('wizardPage')) {
style += "min-width:33.3%;"; style += "min-width:33.3%;";
} }

View File

@ -102,7 +102,7 @@
"FolderTypeInherit": "Inherit", "FolderTypeInherit": "Inherit",
"LabelContentType": "Content type:", "LabelContentType": "Content type:",
"TitleScheduledTasks": "Scheduled Tasks", "TitleScheduledTasks": "Scheduled Tasks",
"HeaderSetupLibrary": "Setup your media library", "HeaderSetupLibrary": "Setup your media libraries",
"ButtonAddMediaFolder": "Add media folder", "ButtonAddMediaFolder": "Add media folder",
"LabelFolderType": "Folder type:", "LabelFolderType": "Folder type:",
"ReferToMediaLibraryWiki": "Refer to the media library wiki.", "ReferToMediaLibraryWiki": "Refer to the media library wiki.",

View File

@ -102,7 +102,7 @@
"FolderTypeInherit": "Inherit", "FolderTypeInherit": "Inherit",
"LabelContentType": "Content type:", "LabelContentType": "Content type:",
"TitleScheduledTasks": "Scheduled Tasks", "TitleScheduledTasks": "Scheduled Tasks",
"HeaderSetupLibrary": "Setup your media library", "HeaderSetupLibrary": "Setup your media libraries",
"ButtonAddMediaFolder": "Add media folder", "ButtonAddMediaFolder": "Add media folder",
"LabelFolderType": "Folder type:", "LabelFolderType": "Folder type:",
"ReferToMediaLibraryWiki": "Refer to the media library wiki.", "ReferToMediaLibraryWiki": "Refer to the media library wiki.",