roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1619562 - in /roller/trunk/app/src/main: java/org/apache/roller/weblogger/pojos/ java/org/apache/roller/weblogger/pojos/wrapper/ java/org/apache/roller/weblogger/ui/struts2/editor/ resources/ resources/org/apache/roller/weblogger/pojos/ re...
Date Thu, 21 Aug 2014 20:12:17 GMT
Author: gmazza
Date: Thu Aug 21 20:12:17 2014
New Revision: 1619562

URL: http://svn.apache.org/r1619562
Log:
Restored default plugins for each blog, starting RC3 soon...

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java
    roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml
    roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm
    roller/trunk/app/src/main/resources/sql/createdb.vm
    roller/trunk/app/src/main/resources/struts.xml
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp
    roller/trunk/app/src/main/webapp/roller-ui/styles/roller.css

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/Weblog.java Thu Aug 21
20:12:17 2014
@@ -69,6 +69,7 @@ public class Weblog implements Serializa
     private String  editorTheme      = null;
     private String  locale           = null;
     private String  timeZone         = null;
+    private String  defaultPlugins   = null;
     private Boolean visible          = Boolean.TRUE;
     private Boolean active           = Boolean.TRUE;
     private Date    dateCreated      = new java.util.Date();
@@ -355,7 +356,18 @@ public class Weblog implements Serializa
             dateCreated = null;
         }
     }
-    
+
+    /**
+     * Comma-delimited list of user's default Plugins.
+     */
+    public String getDefaultPlugins() {
+        return defaultPlugins;
+    }
+
+    public void setDefaultPlugins(String string) {
+        defaultPlugins = string;
+    }
+
     /**
      * Set bean properties based on other bean.
      */

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/wrapper/WeblogWrapper.java
Thu Aug 21 20:12:17 2014
@@ -184,8 +184,12 @@ public final class WeblogWrapper {
     public Date getDateCreated() {
         return this.pojo.getDateCreated();
     }
-    
-    
+
+
+    public String getDefaultPlugins() {
+        return this.pojo.getDefaultPlugins();
+    }
+
     public Locale getLocaleInstance() {
         return this.pojo.getLocaleInstance();
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java
Thu Aug 21 20:12:17 2014
@@ -125,6 +125,12 @@ public final class EntryEdit extends UIA
             getBean().setLocale(getActionWeblog().getLocale());
             getBean().setAllowComments(getActionWeblog().getDefaultAllowComments());
             getBean().setCommentDays(getActionWeblog().getDefaultCommentDays());
+            // apply weblog default plugins
+            if (getActionWeblog().getDefaultPlugins() != null) {
+                getBean().setPlugins(
+                        StringUtils.split(getActionWeblog().getDefaultPlugins(),
+                                ","));
+            }
         }
 
         return INPUT;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
Thu Aug 21 20:12:17 2014
@@ -249,15 +249,6 @@ public class MediaFileAdd extends MediaF
         }
     }
     
-    /**
-     * Cancel.
-     * 
-     * @return the string
-     */
-    public String cancel() {
-        return CANCEL;
-    }
-
     public MediaFileBean getBean() {
         return bean;
     }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogConfigBean.java
Thu Aug 21 20:12:17 2014
@@ -18,6 +18,7 @@
 
 package org.apache.roller.weblogger.ui.struts2.editor;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.roller.weblogger.pojos.Weblog;
 
 
