Author: brushed
Date: Sun Aug 23 18:37:57 2009
New Revision: 806999
URL: http://svn.apache.org/viewvc?rev=806999&view=rev
Log:
v2.8.3-svn-14:
* JSPWIKI-480. Small improvement on Attachment sorting.
* JSPWIKI-574. Redirect from UserPreferences.jsp hangs when 'redirect'
= null.
* JSPWIKI-590. Use relative paths to link the javascript routines.
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/Login.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/UserPreferences.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Wiki.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/scripts/jspwiki-common.js
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/EditTemplate.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/InfoContent.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/PreferencesContent.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/UploadTemplate.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/ViewTemplate.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/plain.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=806999&r1=806998&r2=806999&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog (original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/ChangeLog Sun Aug 23 18:37:57
2009
@@ -1,3 +1,20 @@
+2009-08-23 Dirk Frederickx <[email protected]>
+
+ * 2.8.3-svn-14
+
+ * JSPWIKI-480. Small improvement on Attachment sorting.
+ Not using the attribute 'jspwiki:sortvalue' to allow sorting of
+ date values, both in attachment and info tabs.
+
+ * JSPWIKI-574. Redirect from UserPreferences.jsp hangs when null.
+ (which is the case eg after subsequent log in)
+
+ * JSPWIKI-590. Use relative paths to link the javascript routines.
+ Avoid the use of getContextPath(), as the URL may have been rewritten
+ external to jspwiki. (reported by Florian)
+ This fix only resolves the references to javascript routines.
+
+
2009-08-19 Harry Metske <[email protected]>
* 2.8.3-svn-13
@@ -12,7 +29,7 @@
* JSPWIKI-585: Scrollbars on wide-pages fixed for FF and Safari
(overflow-y:hidden) and IE.
- * JSPWIKI-383, JSPWIKI-481: Support redirecting back to special pages
suchs as
+ * JSPWIKI-383, JSPWIKI-481: Support redirecting back to special pages
such as
the Search page, Workflow page.
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=806999&r1=806998&r2=806999&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 Aug 23 18:37:57 2009
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "13";
+ public static final String BUILD = "14";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Login.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Login.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Login.jsp
(original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Login.jsp Sun Aug
23 18:37:57 2009
@@ -155,7 +155,7 @@
// If wiki page was "Login", redirect to main, otherwise use the page
supplied
String redirectPage = request.getParameter( "redirect" );
- if ( redirectPage == null )
+ if( !wiki.pageExists( redirectPage ) )
{
redirectPage = wiki.getFrontPage();
}
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/UserPreferences.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/UserPreferences.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/UserPreferences.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/UserPreferences.jsp
Sun Aug 23 18:37:57 2009
@@ -73,7 +73,15 @@
if ( wikiSession.getMessages( "profile" ).length == 0 )
{
String redirectPage = request.getParameter( "redirect" );
- response.sendRedirect( wiki.getViewURL(redirectPage) );
+
+ if( !wiki.pageExists( redirectPage ) )
+ {
+ redirectPage = wiki.getFrontPage();
+ }
+
+ String viewUrl = ( "UserPreferences".equals( redirectPage ) ) ?
"Wiki.jsp" : wiki.getViewURL( redirectPage );
+ log.info( "Redirecting user to " + viewUrl );
+ response.sendRedirect( viewUrl );
return;
}
}
@@ -85,6 +93,10 @@
CookieAssertionLoginModule.setUserCookie( response, assertedName );
String redirectPage = request.getParameter( "redirect" );
+ if( !wiki.pageExists( redirectPage ) )
+ {
+ redirectPage = wiki.getFrontPage();
+ }
String viewUrl = ( "UserPreferences".equals( redirectPage ) ) ?
"Wiki.jsp" : wiki.getViewURL( redirectPage );
log.info( "Redirecting user to " + viewUrl );
Modified: incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Wiki.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Wiki.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Wiki.jsp
(original)
+++ incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/Wiki.jsp Sun Aug
23 18:37:57 2009
@@ -16,7 +16,7 @@
String pagereq = wikiContext.getName();
// Redirect if request was for a special page
- String redirect = wiki.getRedirectURL( wikiContext );
+ String redirect = wikiContext.getRedirectURL( );
if( redirect != null )
{
response.sendRedirect( redirect );
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=806999&r1=806998&r2=806999&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 Aug 23 18:37:57 2009
@@ -1389,7 +1389,8 @@
rows.each(function(r,i){
var v = r.cells[colidx];
- v = v.getAttribute('sortvalue') || $getText(v);
+
+ v = v.getAttribute('jspwiki:sortvalue') || $getText(v);
v = v.clean().toLowerCase();
if(num) num = !isNaN(parseFloat(v));
@@ -1442,8 +1443,8 @@
//fixme: should cache the converted sortable values
var v1 = row1.cells[i],
v2 = row2.cells[i],
- val1 = Sortable.convert(
v1.getAttribute('sortvalue') || $getText(v1), datatype ),
- val2 = Sortable.convert(
v2.getAttribute('sortvalue') || $getText(v2), datatype );
+ val1 = Sortable.convert(
v1.getAttribute('jspwiki:sortvalue') || $getText(v1), datatype ),
+ val2 = Sortable.convert(
v2.getAttribute('jspwiki:sortvalue') || $getText(v2), datatype );
return (val1<val2) ? -1 : (val1>val2) ? 1 : 0;
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
Sun Aug 23 18:37:57 2009
@@ -107,7 +107,7 @@
<td style="text-align:center;">
<a href="<wiki:PageInfoLink format='url' />" title="<fmt:message
key='attach.moreinfo.title'/>"><wiki:PageVersion /></a>
</td>
- <td style="white-space:nowrap;" sortvalue="<fmt:formatDate value='<%=
att.getLastModified() %>' pattern='EEE, d MMM yyyy hh:mm:ss' />">
+ <td style="white-space:nowrap;" jspwiki:sortvalue="<%=
att.getLastModified().getTime() %>">
<fmt:formatDate value="<%= att.getLastModified() %>"
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
</td>
<td><wiki:Author /></td>
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/EditTemplate.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/EditTemplate.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/EditTemplate.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/EditTemplate.jsp
Sun Aug 23 18:37:57 2009
@@ -4,7 +4,7 @@
<fmt:setBundle basename="templates.default"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html id="top" xmlns="http://www.w3.org/1999/xhtml">
+<html id="top" xmlns="http://www.w3.org/1999/xhtml"
xmlns:jspwiki="http://www.jspwiki.org">
<head>
<title>
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=806999&r1=806998&r2=806999&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 Aug 23 18:37:57 2009
@@ -199,7 +199,7 @@
</wiki:LinkTo>
</td>
- <td style="white-space:nowrap;" sortvalue="<fmt:formatDate
value='<%= currentPage.getLastModified() %>' pattern='EEE, d MMM yyyy hh:mm:ss'
/>">
+ <td style="white-space:nowrap;" jspwiki:sortvalue="<%=
currentPage.getLastModified().getTime() %>">
<fmt:formatDate value="<%= currentPage.getLastModified() %>"
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
</td>
<td style="white-space:nowrap;text-align:right;">
@@ -360,7 +360,7 @@
<td style="white-space:nowrap;text-align:right;">
<fmt:formatNumber value='<%=Double.toString(att.getSize()/1000.0) %>'
groupingUsed='false' maxFractionDigits='1'
minFractionDigits='1'/> <fmt:message key="info.kilobytes"/>
</td>
- <td style="white-space:nowrap;" sortvalue="<fmt:formatDate value='<%=
att.getLastModified() %>' pattern='EEE, d MMM yyyy hh:mm:ss' />">
+ <td style="white-space:nowrap;" jspwiki:sortvalue="<%=
att.getLastModified().getTime() %>">
<fmt:formatDate value="<%= att.getLastModified() %>"
pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
</td>
<td><wiki:Author /></td>
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/PreferencesContent.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/PreferencesContent.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/PreferencesContent.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/PreferencesContent.jsp
Sun Aug 23 18:37:57 2009
@@ -7,7 +7,7 @@
<fmt:setBundle basename="templates.default"/>
<%
WikiContext context = WikiContext.findContext( pageContext );
- TemplateManager.addResourceRequest( context, "script",
"scripts/jspwiki-prefs.js" );
+ TemplateManager.addResourceRequest( context,
TemplateManager.RESOURCE_SCRIPT, "scripts/jspwiki-prefs.js" );
%>
<wiki:TabbedSection defaultTab="${param.tab}">
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/UploadTemplate.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/UploadTemplate.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/UploadTemplate.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/UploadTemplate.jsp
Sun Aug 23 18:37:57 2009
@@ -13,7 +13,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html id="top" xmlns="http://www.w3.org/1999/xhtml">
+<html id="top" xmlns="http://www.w3.org/1999/xhtml"
xmlns:jspwiki="http://www.jspwiki.org">
<head>
<title><fmt:message key="upload.title"><fmt:param><wiki:Variable
var="applicationname"/></fmt:param></fmt:message></title>
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/ViewTemplate.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/ViewTemplate.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/ViewTemplate.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/ViewTemplate.jsp
Sun Aug 23 18:37:57 2009
@@ -4,7 +4,7 @@
<fmt:setBundle basename="templates.default"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html id="top" xmlns="http://www.w3.org/1999/xhtml">
+<html id="top" xmlns="http://www.w3.org/1999/xhtml"
xmlns:jspwiki="http://www.jspwiki.org">
<head>
<title>
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/FCK.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
Sun Aug 23 18:37:57 2009
@@ -26,7 +26,7 @@
wikiPage.setAttribute( JSPWikiMarkupParser.PROP_CAMELCASELINKS, "false" );
String usertext = EditorManager.getEditedText(pageContext);
- TemplateManager.addResourceRequest( context, "script",
"scripts/fckeditor/fckeditor.js" );
+ TemplateManager.addResourceRequest( context,
TemplateManager.RESOURCE_SCRIPT,"scripts/fckeditor/fckeditor.js" );
%>
<wiki:CheckRequestContext context="edit">
<wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
Modified:
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/plain.jsp
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/plain.jsp?rev=806999&r1=806998&r2=806999&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/plain.jsp
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_8_BRANCH/src/webdocs/templates/default/editors/plain.jsp
Sun Aug 23 18:37:57 2009
@@ -19,10 +19,9 @@
WikiContext context = WikiContext.findContext( pageContext );
WikiEngine engine = context.getEngine();
- String contextPath = request.getContextPath();
+ TemplateManager.addResourceRequest( context,
TemplateManager.RESOURCE_SCRIPT, "scripts/jspwiki-edit.js" );
+ TemplateManager.addResourceRequest( context,
TemplateManager.RESOURCE_SCRIPT, "scripts/posteditor.js" );
- TemplateManager.addResourceRequest( context, "script", contextPath +
"/scripts/jspwiki-edit.js" );
- TemplateManager.addResourceRequest( context, "script", contextPath +
"/scripts/posteditor.js" );
String usertext = EditorManager.getEditedText( pageContext );
%>
<wiki:CheckRequestContext context="edit">