added persistent and cant_close to PA_JobManager_FE_Message, used them from pa_job_manager to set status messages with persistence/close buttons appropriately for items like fix_dups/stale_jobs. When "fixing" now, the persistent Status message stays, but its now positioned approx. below the navbar on the right and is ok. Started on changing status to a more sensible naming conventions (away from alert to level) - more work to complete this

This commit is contained in:
2023-01-10 17:45:02 +11:00
parent 56c2d586b6
commit 0784861331
8 changed files with 46 additions and 64 deletions

View File

@@ -5,18 +5,18 @@ from shared import PA
# including when duplicates are found on import. These status messages are exposed into
# the html files, and they show once for success/green, and sticky for danger/red
class Status(PA):
alert="success"
level="success"
message=""
def GetAlert(self):
return self.alert
return self.level
def GetMessage(self):
return self.message
def SetMessage(self, msg, al="success"):
def SetMessage(self, msg, l="success"):
self.message=msg
self.alert=al
self.level=l
return
def AppendMessage(self, msg):
@@ -24,7 +24,7 @@ class Status(PA):
return
def ClearStatus(self):
self.alert="success"
self.level="success"
self.message=""
return ""