add some padding, and set root_eid - Its 0 when nothing at all in Path (first run/empty). Also, started override for marshmallow, but overrides wont work yet
This commit is contained in:
@@ -490,7 +490,7 @@ function drawPageOfFigures()
|
||||
|
||||
if( OPT.folders )
|
||||
{
|
||||
if( !document.entries.length || (document.entries.length && document.entries[0].in_dir.rel_path == '' ) )
|
||||
if( (document.entries.length && document.entries[0].in_dir.rel_path == '' ) || OPT.root_eid == 0 )
|
||||
{
|
||||
gray="_gray"
|
||||
back=""
|
||||
@@ -512,9 +512,6 @@ function drawPageOfFigures()
|
||||
</figure>
|
||||
</div>`
|
||||
ecnt++
|
||||
/*
|
||||
<script>f=$('#_back'); w=f.find('svg').width(); f.find('figcaption').width(w);</script>
|
||||
*/
|
||||
$('#figures').append(html)
|
||||
}
|
||||
for (const obj of document.entries) {
|
||||
@@ -524,7 +521,7 @@ function drawPageOfFigures()
|
||||
if( document.entries.length == 0 )
|
||||
if( OPT.search_term )
|
||||
$('#figures').append( `<span class="alert alert-danger p-2 col-auto"> No matches for: '${OPT.search_term}'</span>` )
|
||||
else
|
||||
else if( OPT.root_eid == 0 )
|
||||
$('#figures').append( `<span class="alert alert-danger p-2 col-auto d-flex align-items-center">No files in Path!</span>` )
|
||||
$('.figure').click( function(e) { DoSel(e, this ); SetButtonState(); return false; });
|
||||
$('.figure').dblclick( function(e) { dblClickToViewEntry( $(this).attr('id') ); setDisabledForViewingNextPrevBttons(); addViewerKeyHandler() } )
|
||||
@@ -536,6 +533,11 @@ function drawPageOfFigures()
|
||||
function getPageFileList(res, viewingIdx)
|
||||
{
|
||||
$('#file_list_div').empty()
|
||||
if( OPT.root_eid == 0 )
|
||||
{
|
||||
$('#file_list_div').append( `<span class="alert alert-danger p-2">No files in Path!</span>` )
|
||||
return
|
||||
}
|
||||
html='<table class="table table-striped table-sm col-12">'
|
||||
html+='<thead><tr class="table-primary"><th>Name</th><th>Size (MB)</th><th>Path Prefix</th><th>Hash</th></tr></thead><tbody>'
|
||||
for (const obj of res) {
|
||||
|
||||
Reference in New Issue
Block a user