From 896194b6e3d6fa81747497ff4985d0e10f58ce9c Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 4 Nov 2021 11:07:26 +0100 Subject: [PATCH] perf(wizard): load counters after forms Signed-off-by: Thierry Bugier --- inc/wizard.class.php | 3 --- js/scripts.js | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/wizard.class.php b/inc/wizard.class.php index 00f190e5d..d8044a5c3 100644 --- a/inc/wizard.class.php +++ b/inc/wizard.class.php @@ -264,9 +264,6 @@ public static function showTicketSummary() { "; echo ''; // formcreator_servicecatalogue_ticket_summary - echo Html::scriptBlock("$(function() { - plugin_formcreator.getCounters(); - })"); } protected static function findActiveMenuItem() { diff --git a/js/scripts.js b/js/scripts.js index fc2ebd66c..b76f052b2 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -148,6 +148,11 @@ $(function() { }); } + // load counters + if ($('.status.status_incoming .status_number').length > 0) { + plugin_formcreator.getCounters(); + } + // Initialize search bar var searchInput = $('#plugin_formcreator_searchBar input:first'); if (searchInput.length == 1) {