diff --git a/TODO b/TODO index deb0477..12026f2 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,9 @@ ### 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 + -- [DONE] 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) + -- should allow all JM Messages, or other messages to be an active Ajax poll until a job has completed * ignore face should ignore ALL matching faces (re: Declan) diff --git a/templates/base.html b/templates/base.html index b3c4e0f..17983df 100644 --- a/templates/base.html +++ b/templates/base.html @@ -137,22 +137,24 @@ {% if GetJM_Message() != None %} {% set msg=GetJM_Message() %} {% if request.endpoint != "fix_dups" and request.endpoint != "rm_dups" and request.endpoint != "stale_jobs" %} -
- {% if msg.alert != "success" and msg.job.name != "checkdups" %} -
- + {% if msg.alert != "success" %} +
+ {% if msg.alert != "success" and msg.job.name != "checkdups" %} + + + {% endif %} + {% if msg.job_id %} + Job #{{msg.job_id}}: + {% endif %} + {{msg.message|safe}} + +
+ {# if a JM is a danger message, allow code to remove the status, it should be 'permanent' until addressed -- e.g. you have duplicates, fix them #} + {% if msg.alert != "danger" %} + {% set dont_print=ClearJM_Message(msg.id) %} {% endif %} - {% if msg.job_id %} - Job #{{msg.job_id}}: - {% endif %} - {{msg.message|safe}} - -
- {# if a JM is a danger message, allow code to remove the status, it should be 'permanent' until addressed -- e.g. you have duplicates, fix them #} - {% if msg.alert != "danger" %} - {% set dont_print=ClearJM_Message(msg.id) %} {% endif %} {% endif %} {% endif %} @@ -172,16 +174,23 @@ - {% if GetMessage()|length %} - {{ ClearStatus() }} - {% endif %} {% endif %}