Module: check_mk
Branch: master
Commit: 3c4d8c115e294b906590962f2c2d90cf96caebcf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c4d8c115e294b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 19 19:02:55 2012 +0200
Small layout fixed in new folder style
---
web/htdocs/js/wato.js | 3 ++-
web/htdocs/wato.css | 19 +++++++++++++++----
web/htdocs/wato.py | 12 ++++++------
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index ad3e879..dfa3d4f 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -483,7 +483,8 @@ function wato_randomize_secret(id, len) {
// Folderlist
// ----------------------------------------------------------------------------
-function folder_toggle(obj, on) {
+function wato_toggle_folder(oDiv, on) {
+ var obj = oDiv.parentNode;
var id = obj.id.substr(7);
var obj_edit = document.getElementById('edit_' + id);
var obj_delete = document.getElementById('delete_' + id);
diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css
index 84fa765..23b3c0f 100644
--- a/web/htdocs/wato.css
+++ b/web/htdocs/wato.css
@@ -302,20 +302,20 @@ table.validationerror img {
.wato div.floatfolder .edit {
position: absolute;
top:20px;
- left:20px;
+ right:42px;
}
.wato div.floatfolder .delete {
position: absolute;
top:20px;
- left:42px;
+ right:20px;
}
.wato div.floatfolder .infos {
position: absolute;
- top: 85px;
+ bottom: 29px;
left: 20px;
- color: #fff;
+ color: #bde;
}
.wato div.floatfolder .title {
@@ -336,6 +336,17 @@ table.validationerror img {
color: #fff;
font-size: 14px;
text-decoration: none;
+ position: relative;
+ top: -3px;
+}
+
+.wato div.hoverarea {
+ width: 154px;
+ height: 40px;
+ position: relative;
+ top: 4px;
+ left: 10px;
+ z-index: 100;
}
.wato div.floatfolder:hover {
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 33efbb8..ca3a6e4 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1034,14 +1034,14 @@ def show_subfolders(folder):
# Am I authorized?
auth = check_folder_permissions(entry, "write", False)
- html.write('<div class=floatfolder onclick="location.href =
\'%s\'" ' % enter_url)
+ html.write('<div class=floatfolder id="folder_%s"
onclick="location.href = \'%s\'">' % (
+ entry[".name"], enter_url))
# Only make folder openable when permitted to edit
if auth == True:
- html.write(
- 'onmouseover="folder_toggle(this, true);" '
- 'onmouseout="folder_toggle(this, false)"
id="folder_%s"' % entry['.name']
- )
- html.write('>')
+ html.write('<div class=hoverarea '
+ 'onmouseover="wato_toggle_folder(this, true);" '
+ 'onmouseout="wato_toggle_folder(this, false)">'
+ '</div>')
if auth != True:
html.write('<img class="icon autherr"
src="images/icon_autherr.png" title="%s">' % \