diff --git a/TODO b/TODO index da871d4..26088f2 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,12 @@ ### GENERAL - * delete files should behave like /move_files (stay on same page) as well as the status messages above - * all routes should be consistent naming conventions (with or without _ ) - * change the rotation code to use that jpeg util to reduce/remove compression loss? - * get build process to create a random string for secret for PROD, otherwise use builtin for dev * think about security - in job_mgr anywhere I can os.replace/remove NEED to protect, etc + * change the rotation code to use that jpeg util to reduce/remove compression loss? + * read this: https://flask.palletsprojects.com/en/2.2.x/testing/#faking-resources-and-context * could get better AI optim, by keeping track of just new files since scan (even if we did this from the DB), diff --git a/internal/js/files_support.js b/internal/js/files_support.js index 9c43b34..d6c0ae3 100644 --- a/internal/js/files_support.js +++ b/internal/js/files_support.js @@ -74,18 +74,18 @@ function GetExistingDirsAsDiv( dt, divname, ptype ) } ) } -// wrapper to do some clean up before POST to /move_files -// used to remove the highlighted item(s) -- effectively removing them from view/selection so continued 'Moves' can occur -function MoveSubmit() +// wrapper to do some clean up before POST to /move_files or /delete_files +// used to remove the highlighted item(s) && reset the numbering so highlighting continues to work +function MoveOrDelCleanUpUI() { // remove the images being moved (so UI immediately 'sees' the move) $("[name^=eid-]").each( function() { $('#'+$(this).attr('value')).remove() } ) // reorder the images via ecnt again, so future highlighting can work document.mf_id=0; $('.figure').each( function() { $(this).attr('ecnt', document.mf_id ); document.mf_id++ } ) $('#dbox').modal('hide') - $.ajax({ type: 'POST', data: $('#mv_fm').serialize(), url: '/move_files', success: function(data) { CheckForJobs() } }) } + // show the DBox for a move file, includes all thumbnails of selected files to move // and a pre-populated folder to move them into, with text field to add a suffix function MoveDBox(path_details, db_url) @@ -126,10 +126,12 @@ function MoveDBox(path_details, db_url)