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 @@
-
diff --git a/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php b/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php
index 5232dbc1ec..72baca6351 100644
--- a/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php
+++ b/modules/boonex/artificer/data/template/system/scripts/BxTemplMenu.php
@@ -18,7 +18,7 @@ public function __construct ($aObject, $oTemplate = false)
if(isset($aObject['object'])) {
//--- For page submenus ---//
- if(strpos($aObject['object'], '_submenu') !== false && !($this instanceof BxBaseModProfileMenuView)) {
+ if(strpos($aObject['object'], '_submenu') !== false) {
$sClass = 'bx-menu-tab-active';
$this->_bHx = true;
diff --git a/modules/boonex/events/install/langs/en.xml b/modules/boonex/events/install/langs/en.xml
index 002f543786..51937a36dd 100644
--- a/modules/boonex/events/install/langs/en.xml
+++ b/modules/boonex/events/install/langs/en.xml
@@ -193,8 +193,8 @@
-
-
+
+
diff --git a/modules/boonex/russian/data/langs/bx_events/ru.xml b/modules/boonex/russian/data/langs/bx_events/ru.xml
index 374d771a4b..3dae0c90d0 100644
--- a/modules/boonex/russian/data/langs/bx_events/ru.xml
+++ b/modules/boonex/russian/data/langs/bx_events/ru.xml
@@ -576,8 +576,8 @@
-
-
+
+
diff --git a/template/calendar.html b/template/calendar.html
index 2c7cc1a702..50d39ae627 100644
--- a/template/calendar.html
+++ b/template/calendar.html
@@ -23,10 +23,16 @@
}
};
var oOptions = __options__;
-
+
var oBxFullCalendar = null;
- document.addEventListener('DOMContentLoaded', function() {
- oBxFullCalendar = new FullCalendar.Calendar(document.getElementById('__id__'), $.extend({}, oDefaults, oOptions));
+ var fBxFullCalendarInit = function() {
+ oBxFullCalendar = new FullCalendar.Calendar(oElement, $.extend({}, oDefaults, oOptions));
oBxFullCalendar.render();
- });
+ };
+
+ var oElement = document.getElementById('__id__');
+ if(oElement)
+ fBxFullCalendarInit();
+ else
+ document.addEventListener('DOMContentLoaded', fBxFullCalendarInit);
diff --git a/template/scripts/BxBaseMenu.php b/template/scripts/BxBaseMenu.php
index 5e165460fd..6a173ccd59 100644
--- a/template/scripts/BxBaseMenu.php
+++ b/template/scripts/BxBaseMenu.php
@@ -236,7 +236,7 @@ protected function _getMenuItem ($a)
$a['attrs'] = $this->_getMenuAttrs($a);
$a['attrs_wrp'] = '';
- if($this->_bHx /*&& strpos($a['name'], '-manage') === false*/) {
+ if($this->_bHx && !empty($a['link']) && strpos($a['link'], 'javascript:') === false) {
$this->_aHx['get'] = $a['link'];
$a['attrs'] .= bx_get_htmx_attrs($this->_aHx);
diff --git a/template/scripts/BxBasePage.php b/template/scripts/BxBasePage.php
index 764631b19b..dfe8305179 100644
--- a/template/scripts/BxBasePage.php
+++ b/template/scripts/BxBasePage.php
@@ -124,7 +124,7 @@ public function performActionEmbed ()
* Very similar to BxBasePage::getCode
* but adds css and js files which are needed for the corect page display
*/
- public function getCodeDynamic ($bIncludesOnly = false)
+ public function getCodeDynamic ()
{
// TODO: remake to use use collect* template methods
@@ -155,7 +155,28 @@ public function getCodeDynamic ($bIncludesOnly = false)
foreach ($aJsNew as $a)
$sJs .= $oTemplate->addJs($a['url'], true);
- return $sJs . $sCss . (!$bIncludesOnly ? $sContent : '');
+ return $sJs . $sCss . $sContent;
+ }
+
+ public function getIncludes ()
+ {
+ $oTemplate = BxDolTemplate::getInstance();
+
+ // generate page code
+ $this->getCode();
+
+ // get js&css after the page code is generated
+ $aCss = $oTemplate->getCss();
+ $aJs = $oTemplate->getJs();
+
+ // add js&css files in static mode
+ $sResult = '';
+ foreach ($aCss as $a)
+ $sResult .= $oTemplate->addCss($a['url'], true);
+ foreach ($aJs as $a)
+ $sResult .= $oTemplate->addJs($a['url'], true);
+
+ return $sResult;
}
/**