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:
1 parent
ea88b7a772
commit
debce4ba4a
9 files changed
+30
-18
No files matched your search
@@ -29,7 +29,7 @@
|
||||
{{ form_widget(dependency.position) }}
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<button type="button" class="btn btn-ghost btn-sm program-collection-remove" title="{{ 'mt3s.marketing_program.task.dependency.remove'|trans }}">
|
||||
<button type="button" class="btn btn-ghost btn-sm btn-nospin program-collection-remove" title="{{ 'mt3s.marketing_program.task.dependency.remove'|trans }}">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -53,7 +53,7 @@
|
||||
{{ form_widget(raci.position) }}
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
<button type="button" class="btn btn-ghost btn-sm program-collection-remove" title="{{ 'mt3s.marketing_program.task.raci.remove'|trans }}">
|
||||
<button type="button" class="btn btn-ghost btn-sm btn-nospin program-collection-remove" title="{{ 'mt3s.marketing_program.task.raci.remove'|trans }}">
|
||||
<i class="ri-delete-bin-line"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -114,7 +114,7 @@
|
||||
{{ _self.dependency_row(dependency) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-ghost program-collection-add">
|
||||
<button type="button" class="btn btn-ghost btn-nospin program-collection-add">
|
||||
<i class="ri-add-line"></i> {{ 'mt3s.marketing_program.task.dependency.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@
|
||||
{{ _self.raci_row(raci) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-ghost program-collection-add">
|
||||
<button type="button" class="btn btn-ghost btn-nospin program-collection-add">
|
||||
<i class="ri-add-line"></i> {{ 'mt3s.marketing_program.task.raci.add'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user