mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-16 12:45:36 +02:00
Merge b2f561b851
into 4d8d4a3aba
This commit is contained in:
commit
2673cac008
|
@ -2113,7 +2113,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
||||||
<td><?php echo fm_enc($owner['name'] . ':' . $group['name']) ?></td>
|
<td><?php echo fm_enc($owner['name'] . ':' . $group['name']) ?></td>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<td class="inline-actions">
|
<td class="inline-actions">
|
||||||
<a title="<?php echo lng('Preview') ?>" href="<?php echo $filelink.'&quickView=1'; ?>" data-toggle="lightbox" data-gallery="tiny-gallery" data-title="<?php echo fm_convert_win(fm_enc($f)) ?>" data-max-width="100%" data-width="100%"><i class="fa fa-eye"></i></a>
|
<a title="<?php echo lng('Preview') ?>" href="<?php echo $filelink.'&quickView=1'; ?>" data-toggle="lightbox" data-ext="<?php echo pathinfo($f, PATHINFO_EXTENSION) ?>" data-gallery="tiny-gallery" data-title="<?php echo fm_convert_win(fm_enc($f)) ?>" data-max-width="100%" data-width="100%"><i class="fa fa-eye"></i></a>
|
||||||
<?php if (!FM_READONLY): ?>
|
<?php if (!FM_READONLY): ?>
|
||||||
<a title="<?php echo lng('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('File').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o"></i></a>
|
<a title="<?php echo lng('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('File').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o"></i></a>
|
||||||
<a title="<?php echo lng('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o"></i></a>
|
<a title="<?php echo lng('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o"></i></a>
|
||||||
|
@ -3838,12 +3838,17 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"></script>
|
||||||
<?php if (FM_USE_HIGHLIGHTJS): ?>
|
<?php if (FM_USE_HIGHLIGHTJS): ?>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||||
<script>hljs.highlightAll(); var isHighlightingEnabled = true;</script>
|
<script>hljs.highlightAll(); var isHighlightingEnabled = true;</script>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<script>
|
<script>
|
||||||
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
|
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
|
||||||
event.preventDefault();
|
var reInitHighlight;
|
||||||
var reInitHighlight = function() { if(typeof isHighlightingEnabled !== "undefined" && isHighlightingEnabled) { setTimeout(function () { $('.ekko-lightbox-container pre code').each(function (i, e) { hljs.highlightBlock(e) }); }, 555); } };
|
if ($(this)[0].dataset.ext == 'md' || $(this)[0].dataset.ext == 'markdown') {
|
||||||
|
reInitHighlight = function() { if(typeof isHighlightingEnabled !== "undefined" && isHighlightingEnabled) { setTimeout(function () { var md; $('.ekko-lightbox-container pre code').each(function (i, e) { md = e.innerHTML; $(e).parent().replaceWith(document.createElement("md")) }); $('.ekko-lightbox-container md').each(function (i, e) { $(e).html(marked.parse(md).replace(/<u>(.*)<\/u>/gim, '<u>$1</u>')) }); }, 555); } };
|
||||||
|
} else {
|
||||||
|
reInitHighlight = function() { if(typeof isHighlightingEnabled !== "undefined" && isHighlightingEnabled) { setTimeout(function () { $('.ekko-lightbox-container pre code').each(function (i, e) { hljs.highlightBlock(e) }); }, 555); } };
|
||||||
|
}
|
||||||
$(this).ekkoLightbox({
|
$(this).ekkoLightbox({
|
||||||
alwaysShowClose: true, showArrows: true, onShown: function() { reInitHighlight(); }, onNavigate: function(direction, itemIndex) { reInitHighlight(); }
|
alwaysShowClose: true, showArrows: true, onShown: function() { reInitHighlight(); }, onNavigate: function(direction, itemIndex) { reInitHighlight(); }
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue