1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00
This commit is contained in:
Ryan Cramer
2024-07-05 12:00:26 -04:00
parent 36227dc778
commit 899ffd186a
2 changed files with 7 additions and 2 deletions

View File

@@ -208,7 +208,7 @@ $(document).ready(function() {
if($fileList.length < 1) { if($fileList.length < 1) {
$fileList = $("<ul class='InputfieldFileList InputfieldFileListBlank'></ul>"); $fileList = $("<ul class='InputfieldFileList InputfieldFileListBlank'></ul>");
$this.prepend($fileList); $this.find('.InputfieldFileListPlaceholder').replaceWith($fileList);
$this.parent('.Inputfield').addClass('InputfieldFileEmpty'); $this.parent('.Inputfield').addClass('InputfieldFileEmpty');
} }

View File

@@ -640,7 +640,12 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
$class = 'InputfieldFileList ui-helper-clearfix'; $class = 'InputfieldFileList ui-helper-clearfix';
if($this->overwrite && !$this->renderValueMode) $class .= " InputfieldFileOverwrite"; if($this->overwrite && !$this->renderValueMode) $class .= " InputfieldFileOverwrite";
if($out) $out = "<ul class='$class'>$out</ul>";
if($out) {
$out = "<ul class='$class'>$out</ul>";
} else {
$out = "<div class='InputfieldFileListPlaceholder' hidden></div>";
}
return $out; return $out;
} }