@@ -40,6 +41,7 @@ public class WeblogConfigBean {
     private String emailAddress = null;
     private String locale = null;
     private String timeZone = null;
+    private String defaultPlugins = null;
     private int entryDisplayCount = 15;
     private boolean active = true;
     private boolean commentModerationRequired = false;
@@ -51,6 +53,7 @@ public class WeblogConfigBean {
     private String analyticsCode = null;
     
     private String bloggerCategoryId = null;
+    private String[] defaultPluginsArray = null;
     private boolean applyCommentDefaults = false;
     
     
@@ -222,6 +225,13 @@ public class WeblogConfigBean {
         this.bloggerCategoryId = bloggerCategoryId;
     }
 
+    public String[] getDefaultPluginsArray() {
+        return defaultPluginsArray;
+    }
+
+    public void setDefaultPluginsArray(String[] strings) {
+        defaultPluginsArray = strings;
+    }
     public boolean getApplyCommentDefaults() {
         return applyCommentDefaults;
     }
@@ -262,6 +272,7 @@ public class WeblogConfigBean {
         this.emailAddress = dataHolder.getEmailAddress();
         this.locale = dataHolder.getLocale();
         this.timeZone = dataHolder.getTimeZone();
+        this.defaultPlugins = dataHolder.getDefaultPlugins();
         this.entryDisplayCount = dataHolder.getEntryDisplayCount();
         setActive(dataHolder.getActive());
         this.commentModerationRequired = dataHolder.getCommentModerationRequired();
@@ -273,6 +284,9 @@ public class WeblogConfigBean {
         if (dataHolder.getBloggerCategory() != null) {
             bloggerCategoryId = dataHolder.getBloggerCategory().getId();
         }
+        if (dataHolder.getDefaultPlugins() != null) {
+            defaultPluginsArray = StringUtils.split(dataHolder.getDefaultPlugins(), ",");
+        }
     }
     
     
@@ -289,6 +303,7 @@ public class WeblogConfigBean {
         dataHolder.setEmailAddress(this.emailAddress);
         dataHolder.setLocale(this.locale);
         dataHolder.setTimeZone(this.timeZone);
+        dataHolder.setDefaultPlugins(StringUtils.join(this.defaultPluginsArray, ","));
         dataHolder.setEntryDisplayCount(this.entryDisplayCount);
         dataHolder.setActive(this.getActive());
         dataHolder.setCommentModerationRequired(this.commentModerationRequired);

Modified: roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml (original)
+++ roller/trunk/app/src/main/resources/org/apache/roller/weblogger/pojos/Weblog.orm.xml Thu
Aug 21 20:12:17 2014
@@ -81,7 +81,10 @@
 				<column name="datecreated" insertable="true" updatable="true" unique="false"/>
 				<temporal>TIMESTAMP</temporal>
 			</basic>
-			<basic name="entryDisplayCount">
+            <basic name="defaultPlugins">
+                <column name="defaultplugins" insertable="true" updatable="true" unique="false"/>
+            </basic>
+            <basic name="entryDisplayCount">
 				<column name="displaycnt" insertable="true" updatable="true" unique="false"/>
 			</basic>
 			<basic name="visible">

Modified: roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm (original)
+++ roller/trunk/app/src/main/resources/sql/500-to-510-migration.vm Thu Aug 21 20:12:17 2014
@@ -15,7 +15,6 @@ update roller_properties set name = 'use
 #dropColumn('weblog' 'ignorewords')
 #dropColumn('weblog' 'defaultpageid')
 #dropColumn('weblog' 'weblogdayid')
-#dropColumn('weblog' 'defaultplugins')
 
 -- two weblog columns renamed
 #addColumnNotNull('weblog' 'visible' $db.BOOLEAN_SQL_TYPE $db.BOOLEAN_TRUE)

Modified: roller/trunk/app/src/main/resources/sql/createdb.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/createdb.vm?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/createdb.vm (original)
+++ roller/trunk/app/src/main/resources/sql/createdb.vm Thu Aug 21 20:12:17 2014
@@ -84,6 +84,7 @@ create table weblog (
     editortheme       varchar(255),
     locale            varchar(20),
     timezone          varchar(50),
+    defaultplugins    varchar(255),
     visible           $db.BOOLEAN_SQL_TYPE_TRUE not null,
     isactive          $db.BOOLEAN_SQL_TYPE_TRUE not null,
     datecreated          $db.TIMESTAMP_SQL_TYPE not null,

Modified: roller/trunk/app/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/struts.xml?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/struts.xml (original)
+++ roller/trunk/app/src/main/resources/struts.xml Thu Aug 21 20:12:17 2014
@@ -252,7 +252,7 @@
             <result name="input" type="tiles">.MediaFileAdd</result>
             <result name="success" type="tiles">.MediaFileAddSuccess</result>
             <result name="error" type="tiles">.MediaFileAdd</result>
-             <result name="cancel" type="redirectAction">
+            <result name="cancel" type="redirectAction">
                 <param name="actionName">mediaFileView</param>
                 <param name="weblog">${weblog}</param>
             </result>

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Bookmarks.jsp Thu Aug 21 20:12:17
2014
@@ -153,7 +153,7 @@ function onMove()
         </s:else>
     </table>
     
-    <div class="control group">
+    <div class="control clearfix">
         <s:if test="folder.bookmarks.size > 0">
                 <%-- Delete-selected button --%>
                 <input type="button" value="<s:text name="bookmarksForm.delete"/>"
onclick="onDelete();return false;" />
@@ -168,7 +168,6 @@ function onMove()
         </s:if>
 
         <s:if test="folder.name != 'default'">
-            <!-- need a group (above) clearfix to use this float correctly -->
             <span style="float:right">
                 <s:submit value="%{getText('bookmarksForm.deleteFolder')}" action="bookmarks!deleteFolder"
onclick="onDeleteFolder();return false;"/>
             </span>

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileAdd.jsp Thu Aug 21 20:12:17
2014
@@ -178,7 +178,6 @@
 
     <br />
     <div class="control">
-       <%-- <input type="submit" value='<s:text name="mediaFileAdd.upload" />'
name="upload" /> --%>
        <s:submit value="%{getText('mediaFileAdd.upload')}" action="mediaFileAdd!save"
/>
        <s:submit value="%{getText('generic.cancel')}" action="mediaFileAdd!cancel" />
     </div>

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/MediaFileView.jsp Thu Aug 21 20:12:17
2014
@@ -378,7 +378,7 @@
     <div style="clear:left;"></div>
 
     <s:if test="(!pager && childFiles.size() > 0) || (pager && pager.items.size()
> 0) || (currentDirectory.name != 'default' && !pager)">
-        <div class="control group" style="margin-top: 15px">
+        <div class="control clearfix" style="margin-top: 15px">
 
             <s:if test="(!pager && childFiles.size() > 0) || (pager &&
pager.items.size() > 0)">
                 <span style="padding-left:7px;margin-top: 20px">
@@ -396,7 +396,6 @@
             </s:if>
 
             <s:if test="currentDirectory.name != 'default' && !pager">
-                <!-- need a group (above) clearfix to use this float correctly -->
                 <span style="float:right;">
                     <s:submit value="%{getText('mediaFileView.deleteFolder')}" action="mediaFileView!deleteFolder"
onclick="onDeleteFolder();return false;"/>
                 </span>

Modified: roller/trunk/app/src/main/webapp/roller-ui/styles/roller.css
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/styles/roller.css?rev=1619562&r1=1619561&r2=1619562&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/styles/roller.css (original)
+++ roller/trunk/app/src/main/webapp/roller-ui/styles/roller.css Thu Aug 21 20:12:17 2014
@@ -864,7 +864,7 @@ div.autocomplete ul li {
 #ewecontextmenu .yuimenuitem-selected a {color:#ffffff;}
 
 /*** Right control floats aka clearfix ***/
-.group:after {
+.clearfix:after {
   content: "";
   display: table;
   clear: both;



Mime
View raw message