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')
|
$('#viewer_div').addClass('d-none')
|
||||||
$('#files_div').removeClass('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>
|
</button>
|
||||||
<!-- Left Button (large/flex-grow-1) -->
|
<!-- Left Button (large/flex-grow-1) -->
|
||||||
<button title="Show previous image" class="btn btn-outline-info px-2 flex-grow-1"
|
<button title="Show previous image" class="btn btn-outline-info px-2 flex-grow-1"
|
||||||
style="padding: 10%" id="la"
|
style="padding: 10%" id="la" onClick="prevImageInViewer()">
|
||||||
onClick="getPreviousEntry(); setDisabledForViewingNextPrevBttons(); ViewImageOrVideo()">
|
|
||||||
<svg width="16" height="16" fill="currentColor">
|
<svg width="16" height="16" fill="currentColor">
|
||||||
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#prev"/></svg>
|
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#prev"/></svg>
|
||||||
</button>
|
</button>
|
||||||
@@ -161,8 +160,8 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<!-- Right Button (large/flex-grow-1) -->
|
<!-- 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"
|
<button title="Show next image" class="btn btn-outline-info px-2 flex-grow-1"
|
||||||
onClick="getNextEntry(); setDisabledForViewingNextPrevBttons(); ViewImageOrVideo()">
|
style="padding: 10%" id="ra" onClick="nextImageInViewer()">
|
||||||
<svg width="16" height="16" fill="currentColor">
|
<svg width="16" height="16" fill="currentColor">
|
||||||
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#next"/></svg>
|
<use xlink:href="{{url_for('internal', filename='icons.svg')}}#next"/></svg>
|
||||||
</button>
|
</button>
|
||||||
@@ -228,9 +227,6 @@
|
|||||||
</div class="row">
|
</div class="row">
|
||||||
</div id="viewer">
|
</div id="viewer">
|
||||||
</div id="viewer_div">
|
</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 %}
|
{% endblock main_content %}
|
||||||
|
|
||||||
{% block script_content %}
|
{% block script_content %}
|
||||||
|
|||||||
Reference in New Issue
Block a user