Module: check_mk
Branch: master
Commit: 3ebca8e42244640bde7a6cae35dbfa8244841574
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3ebca8e4224464…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 17 18:40:09 2015 +0200
fixed styling of pnpgraphs ; closing popup menus when clicking trigger again
---
web/htdocs/js/checkmk.js | 14 ++++++++------
web/htdocs/pages.css | 6 +++---
web/htdocs/status.css | 2 +-
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index b02172c..8b74e35 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -738,7 +738,7 @@ function create_graph(data, params) {
if (data.with_link) {
var graph_container = document.createElement('div');
- graph_container.setAttribute('class', 'graph')
+ graph_container.setAttribute('class', 'pnp_graph')
var view = data['view'] == '' ? 0 : data['view'];
// needs to be extracted from "params", hack!
@@ -2395,11 +2395,13 @@ function toggle_popup(event, trigger_obj, ident, what, data,
params)
event = window.event;
var container = trigger_obj.parentNode;
- close_popup();
-
- if (popup_id === ident) {
- popup_id = null;
- return; // same icon clicked: just close the menu
+ if (popup_id) {
+ if (popup_id === ident) {
+ close_popup();
+ return; // same icon clicked: just close the menu
+ } else {
+ close_popup();
+ }
}
popup_id = ident;
diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css
index 8fc894b..4e16d96 100644
--- a/web/htdocs/pages.css
+++ b/web/htdocs/pages.css
@@ -1101,7 +1101,7 @@ table.debug_vars td {
/* Popup for adding to visuals (Dashboard, Reports */
-div.graph, div.popup_trigger {
+div.pnp_graph, div.popup_trigger {
position: relative;
}
@@ -1109,7 +1109,7 @@ div.popup_trigger {
display: inline-block;
}
-div.graph a.popup_trigger {
+div.pnp_graph a.popup_trigger {
position: absolute;
top: 10px;
left: 10px;
@@ -1120,7 +1120,7 @@ div.graph a.popup_trigger {
background-image: url(images/button_add_dashlet_lo.png);
}
-div.graph a.popup_trigger:hover {
+div.pnp_graph a.popup_trigger:hover {
background-image: url(images/button_add_dashlet_hi.png);
cursor: pointer;
}
diff --git a/web/htdocs/status.css b/web/htdocs/status.css
index cd96776..c4ba9c0 100644
--- a/web/htdocs/status.css
+++ b/web/htdocs/status.css
@@ -382,7 +382,7 @@ table.data tr.data td.pnpgraph {
padding: 0;
}
-tr.data td.pnpgraph div.graph > a > img {
+tr.data td.pnpgraph div.pnp_graph > a > img {
border: 1px solid #888;
margin: 4px 4px 4px 4px;
box-shadow: 1px 1px 3px #000000;