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 2013/01/27 16:33:08 UTC
svn commit: r1439100 - in /incubator/jspwiki/trunk: ChangeLog
src/org/apache/wiki/Release.java src/webdocs/Comment.jsp
src/webdocs/templates/default/InfoContent.jsp
src/webdocs/templates/default/PreferencesTab.jsp
src/webdocs/templates/default/jspwiki.css
Author: brushed
Date: Sun Jan 27 15:33:07 2013
New Revision: 1439100
URL: http://svn.apache.org/viewvc?rev=1439100&view=rev
Log:
2.9.1-svn-21
* JSPWIKI-712, fixing entities encoding in change-note, author and link fields.
Part 2 : more fixes when adding page comments. (as pointed out by Harry)
* Improved styling of form buttons, fixing presentation issues in Chrome.
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
incubator/jspwiki/trunk/src/webdocs/Comment.jsp
incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp
incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css
Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Jan 27 15:33:07 2013
@@ -1,3 +1,12 @@
+2013-01-27 Dirk Frederickx (brushed AT apache DOT org)
+
+ * 2.9.1-svn-21
+
+ * JSPWIKI-712, fixing entities encoding in change-note, author and link fields.
+ Part 2 : more fixes when adding page comments. (as pointed out by Harry)
+
+ * Improved styling of form buttons, fixing presentation issues in Chrome.
+
2013-01-26 Glen Mazza
* Removed no longer needed StressTestRCSProvider.java,
returned StressTestVersioningProvider to JUnit tests in build.xml
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/Release.java?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/Release.java Sun Jan 27 15:33:07 2013
@@ -75,7 +75,7 @@ public final class Release
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "20";
+ public static final String BUILD = "21";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/trunk/src/webdocs/Comment.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Comment.jsp?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Comment.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Comment.jsp Sun Jan 27 15:33:07 2013
@@ -14,7 +14,7 @@
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
- under the License.
+ under the License.
--%>
<%@ page import="org.apache.log4j.*" %>
@@ -42,14 +42,14 @@
String findParam( PageContext ctx, String key )
{
ServletRequest req = ctx.getRequest();
-
+
String val = req.getParameter( key );
-
+
if( val == null )
{
val = (String)ctx.findAttribute( key );
}
-
+
return val;
}
%>
@@ -73,10 +73,10 @@
String ok = request.getParameter("ok");
String preview = request.getParameter("preview");
String cancel = request.getParameter("cancel");
- String author = request.getParameter("author");
- String link = request.getParameter("link");
+ String author = TextUtil.replaceEntities( request.getParameter("author") );
+ String link = TextUtil.replaceEntities( request.getParameter("link") );
String remember = request.getParameter("remember");
- String changenote = request.getParameter( "changenote" );
+ String changenote = TextUtil.replaceEntities( request.getParameter( "changenote" ) );
WikiPage wikipage = wikiContext.getPage();
WikiPage latestversion = wiki.getPage( pagereq );
@@ -120,7 +120,7 @@
if( changenote != null )
session.setAttribute( "changenote", changenote );
-
+
//
// Branch
//
@@ -139,12 +139,12 @@
// is the best place to show errors, though.
String spamhash = request.getParameter( SpamFilter.getHashFieldName(request) );
-
+
if( !SpamFilter.checkHash(wikiContext,pageContext) )
{
return;
}
-
+
//
// We expire ALL locks at this moment, simply because someone has
// already broken it.
@@ -160,10 +160,10 @@
modifiedPage.setAuthor( storedUser );
if( changenote != null )
- modifiedPage.setAttribute( WikiPage.CHANGENOTE, TextUtil.replaceEntities( changenote ) );
+ modifiedPage.setAttribute( WikiPage.CHANGENOTE, changenote );
else
modifiedPage.removeAttribute( WikiPage.CHANGENOTE );
-
+
//
// Build comment part
//
@@ -179,9 +179,9 @@
{
pageText.append( "\n\n----\n\n" );
}
-
+
String commentText = EditorManager.getEditedText(pageContext);
-
+
//
// WYSIWYG editor sends us its greetings
//
@@ -190,7 +190,7 @@
{
commentText = new HtmlStringToWikiTranslator().translate(htmlText,wikiContext);
}
-
+
pageText.append( commentText );
log.debug("Author name ="+author);
Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/InfoContent.jsp Sun Jan 27 15:33:07 2013
@@ -14,7 +14,7 @@
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
- under the License.
+ under the License.
--%>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
@@ -240,11 +240,7 @@
</td>
<td class="changenote">
- <%
- String changeNote = (String)currentPage.getAttribute( WikiPage.CHANGENOTE );
- changeNote = (changeNote != null) ? changeNote : "" ;
- %>
- <%= changeNote %>
+ <%= (String)currentPage.getAttribute( WikiPage.CHANGENOTE ) %>
</td>
</tr>
@@ -395,13 +391,7 @@
</wiki:Permission>
--%>
<td class='changenote'>
- <%
- String changeNote = (String)att.getAttribute(WikiPage.CHANGENOTE);
- if( changeNote != null ) {
- changeNote = TextUtil.replaceEntities(changeNote);
- %><%=changeNote%><%
- }
- %>
+ <%= (String)att.getAttribute(WikiPage.CHANGENOTE) %>
</td>
</tr>
</wiki:HistoryIterator><%-- </wiki:AttachmentsIterator> --%>
Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesTab.jsp Sun Jan 27 15:33:07 2013
@@ -14,7 +14,7 @@
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
- under the License.
+ under the License.
--%>
<%@ page errorPage="/Error.jsp" %>
@@ -29,7 +29,7 @@
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
<fmt:setLocale value="${prefs.Language}" />
@@ -52,8 +52,8 @@
</div>
</c:if>
-<form action="<wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab' value='prefs'/></wiki:Link>"
- class="wikiform"
+<form action="<wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab' value='prefs'/></wiki:Link>"
+ class="wikiform"
id="setCookie"
method="post" accept-charset="<wiki:ContentEncoding />"
onsubmit="WikiPreferences.savePrefs(); return Wiki.submitOnce(this);" >
@@ -61,7 +61,7 @@
<tr>
<td><label for="assertedName"><fmt:message key="prefs.assertedname"/></label></td>
- <td>
+ <td>
<input type="text" id="assertedName" name="assertedName" size="20" value="<wiki:UserProfile property='wikiname' />" />
<%-- CHECK THIS
<input type="text" id="assertedName" name="assertedName" size="20" value="<wiki:UserProfile property='loginname'/>" />
@@ -96,16 +96,16 @@
</select>
</td>
</tr>
-
+
<tr>
<td><label for="prefSectionEditing"><fmt:message key="prefs.user.sectionediting"/></label></td>
<td>
- <input id="prefSectionEditing" name="prefSectionEditing"
+ <input id="prefSectionEditing" name="prefSectionEditing"
type="checkbox" <c:if test='${"on" == prefs.SectionEditing}'>checked="checked"</c:if> ></input>
<fmt:message key="prefs.user.sectionediting.text"/>
</td>
</tr>
-
+
<tr>
<td><label for="prefSkin"><fmt:message key="prefs.user.skin"/></label></td>
<td>
@@ -168,13 +168,13 @@
<tr>
<td><label for="prefShowQuickLinks">Show Quick Links</label></td>
<td>
- <input class='checkbox' type='checkbox' id='prefShowQuickLinks' name='prefShowQuickLinks'
+ <input class='checkbox' type='checkbox' id='prefShowQuickLinks' name='prefShowQuickLinks'
<c:if test='${"on" == prefs.SectionEdit}'>selected="selected"</c:if> />
- <span class="quicklinks"><span
- class='quick2Top'><a href='#wikibody' title='Go to Top' >«</a></span><span
- class='quick2Prev'><a href='#' title='Go to Previous Section'>‹</a></span><span
- class='quick2Edit'><a href='#' title='Edit this section'>•</a></span><span
- class='quick2Next'><a href='#' title='Go to Next Section'>›</a></span><span
+ <span class="quicklinks"><span
+ class='quick2Top'><a href='#wikibody' title='Go to Top' >«</a></span><span
+ class='quick2Prev'><a href='#' title='Go to Previous Section'>‹</a></span><span
+ class='quick2Edit'><a href='#' title='Edit this section'>•</a></span><span
+ class='quick2Next'><a href='#' title='Go to Next Section'>›</a></span><span
class='quick2Bottom'><a href='#footer' title='Go to Bottom' >»</a></span></span>
</td>
</tr>
@@ -182,7 +182,7 @@
<tr>
<td><label for="prefShowCalendar">Show Calendar</label></td>
<td>
- <input class='checkbox' type='checkbox' id='prefShowCalendar' name='prefShowCalendar'
+ <input class='checkbox' type='checkbox' id='prefShowCalendar' name='prefShowCalendar'
<%= (prefShowCalendar.equals("yes") ? "checked='checked'": "") %> >
</td>
</tr>
@@ -190,7 +190,7 @@
<tr>
<td> </td>
<td>
- <input type="submit" name="ok" value="<fmt:message key='prefs.save.prefs.submit'/>"
+ <input type="submit" name="ok" value="<fmt:message key='prefs.save.prefs.submit'/>"
accesskey="s" />
<input type="hidden" name="redirect" value="<wiki:Variable var='redirect' default='' />" />
<input type="hidden" name="action" value="setAssertedName" />
@@ -200,15 +200,16 @@
</table>
</form>
-
+
<!-- Clearing the 'asserted name' and other prefs in the cookie -->
<%--wiki:UserCheck status="asserted"--%>
<h3><fmt:message key='prefs.clear.heading'/></h3>
<form action="<wiki:Link jsp='UserPreferences.jsp' format='url'><wiki:Param name='tab' value='prefs'/></wiki:Link>"
+ class="wikiform"
id="clearCookie"
- onsubmit="Wiki.prefs.empty(); return Wiki.submitOnce( this );"
+ onsubmit="Wiki.prefs.empty(); return Wiki.submitOnce( this );"
method="post" accept-charset="<wiki:ContentEncoding />" >
<div>
<input type="submit" name="ok" value="<fmt:message key='prefs.clear.submit'/>" />
Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css?rev=1439100&r1=1439099&r2=1439100&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css Sun Jan 27 15:33:07 2013
@@ -289,11 +289,26 @@ fieldset {
padding:0.5em;
border:1px solid #ddd;
}
-.wikiform input[type='submit'], .wikiform input[type='button'],.wikiform input[type='file'], .wikiform button {
- cursor:pointer;
-}
.wikiform input, .wikiform option {
- padding:0 0.25em;
+ padding:0.5em;
+
+ color:#555;
+ border:1px solid #ddd;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+}
+.wikiform input[type='submit'], .wikiform input[type='button'],.wikiform input[type='file'], .wikiform button, .btn {
+ display:inline-block;
+ cursor:pointer;
+
+ background: transparent;
+ background: -moz-linear-gradient(top, transparent, rgba(0,0,0,.1));
+ background: -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0,0,0,.1)));
+ text-shadow:0 1px 0 rgba(255,255,255,.8);
+}
+.wikiform input[type='submit']:hover, .wikiform input[type='button']:hover,.wikiform input[type='file']:hover, .wikiform button:hover, .btn:hover {
+ background: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,.1)), to(transparent));
+ background: -moz-linear-gradient(top, rgba(0,0,0,.1), transparent);
}
/* +++ 240 Pre-formatted text blocks and code +++ */