jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brus...@apache.org
Subject svn commit: r1734729 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/plugin/ jspwiki-war/src/main/resources/plugin/ jspwiki-war/src/main/resources/templates/ jspwiki-war/src/main/scripts/beha...
Date Sat, 12 Mar 2016 20:05:01 GMT
Author: brushed
Date: Sat Mar 12 20:05:01 2016
New Revision: 1734729

URL: http://svn.apache.org/viewvc?rev=1734729&view=rev
Log:
2.10.3-svn-5  
       * %%ADD-CSS: fix regexp for inline images on IE.       
       * Fix posting Comments in the Haddock template
       * Fixes & styles related to WEBLOGPLUGIN
       

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
    jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties
    jspwiki/trunk/jspwiki-war/src/main/resources/templates/default.properties
    jspwiki/trunk/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
    jspwiki/trunk/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
    jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.View.less
    jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
    jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Sat Mar 12 20:05:01 2016
@@ -1,3 +1,16 @@
+2016-03-12  Dirk Frederickx (brushed AT apache DOT org)
+
+       * 2.10.3-svn-5  
+
+       * %%ADD-CSS: fix regexp for inline images on IE.
+       
+       * Fix posting of comments in the Haddock template
+       
+       * Fixed some missing localization of the weblogplugin.
+         Few more tweaks of the styling of weblog entries & comments.
+       
+
+       
 2016-03-08  Dirk Frederickx (brushed AT apache DOT org)
 
        * 2.10.3-svn-4  Few more small fixes related to the HADDOCK template 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sat Mar 12 20:05:01
