diff --git a/inc/classes/BxDolInformer.php b/inc/classes/BxDolInformer.php index 06fa95e09b..6fea93030d 100644 --- a/inc/classes/BxDolInformer.php +++ b/inc/classes/BxDolInformer.php @@ -81,11 +81,15 @@ public function setEnabled($bEnabled) */ public function add ($sId, $sMsg, $iType = BX_INFORMER_INFO) { - $this->_aMessages[$sId] = array ( + if(!$this->_bEnabled) + return; + + $this->_addJsCss(); + $this->_aMessages[$sId] = [ 'id' => $sId, 'msg' => $sMsg, 'type' => $iType, - ); + ]; } /** diff --git a/inc/classes/BxDolPage.php b/inc/classes/BxDolPage.php index 1bd39e5015..33d1a9b6ee 100644 --- a/inc/classes/BxDolPage.php +++ b/inc/classes/BxDolPage.php @@ -697,7 +697,7 @@ public function displayPage ($oTemplate = null) $oTemplate->setPageType($this->getType()); $oTemplate->setPageInjections($this->getInjections()); if($oTemplate->getPageNameIndex() == BX_PAGE_CONTENT_PRELOAD) - $oTemplate->setPageContent('page_main_code', $this->getCodeDynamic(true)); + $oTemplate->setPageContent('page_main_code', $this->getIncludes()); else $oTemplate->setPageContent('page_main_code', $this->getCode()); $oTemplate->getPageCode(); diff --git a/modules/base/groups/classes/BxBaseModGroupsModule.php b/modules/base/groups/classes/BxBaseModGroupsModule.php index e83ec75aa9..4e42a8ffd6 100644 --- a/modules/base/groups/classes/BxBaseModGroupsModule.php +++ b/modules/base/groups/classes/BxBaseModGroupsModule.php @@ -128,11 +128,9 @@ public function actionGetQuestionnaire() public function serviceManageTools($sType = 'common') { - $sResult = parent::serviceManageTools($sType); - if(!empty($sResult)) - $this->_oTemplate->addJsSystem(['modules/base/groups/js/|manage_tools.js']); + $this->_oTemplate->addJs(['modules/base/groups/js/|manage_tools.js']); - return $sResult; + return parent::serviceManageTools($sType); } public function decodeDataAPI($aData, $aParams = []) diff --git a/modules/base/groups/classes/BxBaseModGroupsSearchResult.php b/modules/base/groups/classes/BxBaseModGroupsSearchResult.php index 582079b172..170c7f3bed 100644 --- a/modules/base/groups/classes/BxBaseModGroupsSearchResult.php +++ b/modules/base/groups/classes/BxBaseModGroupsSearchResult.php @@ -24,8 +24,8 @@ public function __construct($sMode = '', $aParams = array()) public function displaySearchBox ($sContent, $sPaginate = '') { $aResult = parent::displaySearchBox($sContent, $sPaginate); - - if(!empty($aResult['content'])) { + + if(!empty($aResult['content']) && $this->oModule->_oConfig->getJsClass('main') != '') { $this->oModule->_oTemplate->addJs(['modules/base/groups/js/|main.js', 'main.js']); $aResult['content'] = $this->oModule->_oTemplate->getJsCode('main', [ diff --git a/modules/boonex/artificer/data/template/system/menu_main_submenu_more_auto.html b/modules/boonex/artificer/data/template/system/menu_main_submenu_more_auto.html index 216063aacc..0e03f1b2f2 100644 --- a/modules/boonex/artificer/data/template/system/menu_main_submenu_more_auto.html +++ b/modules/boonex/artificer/data/template/system/menu_main_submenu_more_auto.html @@ -1,6 +1,6 @@