From 4d7f3dfed9a0f28e3a63ea3a64a10cf97ba76227 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 26 Oct 2025 15:44:13 +1100 Subject: [PATCH] Fixing BUGs 144/145, (needed a parseInt), and force MovedBox path selection to Storage always - if moving from Import path, likely storing, if in Storage path, likely moving inside the Storage area, user can always override --- BUGs | 1 - internal/js/files_support.js | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/BUGs b/BUGs index 47afd0b..0b8440a 100644 --- a/BUGs +++ b/BUGs @@ -1,5 +1,4 @@ ### Next: 146 -BUG-145: when I selected a few files with ctrl-click, moved them, the end result was "no files in path" BUG-143: if I skip next fast enough in files_ip, it can get the warning about changes to entry list... (would have though I disabled next page until loaded) BUG-142: after transforming, the face data is still in the old spots, really should delete it / make it recalc BUG-141: can currently try to flip a video (in a highlighted group) diff --git a/internal/js/files_support.js b/internal/js/files_support.js index 7a12a17..e12e058 100644 --- a/internal/js/files_support.js +++ b/internal/js/files_support.js @@ -89,7 +89,7 @@ function GetExistingDirsAsDiv( dt, divname, ptype ) // 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) +function MoveDBox() { $('#dbox-title').html('Move Selected File(s) to new directory in Storage Path') div =` @@ -99,7 +99,7 @@ function MoveDBox(path_details)
' + div += ' value="' + move_paths[0].type.name + '">' div+=GetSelnAsDiv() yr=$('.highlight').first().attr('yr') dt=$('.highlight').first().attr('date') @@ -110,10 +110,10 @@ function MoveDBox(path_details) ` // NB: alert-primary here is a hack to get the bg the same color as the alert primary by - div+= '' + div+= '' div+= '' div+=` @@ -140,6 +140,13 @@ function MoveDBox(path_details) ` + // force to Storage always - if in Import, liekly storing, if in Storage, likely moving, user can always override + div+=` + + ` $('#dbox-content').html(div) $('#dbox').modal('show') @@ -675,6 +682,7 @@ function getPage(pageNumber, successCallback, viewingIdx=0) $('#ra').prop('disabled', true) const startIndex = (pageNumber - 1) * OPT.how_many; const endIndex = startIndex + OPT.how_many; + console.log('pageNumber is: ' + pageNumber + ', about to make pageList from si=' +startIndex + ', to ei=' + endIndex ) pageList = entryList.slice(startIndex, endIndex); // set up data to send to server to get the entry data for entries in pageList @@ -850,9 +858,9 @@ function handleMoveOrDeleteOrRestoreFileJobCompleted(job) { // this grabs the values from the object attributes of eid-0, eid-1, etc. const ids = job.extra.filter(item => item.name.startsWith("eid-")).map(item => item.value); - + // find page number of first element to delete (this is the page we will return too) - pnum=getPageNumberForId( ids[0] ) + pnum=getPageNumberForId( parseInt(ids[0]) ) // remove amendment data for (const ent of ids) @@ -967,7 +975,7 @@ $.contextMenu({ callback: function( key, options) { if( key == "details" ) { DetailsDBox() } if( key == "view" ) { startViewing( $(this).attr('id') ) } - if( key == "move" ) { MoveDBox(move_paths) } + if( key == "move" ) { MoveDBox() } if( key == "del" ) { DelDBox('Delete') } if( key == "undel") { DelDBox('Restore') } if( key == "r90" ) { Transform(90) }