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:
2025-10-11 11:11:51 +11:00
parent 346defde8b
commit 1e421c3f22
2 changed files with 21 additions and 7 deletions

View File

@@ -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 %}