@cryptotaxi247 / netdata-1 / commits / fd8900d65

fix for very long affix

Costa Tsaousis (ktsaou) committed Dec 15, 2015 at 03:39 UTC fd8900d65ba7a84b05319cc5f2825e5cc68850c1
1 file changed +17 -3
web/dashboard_full.html
+17 -3
@@ -50,6 +50,12 @@
50 * sections of docs content.
51 */
52
53 + .dashboard-sidebar {
54 + max-height: calc(100% - 70px) !important;
55 + overflow-y: auto;
56 + width: 170px !important;
57 + }
58 +
59 /* By default it's not affixed in mobile views, so undo that */
60 .dashboard-sidebar.affix {
61 position: static;
@@ -62,7 +68,7 @@
68
69 .affix {
70 position: static;
65 - top: 50px;
71 + top: 70px !important;
72 width: 170px;
73 }
74 .affix-top {
@@ -644,11 +650,19 @@ function prepareScreen(data) {
650 });
651
652 /* activate bootstrap sidebar (affix) */
647 - $('#sidebar_ul').affix({
653 + $('#sidebar').affix({
654 offset: {
649 - top: 200
655 + top: 200,
656 + bottom: 0
657 }
658 });
659 +
660 + /* fix scrolling of very long affix lists
661 + http://stackoverflow.com/questions/21691585/bootstrap-3-1-0-affix-too-long
662 + */
663 + $('#sidebar').on('affixed.bs.affix', function() {
664 + $(this).removeAttr('style');
665 + });
666 }
667
668 NETDATA.ready(function() {