From 2be2c504b26b04ab8c799e3e02d2ffa90819db88 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 11 Jan 2023 13:48:50 +1100 Subject: [PATCH] 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 --- status.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 status.py diff --git a/status.py b/status.py deleted file mode 100644 index 0b25ce1..0000000 --- a/status.py +++ /dev/null @@ -1,31 +0,0 @@ -from shared import PA - -### shared variables to show state of save/delete when we redirect to 'show all' view -# used mostly to note we have create a job for the job manager, or when a job finishes -# 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): - level="success" - message="" - - def GetAlert(self): - return self.level - - def GetMessage(self): - return self.message - - def SetMessage(self, msg, l="success"): - self.message=msg - self.level=l - return - - def AppendMessage(self, msg): - self.message=self.message+msg - return - - def ClearStatus(self): - self.level="success" - self.message="" - return "" - -st=Status()