fix(program): endless spinner on client-side buttons; program pages never ran their JS

Two defects kept the task form's dependency/RACI rows appearing stuck, and left the program pages uninitialized:

- Add btn-nospin to the 14 client-side Add/Remove buttons (task dependency
  and RACI add/remove, program form collections, item type rows, read-more
  toggle): core binds startIconSpinOnEvent to .btn:not(.btn-nospin) and only
  the ajax handlers restore the icon, so these non-ajax buttons spun forever
- Add ProgramController::getJsLoadMethodPrefix() returning 'mt3sMpProgram':
  core dispatches Mautic[getJsLoadMethodPrefix() + 'OnLoad'](), and without
  the override it fell back to the model alias 'mt3smp.program', which
  nothing listens to, so collections/tabs/sortables were never initialized
- Set the Program list/form/details mauticContent blocks to mt3sMpProgram
  so Mautic.mt3sMpProgramOnLoad() is dispatched on those pages
- TaskController: pass mauticContent=mt3sMpProgram in the post-save
  redirect back to the program view so the program page's JS re-fires
  after saving a task from program context
This commit is contained in:
Alexandre Gain committed 2026-11-15 17:48:40 +01:00
1 parent ea88b7a772
commit debce4ba4a
9 files changed
+30 -18

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
*
* - Plan form: editable, sortable rows (objectives, description items, allocation items), the selected
* item type's description, and tab error markers. Started by Mautic.mt3sMpProgramOnLoad(), which Mautic calls after
* it loads any page whose mauticContent is "program", including pages loaded through Ajax.
* it loads any page whose mauticContent is "mt3sMpProgram", including pages loaded through Ajax.
* - Task form (mauticContent "mt3sMpProgramTask", started by Mautic.mt3sMpProgramTaskOnLoad()): the dependencies and
* the RACI rows work like the program form's collections; the selected kind enslaves a milestone's
* end date; the selected type's description and pictogram sit next to the type dropdown.