d247ecec54
fix up bug where sucess used instead of success, also if we delete/restore/move a file from inside the viewer, then adjust the files* divs, and go out of the viewer (back/up) and show updated files div
2025-10-27 22:06:54 +11:00
4d7f3dfed9
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
2025-10-26 15:44:13 +11:00
4421da0d1d
make move_files have EntryAmendments, do not remove from the UI instantly, and handle just like delete_files, remove restriction on forcing the page to go back to / on search, with new logic its not an issue, also force MoveDBox to start with Storage path rather than another, MOST moves should be to Storage, but should tweak this to be the opposite of current path type
2025-10-26 13:32:31 +11:00
9bdd9d5b78
revamp whole EA flow. Server created EAs when we do certain jobs (transform, delete_files, restore_files), then instead of faking amendments in the jscript, get job creation to return EA from job ORM, then check is now generic for end of any amendment job, and when it finishes, use that to clear our amendments in document, and redraw through normal UI code. No smarts in client, all driven by state from server, and if we reload a page mid jobs, it has required state, and because an amendment job is still progressing, it runs check code again
2025-10-25 18:21:28 +11:00
56771308a6
updated BUGs in general to remove older / fixed BUGs relating to the confusion of current/eids, etc.
...
update amendments in tables.sql to include job_id in entry_ammendment
added amend.py to move amendment-related code into its own file when we create a job (NewJob)
and that job matches an amendmentType (via job_name or job_name:amt <- where amt relates to how we do a transform_image), then
we enter a new EntryAmendment pa_job_mgr knows when a Transform job ends, and removes relevant EntryAmendment
files*.js use EntryAmendment data to render thumbnails with relevant AmendmentType
if a normal page load (like /files_ip), and there is an EntryAmendment, mark up the thumb, run the check jobs to look for completion of the job,
removeal of the EntryAmendment and update the entry based on 'transformed' image
OVERALL: this is a functioning version that uses EntryAmendments and can handle loading a new page with outstanding amendments
and 'deals' with it. This is a good base, but does not cater for remove_files or move_files
2025-10-20 19:31:57 +11:00
80ceb7aaed
removed __repr__ from classes in files.py, and added in sqlalchemy class and marshmallow schemas for entry amendments, then load amendments on get_entry_by_id - so any page load (first or next/prev) will see amendments, we then display them into the files list and now add a white circle inside the throbber and overlay that with approrpiate icon/image - all of which is taken from amendment type and eid. tables.sql also updated to create the amendment data, tweaked icons.svg to remove hardcoded-colours for flip_[vh]
2025-10-15 23:06:05 +11:00
27e06a9462
any change of opts needs to invaldiate cache
2025-10-12 21:22:14 +11:00
0eee594206
fix up bug with cache not working when we change how_many
2025-10-12 19:33:12 +11:00
97e738dc13
implemented a quick cache for flat view
2025-10-12 16:29:39 +11:00
b61f048dec
reverted partial client side back button logic, but also now tested / validated if somehow we are in a flat view and ask for entries and dont get all of them back, or we are in folder view and we try to go into a folder or back up a folder and we get no data as someone deleted it since we made the view, so then show appropriate client-side errors
2025-10-12 16:02:21 +11:00
0ac0eedef9
handle going into Dirs and back from Dirs by doing logic of parent dir on server side, only return eids, and get normal code to handle rendering, no specific get_dir_entries route -> its not get_dir_eids, and the rest is normal code. Much cleaner/simpler. At this point I think the major rewrite it functional, commiting before more testing and then merge code and removed firstEntryOnPage bug (its now pageList[0])
2025-10-12 13:14:53 +11:00
517b5c6167
made more of the javascript hopefulyl honour versions, sort of works, not fully deployed consistently but works well enough for home use in dev. Also tweaked how the layout looks on a phone so that la / ra buttons on beside the image. Still oddly needs me to shrink that page, but it is now visually right - odd
2025-10-11 15:02:58 +11:00
e4bf9606b9
move functions to appropriate file location for files/view support js, commented them better, removed some dead code
2025-10-11 12:13:44 +11:00
1e421c3f22
move jscript logic out of template/html, into jscript so we can keep all logic into the included file, then I can force version on it and stop caching issues in mobiles, and a shift-reload will also get new code, rather than a container restart even on desktops
2025-10-11 11:11:51 +11:00
346defde8b
added a functional (small) up button in the viewer, all works
2025-10-11 09:19:51 +11:00
b51d9e1776
make delete/restore button in viewer be the right colour, and go back to / when the success for the delete or restore finishes
2025-10-10 23:13:03 +11:00
fa2197adbe
fix up bug where empty file_rbp did not work and displayed in the wrong div
2025-10-10 23:03:23 +11:00
4feae96511
remove comments/format
2025-10-07 23:31:37 +11:00
eb7bb84e09
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
2025-10-07 00:00:50 +11:00
7f13d78700
deal with completely empty directories, remove ChangeSize and move that content into changeSize
2025-10-06 21:41:35 +11:00
e5d6ce9b73
move MoveDBox into full javascript and fold it into internal/js/files_support.js, also remove unused parameter for MoveDBox, and use marshmallow to pass people in query_data - overall just cleaner more consistent code for existing functionality
2025-10-05 23:20:17 +11:00
24c3762c61
remove PathDetails*, and use marshmallow schemas with methods to get icon_url, and "path" renamed to "root_dir", updated move* code to use new data structure
2025-10-05 22:19:58 +11:00
40f0b5d369
refactor most javascript code, moved what can be moved into files_support.js, made keydown() items only apply when I go to the viewer code
2025-10-04 23:25:46 +10:00
b0c738fcc1
moved cFO() to changeOPT() into internal/js, transformed file_list_ip to work with new query_data model, made the Size buttons use modern bootstrap5 radio buttons and work again without the form for all file* routes. Removed a lot of dead code, moved code to resetNextPrev buttons to anytime we getPage, reducing code, handle setting OPT in jscript via a to_dict() for States. Overall, search and file_list_ip now work. Only main thing left is the override code
2025-10-02 23:11:14 +10:00
a7ce8e66b5
change back to how_many, too hard to fix and the inconsistency broke the GUI change
2025-10-01 23:40:39 +10:00
175e43c9bb
make viewer work for files_sp, by resetting entryList and pageList for any new directory load
2025-09-30 18:38:54 +10:00
a0e06717ac
viewer now works for files_ip, still have broken bits everywhere - files_rbp, change_opts, do I want a back button? lots of dead/old code, probably cam move more js into *_support, and do I want to keep files_support separate to view_support
2025-09-30 00:29:11 +10:00
1ca5ca192c
move isMobile() to support js, as it has no jinja2 in it
2025-09-28 21:44:02 +10:00
5f8c48ac18
fix highlighting issue - as expected, ecnt was wrong
2025-09-27 17:36:31 +10:00
b67f2d9dcb
now allow files_sp paths to work (and support folders). Highlighting with folders is broken (likely dodgy ecnt). viewing still broken, but basic navigations is finally working with folders now
2025-09-27 12:42:01 +10:00
5842bf2ab8
set OPT values in jscript in files.html, added functions to draw figures on a page based on pageList (subset of entryList) & json data, and tweaked just grouping select as well to also use the draw figures func() in jscript. Needed to move out .figure click handler into the draw figures too. This is now semi-functional, images load, pages next/prev works, grouping works -- BUT only for files_ip -- folders wont work, search wont work, files_sp wont work, viewing a file wont work
2025-09-27 00:31:42 +10:00
9ec8195d0a
first pass of supprot functions to allow query/entry_list to drive pagination, and do not go back to the server to calc next/prev page
2025-09-26 19:25:19 +10:00
53ef671d34
added a isMobile() function that adds a shift and ctrl key to the files view, which can be clicked to fake a shift or ctrl key selection event on a tablet/mobile - first pass at this, its fairly usable. I might allow de-selecting the shift or ctrl key if they are pressed again before a selection is used, otherwise this is all functional. Note, I also changed the contextmenu to a click not mouse down on selection of an item in the menu. This is allows me to stop the propagation of the click event which was being trapped by the $(document).on( "click" ... and which we dont want - also exposes a BUG that when I click the context menu onto a different image it does not highlight the new image and some menu items process the original highlight, others the image under the context menu
2024-01-21 23:07:31 +11:00
4b1bbcb2bf
broad (small) changes to make style of all routes and jobs to be consistent, e.g. use underscords between words
2023-01-15 23:17:59 +11:00
f1c43906ab
delete & restore files now clean up UI and dont reload page by default. For all moves/deletes/restores that start on a search view, they now reload the page instead of just cleaning up the UI as searching by name will cause the UI to need complex redrawing, easier to live with the reload for now
2023-01-15 13:32:25 +11:00
1ed4a0f25d
escape apostrophes in prefix/suffix on move existing which fixes BUG-116
2023-01-13 17:22:26 +11:00
f875b50dc8
fixed BUG-114 -> only show path-specific existing options in movedbox. Added test doc to read to TODO
2023-01-13 16:48:35 +11:00
ef9f26189a
another large clean up of code, all POSTs are now using make_response() and returning json OR are for a form that flask handles with rendering direct html. Where there is a POST with json response, the jscript now calls CheckForJobs() to show it in the F/E. Removed several debugs. Fixed up undocumented BUG where import datetime was wrong, and prefix/suffix also to offer directories near the date of an image. Removed unused routes for clearing messages
2023-01-12 16:47:43 +11:00
a29cbb143c
Huge change, removed Status class and all "alert" messages are now shown as BS toast() and are via the DB and handled async in the F/E in jscript via Ajax. Fixed BUG-113 where toasts() were repeating. Removed many of the explicit alert messages (other than errors) and hooked {New|Finish}Job to consistently send messages to the F/E. Other messages (F/E without a job, like save settings) now use this model as well. Finally converted most of the older POST responses to formal json
2023-01-11 13:50:05 +11:00
56c2d586b6
clean up how we create toasts() [no longer try to reuse dom elements, just add new ones each time], support persistent notifications and close button or not [via separate booleans], created a clear message route and use that now in templates/base.html to clear FE messages. This will break for check dups as I am not setting persistence / close buttons correctly for those jobs, that is next. Converted move_files to new format
2023-01-09 13:13:51 +11:00
1ba9bf4312
renamed toast.js to jobs.js and moved Job related calls to jobs.py form files.py AND get job.py to allow job_mgr msgs to go to F/E via a POST of /checkforjobs (picked up in templates/base.html). move files also calls new CheckForJobs() to pick up when move job finishes without needing a page reload
2023-01-06 17:37:15 +11:00
a64b449327
created toast.js with a StatusMsg() func that dynamically adds toasts that can stack as we need more, and changed over code to use it
2023-01-04 23:36:20 +11:00
c3971eb495
first-pass of popups for job creation for more than just move files, and fix BUG-112 (after move highlighting is broken)
2023-01-04 12:26:25 +11:00
0eeb68658b
move files now has bs toast pop for success and stays on the page you are on for more moves
2023-01-03 22:46:29 +11:00
972eac5b5b
first pass of move_files not redirecting to / and staying put for an other move_files, works, but needs success/toast
2023-01-03 15:48:13 +11:00
a320f1e5e6
fix BUG-110 (Enter key not submitting MoveDBox
2022-12-28 13:58:03 +11:00
7a17d91779
now use eval() for GetEntries*Fold*, and much better fix for bug where next/prev was breaking with inputs with spaces in names -- dont need those inputs anyway, JUST pass next or prev and the rest comes from pa_user_state now
2022-01-29 18:53:30 +11:00
8e82271e2a
start of noo for Search, and rewrite of GetEnt* to use eval(), search and flat done, but also fixed OLD bug I just noticed where prev/next buttons would not work when sorting by "A to Z", etc. as the value of the form.input has a space in it and serializeArray() was not dealing with it properly
2022-01-29 18:06:21 +11:00
a84946b561
fixed BUG-76 - no existing for a non-date with move
2022-01-09 18:13:26 +11:00
dc21d65dd7
Put new functionality in to allow choosing existing folder in move code - it goes back and forwards 7 days from the date of this file and finds matching files and uses those dirs, or just dirname matches for those dates and offers them up. Also improved Move code to reject dodgy paths
2022-01-09 12:20:29 +11:00