move jscript logic out of template/html, into jscript so we can keep all logic into the included file, then I can force version on it and stop caching issues in mobiles, and a shift-reload will also get new code, rather than a container restart even on desktops
This commit is contained in:
@@ -936,3 +936,21 @@ function goOutOfViewer()
|
||||
$('#viewer_div').addClass('d-none')
|
||||
$('#files_div').removeClass('d-none')
|
||||
}
|
||||
|
||||
|
||||
// left arrow onclick handler to go to prev image from inside the viewer
|
||||
function prevImageInViewer()
|
||||
{
|
||||
getPreviousEntry()
|
||||
setDisabledForViewingNextPrevBttons()
|
||||
ViewImageOrVideo()
|
||||
}
|
||||
|
||||
// right arrow onclick handler to go to next image from inside the viewer
|
||||
function nextImageInViewer()
|
||||
{
|
||||
getNextEntry()
|
||||
setDisabledForViewingNextPrevBttons()
|
||||
ViewImageOrVideo()
|
||||
|
||||
}
|
||||
|
||||
@@ -127,8 +127,7 @@
|
||||
</button>
|
||||
<!-- Left Button (large/flex-grow-1) -->
|
||||
<button title="Show previous image" class="btn btn-outline-info px-2 flex-grow-1"
|
||||
style="padding: 10%" id="la"
|
||||
onClick="getPreviousEntry(); setDisabledForViewingNextPrevBttons(); ViewImageOrVideo()">
|
||||
style="padding: 10%" id="la" onClick="prevImageInViewer()">
|
||||
<svg width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#prev"/></svg>
|
||||
</button>
|
||||
@@ -161,8 +160,8 @@
|
||||
</svg>
|
||||
</button>
|
||||
<!-- Right Button (large/flex-grow-1) -->
|
||||
<button title="Show next image" class="btn btn-outline-info px-2 flex-grow-1" style="padding: 10%" id="ra"
|
||||
onClick="getNextEntry(); setDisabledForViewingNextPrevBttons(); ViewImageOrVideo()">
|
||||
<button title="Show next image" class="btn btn-outline-info px-2 flex-grow-1"
|
||||
style="padding: 10%" id="ra" onClick="nextImageInViewer()">
|
||||
<svg width="16" height="16" fill="currentColor">
|
||||
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#next"/></svg>
|
||||
</button>
|
||||
@@ -228,9 +227,6 @@
|
||||
</div class="row">
|
||||
</div id="viewer">
|
||||
</div id="viewer_div">
|
||||
{#
|
||||
$.ajax({ type: 'POST', data: '&eid-0='+document.viewing.id, url: '/delete_files', success: function(data){ window.location='/'; return false; } })">
|
||||
#}
|
||||
{% endblock main_content %}
|
||||
|
||||
{% block script_content %}
|
||||
|
||||
Reference in New Issue
Block a user