activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pvillaco...@apache.org
Subject svn commit: r395201 - /incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
Date Wed, 19 Apr 2006 10:36:59 GMT
Author: pvillacorta
Date: Wed Apr 19 03:36:55 2006
New Revision: 395201

URL: http://svn.apache.org/viewcvs?rev=395201&view=rev
Log:
Restored fixes for some cross-browser issues 

Modified:
    incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js

Modified: incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js?rev=395201&r1=395200&r2=395201&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
(original)
+++ incubator/activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/behaviour.js
Wed Apr 19 03:36:55 2006
@@ -29,7 +29,7 @@
 
    License:
    
-   	This file is entirely BSD licensed.
+   	This file is entirely BSD licensed.
    	
    More information:
    	
@@ -51,15 +51,15 @@
 	},
 	
 	apply : function(){
-		for (h=0;sheet=Behaviour.list[h];h++){
+		for (var h=0;sheet=Behaviour.list[h];h++){
 			for (selector in sheet){
 				list = document.getElementsBySelector(selector);
-				
+
 				if (!list){
 					continue;
 				}
 
-				for (i=0;element=list[i];i++){
+				for (var i=0;element=list[i];i++){
 					sheet[selector](element);
 				}
 			}
@@ -68,13 +68,14 @@
 	
 	addLoadEvent : function(func){
 		var oldonload = window.onload;
-		
 		if (typeof window.onload != 'function') {
 			window.onload = func;
 		} else {
 			window.onload = function() {
 				oldonload();
-				func();
+				if(func != null) {
+				   func();
+				}
 			}
 		}
 	}



Mime
View raw message