tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r612172 - in /tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3: dojo2.js dojo2.js.uncompressed.js src/date/format.js
Date Tue, 15 Jan 2008 17:41:23 GMT
Author: jkuhnert
Date: Tue Jan 15 09:41:16 2008
New Revision: 612172

URL: http://svn.apache.org/viewvc?rev=612172&view=rev
Log:
Fixes TAPESTRY-2047.  Changed regexp built up to alternate on each am/pm character to make
it work with upper/lowercase instead of trying to match pre-built "am" or "AM" strings only.

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js.uncompressed.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/date/format.js

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js?rev=612172&r1=612171&r2=612172&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js Tue Jan 15 09:41:16
2008
@@ -1549,7 +1549,7 @@
 }
 function _buildDateTimeRE(_13a,info,_13c,_13d){
 return _13d.replace(/([a-z])\1*/ig,function(_13e){
-var s;
+var s='';
 var c=_13e.charAt(0);
 var l=_13e.length;
 switch(c){
@@ -1584,10 +1584,9 @@
 if(_13c.strict){
 s=am+"|"+pm;
 }else{
-s=am;
-s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
-s+="|";
-s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
+for (var i=0; i < am.length; i++){s += '[' + am.charAt(i).toLowerCase() + '|' + am.charAt(i).toUpperCase()
+ ']';}
+s += '|';
+for (var i=0; i < pm.length; i++){ s += '[' + pm.charAt(i).toLowerCase() + '|' + pm.charAt(i).toUpperCase()
+ ']';}
 }
 break;
 default:

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js.uncompressed.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js.uncompressed.js?rev=612172&r1=612171&r2=612172&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js.uncompressed.js
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/dojo2.js.uncompressed.js
Tue Jan 15 09:41:16 2008
@@ -2440,7 +2440,7 @@
 function _buildDateTimeRE(groups, info, options, pattern){
 	return pattern.replace(/([a-z])\1*/ig, function(match){
 		// Build a simple regexp without parenthesis, which would ruin the match list
-		var s;
+		var s = '';
 		var c = match.charAt(0);
 		var l = match.length;
 		switch(c){
@@ -2475,10 +2475,13 @@
 				if(options.strict){
 					s = am + '|' + pm;
 				}else{
-					s = am;
-					s += (am != am.toLowerCase()) ? '|' + am.toLowerCase() : '';
-					s += '|';
-					s += (pm != pm.toLowerCase()) ? pm + '|' + pm.toLowerCase() : pm;
+					for (var i=0; i < am.length; i++){
+                        s += '[' + am.charAt(i).toLowerCase() + '|' + am.charAt(i).toUpperCase()
+ ']';
+                    }
+                    s += '|';
+                    for (var i=0; i < pm.length; i++){
+                        s += '[' + pm.charAt(i).toLowerCase() + '|' + pm.charAt(i).toUpperCase()
+ ']';
+                    }
 				}
 				break;
 			default:

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/date/format.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/date/format.js?rev=612172&r1=612171&r2=612172&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/date/format.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/date/format.js Tue Jan
15 09:41:16 2008
@@ -411,7 +411,7 @@
 }
 function _buildDateTimeRE(_47,_48,_49,_4a){
 return _4a.replace(/([a-z])\1*/ig,function(_4b){
-var s;
+var s = '';
 var c=_4b.charAt(0);
 var l=_4b.length;
 switch(c){
@@ -446,10 +446,8 @@
 if(_49.strict){
 s=am+"|"+pm;
 }else{
-s=am;
-s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
-s+="|";
-s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
+for (var i=0; i < am.length; i++){s += '[' + am.charAt(i).toLowerCase() + '|' + am.charAt(i).toUpperCase()
+ ']';}
+s += '|'; for (var i=0; i < pm.length; i++){ s += '[' + pm.charAt(i).toLowerCase() + '|'
+ pm.charAt(i).toUpperCase() + ']';}
 }
 break;
 default:



Mime
View raw message