Module: check_mk
Branch: master
Commit: 7ac930dd056990d508655ed6221c3624534292a7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ac930dd056990…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat May 12 18:50:24 2012 +0200
Minor layout fix: prevent bookmarks from wrapping
---
web/htdocs/sidebar.css | 1 +
web/plugins/sidebar/shipped.py | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css
index 88f731b..7c66307 100644
--- a/web/htdocs/sidebar.css
+++ b/web/htdocs/sidebar.css
@@ -321,6 +321,7 @@ div.snapin img.iconbutton {
div.snapin img.iconbutton.bookmark {
width: 16px;
height: 16px;
+ margin: 0px -1px;
}
/* state bullets at problem host or all hosts snapin */
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 4cf53e0..b896407 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1050,7 +1050,7 @@ def render_bookmarks():
bookmarks = load_bookmarks()
n = 0
for title, href in bookmarks:
- html.write("<div id=\"bookmark_%d\">" % n)
+ html.write("<div class=bookmark id=\"bookmark_%d\">" %
n)
iconbutton(_("delete"), "del_bookmark.py?num=%d" % n,
"side", "updateContents", 'snapin_bookmarks', css_class =
'bookmark')
iconbutton(_("edit"), "edit_bookmark.py?num=%d" % n,
"main", css_class = 'bookmark')
html.write(link(title, href))
@@ -1130,6 +1130,17 @@ sidebar_snapins["bookmarks"] = {
"author" : "Mathias Kettner",
"render" : render_bookmarks,
"allowed": [ "user", "admin", "guest" ],
+ "styles" : """
+div.bookmark {
+ width: 230px;
+ max-width: 230px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ white-space: nowrap;
+ color: white;
+}
+"""
}