remove onpopstate stuff, and updated TODO with better way to deal with this

This commit is contained in:
2022-01-19 21:18:50 +11:00
parent f8cff5f73e
commit a2091f0194
3 changed files with 4 additions and 7 deletions

6
TODO
View File

@@ -1,8 +1,8 @@
## GENERAL
* going forward into search page (and probably all POSTs) does not work - no data posted (e.g. no search term)
- use replaceState in routes I know use POST and I need to keep data, try search first
https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate
- okay somehow (maybe cache-control?) is causing flask to handle this and gunicorn does not!
- seems we could make the /search url be /search/term and use a GET, this would make it not run into this issue
- OR, seems we can follow a different pattern... don't render_template instead do a redirect to a GET of the new, or list? for del...
* per file you could select an unknown face and add it as a ref img to an existing person, or make a new person and attach?
* [DONE] order/ find face with largest size and at least show that as unmatched

View File

@@ -346,6 +346,7 @@ def search():
OPT=Options( request )
# always show flat results for search to start with
OPT.folders=False
OPT.paths=None
entries=GetEntries( OPT )
move_paths = MovePathDetails()
return render_template("files.html", page_title='View Files', search_term=request.form['search_term'], entry_data=entries, OPT=OPT, move_paths=move_paths )

View File

@@ -163,10 +163,6 @@
{% if not InDBox %}
<script>
// do our own back button handling, TODO: 'dangerous' URLs, will be replaced with GETs first via history.replaceState()
window.onpopstate = function(e) {
window.history.back()
}
function SetViewingOptionsForSearchForm()
{
if( $('#noo').length )