Module: check_mk
Branch: master
Commit: 65a41ed71d7ea909b80f5435220bfd02320f0326
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=65a41ed71d7ea9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 5 13:46:55 2014 +0100
Added tooltips to dashboard editor controls
---
web/htdocs/dashboard.css | 11 ++++++-----
web/htdocs/js/dashboard.js | 11 ++++++++++-
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/dashboard.css b/web/htdocs/dashboard.css
index c34a860..6657396 100644
--- a/web/htdocs/dashboard.css
+++ b/web/htdocs/dashboard.css
@@ -317,7 +317,7 @@ div.dashlet.edit .del:hover {
/* position anchors */
div.dashlet.edit .anchor {
- cursor: pointer;
+ cursor: auto;
position: absolute;
width: 20px;
height: 20px;
@@ -330,14 +330,15 @@ div.dashlet.edit .anchor {
background-image: url(images/dashlet_anchor_lo.png);
}
-div.dashlet.edit .anchor:hover {
- background-image: url(images/dashlet_anchor_hi.png);
-}
-
div.dashlet.edit .anchor.off {
+ cursor: pointer;
background-image: url(images/dashlet_anchor_off.png);
}
+div.dashlet.edit .anchor.off:hover {
+ background-image: url(images/dashlet_anchor_hi.png);
+}
+
div.dashlet.edit .anchor.anchor0 {
top: 5px;
left: 5px;
diff --git a/web/htdocs/js/dashboard.js b/web/htdocs/js/dashboard.js
index 50dabf8..acda275 100644
--- a/web/htdocs/js/dashboard.js
+++ b/web/htdocs/js/dashboard.js
@@ -462,13 +462,16 @@ function render_sizer(controls, id, i, active, size) {
if (size == MAX) {
sizer.className += ' max';
sizer_lbl.innerHTML = 'MAX';
+ sizer.title = 'Use maximum available space in this direction';
}
else if (size == GROW) {
sizer.className += ' grow';
sizer_lbl.innerHTML = 'GROW';
+ sizer.title = 'Grow in this direction';
}
else {
sizer.className += ' abs';
+ sizer.title = 'Fixed size (drag border for resize)';
render_resize_controls(controls, i, active);
}
@@ -479,6 +482,7 @@ function render_sizer(controls, id, i, active, size) {
};
}(id, i);
sizer_lbl.onclick = sizer.onclick;
+ sizer_lbl.title = sizer.title;
controls.appendChild(sizer);
if (size == MAX || size == GROW)
@@ -525,8 +529,11 @@ function dashlet_toggle_edit(dashlet, edit) {
for (var i = 0; i < 4; i++) {
var anchor = document.createElement('a');
anchor.className = 'anchor anchor'+i;
- if (active != i)
+ anchor.title = 'Currently growing from here';
+ if (active != i) {
anchor.className += ' off';
+ anchor.title = 'Click to start growing from here';
+ }
// js magic stuff - closures!
anchor.onclick = function(dashlet_id, anchor_id) {
@@ -541,6 +548,7 @@ function dashlet_toggle_edit(dashlet, edit) {
// Add edit dashlet button
var edit = document.createElement('a');
edit.className = 'edit';
+ edit.title = 'Edit properties of this dashlet';
edit.onclick = function(dashlet_id, board_name) {
return function() {
location.href = 'edit_dashlet.py?name=' + board_name +
'&id=' + dashlet_id;
@@ -551,6 +559,7 @@ function dashlet_toggle_edit(dashlet, edit) {
// Add delete dashlet button
var del = document.createElement('a');
del.className = 'del';
+ del.title = 'Delete this dashlet';
del.onclick = function(dashlet_id, board_name) {
return function() {
location.href = 'delete_dashlet.py?name=' + board_name +
'&id=' + dashlet_id;