You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2010/12/05 11:06:53 UTC

svn commit: r1042300 - in /incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH: ChangeLog src/com/ecyrd/jspwiki/Release.java src/webdocs/scripts/jspwiki-common.js src/webdocs/templates/default/InfoContent.jsp

Author: brushed
Date: Sun Dec  5 10:06:52 2010
New Revision: 1042300

URL: http://svn.apache.org/viewvc?rev=1042300&view=rev
Log:
v2.8.5-svn-3:javascript fixes.
        * JSPWIKI-667: Fixed Scorebar issue in Google Chrome. (workaround js error)       
        * JSPWIKI-675: Fixed Unicode support in quickEdit (javascript regexp)
        * JSPWIKI-674: Fixed support for nested tabbed sections

Modified:
    incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog
    incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js
    incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp

Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog?rev=1042300&r1=1042299&r2=1042300&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog Sun Dec  5 10:06:52 2010
@@ -1,3 +1,13 @@
+2010-12-05 Dirk Frederickx <br...@apache.org>
+
+        * v2.8.5-svn-3
+
+        * JSPWIKI-667: Fixed Scorebar issue in Google Chrome. (workaround js error)
+        
+        * JSPWIKI-675: Fixed Unicode support in quickEdit (javascript regexp)
+
+        * JSPWIKI-674: Fixed support for nested tabbed sections
+
 2010-09-30  Harry Metske <me...@apache.org>
 
         * 2.8.5-svn-2

Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/com/ecyrd/jspwiki/Release.java?rev=1042300&r1=1042299&r2=1042300&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/com/ecyrd/jspwiki/Release.java Sun Dec  5 10:06:52 2010
@@ -77,7 +77,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "2";
+    public static final String     BUILD         = "3";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js?rev=1042300&r1=1042299&r2=1042300&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js Sun Dec  5 10:06:52 2010
@@ -299,7 +299,7 @@ var Wiki = {
 	//allow letters, digits and punctuation chars: ()&+,-=._$
 	cleanLink: function(p){
 		return p.trim().replace(/\s+/g,' ')
-				.replace(/[^A-Za-z0-9()&+,-=._$ ]/g, '');
+				.replace(/[^0-9A-Za-z\u00C0-\u1FFF\u2800-\uFFFD()&+,-=._$ ]/g, '');
 	},
 
 	changeOrientation: function(){
@@ -799,7 +799,7 @@ var TabbedSection = {
 		this.addClass('activetab');
 
 		tabs.getChildren().addClass('hidetab');
-		tabs.getElementById(this.id.substr(5)).removeClass('hidetab');
+		tabs.getElement( '#'+ this.id.substr(5)).removeClass('hidetab');
 	}
 
 }
@@ -1051,7 +1051,8 @@ var GraphBar =
 				isProgress = false,	// progress bar
 				isHorizontal = true,// horizontal or vertical orientation
 				parms = g.className.substr(9).split('-'),
-				barName = parms.shift(); //first param is optional barName
+				barName = parms.shift(), //first param is optional barName
+				size,bars,barData,border;
 
 			parms.each(function(p){
 				p = p.toLowerCase();
@@ -1069,16 +1070,16 @@ var GraphBar =
 			if( !color2 && color1) color2 = (isGauge || isProgress) ? color1.invert() : color1;
 
 			if( lbound > ubound ) { var m = ubound; ubound=lbound; ubound=m; }
-			var size = ubound-lbound;
+			size = ubound-lbound;
 
-			var bars = $ES('.gBar'+barName, g); //collect all gBar elements
+			bars = $ES('.gBar'+barName, g); //collect all gBar elements
 			if( (bars.length==0) && barName && (barName!="")){  // check table data
 				bars = this.getTableValues(g, barName);
 			}
 			if( !bars ) return;
 
-			var barData = this.parseBarData( bars, lbound, size ),
-				border = (isHorizontal ? 'borderLeft' : 'borderBottom');
+			barData = this.parseBarData( bars, lbound, size );
+			border = (isHorizontal ? 'borderLeft' : 'borderBottom');
 
 			bars.each(function(b,j){
 				var bar1 = $H().set(border+'Width',barData[j]),
@@ -1134,12 +1135,14 @@ var GraphBar =
 		nodes.each(function(n,i){
 			var s = n.getText();
 			barData.push(s);
-			if(num) num = !isNaN(parseFloat( s.match(Number.REparsefloat) ) );
-			if(date) date = !isNaN(Date.parse(s));
+			num &= !isNaN(s.toFloat());
+			/* chrome accepts numbers as valid Dates !! */
+			date &= !isNaN(Date.parse(s)) && s.test(/[^\d]/);
 		});
+
 		barData = barData.map(function(b){
-			if(date)     { b = new Date(Date.parse(b) ).valueOf();  }
-			else if(num) { b = parseFloat( b.match(Number.REparsefloat) ); }
+			if(date){ b = new Date(Date.parse(b) ).valueOf();  }
+			else if(num){ b = parseFloat( b.match(Number.REparsefloat) ); }
 
 			maxValue = Math.max(maxValue, b);
 			minValue = Math.min(minValue, b);
@@ -1398,7 +1401,8 @@ var Sortable =
 			v = v.clean().toLowerCase();
 
 			if(num)  num  = !isNaN(parseFloat(v));
-			if(date) date = !isNaN(Date.parse(v));
+			/* chrome accepts numbers as valid Dates !! */
+			if(date) date = !isNaN(Date.parse(v)) && v.test(/[^\d]/);
 			if(ip4)  ip4  = v.test(/(?:\\d{1,3}\\.){3}\\d{1,3}/); //169.169.0.1
 			if(euro) euro = v.test(/^[£$€][0-9.,]+/);
 			if(kmgt) kmgt = v.test(/(?:[0-9.,]+)\s*(?:[kmgt])b/);  //2 MB, 4GB, 1.2kb, 8Tb

Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp?rev=1042300&r1=1042299&r2=1042300&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp Sun Dec  5 10:06:52 2010
@@ -168,7 +168,7 @@
 	<%--
     <wiki:CheckVersion mode="first"><fmt:message key="info.noversions"/></wiki:CheckVersion>
 	--%>
-    
+
     <%-- if( itemcount > 1 ) { --%>
 
     <wiki:SetPagination start="<%=startitem%>" total="<%=itemcount%>" pagesize="<%=pagesize%>" maxlinks="9"
@@ -222,7 +222,7 @@
          <td class="changenote">
            <%
               String changeNote = (String)currentPage.getAttribute( WikiPage.CHANGENOTE );
-              changeNote = (changeNote != null) ? changeNote : "" ;
+              changeNote = (changeNote != null) ? TextUtil.replaceEntities( changeNote ) : "" ;
            %>
            <%= changeNote %>
          </td>
@@ -378,7 +378,7 @@
       <%
          String changeNote = (String)att.getAttribute(WikiPage.CHANGENOTE);
          if( changeNote != null ) {
-             changeNote = changeNote;
+             changeNote = TextUtil.replaceEntities(changeNote);
          %><%=changeNote%><%
          }
       %>