Module: check_mk
Branch: master
Commit: fdd133972381c8c5f0fbe9734c9bdb514d09dcc9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fdd133972381c8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 14 13:12:44 2016 +0200
Fixed contactgroups overlapping folder graphic on hover
---
web/htdocs/js/wato.js | 4 ++--
web/htdocs/wato.css | 21 ++++++++++++++++++++-
web/htdocs/wato.py | 4 +++-
3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/js/wato.js b/web/htdocs/js/wato.js
index 01b2c39..4b51e2b 100644
--- a/web/htdocs/js/wato.js
+++ b/web/htdocs/js/wato.js
@@ -711,9 +711,9 @@ function wato_toggle_folder(event, oDiv, on) {
}
if(on) {
- obj.style.backgroundImage = 'url("images/folder_open.png")';
+ add_class(obj, "open");
} else {
- obj.style.backgroundImage = 'url("images/folder_closed.png")';
+ remove_class(obj, "open");
// Hide the eventual open move dialog
var move_dialog = document.getElementById('move_dialog_' + id);
diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css
index 01e05ea..9789f7e 100644
--- a/web/htdocs/wato.css
+++ b/web/htdocs/wato.css
@@ -368,6 +368,10 @@ table.validationerror img {
height: 140px;
}
+.wato div.floatfolder.open {
+ background-image: url('images/folder_open.png');
+}
+
.wato div.floatfolder .autherr {
position: absolute;
top: 28px;
@@ -405,12 +409,27 @@ table.validationerror img {
bottom: 23px;
left: 20px;
right: 20px;
+ overflow: hidden;
+}
+
+.wato div.floatfolder .infos .infos_content {
color: #bde;
- overflow:hidden;
+ overflow: hidden;
white-space: nowrap;
+ left: 0;
+ right: 0;
text-overflow: ellipsis;
}
+.wato div.floatfolder.open .infos {
+ height: 50px;
+}
+
+.wato div.floatfolder.open .infos .infos_content {
+ position: absolute;
+ bottom: 0;
+}
+
.wato div.floatfolder .title {
position: absolute;
bottom: 0;
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index f915f6b..e9598d7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -599,6 +599,7 @@ def show_subfolder_delete_button(subfolder):
def show_subfolder_infos(subfolder):
html.write('<div class=infos>')
+ html.write('<div class=infos_content>')
groups = userdb.load_group_information().get("contact", {})
permitted_groups, folder_contact_groups, use_for_services = subfolder.groups()
for num, pg in enumerate(permitted_groups):
@@ -616,7 +617,8 @@ def show_subfolder_infos(subfolder):
html.write("%d %s" % (num_hosts, _("Hosts")))
else:
html.write("<i>%s</i>" % _("(no hosts)"))
- html.write('</div>') # class=infos
+ html.write('</div>')
+ html.write('</div>')
def show_hosts(folder):