Make crop editor usable #22
@ -138,11 +138,14 @@ class EditAssetForm extends SubTemplate
|
||||
<h3>Thumbnails</h3>
|
||||
View: <select id="thumbnail_src">';
|
||||
|
||||
foreach ($this->thumbs as $thumb)
|
||||
$first = INF;
|
||||
foreach ($this->thumbs as $i => $thumb)
|
||||
{
|
||||
if (!$thumb['status'])
|
||||
continue;
|
||||
|
||||
$first = min($i, $first);
|
||||
|
||||
echo '
|
||||
<option data-url="', $thumb['url'], '" data-crop_width="', $thumb['dimensions'][0], '" data-crop_height="', $thumb['dimensions'][1], '"',
|
||||
isset($thumb['crop_method']) ? ' data-crop_method="' . $thumb['crop_method'] . '"' : '',
|
||||
@ -171,8 +174,8 @@ class EditAssetForm extends SubTemplate
|
||||
|
||||
echo '
|
||||
</select>
|
||||
<a id="thumbnail_link" href="', $this->thumbs[0]['url'], '" target="_blank">
|
||||
<img id="thumbnail" src="', $this->thumbs[0]['url'], '" alt="Thumbnail" style="width: 100%; height: auto;">
|
||||
<a id="thumbnail_link" href="', $this->thumbs[$first]['url'], '" target="_blank">
|
||||
<img id="thumbnail" src="', $this->thumbs[$first]['url'], '" alt="Thumbnail" style="width: 100%; height: auto;">
|
||||
</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
Loading…
Reference in New Issue
Block a user