related to #1657 upsize svg if they are too small

This commit is contained in:
Matthieu Leproux committed 2022-05-17 11:32:59 +02:00
1 parent cac159e154
commit 61c26661b5
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -212,7 +212,8 @@ SELECT
{
$legend.= ' ('.$row['file'].')';
}
$extTab = explode('.',$row['path']);
$template->append(
'elements', array_merge($row,
array(
@@ -227,6 +228,7 @@ SELECT
'DESCRIPTION' => htmlspecialchars(@$row['comment']),
'DATE_CREATION' => $row['date_creation'],
'TAGS' => $tag_selection,
'is_svg' => (strtoupper(end($extTab)) == 'SVG'),
)
));
}
@@ -58,7 +58,7 @@ jQuery("a.preview-box").colorbox( {
<legend>{$element.LEGEND}</legend>
<span class="thumb">
<a href="{$element.FILE_SRC}" class="preview-box icon-zoom-in" title="{$element.LEGEND|@htmlspecialchars}"><img src="{$element.TN_SRC}" alt="" {if $current.is_svg}style="{if $current.width < 100}min-width: 100px;{/if}{if $current.height < 100} min-height: 100px; {/if}" {/if}></a>
<a href="{$element.FILE_SRC}" class="preview-box icon-zoom-in" title="{$element.LEGEND|@htmlspecialchars}"><img src="{$element.TN_SRC}" alt="" {if $element.is_svg}style="{if $current.width < 100}min-width: 100px;{/if}{if $current.height < 100} min-height: 100px; {/if}" {/if}></a>
<a href="{$element.U_EDIT}" class="icon-pencil">{'Edit'|@translate}</a>
</span>