1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-21 22:06:12 +02:00

Fix issue processwire/processwire-issues#756 make link modal files selection not require being open before it can be populated with files from page selection

This commit is contained in:
Ryan Cramer
2018-12-14 06:01:02 -05:00
parent 6d1b558d85
commit 6801e2df94
2 changed files with 6 additions and 4 deletions

View File

@@ -36,8 +36,10 @@ $(document).ready(function() {
$fileSelect.append($option); $fileSelect.append($option);
}); });
$wrap.find("p.notes strong").text(selectedPageData.url); $wrap.find("p.notes strong").text(selectedPageData.url);
if($fileSelect.is(":visible")) {
$wrap.children().effect('highlight', {}, 500); $wrap.children().effect('highlight', {}, 500);
$fileSelect.effect('bounce', {}, 50); $fileSelect.effect('bounce', {}, 50);
}
}); });
} }
@@ -94,7 +96,7 @@ $(document).ready(function() {
selectedPageData.url = ProcessWire.config.urls.root + data.url.substring(1); selectedPageData.url = ProcessWire.config.urls.root + data.url.substring(1);
selectedPageData.url = absoluteToRelativePath(selectedPageData.url); selectedPageData.url = absoluteToRelativePath(selectedPageData.url);
$linkPageURL.val(selectedPageData.url).change(); $linkPageURL.val(selectedPageData.url).change();
if($fileSelect.is(":visible")) populateFileSelect(selectedPageData); populateFileSelect(selectedPageData); // was: if($fileSelect.is(":visible")) { ... }
} }
$(this).parents(".InputfieldInteger").children(".InputfieldHeader").click() // to close the field $(this).parents(".InputfieldInteger").children(".InputfieldHeader").click() // to close the field

File diff suppressed because one or more lines are too long