diff --git a/BUGs b/BUGs index 5ed24b3..43e33cd 100644 --- a/BUGs +++ b/BUGs @@ -6,4 +6,3 @@ BUG-106: cant add trudy /pat? as refimgs via FaceDBox (it came from a face bbox, BUT, I have grown the face seln by 10%?) BUG-109: add mich force override, removed it, then re-added it, then rebuild DB form scratch and metadata has a duplicate - redo disco metadata with md5 not UUID of face dataS -BUG-112: with 'move_files' staying on same page, highlighting is now broken as ecnt is in the wrong order diff --git a/TODO b/TODO index ccd751e..deb0477 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,8 @@ ### GENERAL * get all status messages to use toasts AND get func to also increase/descrease the job counter as appropriate) + - [DONE] all status messages use toasts + -- [TODO] make a helper func for setting toast body and use it in base.html && file_support.js + -- [TODO] make a helper func for setting 'Active Jobs' text/badge and call it when document ready (rather/both than start of base.html) * ignore face should ignore ALL matching faces (re: Declan) diff --git a/files.py b/files.py index 41b7429..70e9774 100644 --- a/files.py +++ b/files.py @@ -502,7 +502,7 @@ def search(search_term): def scannow(): job=NewJob("scannow" ) st.SetMessage("scanning for new files in: Job #{} (Click the link to follow progress)".format( job.id, job.id) ) - return render_template("base.html") + return redirect("/jobs") ################################################################################ # /files/forcescan -> deletes old data in DB, and does a brand new scan @@ -512,7 +512,7 @@ def scannow(): def forcescan(): job=NewJob("forcescan" ) st.SetMessage("force scan & rebuild data for files in: Job #{} (Click the link to follow progress)".format( job.id, job.id) ) - return render_template("base.html") + return redirect("/jobs") ################################################################################ # /files/scan_sp -> allows us to force a check for new files @@ -522,7 +522,7 @@ def forcescan(): def scan_sp(): job=NewJob("scan_sp" ) st.SetMessage("scanning for new files in: Job #{} (Click the link to follow progress)".format( job.id, job.id) ) - return render_template("base.html") + return redirect("/jobs") ################################################################################ diff --git a/internal/js/files_support.js b/internal/js/files_support.js index 007535e..3d663d3 100644 --- a/internal/js/files_support.js +++ b/internal/js/files_support.js @@ -61,6 +61,8 @@ function MoveSubmit() { // remove the images being moved $("[name^=eid-]").each( function() { $('#'+$(this).attr('value')).remove() } ) + // reorder the images via ecnt again, so 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){ $('.toast-body').html( "Created Job #" + data.job_id + " to move selected file(s)" ); $('.toast').toast("show"); return false; } }) } diff --git a/job.py b/job.py index 4b9ac34..98b92e2 100644 --- a/job.py +++ b/job.py @@ -197,7 +197,7 @@ def joblog(id): @login_required def wakeup(): WakePAJobManager() - return render_template("base.html") + return redirect("/") ################################################################################ @app.route("/stale_job/", methods=["POST"]) diff --git a/person.py b/person.py index 07ccedb..99bd75b 100644 --- a/person.py +++ b/person.py @@ -242,7 +242,7 @@ def person(id): person = Person.query.get(id) if not person: st.SetMessage( f"No such person with id: {id}", "danger" ) - return render_template("base.html" ) + return redirect("/") form = PersonForm(request.values, obj=person) return render_template("person.html", person=person, form=form, page_title = page_title) diff --git a/templates/base.html b/templates/base.html index 1852a54..4558006 100644 --- a/templates/base.html +++ b/templates/base.html @@ -133,12 +133,6 @@ - {% if GetMessage()|length %} -
- {{ GetMessage()|safe}} - {{ ClearStatus() }} -
- {% endif %} {% if GetJM_Message() != None %} {% set msg=GetJM_Message() %} {% if request.endpoint != "fix_dups" and request.endpoint != "rm_dups" and request.endpoint != "stale_jobs" %} @@ -178,6 +172,17 @@ + {% if GetMessage()|length %} + + {{ ClearStatus() }} + {% endif %} {% endif %}