diff --git a/administrator/templates/isis/css/template-rtl.css b/administrator/templates/isis/css/template-rtl.css index ced2a2480f6ac..260ea06277938 100644 --- a/administrator/templates/isis/css/template-rtl.css +++ b/administrator/templates/isis/css/template-rtl.css @@ -6995,7 +6995,6 @@ html { height: 100%; } body { - height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; @@ -8569,7 +8568,8 @@ td.nowrap.has-context { min-height: 51px; } .subhead-collapse { - margin-bottom: 19px; + margin-bottom: 18px; + z-index: 100; } .subhead-collapse.collapse { height: auto; @@ -8599,6 +8599,13 @@ td.nowrap.has-context { padding-right: 10px; } } +@media (min-width: 768px) { + .subhead-collapse.sticky { + position: static; + position: sticky; + top: 30px; + } +} .subhead h1 { font-size: 17px; font-weight: normal; diff --git a/administrator/templates/isis/css/template.css b/administrator/templates/isis/css/template.css index 5e56a1a968c64..3e8a334132259 100644 --- a/administrator/templates/isis/css/template.css +++ b/administrator/templates/isis/css/template.css @@ -6995,7 +6995,6 @@ html { height: 100%; } body { - height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; @@ -8569,7 +8568,8 @@ td.nowrap.has-context { min-height: 51px; } .subhead-collapse { - margin-bottom: 19px; + margin-bottom: 18px; + z-index: 100; } .subhead-collapse.collapse { height: auto; @@ -8599,6 +8599,13 @@ td.nowrap.has-context { padding-right: 10px; } } +@media (min-width: 768px) { + .subhead-collapse.sticky { + position: static; + position: sticky; + top: 30px; + } +} .subhead h1 { font-size: 17px; font-weight: normal; diff --git a/administrator/templates/isis/index.php b/administrator/templates/isis/index.php index a5f4f18a0e265..ae0d4cc0a5437 100644 --- a/administrator/templates/isis/index.php +++ b/administrator/templates/isis/index.php @@ -108,20 +108,8 @@ function colorIsLight($color) return $yiq >= 200; } -// Pass some values to javascript -$offset = 20; - -if ($displayHeader || !$statusFixed) -{ - $offset = 30; -} - -$stickyBar = 0; - -if ($stickyToolbar) -{ - $stickyBar = 'true'; -} +// Sticky toolbar +$stickyBar = $stickyToolbar ? ' sticky' : ''; // Template color if ($navbar_color) @@ -265,7 +253,7 @@ function colorIsLight($color) -
+
diff --git a/administrator/templates/isis/js/template.js b/administrator/templates/isis/js/template.js index 19bed63eb52b6..f1d0327db5ee7 100644 --- a/administrator/templates/isis/js/template.js +++ b/administrator/templates/isis/js/template.js @@ -214,51 +214,6 @@ jQuery(function($) } - /** - * USED IN: All views with toolbar and sticky bar enabled - */ - var navTop; - var isFixed = false; - - if (document.getElementById('isisJsData') && document.getElementById('isisJsData').getAttribute('data-tmpl-sticky') == "true") { - processScrollInit(); - processScroll(); - - $(window).on('resize', processScrollInit); - $(window).on('scroll', processScroll); - } - - function processScrollInit() { - if ($('.subhead').length) { - navTop = $('.subhead').length && $('.subhead').offset().top - parseInt(document.getElementById('isisJsData').getAttribute('data-tmpl-offset')); - - // Fix the container top - $(".container-main").css("top", $('.subhead').height() + $('nav.navbar').height()); - - // Only apply the scrollspy when the toolbar is not collapsed - if (document.body.clientWidth > 480) { - $('.subhead-collapse').height($('.subhead').height()); - $('.subhead').scrollspy({offset: {top: $('.subhead').offset().top - $('nav.navbar').height()}}); - } - } - } - - function processScroll() { - if ($('.subhead').length) { - var scrollTop = $(window).scrollTop(); - if (scrollTop >= navTop && !isFixed) { - isFixed = true; - $('.subhead').addClass('subhead-fixed'); - - // Fix the container top - $(".container-main").css("top", $('.subhead').height() + $('nav.navbar').height()); - } else if (scrollTop <= navTop && isFixed) { - isFixed = false; - $('.subhead').removeClass('subhead-fixed'); - } - } - } - /** * USED IN: All list views to hide/show the sidebar */ diff --git a/administrator/templates/isis/less/blocks/_global.less b/administrator/templates/isis/less/blocks/_global.less index 614f734b2d3af..698d23878dbc6 100644 --- a/administrator/templates/isis/less/blocks/_global.less +++ b/administrator/templates/isis/less/blocks/_global.less @@ -6,7 +6,6 @@ html { } body { - height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; diff --git a/administrator/templates/isis/less/blocks/_toolbar.less b/administrator/templates/isis/less/blocks/_toolbar.less index 8d1f36170b118..9d3e0db57da7c 100644 --- a/administrator/templates/isis/less/blocks/_toolbar.less +++ b/administrator/templates/isis/less/blocks/_toolbar.less @@ -11,7 +11,8 @@ } .subhead-collapse { - margin-bottom: 19px; + margin-bottom: 18px; + z-index: 100; } .subhead-collapse.collapse { @@ -45,6 +46,13 @@ padding-right: 10px; } } +@media (min-width: @md) { + .subhead-collapse.sticky { + position: static; + position: sticky; + top: 30px; + } +} .subhead h1 { font-size: 17px;