Author:   Lars Michelsen <[email protected]>
Date:     Thu Oct  6 15:52:13 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Thu Oct  6 15:52:13 2011 +0200

Bugfix: IE8 fixing event registration (javascript errors on page loading)

---

 ChangeLog                             |    1 +
 share/frontend/nagvis-js/js/nagvis.js |   12 ++----------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 19aab7c..e588640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ Frontend
   * Bugfix: Added missing list code for header templates (map global section 
editing)
   * Bugfix: Don't hide dependent fiels where the master attribute is not 
available
   * Bugfix: Fixed map global section editing
+  * Bugfix: IE8 fixing event registration (javascript errors on page loading)
 
 1.6rc1
 
diff --git a/share/frontend/nagvis-js/js/nagvis.js 
b/share/frontend/nagvis-js/js/nagvis.js
index b4fb189..36f9d7b 100644
--- a/share/frontend/nagvis-js/js/nagvis.js
+++ b/share/frontend/nagvis-js/js/nagvis.js
@@ -830,13 +830,7 @@ function addEvent(obj, type, fn) {
    if(obj.addEventListener) {
       obj.addEventListener(type, fn, false);
    } else if (obj.attachEvent) {
-      obj["e"+type+fn] = fn;
-
-      obj[type+fn] = function() {
-       obj["e"+type+fn](window.event);
-      }
-
-      obj.attachEvent("on"+type, obj[type+fn]);
+      obj.attachEvent("on"+type, fn);
    }
 }
 
@@ -845,9 +839,7 @@ function removeEvent(obj, type, fn) {
     if(obj.removeEventListener) {
         obj.removeEventListener(type, fn, false);
     } else if (obj.detachEvent) {
-        obj.detachEvent("on"+type, obj[type+fn]);
-        delete obj["e"+type+fn];
-        delete obj[type+fn];
+        obj.detachEvent("on"+type, fn);
     }
 }
 


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to