From 5db740c828ddffcb918aa6d91fa45247a2d67ace Mon Sep 17 00:00:00 2001 From: wangyidong Date: Sat, 13 Jul 2024 09:57:33 +0800 Subject: [PATCH] * [perf story #59018] Add updateProgress function for export for gantt wg. --- lib/zin/wg/gantt/js/v1.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/zin/wg/gantt/js/v1.js b/lib/zin/wg/gantt/js/v1.js index 78506fe0a8..f9251e6e1a 100644 --- a/lib/zin/wg/gantt/js/v1.js +++ b/lib/zin/wg/gantt/js/v1.js @@ -21,3 +21,17 @@ function getRemoteScript(url, successCallback, errorCallback) script.src = url; document.head.appendChild(script); } + +/** + * Update export progress. + * + * @param int $progress + * @access public + * @return void + */ +function updateProgress(progress) +{ + let progressText = ganttLang.exporting; + if(progress < 1) progressText += Math.floor(progress * 100) + '%'; + $('#mainContent').attr('data-loading', progressText); +}