mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-15 20:25:16 +02:00
feat(/): add live image preview when user hovers the image file name (only when the number of files in current folder less than 500 files) (#244)
Co-authored-by: Prasath Mani <prasathmani@users.noreply.github.com>
This commit is contained in:
parent
4905e5c61c
commit
0319b7b102
|
@ -1870,9 +1870,12 @@ $all_files_size = 0;
|
||||||
<label class="custom-control-label" for="<?php echo $ik ?>"></label>
|
<label class="custom-control-label" for="<?php echo $ik ?>"></label>
|
||||||
</div>
|
</div>
|
||||||
</td><?php endif; ?>
|
</td><?php endif; ?>
|
||||||
<td>
|
<td class="file-name-col">
|
||||||
<div class="filename"><a href="<?php echo $filelink ?>" title="File info"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?>
|
<div class="filename"><a href="<?php echo $filelink ?>" title="File info"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?>
|
||||||
</a><?php echo($is_link ? ' → <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div>
|
</a><?php echo($is_link ? ' → <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div>
|
||||||
|
<?php if ($num_files < 500 && in_array(strtolower(pathinfo($f, PATHINFO_EXTENSION)), array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg'))): ?>
|
||||||
|
<img src="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f) ?>" alt="" class="live-preview-img">
|
||||||
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
<td><span title="<?php printf('%s bytes', $filesize_raw) ?>">
|
<td><span title="<?php printf('%s bytes', $filesize_raw) ?>">
|
||||||
<?php echo $filesize; ?>
|
<?php echo $filesize; ?>
|
||||||
|
|
Loading…
Reference in a new issue