Переглянути джерело

Ticket #5184 - Add pissibility to use another iconset.

AntonLV 1 рік тому
батько
коміт
ccde595fb8
1 змінених файлів з 12 додано та 2 видалено
  1. 12 2
      template/scripts/BxBaseIconsetLucide.php

+ 12 - 2
template/scripts/BxBaseIconsetLucide.php

@@ -118,7 +118,7 @@ class BxBaseIconsetLucide extends BxBaseIconset
         $sMap = json_encode($this->_aMap);
 
         $sCode = <<<BLAH
-        (function initClassOnlyLucide() {
+        function bx_iconset_init_lucide() {
             if(!window.lucide || !lucide.icons)
                 return;
  
@@ -139,7 +139,17 @@ class BxBaseIconsetLucide extends BxBaseIconset
               attrs: { class: ['sys-icon'] },
               nameAttr: 'data-lucide'
             });
-        })();
+        };
+
+        bx_iconset_init_lucide();
+
+        if (typeof glOnProcessHtml === 'undefined')
+            glOnProcessHtml = [];
+        if (glOnProcessHtml instanceof Array) {
+            glOnProcessHtml.push(function(e) {
+                bx_iconset_init_lucide();
+            });
+        }
 BLAH;
 
         return $this->_oTemplate->_wrapInTagJsCode($sCode);