Skip to content

Commit fcbdf9e

Browse files
committed
commit
1 parent 69be4d3 commit fcbdf9e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/site/tools/FAPI/Fields/Gallery.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ public function preRender(Form $form)
154154
protected function renderMediaElement(?MediaElement $media, ?string $labelText = null, int $maxLength = 12): string
155155
{
156156
$text = ($labelText ?? '<abbr title="' . $media?->getFilename() . '">' . substr("" . $media?->getFilename(), 0, $maxLength) . (strlen("".$media?->getFilename()) > $maxLength ? '...' : '') . '</abbr>');
157-
$label = '<label class="text-nowrap" for="media-selector-'.$media?->getId().'"><input type="checkbox" class="media-selector" id="media-selector-'.$media?->getId().'" value="' . $media?->getId() . '" />' . $text . '</label>';
158-
157+
159158
$label = '<div class="pretty p-icon p-smooth p-primary p-curve">
160159
<input class="media-selector" type="checkbox" id="media-selector-'.$media?->getId().'" value="' . $media?->getId() . '" />
161160
<div class="state">
@@ -164,8 +163,6 @@ protected function renderMediaElement(?MediaElement $media, ?string $labelText =
164163
</div>
165164
</div>';
166165

167-
168-
169166
if (is_null($media) || $media->isDirectory()) {
170167
$uri = App::getInstance()->getEnvironment()->getRequest()->getUri();
171168
$parsed = parse_url($uri);
@@ -177,7 +174,7 @@ protected function renderMediaElement(?MediaElement $media, ?string $labelText =
177174
}
178175

179176
return match (true) {
180-
is_null($media), $media?->isDirectory() => '<div class="media-element media-directory"><h2 style="height: 50px; margin: 0;">'.App::getInstance()->getHtmlRenderer()->getFAIcon('folder', 'regular').'</h2></div>',
177+
is_null($media), $media?->isDirectory() => '<div class="media-element media-directory"><h2 style="height: 40px; margin: 0; zoom:1.5;">'.App::getInstance()->getHtmlRenderer()->getFAIcon('folder', 'solid').'</h2></div>',
181178
$media?->isImage() => '<div class="media-element media-image">' . $media->getThumb('50x50') . '</div>',
182179
default => '<div class="media-element media-file">' . $media->getMimeIcon() . '</div>',
183180
} . '<div>'.$label.'</div>';

0 commit comments

Comments
 (0)