Author: Lars Michelsen <[email protected]>
Date: Tue Jul 5 18:53:15 2011 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Tue Jul 5 18:53:15 2011 +0200
While objects are unlocked the hover menus are disabled
---
ChangeLog | 2 +
TODO | 2 +
share/frontend/nagvis-js/js/NagVisObject.js | 11 ++++-
.../frontend/nagvis-js/js/NagVisStatefulObject.js | 42 ++++++++++++++++---
4 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8992715..c6cc379 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,10 +15,12 @@ Core
* Added new context menu action "make root" to automap nodes to change the
root of the automap on-the-fly (Thanks to Oliver Graf)
* Bugfix: Fixed parent calculation in automap (Thanks to Oliver Graf)
+ * Bugfix: Automap could not be used in IE due to javascript error
Frontend
* Labels of objects can now be moved again; The edit mode is affected by the
objects lock/unlock state
* Labels of lines with line_type=14 have more offset now to look better when
using horizontal lines
+ * While objects are unlocked the hover menus are disabled
* Bugfix: Added missing controls to services which are displayed as gadgets
* Bugfix: Fixed parsing of label_type=14 lines (Thanks to Laurent Lebatard)
* Bugfix: Label positioning in case of weathermap lines (Thanks to Laurent
Lebatard)
diff --git a/TODO b/TODO
index d3540db..5d45f59 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,8 @@
This is a small file for storing quick thoughts about new features and needed
changes:
===============================================================================
+- Doku Link im Header darf nur auf Sprachen zeigen, die auch existieren
+
- Backends:
- Zusätzlich beliebige Variablen vom Backend holen lassen
Pro Objekt "Custom Vars" für Context- und Hover-Menus einbauen. Diese
werden dann pro Objekt
diff --git a/share/frontend/nagvis-js/js/NagVisObject.js
b/share/frontend/nagvis-js/js/NagVisObject.js
index b10b0ff..61fba76 100644
--- a/share/frontend/nagvis-js/js/NagVisObject.js
+++ b/share/frontend/nagvis-js/js/NagVisObject.js
@@ -343,6 +343,10 @@ var NagVisObject = Base.extend({
oObj.onmousemove = function(e) { var id = objId; var iH =
iHoverDelay; displayHoverMenu(e, id, iH); id = null; iH = null; };
oObj.onmouseout = function() { hoverHide(); };
}
+
+ // Disable the hover menu by object lock when unlocked
+ if(typeof(this.toggleHoverMenu) == 'function')
+ this.toggleHoverMenu(this.bIsLocked);
}
justCreated = null;
@@ -402,11 +406,14 @@ var NagVisObject = Base.extend({
if(typeof(this.toggleLabelLock) == 'function')
this.toggleLabelLock();
+ if(typeof(this.toggleHoverMenu) == 'function')
+ this.toggleHoverMenu(this.bIsLocked);
+
if(!isset(lock)) {
if(oUserProperties.hasOwnProperty('unlocked-' +
oPageProperties.map_name))
- var unlocked = oUserProperties['unlocked-' +
oPageProperties.map_name].split(',');
+ var unlocked = oUserProperties['unlocked-' +
oPageProperties.map_name].split(',');
else
- var unlocked = [];
+ var unlocked = [];
if(this.bIsLocked)
unlocked.splice(unlocked.indexOf(this.conf.object_id), 1);
diff --git a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
index ec2b350..66b1964 100644
--- a/share/frontend/nagvis-js/js/NagVisStatefulObject.js
+++ b/share/frontend/nagvis-js/js/NagVisStatefulObject.js
@@ -370,6 +370,36 @@ var NagVisStatefulObject = NagVisObject.extend({
},
/**
+ * PUBLIC toggleHoverMenu()
+ *
+ * This enables/disables the hover menu temporary. e.g. in unlocked
+ * mode the hover menu shal be suppressed.
+ *
+ * @author Lars Michelsen <[email protected]>
+ */
+ toggleHoverMenu: function(enable) {
+ if(this.conf.view_type && this.conf.view_type === 'line')
+ var objId = this.conf.object_id+'-linelink';
+ else
+ var objId = this.conf.object_id+'-icon';
+
+ var o = document.getElementById(objId);
+ if(o) {
+ if(enable && isset(o.disabled_onmousemove)) {
+ o.onmousemove = o.disabled_onmousemove;
+ o.onmouseout = o.disabled_onmouseout;
+ o.disabled_onmousemove = null;
+ o.disabled_onmouseout = null;
+ } else if(!enable) {
+ o.disabled_onmousemove = o.onmousemove;
+ o.disabled_onmouseout = o.onmouseout;
+ o.onmousemove = null;
+ o.onmouseout = null;
+ }
+ }
+ },
+
+ /**
* PUBLIC parseContextMenu()
*
* Parses the context menu. Don't add this functionality to the normal icon
@@ -380,13 +410,11 @@ var NagVisStatefulObject = NagVisObject.extend({
*/
parseContextMenu: function () {
// Add a context menu to the object when enabled
- if(this.conf.context_menu && this.conf.context_menu == '1') {
- if(this.conf.view_type && this.conf.view_type == 'line') {
- this.getContextMenu(this.conf.object_id+'-linelink');
- } else {
- this.getContextMenu(this.conf.object_id+'-icon');
- }
- }
+ if(this.conf.context_menu && this.conf.context_menu == '1')
+ if(this.conf.view_type && this.conf.view_type == 'line')
+ this.getContextMenu(this.conf.object_id+'-linelink');
+ else
+ this.getContextMenu(this.conf.object_id+'-icon');
},
/**
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins