fix: [UI] Do not make screenshot images too big

pull/8402/head
Jakub Onderka 2022-05-23 16:41:22 +02:00
parent ca9be6e1bc
commit b246b4560f
2 changed files with 3 additions and 7 deletions

View File

@ -34,11 +34,11 @@ switch ($object['type']) {
if ($object['type'] === 'attachment' && isset($object['image'])) {
if ($object['image'] === true) {
$src = $baseurl . '/' . ($object['objectType'] === 'proposal' ? 'shadowAttributes' : 'attributes') . '/viewPicture/' . (int)$object['id'] . '/1';
echo '<img class="screenshot screenshot-collapsed useCursorPointer img-rounded" src="' . $src . '" title="' . h($object['value']) . '" loading="lazy">';
echo '<img class="screenshot useCursorPointer img-rounded" src="' . $src . '" title="' . h($object['value']) . '" loading="lazy">';
} else {
$extension = pathinfo($object['value'], PATHINFO_EXTENSION);
$uri = 'data:image/' . strtolower(h($extension)) . ';base64,' . h($object['image']);
echo '<img class="screenshot screenshot-collapsed useCursorPointer" src="' . $uri . '" title="' . h($object['value']) . '">';
echo '<img class="screenshot useCursorPointer" src="' . $uri . '" title="' . h($object['value']) . '">';
}
} else {
$filenameHash = explode('|', h($object['value']));

View File

@ -1804,7 +1804,7 @@ span.success {
color:white;
}
input.select {
input.select, input.select_attribute {
margin-top: 0; /* remove top margin for checkboxes in index table */
}
@ -2177,10 +2177,6 @@ table.table.table-striped tr.deleted_row td {
width:100%;
}
.screenshot-collapsed {
width:200px;
}
/*
nifty close-icon from http://stackoverflow.com/a/20139794/2622597
*/