Author: Lars Michelsen <[email protected]>
Date: Mon Jun 25 13:36:12 2012 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Mon Jun 25 13:36:12 2012 +0200
Bugfix: Fixed rendering errors in IE (below version 9)
---
ChangeLog | 1 +
share/frontend/nagvis-js/js/nagvis.js | 33 +++++++++++++++++++++++----------
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 28d6388..e7838e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@ Frontend
* Bugfix: Fixed bug which suppressed the hover menu on overview page in some
cases
* Bugfix: Fixed some IE css warning message
* Bugfix: Fixed icons not being displayed in IE (version 9 in this case)
+ * Bugfix: Fixed rendering errors in IE (below version 9)
1.7b2
Core
diff --git a/share/frontend/nagvis-js/js/nagvis.js
b/share/frontend/nagvis-js/js/nagvis.js
index dccd497..0105020 100644
--- a/share/frontend/nagvis-js/js/nagvis.js
+++ b/share/frontend/nagvis-js/js/nagvis.js
@@ -1286,22 +1286,35 @@ function rmZoomFactor(coord) {
function addZoomHandler(oImage) {
oImage.style.display = 'none';
- addEvent(oImage, 'load', function() {
+ var img = oImage;
+ addEvent(oImage, 'load', function(event) {
+ // Another IE specific thing: "this" points to the window element,
+ // not the raising object
+ if(this == window) {
+ var obj = img;
+ } else {
+ var obj = this;
+ }
+
+ if(!obj)
+ return false;
+
// This can not be added directly to the object beacause the
// width/height is scaled in at least firefox automatically
-
- // IE FAIL: Needs to be made visible during getting this.width/height
+ //
+ // IE FAIL: Needs to be made visible during getting obj.width/height
// because IE can not tell us anything about the dimensions when
// the object is not visible
- this.style.display = 'block';
- var width = addZoomFactor(this.width);
- var height = addZoomFactor(this.height);
- this.style.display = 'none';
+ obj.style.display = 'block';
+ var width = addZoomFactor(obj.width);
+ var height = addZoomFactor(obj.height);
+ obj.style.display = 'none';
- this.width = width;
- this.height = height;
+ obj.width = width;
+ obj.height = height;
// Now really show the image
- this.style.display = 'block';
+ obj.style.display = 'block';
+ obj = null;
});
oImage = null;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins