scrollbar in multisite sidebar
Message-ID: <51d2ec85.VDmATXnfnlKcirgE%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: d98d32cc73bb3134cc5832a6d5e55e33c5778fcc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d98d32cc73bb31…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 2 17:05:52 2013 +0200
Added option to enable an (ugly) scrollbar in multisite sidebar
---
ChangeLog | 2 ++
web/htdocs/sidebar.css | 8 +++++++-
web/htdocs/sidebar.py | 6 +++++-
web/plugins/config/builtin.py | 3 +++
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 50ce77e..4528939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,8 @@
Display current date in dashboard
* LDAP: Using asynchronous searches / added optional support for paginated
searches (Can be enabled in connection settings)
+ * Added option to enable browser scrollbar to the multisite sidebar (only
+ via "sidebar_show_scrollbar = True" in multisite.mk
WATO:
* Allow to configure check-/retry_interval in second precision
diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css
index b11f718..2ff7a15 100644
--- a/web/htdocs/sidebar.css
+++ b/web/htdocs/sidebar.css
@@ -84,7 +84,13 @@ body.side {
height: 500px;
overflow: hidden;
color: #000000;
- padding-top: 55px;
+ padding-top: 5px;
+ position: absolute;
+ top: 50px;
+}
+
+#side_content.scroll {
+ overflow-y: scroll;
}
/* The footer of the sidebar */
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 1522de1..5898259 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -163,7 +163,11 @@ def page_side():
refresh_snapins = []
restart_snapins = []
- html.write('<div id="side_content">')
+ scrolling = ''
+ if config.sidebar_show_scrollbar:
+ scrolling = ' class=scroll'
+
+ html.write('<div id="side_content"%s>' % scrolling)
for name, state in user_config:
if not name in sidebar_snapins or not config.may("sidesnap." + name):
continue
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index c1abc51..be85e05 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -148,6 +148,9 @@ reschedule_timeout = 10.0
# Interval of snapin updates in seconds
sidebar_update_interval = 30.0
+# It is possible (but ugly) to enable a scrollbar in the sidebar
+sidebar_show_scrollbar = False
+
# Number of columsn in "Filter" form
filter_columns = 2