diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml index c715ee1cd..e64577cc2 100644 --- a/application/layouts/scripts/layout.phtml +++ b/application/layouts/scripts/layout.phtml @@ -56,6 +56,25 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
render($innerLayoutScript); ?>
+ diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 07af82446..866bea4b2 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -27,6 +27,16 @@ * @type {bool} */ this.mobileMenu = false; + + // detect currentLayout + var classList = $('#layout').attr('class').split(/\s+/); + var _this = this; + var matched; + $.each(classList, function(index, item) { + if (null !== (matched = item.match(/^([a-z]+)-layout$/))) { + _this.currentLayout = matched[1]; + } + }); }; Icinga.UI.prototype = {