]> arthur.barton.de Git - netdata.git/commitdiff
fix for very long affix
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 15 Dec 2015 01:39:47 +0000 (03:39 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 15 Dec 2015 01:39:47 +0000 (03:39 +0200)
web/dashboard_full.html

index 3aea06303abbabdc59ca655b99b978b0489807d4..06f0dd9290f3e13455975b044dc70484eecfc2a2 100755 (executable)
         * sections of docs content.
         */
 
+       .dashboard-sidebar {
+               max-height: calc(100% - 70px) !important;
+               overflow-y: auto;
+               width: 170px !important;
+       }
+
        /* By default it's not affixed in mobile views, so undo that */
        .dashboard-sidebar.affix {
                position: static;
@@ -62,7 +68,7 @@
 
        .affix {
                position: static;
-               top: 50px;
+               top: 70px !important;
                width: 170px;
        }
        .affix-top {
@@ -644,11 +650,19 @@ function prepareScreen(data) {
        });
 
        /* activate bootstrap sidebar (affix) */
-       $('#sidebar_ul').affix({
+       $('#sidebar').affix({
                offset: {
-                       top: 200
+                       top: 200,
+                       bottom: 0
                }
        });
+
+       /* fix scrolling of very long affix lists
+          http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long
+        */
+       $('#sidebar').on('affixed.bs.affix', function() {
+               $(this).removeAttr('style');
+       });
 }
 
 NETDATA.ready(function() {