2016
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "4";
+    public static final String     BUILD         = "5";
 
     /**
      *  This is the generic version string you should use when printing out the version.
 It is of 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java Sat Mar
12 20:05:01 2016
@@ -21,6 +21,7 @@ package org.apache.wiki.plugin;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
@@ -30,6 +31,7 @@ import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.ResourceBundle;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -311,6 +313,8 @@ public class WeblogPlugin
         throws ProviderException
     {
         WikiEngine engine = context.getEngine();
+        ResourceBundle rb = Preferences.getBundle(context, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE);
+
         buffer.append("<div class=\"weblogentry\">\n");
 
         //
@@ -372,7 +376,7 @@ public class WeblogPlugin
         }
 
         buffer.append("By "+author+"&nbsp;&nbsp;");
-        buffer.append( "<a href=\""+entryCtx.getURL(WikiContext.VIEW, entry.getName())+"\">Permalink</a>"
);
+        buffer.append( "<a href=\""+entryCtx.getURL(WikiContext.VIEW, entry.getName())+"\">"+rb.getString("weblogentryplugin.permalink")+"</a>"
);
         String commentPageName = TextUtil.replaceString( entry.getName(),
                                                          "blogentry",
                                                          "comments" );
@@ -387,13 +391,16 @@ public class WeblogPlugin
             //  has changed.
             //
             buffer.append( "&nbsp;&nbsp;" );
+
+            String addcomment = rb.getString("weblogentryplugin.addcomment");
+
             buffer.append( "<a href=\""+
                        entryCtx.getURL(WikiContext.COMMENT,
                                        commentPageName,
                                        "nc="+numComments)+
-                       "\">Comments? ("+
-                       numComments+
-                       ")</a>" );
+                       "\">"+
+                       MessageFormat.format(addcomment, numComments)
+                       +"</a>" );
         }
 
         buffer.append("</div>\n");

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/plugin/PluginResources.properties Sat Mar
12 20:05:01 2016
@@ -21,7 +21,7 @@
 # Errors rendering plugins
 
 plugin.error.insertionfailed = {0} : {1} - Plugin insertion failed: {2}
-plugin.error.cannotinstantiate = Cannot instantiate plugin {0} 
+plugin.error.cannotinstantiate = Cannot instantiate plugin {0}
 plugin.error.notallowed = Not allowed to access plugin {0}
 plugin.error.instantationfailed = Instantiation of plugin {0} failed.
 plugin.error.failed = Plugin failed
@@ -45,7 +45,10 @@ currenttimeplugin.badformat = You specif
 
 # WeblogEntryPlugin
 
-weblogentryplugin.newentry = New entry
+weblogentryplugin.newentry = <span class="icon-plus"></span> New entry
+weblogentryplugin.permalink = Permalink
+weblogentryplugin.addcomment = <span class="icon-plus"></span> Add new comment
({0})
+
 
 # ReferringPagesPlugin
 

Modified: jspwiki/trunk/jspwiki-war/src/main/resources/templates/default.properties
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/resources/templates/default.properties?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/resources/templates/default.properties (original)
+++ jspwiki/trunk/jspwiki-war/src/main/resources/templates/default.properties Sat Mar 12 20:05:01
2016
@@ -597,6 +597,7 @@ editor.wikiwizard.noapplet=Applets are c
 blog.commenttitle=Comments:
 blog.backtomain=Back to {0}
 blog.addcomments=Add new comment
+blog.permalink=Permalink
 
 
 #

Modified: jspwiki/trunk/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/scripts/behaviors/AddCSS.js?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/scripts/behaviors/AddCSS.js (original)
+++ jspwiki/trunk/jspwiki-war/src/main/scripts/behaviors/AddCSS.js Sat Mar 12 20:05:01 2016
@@ -44,7 +44,7 @@ function AddCSS( element ){
         //xss protection: remove invalid url's;  only allow url([wiki-attachement])
         css = css.replace( /url\(\<[^i][^)]*\)/gi, "url(invalid)" ); //remove url(<a...)
         css = css.replace( /url\([^<][^)]*\)/gi, "url(invalid)" );  //remove url(xxx)
-        css = css.replace( /url\(<img class="inline" src="([^"]+)[^>]+>\)/gi, "url($1)"
);
+        css = css.replace( /url\(<img class="inline" .*?src="([^"]+)[^>]*>\)/gi,
"url($1)" );
 
         css = css.replace( /<p>|<\/p>/gi, "" ); //jspwiki inserts <p/>
for empty lines
 

Modified: jspwiki/trunk/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js (original)
+++ jspwiki/trunk/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js Sat Mar 12 20:05:01
2016
@@ -64,8 +64,7 @@ wiki.add("#editform", function( element
 
     });
 
-    if( wiki.Context == "edit"
-    && ( sectionsDropDown = getFormElement(".sections") ) ){
+    if( sectionsDropDown = getFormElement(".sections") ){
 
         new Snipe.Sections( sectionsDropDown, {
            snipe: snipe,

Modified: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.View.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.View.less?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.View.less (original)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.View.less Sat Mar 12
20:05:01 2016
@@ -164,7 +164,7 @@ a.logo {
         line-height: 50%;
         letter-spacing: .08em;
     }
-    b:before { content:"\A"; white-space:pre ;}
+    b:before { content:"\A"; white-space:pre ;}  //carriage return hack
 
 }
 
@@ -251,6 +251,7 @@ body.can-flex .content {
 
 .reader .copyright {
     margin: 2em 0;
+    clear:both;
 }
 
 .feed {

Modified: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less (original)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less Sat Mar 12
20:05:01 2016
@@ -62,7 +62,6 @@ a[href*="NewBlogEntry.jsp"] { .btn; .btn
 }
 .weblogentrybody {
     .p;
-    //padding:@padding-base-vertical @padding-base-horizontal;
     clear:both;
 }
 .weblogentryfooter {
@@ -71,12 +70,9 @@ a[href*="NewBlogEntry.jsp"] { .btn; .btn
     background-color:@pre-bg;
     clear:both;
 
-    a {
-        .btn;
-        .btn-xs;
-    }
+    a { .btn; .btn-xs; }
     a[href*="_blogentry_"] { .btn-primary;  }
-    a[href*="_comments_"] { .btn-success;  }
+    a[href*="_comments_"] { .btn-default;  }
 
 }
 
@@ -92,37 +88,33 @@ a[href*="NewBlogEntry.jsp"] { .btn; .btn
     text-decoration:none;
     margin-left:0 !important;
 }
-.archiveyear:after {
-    content:" AD";
-}
+//.archiveyear:after { content:" AD"; }
 
 /*
 DOM Structure of page with name <blog-name>_blogentry_<timestamp>-SEQ#
 
 div.weblogcommenstitle
 div.weblogcomments
-    div.comment-template
-    p
-    p
-        --
+    ...
+    p.signature
         a.outlink
         , timestamp
-    p
     hr
     <repeat for each comment>
 
 */
 .weblogcommentstitle {
     .h4;
-    margin:(@line-height-computed/2) 0;
-    clear:both;
+    margin:(@line-height-computed) 0;
+    border-bottom:1px solid @hr-border;
 }
