moved JoblogSearch to internal/js/ as it does not need any jinja processing, added button and hotkey to show logs, and brief logs into dbox - it works, but needs prettying up

This commit is contained in:
2022-02-06 11:36:25 +11:00
parent 83eff02910
commit 645d419748
3 changed files with 29 additions and 10 deletions

View File

@@ -75,16 +75,6 @@
return s
}
function JoblogSearch()
{
data="eid="+current
$.ajax({ type: 'POST', data: data, url: '/joblog_search', success: function(res) {
data = JSON.parse(res)
console.log(data)
}
})
}
function CallViewListRoute(dir)
{
data="eids="+$("#eids").val()
@@ -250,6 +240,9 @@
<button class="btn btn-outline-info p-1" title="View in Fullscreen mode (hotkey: F)" onClick="fullscreen=true; ViewImageOrVideo()">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#fullscreen"/></svg>
</button>
<button class="btn btn-outline-info p-1" title="Show logs relating to this filename (hotkey: l)" onClick="JoblogSearch()">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#log"/></svg>
</button>
<button id="del" class="btn btn-outline-danger p-1" title="Delete (hotkey: Del)"
onClick="$.ajax({ type: 'POST', data: '&eid-0={{current}}', url: '/delete_files', success: function(data){ window.location='/'; return false; } })">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('internal', filename='icons.svg')}}#trash"/></svg>
@@ -285,6 +278,9 @@ $( document ).keydown(function(event) {
fullscreen=!document.fullscreen
ViewImageOrVideo()
break;
case "l":
JoblogSearch()
break;
case "Delete":
$('#del').click()
default: