mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Fix issue processwire/processwire-issues#1944
This commit is contained in:
@@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user