diff --git a/TODO b/TODO index 5002b93..463ddb5 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,3 @@ -restore dialog has ok button without colour -delete from viewer on success should go up - ### GENERAL * jobs for AI should show path name * rm dups job should show progress bar diff --git a/internal/js/files_support.js b/internal/js/files_support.js index e12e058..d5f0e36 100644 --- a/internal/js/files_support.js +++ b/internal/js/files_support.js @@ -201,7 +201,7 @@ function DelDBox(del_or_undel) else { which="restore" - col="sucess" + col="success" } document.ents_to_del=[] @@ -905,6 +905,9 @@ function handleCheckAmendmentJobStatus(data) handleTransformImageJobCompleted(data.job, data.entry) else if ( data.job.name == 'delete_files' || data.job.name == 'restore_files' || data.job.name == 'move_files' ) handleMoveOrDeleteOrRestoreFileJobCompleted(data.job) + // if we are viewing this file, then just go up / back,b/c this file is "gone" from this view + if( document.viewing ) + goOutOfViewer() } else { setTimeout( function() { checkForAmendmentJobToComplete(data.job.id) }, 1000 ); } } diff --git a/internal/js/view_support.js b/internal/js/view_support.js index b486e9b..fd31f55 100644 --- a/internal/js/view_support.js +++ b/internal/js/view_support.js @@ -80,16 +80,19 @@ function DrawImg() // -50 is a straight up hack, no idea why this works, but its good enough for me if (!Array.isArray(am)) { - const style = 'position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);'; - $('#throbber').attr('style', style + ' height: 96px;'); - $('#white-circle').attr('style', style + ' height: 72px;'); + $('#throbber').show() + $('#white-circle').show() if(am.type.which == 'img' ) - $('#inside-img').attr('style', style + ' height: 64px;').attr('src', '/internal/'+am.type.what ); + { + $('#inside-img').attr('src', '/internal/'+am.type.what ); + $('#inside-img').show() + } else { - $('#inside-icon').attr('style', `${style} color:${am.type.colour}; height: 64px;`) + $('#inside-icon').attr('style', `color:${am.type.colour};height:64px` ) $('#inside-icon').attr('fill', am.type.colour ) $('#inside-icon use').attr('xlink:href', `/internal/icons.svg#${am.type.what}`); + $('#inside-icon').show() } } else { $('#throbber').hide() diff --git a/templates/files.html b/templates/files.html index 67e4de5..600d27e 100644 --- a/templates/files.html +++ b/templates/files.html @@ -140,10 +140,12 @@
- - - - + + +