[MGNLGROOVY-5] Disable 'Run' button in script dialog when script is running Created: 19/Jan/10  Updated: 17/Jan/14  Resolved: 17/Jan/14

Status: Closed
Project: Magnolia Groovy Module
Component/s: tree/dialog
Affects Version/s: 1.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Federico Grilli Assignee: Federico Grilli
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

We need to disable the run button when a script is already running, to prevent the user to inadvertently or on purpose submit multiple requests to the server. I quickly tried to implement this but the problem is that I can't assign an id to the button element in DOM via config (is that a bug?).



 Comments   
Comment by Federico Grilli [ 22/Sep/10 ]

Without a proper button or submit element it becomes insanely complicated to disable multiple running of the script. Tried to remove onclick attr while running and restore after it but does not work. Tried adding a global boolean variable called 'running' to the MgnlGroovy.js object which becomes true slightly before ajax call and false in the callback functions 'onError' and 'onSuccess' but seems that the false value is never restored. In sum, I give up for this version.

Generated at Mon Feb 12 05:54:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.