make sure loading viewer for the first time add query param to get latest version of img, and when we leave viewer reset document.viewing
This commit is contained in:
@@ -186,7 +186,7 @@ function ViewImageOrVideo()
|
|||||||
if( ! document.viewing ) return
|
if( ! document.viewing ) return
|
||||||
if( document.viewing.type.name == 'Image' )
|
if( document.viewing.type.name == 'Image' )
|
||||||
{
|
{
|
||||||
im.src='../' + document.viewing.FullPathOnFS
|
im.src='../' + document.viewing.FullPathOnFS + '?t=' + new Date().getTime();
|
||||||
$('#video_div').hide()
|
$('#video_div').hide()
|
||||||
if( $('#fname_toggle').prop('checked' ) )
|
if( $('#fname_toggle').prop('checked' ) )
|
||||||
$('#img-cap').show()
|
$('#img-cap').show()
|
||||||
@@ -623,6 +623,8 @@ function goOutOfViewer()
|
|||||||
// hide viewer div, then show files_div
|
// hide viewer div, then show files_div
|
||||||
$('#viewer_div').addClass('d-none')
|
$('#viewer_div').addClass('d-none')
|
||||||
$('#files_div').removeClass('d-none')
|
$('#files_div').removeClass('d-none')
|
||||||
|
// no longer viewing an image too
|
||||||
|
document.viewing=null
|
||||||
}
|
}
|
||||||
|
|
||||||
// change the viewer to the previous entry (handle page change too)
|
// change the viewer to the previous entry (handle page change too)
|
||||||
|
|||||||
Reference in New Issue
Block a user