Browse Source

#5041 Update packages

Bump theia-sticky-sidebar from 1.7.0 to 2.0.0
Merge pull request #5084 from unacms/dependabot/npm_and_yarn/theia-sticky-sidebar-2.0.0
Alex Trofimov 1 year ago
parent
commit
e405ec133c
2 changed files with 5 additions and 4 deletions
  1. 4 3
      inc/js/classes/BxDolPage.js
  2. 1 1
      template/scripts/BxBasePage.php

+ 4 - 3
inc/js/classes/BxDolPage.js

@@ -30,9 +30,10 @@ function BxDolPage(oOptions) {
 BxDolPage.prototype.init = function() {
     var $this = this;
     if ($this._isStickyColumns && !$('html').hasClass('bx-media-phone')) {
-        $('.bx-layout-col').theiaStickySidebar({
-            additionalMarginTop: 70
-        });
+        window.glTheiaStickySidebar = new TheiaStickySidebar.TheiaStickySidebar($.extend({}, {
+            elements: '.bx-layout-col',
+            additionalMarginTop:70
+        }, typeof(window.glTheiaStickySidebarSettings) !== 'undefined' ? window.glTheiaStickySidebarSettings : {}));
     }
 
     // process embeds

+ 1 - 1
template/scripts/BxBasePage.php

@@ -1005,7 +1005,7 @@ class BxBasePage extends BxDolPage
      */
     protected function _addJsCss()
     {
-        $this->_oTemplate->addJs(array('BxDolPage.js', 'theia-sticky-sidebar/theia-sticky-sidebar.min.js', 'theia-sticky-sidebar/ResizeSensor.min.js'));
+        $this->_oTemplate->addJs(array('BxDolPage.js', 'theia-sticky-sidebar/theia-sticky-sidebar.umd.js', 'theia-sticky-sidebar/ResizeSensor.min.js'));
         $this->_oTemplate->addCss('page_layouts.css');
     }