Module: check_mk
Branch: master
Commit: 76dc11884e817206ae587024b812a1364e516ac2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76dc11884e8172…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 6 15:06:02 2012 +0100
Fix sizing of dashlet contents
---
web/htdocs/dashboard.css | 2 ++
web/htdocs/js/dashboard.js | 4 ++--
web/htdocs/sidebar.py | 12 ++++++------
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/dashboard.css b/web/htdocs/dashboard.css
index 7af9b30..e90e8b2 100644
--- a/web/htdocs/dashboard.css
+++ b/web/htdocs/dashboard.css
@@ -45,6 +45,8 @@ div.dashlet div.dashlet_inner {
position: absolute;
padding: 0px;
margin: 0px;
+ top: 21px;
+ left: 11px;
}
/* Dashlets with "background" set to True */
diff --git a/web/htdocs/js/dashboard.js b/web/htdocs/js/dashboard.js
index 927fb44..64a1a89 100644
--- a/web/htdocs/js/dashboard.js
+++ b/web/htdocs/js/dashboard.js
@@ -93,9 +93,9 @@ function resize_dashlets(id, code)
oDash.style.position = 'absolute';
oDash.style.left = dashlet_padding[3] + "px";
oDash.style.top = dashlet_padding[0] + "px";
- if((d_width - 2*dashlet_padding) > 0)
+ if (netto_width > 0)
oDash.style.width = netto_width + "px";
- if((d_height - 2*dashlet_padding) > 0)
+ if (netto_height > 0)
oDash.style.height = netto_height + "px";
}
}
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 10f4359..c57c3b6 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -206,12 +206,12 @@ def render_snapin(name, state):
html.write('<div class="closesnapin">')
iconbutton("closesnapin",
"sidebar_openclose.py?name=%s&state=off" % name, "side",
"removeSnapin", 'snapin_'+name)
html.write('</div>')
- # Show reload button, but only for reloadable Snapins
- if snapin.get("reload") or snapin.get("restart"):
- html.write('<div class="reloadsnapin">')
- iconbutton("reloadsnapin", url="sidebar_snapin.py?name="
+ name, handler="updateContents",
- name = "snapin_" + name);
- html.write('</div>')
+ # # Show reload button, but only for reloadable Snapins
+ # if snapin.get("reload") or snapin.get("restart"):
+ # html.write('<div class="reloadsnapin">')
+ # iconbutton("reloadsnapin",
url="sidebar_snapin.py?name=" + name, handler="updateContents",
+ # name = "snapin_" + name);
+ # html.write('</div>')
html.write("<b class=heading
onclick=\"toggle_sidebar_snapin(this,'%s')\"
onmouseover=\"this.style.cursor='pointer'\" "
"onmouseout=\"this.style.cursor='auto'\">%s</b>" %
(url, snapin["title"]))
html.write("</div>")