-
 .weblogcomments {
     padding-left: 2em;
-    .comment-template {
-    }
-    > p:nth-of-type(3n+2) {
-        .weblogentryfooter;
+}
+.signature {
+    margin:(@line-height-computed/2) 0;
+    .weblogentryfooter;
+    &:before {
+        content:"—"; //&mdash;
     }
 }

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp Sat Mar 12 20:05:01
2016
@@ -20,6 +20,7 @@
 <%@ taglib uri="http://jspwiki.apache.org/tags" 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" %>
 <%@ page import="org.apache.wiki.*" %>
 <fmt:setLocale value="${prefs.Language}" />
 <fmt:setBundle basename="templates.default"/>
@@ -53,7 +54,13 @@
     <div class="pagename" title="<wiki:PageName />">
       <wiki:CheckRequestContext context='viewGroup|createGroup|editGroup'><span
class="icon-group"></span></wiki:CheckRequestContext>
       <wiki:PageType type="attachment"><span class="icon-paper-clip"></span></wiki:PageType>
-      <wiki:Link><wiki:PageName/></wiki:Link>
+      <wiki:Link>
+        <c:choose>
+        <c:when test="${not empty fn:substringBefore(param.page,'_blogentry_')}">${fn:replace(fn:replace(param.page,'_blogentry_','
['),'_','#')}]</c:when>
+        <c:when test="${not empty fn:substringBefore(param.page,'_comments_')}">${fn:replace(fn:replace(param.page,'_comments_','
['),'_','#')}]</c:when>
+        <c:otherwise><wiki:PageName/></c:otherwise>
+        </c:choose>
+      </wiki:Link>
     </div>
 
   </div>

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp Sat Mar 12 20:05:01
2016
@@ -78,35 +78,51 @@
 <%--
 ISWEBLOG= <%= WikiContext.findContext( pageContext ).getPage().getAttribute( /*ATTR_ISWEBLOG*/
"weblogplugin.isweblog" ) %>
 --%>
+<%--  IF BLOCOMMENT PAGE:  insert back buttons to mainblog and blogentry permalink --%>
+<c:set var="mainblogpage" value="${fn:substringBefore(param.page,'_comments_')}" />
+<c:set var="blogentrypage" value="${fn:replace(param.page,'_comments_','_blogentry_')}"
/>
+<c:if test="${not empty mainblogpage}">
+<wiki:PageExists page="${mainblogpage}">
+  <p></p>
+  <div class="pull-right">
+      <wiki:Link cssClass="btn btn-xs btn-default"  page="${mainblogpage}" >
+         <fmt:message key="blog.backtomain"><fmt:param>${mainblogpage}</fmt:param></fmt:message>
+      </wiki:Link>
+      <wiki:Link cssClass="btn btn-xs btn-primary" page="${blogentrypage}" >
+        <fmt:message key="blog.permalink" />
+      </wiki:Link>
+  </div>
+  <div class="weblogcommentstitle">
+    <fmt:message key="blog.commenttitle"/>
+  </div>
+</wiki:PageExists>
+</c:if>
+
 <%-- Inserts no text if there is no page. --%>
 <wiki:InsertPage />
 
-<%-- Inserts blogcomment if appropriate. --%>
+<%-- IF BLOGENTRY PAGE: insert blogcomment if appropriate. --%>
 <c:set var="mainblogpage" value="${fn:substringBefore(param.page,'_blogentry_')}" />
 <c:set var="blogcommentpage" value="${fn:replace(param.page,'_blogentry_','_comments_')}"
/>
 <c:if test="${not empty mainblogpage}">
 <wiki:PageExists page="${mainblogpage}">
-
-  <hr />
+  <p></p>
   <div class="pull-right">
-      <wiki:Link cssClass="btn btn-xs btn-primary"  page="${mainblogpage}" >
+      <wiki:Link cssClass="btn btn-xs btn-default"  page="${mainblogpage}" >
          <fmt:message key="blog.backtomain"><fmt:param>${mainblogpage}</fmt:param></fmt:message>
       </wiki:Link>
-      <wiki:Link cssClass="btn btn-xs btn-success"  context="comment" page="${blogcommentpage}"
>
+      <wiki:Link cssClass="btn btn-xs btn-default"  context="comment" page="${blogcommentpage}"
>
         <span class="icon-plus"></span> <fmt:message key="blog.addcomments"/>
       </wiki:Link>
   </div>
-
   <c:if test="${not empty blogcommentpage}">
   <wiki:PageExists page="${blogcommentpage}">
-    <div class="weblogcommentstitle clearfix">
-    <hr />
+    <div class="weblogcommentstitle">
       <fmt:message key="blog.commenttitle"/>
     </div>
     <div class="weblogcomments"><wiki:InsertPage page="${blogcommentpage}" /></div>
   </wiki:PageExists>
   </c:if>
-
 </wiki:PageExists>
 </c:if>
 

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp?rev=1734729&r1=1734728&r2=1734729&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp Sat Mar 12
20:05:01 2016
@@ -38,6 +38,11 @@
    can be included).
 --%>
 <%-- CSS stylesheet --%>
+<%--
+BOOTSTRAP, IE compatibility / http://getbootstrap.com/getting-started/#support-ie-compatibility-modes
+--%>
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+
 
 <%-- Localized JS; must come before any css, to avoid blocking immediate execution --%>
 <%-- var LocalizedStrings= { "javascript.<xx>":"...", etc. } --%>
@@ -64,10 +69,6 @@ String.I18N.PREFIX = "javascript.";
 --%>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-<%--
-BOOTSTRAP, IE compatibility / http://getbootstrap.com/getting-started/#support-ie-compatibility-modes
---%>
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
 
 <%-- COOKIE read client preferences --%>
 <%



Mime
View raw message