portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1691459 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/ applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/ applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/ ...
Date Thu, 16 Jul 2015 23:19:10 GMT
Author: taylor
Date: Thu Jul 16 23:19:09 2015
New Revision: 1691459

URL: http://svn.apache.org/r1691459
Log:
JS2-1331: add feature to modify number of columns for Responsive Layouts

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/charts.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/four-rows.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/logins.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/my-account2.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/nested.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/registration.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/responsive-blue.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/charts.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/four-rows.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/logins.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/my-account2.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/nested.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/registration.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/responsive-blue.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/responsive/layout.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-blue/css/styles.css
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-green/css/styles.css
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-red/css/styles.css
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap/css/styles.css
    portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/charts.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/charts.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/charts.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/charts/charts.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@
         See the License for the specific language governing permissions and
         limitations under the License.
         -->
-<page id="/charts/jvm-memory.psml" hidden="false">
+<page id="/charts/charts.psml" hidden="false">
     <title>Jetspeed Chart Demo</title>
     <fragment id="P-chart-demo-10008" type="layout" name="jetspeed-layouts::ResponsiveLayout">
         <fragment id="P-chart-memory-20009" type="portlet" name="j2-admin::MemoryUsageChart">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/four-rows.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/four-rows.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/four-rows.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/four-rows.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/default-page.psml" hidden="false">
+<page id="/responsive/four-rows.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/logins.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/logins.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/logins.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/logins.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/test/logins.psml" hidden="false">
+<page id="/responsive/logins.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/my-account2.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/my-account2.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/my-account2.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/my-account2.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="my-account2"
+<page id="/responsive/my-account2"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.2/schemas/psml.xsd">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/nested.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/nested.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/nested.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/nested.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/nested.psml" hidden="false">
+<page id="/responsive/nested.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/registration.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/registration.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/registration.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/registration.psml Thu Jul 16 23:19:09 2015
@@ -15,13 +15,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/registration.psml" hidden="false">
+<page id="/responsive/registration.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>guest-only</security-constraints-ref>
     </security-constraints>
     <title>Registration</title>
     <short-title>Registration</short-title>
-    <fragment id="jsreg-1" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="jsreg-1" type="layout" name="jetspeed-layouts::ResponsiveLayout">
         <fragment id="jsreg-2" type="portlet" name="j2-admin::UserRegistrationPortlet">
             <property name="row" value="1"></property>
             <property name="column" value="0"></property>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/responsive-blue.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/responsive-blue.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/responsive-blue.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/min-pages/responsive/responsive-blue.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/test/responsive-blue.psml" hidden="false">
+<page id="/responsive/responsive-blue.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/charts.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/charts.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/charts.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/charts/charts.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@
         See the License for the specific language governing permissions and
         limitations under the License.
         -->
-<page id="/charts/jvm-memory.psml" hidden="false">
+<page id="/charts/charts.psml" hidden="false">
     <title>Jetspeed Chart Demo</title>
     <fragment id="P-chart-demo-10008" type="layout" name="jetspeed-layouts::ResponsiveLayout">
         <fragment id="P-chart-memory-20009" type="portlet" name="j2-admin::MemoryUsageChart">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/four-rows.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/four-rows.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/four-rows.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/four-rows.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/default-page.psml" hidden="false">
+<page id="/responsive/four-rows.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/logins.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/logins.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/logins.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/logins.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/test/logins.psml" hidden="false">
+<page id="/responsive/logins.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/my-account2.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/my-account2.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/my-account2.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/my-account2.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="my-account2"
+<page id="/responsive/my-account2"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.2/schemas/psml.xsd">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/nested.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/nested.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/nested.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/nested.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/nested.psml" hidden="false">
+<page id="/responsive/nested.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/registration.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/registration.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/registration.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/registration.psml Thu Jul 16 23:19:09 2015
@@ -15,13 +15,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/registration.psml" hidden="false">
+<page id="/responsive/registration.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>guest-only</security-constraints-ref>
     </security-constraints>
     <title>Registration</title>
     <short-title>Registration</short-title>
-    <fragment id="jsreg-1" type="layout" name="jetspeed-layouts::VelocityOneColumn">
+    <fragment id="jsreg-1" type="layout" name="jetspeed-layouts::ResponsiveLayout">
         <fragment id="jsreg-2" type="portlet" name="j2-admin::UserRegistrationPortlet">
             <property name="row" value="1"></property>
             <property name="column" value="0"></property>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/responsive-blue.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/responsive-blue.psml?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/responsive-blue.psml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/responsive/responsive-blue.psml Thu Jul 16 23:19:09 2015
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<page id="/test/responsive-blue.psml" hidden="false">
+<page id="/responsive/responsive-blue.psml" hidden="false">
     <security-constraints>
         <security-constraints-ref>public-view</security-constraints-ref>
     </security-constraints>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/responsive/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/responsive/layout.vm?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/responsive/layout.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/responsive/layout.vm Thu Jul 16 23:19:09 2015
@@ -51,9 +51,265 @@ limitations under the License.
 #set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
 #set($psrc = $rc.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
 #set($profiledPage = $psrc.PageOrTemplate.Path)
+#set($numberOfColumns = $columnLayout.getNumberOfColumns())
 
 <div id="$renderResponse.namespace" class="container-fluid ${layoutClass} ${layoutClass}-${layoutType}">
 
+#if($editing)
+  <div class="layout-edit-bar">
+    #if($isRoot)
+      #getBoolProperty($allowChangePageTheme $rootDecorator "allow.change.page.theme" true)
+      #getBoolProperty($allowAddPage $rootDecorator "allow.add.page" true)
+      #getBoolProperty($allowChangePageName $rootDecorator "allow.change.page.name" true)
+      #getBoolProperty($allowNavigatePage $rootDecorator "allow.navigate.page" true)
+      #getBoolProperty($allowDeletePage $rootDecorator "allow.delete.page" true)
+      #getBoolProperty($allowChangeFolderTheme $rootDecorator "allow.change.folder.theme" true)
+      #getBoolProperty($allowAddFolder $rootDecorator "allow.add.folder" true)
+      #getBoolProperty($allowChangeFolderName $rootDecorator "allow.change.folder.name" true)
+      #getBoolProperty($allowNavigateFolder $rootDecorator "allow.navigate.folder" true)
+      #getBoolProperty($allowDeleteFolder $rootDecorator "allow.delete.folder" true)
+      #getBoolProperty($allowCustomizeAll $rootDecorator "allow.customize.all" false)
+    #else
+      #set($allowChangePageTheme=false)
+      #set($allowAddPage=false)
+      #set($allowChangePageName=false)
+      #set($allowNavigatePage=false)
+      #set($allowDeletePage=false)
+      #set($allowChangeFolderTheme=false)
+      #set($allowAddFolder=false)
+      #set($allowChangeFolderName=false)
+      #set($allowNavigateFolder=false)
+      #set($allowDeleteFolder=false)
+      #set($allowCustomizeAll=false)
+    #end
+
+    #getIntProperty($maxLayoutNesting $rootDecorator "max.layout.nesting" 2)
+    #set ($fnl = $request.getAttribute("fragmentNestingLevel"))
+    #if (! $fnl)
+        #set ($fnl = 0)
+    #end
+    #if($fnl < $maxLayoutNesting)
+      #set($allowAddLayout=true)
+    #else
+      #set($allowAddLayout=false)
+    #end
+    #getBoolProperty($allowChangeLayout $rootDecorator "allow.change.layout" true)
+    #getBoolProperty($allowAddPortlet $rootDecorator "allow.add.portlet" true)
+    #if ($myFragment.isLocked() == false)             
+    <fieldset>    
+    <div class="layout-edit-bar-left">
+        <div class="layout-title"><b>$messages.getString("portal.page.customizer.name")</b></div>
+    </div>
+    <div class="layout-edit-bar-right">
+      #if($allowAddPortlet)
+        <label>$messages.getString("portal.page.editing.portlet")</label>
+          #set ($chooser = "${jetspeed.basePath}/system/customizer/selector.psml?jspage=${profiledPage}&jslayoutid=$myFragment.id")  
+          <a href="$response.encodeURL($chooser)">
+          <img src="#GetPageResource('images/select.gif')" border="0" title="$messages.getString("portal.page.editing.addportlet")"/>
+        </a>
+      #end
+    </div>
+    </fieldset>
+      #set($form="f${renderResponse.namespace}")
+      #set($formAction = "$renderResponse.createActionURL()")
+      #set($submit = ".submit()")
+
+    <form name="$form" action="$formAction" method='post'>
+    #if($allowCustomizeAll)
+    <fieldset>
+    	<legend>$messages.getString("portal.userfolder.config.title")</legend>
+    	<label for="user_pages_theme">$messages.getString("portal.page.editing.theme")</label>
+    	<select id="user_pages_theme" name="user_pages_theme">
+        	#foreach($td in $decorationFactory.getPageDecorations($rc))
+            <option value='$td'>$td
+            #end
+        </select>   
+        <input type="submit" name="jsChangeUserPagesTheme" value='$messages.getString("portal.page.editing.changetheme")' />
+        <label for="user_portlets_deco">$messages.getString("portal.page.editing.portlet.decorator")</label>
+        <select id="user_portlets_deco" name="user_portlets_deco">
+    		<option value=''>
+    	    #foreach($pd in $decorationFactory.getPortletDecorations($rc))
+        	<option value='$pd'>$pd
+    	   	#end
+        </select>
+        <input type="submit" name="jsChangeUserPortletsDeco" value='$messages.getString("portal.page.editing.changethemeall")'/>        
+    </fieldset>
+    #end
+    <fieldset>
+    <div class="layout-edit-bar-left">
+        #if($allowAddLayout||$allowChangeLayout)
+      <div class="layout-title"><b>$messages.getString("portal.page.editing.layoutConfiguration")</b></div>
+      <div class="layout-content">
+        #end
+##        #if ($allowChangePageTheme)
+        <div>
+          <label for="theme">$messages.getString("portal.page.editing.theme")</label>
+          <select id='theme' name='theme' onChange="$form$submit">
+            #foreach($td in $decorationFactory.getPageDecorations($rc))
+            <option value='$td' #if($rootDecorator.Name == $td) SELECTED #end>$td
+            #end
+          </select>   
+        </div>
+##        #end
+        #if($allowAddLayout||$allowChangeLayout)
+        <div>
+          <label for="layout">$messages.getString("portal.page.editing.layout")</label>
+          <select id='layout' name='layout'>
+            #foreach($ld in $decorationFactory.getLayouts($rc))     
+            <option value='$ld.Name' #if($myFragment.Name == $ld.Name) SELECTED #end>$ld.DisplayName
+            #end
+          </select>
+        #end
+        #if ($allowChangeLayout)
+          <input type="submit" name="jsChangeLayout" value="$messages.getString("portal.page.editing.changelayout")" />
+        #end
+        #if($allowAddLayout)
+          <input type="submit" name="jsAddLayout" value="$messages.getString("portal.page.editing.addlayout")" />
+        #end    
+        #if($allowAddLayout||$allowChangeLayout)
+        </div>
+        #end
+        #if ($allowChangeLayout)
+        <div>
+          <label for="jsNumberColumns">Number of columns</label>
+          <select id="jsNumberColumns" name='jsNumberColumns'>
+              <option value='1' #if($numberOfColumns == "1") SELECTED #end>1</option>
+              <option value='2' #if($numberOfColumns == "2") SELECTED #end>2</option>
+              <option value='3' #if($numberOfColumns == "3") SELECTED #end>3</option>
+              <option value='4' #if($numberOfColumns == "4") SELECTED #end>4</option>
+          </select>
+          <input type="submit" name="jsChangeColumns" value="Change Columns" />
+        </div>
+        #end
+        #getBoolProperty($allowChangePortletDecorator $rootDecorator "allow.change.portlet.decorator" true)
+         ####### Take all fragments and apply style	  
+        #if($allowChangePortletDecorator)          
+        <div>
+          <input type="hidden" name="fragment" value="$myFragment.id">
+          <input type="hidden" name="move" value="">
+          <input type="hidden" name="remove" value="">
+          <label for="decorators">$messages.getString("portal.page.editing.portlet.decorator")</label>
+          <select id="decorators" name="decorators">
+            <option value=''>        	    
+                #set ($fd = "")
+                #if ($f.Decorator)
+                    #set ($fd = $f.Decorator)
+                #end
+				#foreach($pd in $decorationFactory.getPortletDecorations($rc))
+			<option value='$pd' #if ($pd == $fd) SELECTED #end>$pd
+        	    #end
+          </select>
+          <input type="submit" name="jsChangeThemeAll" value="$messages.getString("portal.page.editing.changethemeall")"/>
+        </div>
+        #end	   
+        #if($allowAddLayout||$allowChangeLayout)
+      </div>
+        #end
+    </div> 
+    </fieldset>
+    #end       
+    <fieldset style="float:left;width:49%;margin:0px;padding:0px;">
+    <div class="layout-edit-bar-left">
+        #if($allowAddPage||$allowChangePageName||$allowDeletePage)
+      <div class="page-title"><b>$messages.getString("portal.page.editing.pageConfiguration")</b></div>
+      <div class="page-content">
+        #end
+        #if($allowAddPage||$allowChangePageName)
+        <div>
+          <label for="pagename">$messages.getString("portal.page.editing.page")</label>
+          <input id='pagename' name='jsPageName'/>
+        </div>
+        <div>
+          <label for="pagetitle">$messages.getString("portal.page.editing.page.title")</label>
+          <input id='pagetitle' name='jsPageTitle'/>
+        </div>
+        <div>
+          <label for="pageshorttitle">$messages.getString("portal.page.editing.page.shorttitle")</label>
+          <input id='pageshorttitle' name='jsPageShortTitle'/>
+        </div>
+        <div>
+        #end
+        #if($allowAddPage)
+          <input type="submit" name="jsSubmitPage" value="$messages.getString("portal.page.editing.addpage")"/>
+        #end
+        #if($allowChangePageName)
+          <input type="submit" name="jsChangePageName" value="$messages.getString("portal.page.editing.changepagename")"/>
+        #end
+        #if($allowAddPage||$allowChangePageName)
+        </div>
+        #end
+        #if($allowNavigatePage)
+        <div>
+          <label>$messages.getString("portal.page.editing.pagenavigation")</label>
+          <input id="move-page-left" type="submit" name="jsMovePageLeft" value="$messages.getString("portal.page.editing.movePageLeft")" />
+          <input id="move-page-right" type="submit" name="jsMovePageRight" value="$messages.getString("portal.page.editing.movePageRight")" />
+        </div>
+        #end
+        #if($allowDeletePage)
+        <div>
+          <label for="deletepage">$messages.getString("portal.page.editing.deleteThisPage")</label>
+          <input id="deletepage" type="submit" name="jsDeletePage" value="$messages.getString("portal.page.editing.deletePage")" onclick="if(window.confirm('$messages.getString("portal.page.editing.confirmDeleteThisPage")')){return true;}return false;"/>
+        </div>
+        #end
+        #if($allowAddPage||$allowChangePageName||$allowDeletePage)
+      </div>
+        #end
+    </div> 
+    </fieldset>
+    <fieldset style="width:49%;margin:0px;padding:0px;">
+    <div class="layout-edit-bar-left">
+        #if($allowAddFolder||$allowChangeFolderName||$allowDeleteFolder)
+      <div class="folder-title"><b>$messages.getString("portal.folder.editing.folderConfiguration")</b></div>
+      <div class="folder-content">
+        #end
+        #if($allowAddFolder||$allowChangeFolderName)
+        <div>
+          <label for="foldername">$messages.getString("portal.folder.editing.folder")</label>
+          <input id='foldername' name='jsFolderName'/>
+        </div>
+        <div>
+          <label for="foldertitle">$messages.getString("portal.folder.editing.folder.title")</label>
+          <input id='foldertitle' name='jsFolderTitle'/>
+        </div>
+        <div>
+          <label for="foldershorttitle">$messages.getString("portal.folder.editing.folder.shorttitle")</label>
+          <input id='foldershorttitle' name='jsFolderShortTitle'/>
+        </div>
+        <div>
+        #end
+        #if($allowAddFolder)
+          <input type="submit" name="jsSubmitFolder" value="$messages.getString("portal.folder.editing.addfolder")"/>
+        #end
+        #if($allowChangeFolderName)
+          <input type="submit" name="jsChangeFolderName" value="$messages.getString("portal.folder.editing.changefoldername")"/>
+        #end
+        #if($allowAddFolder||$allowChangeFolderName)
+        </div>
+        #end
+        #if($allowNavigateFolder)
+        <div>
+          <label>$messages.getString("portal.folder.editing.foldernavigation")</label>
+          <input id="move-folder-left" type="submit" name="jsMoveFolderLeft" value="$messages.getString("portal.folder.editing.moveFolderLeft")" />
+          <input id="move-folder-right" type="submit" name="jsMoveFolderRight" value="$messages.getString("portal.folder.editing.moveFolderRight")" />
+        </div>
+        #end
+        #if($allowDeleteFolder)
+        <div>
+          <label for="deletefolder">$messages.getString("portal.folder.editing.deleteThisFolder")</label>
+          <input id="deletefolder" type="submit" name="jsDeleteFolder" value="$messages.getString("portal.folder.editing.deleteFolder")" onclick="if(window.confirm('$messages.getString("portal.folder.editing.confirmDeleteThisFolder")')){return true;}return false;"/>
+        </div>
+        #end
+        #if($allowAddFolder||$allowChangeFolderName||$allowDeleteFolder)
+      </div>
+        #end
+    </div>
+    </fieldset>
+    <br style="clear:both;">
+    </form>
+  </div>
+## end edit mode
+#end
+
   #set ($dcnt = 0)
   #set ($columnIndex = 0)
   #set ($columnCounter = 0)
@@ -61,10 +317,13 @@ limitations under the License.
   #set ($perDesktopColumn = 12 / $originalColumnNumber)
   #set ($perTabletColumn = 12 / $originalColumnNumber * 2)
   #set ($perMobileColumn = 12)
+  #set ($form="f${renderResponse.namespace}")
+  #set ($formAction = "$renderResponse.createActionURL()")
+  #set ($submit = ".submit()")
 
 <div class="row" rel="$originalColumnNumber">
   #foreach($column in $columnLayout.columns)
-    #if(($columnCounter == 2) && ($originalColumnNumber > 2))
+    #if(($columnCounter == $originalColumnNumber) && ($originalColumnNumber > 2))
         <br class="visible-sm-block" style="clear: both" />
     #end
     #if($columnCounter == $originalColumnNumber)
@@ -121,7 +380,7 @@ limitations under the License.
                             #set($fragmentType="Layout")
                           #end
                         ## Move portlet left
-                          #if($lastColumn > 0 && $col > 0)
+                          #if($originalColumnNumber > 0 && $col > 0)
                               <a href="#" onClick="${form}${dcnt}.move.value='3';$form$dcnt$submit;return false;" class="move-portlet-left">
                                   <img src="#GetPageResource('images/movePortletLeft.gif')" border="0" title="$messages.getString("portal.page.editing.move${fragmentType}Left")"/>
                               </a>
@@ -143,7 +402,7 @@ limitations under the License.
                               </a>
                           #end
                         ## Move portlet right
-                          #if($lastColumn > 0 && $col < $lastColumn)
+                          #if($originalColumnNumber > 0 && $col < $originalColumnNumber)
                               <a href="#" onClick="${form}${dcnt}.move.value='4';$form$dcnt$submit;return false;" class="move-portlet-right">
                                   <img src="#GetPageResource('images/movePortletRight.gif')" border="0" title="$messages.getString("portal.page.editing.move${fragmentType}Right")"/>
                               </a>
@@ -162,8 +421,6 @@ limitations under the License.
               #end
             </div>
         #end
-
-
       </div>
     #set ($columnIndex = $columnIndex + 1)
     #set ($columnCounter = $columnCounter + 1)

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-blue/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-blue/css/styles.css?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-blue/css/styles.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-blue/css/styles.css Thu Jul 16 23:19:09 2015
@@ -337,6 +337,7 @@ background-position: 0px -30px
     position: relative;
     top: 55px;
     left: -10px;
+    z-index: 1;
 }
 
 .FolderList
@@ -533,7 +534,7 @@ background-position: 0px -30px
 .layout-jetspeed .layout-title,
 .layout-jetspeed .layout-edit-bar b{font-weight: bold; background: #c2c2c2; color: #666666; padding: 5px; display: block; width: auto; margin-bottom: 5px;}
 
-.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 6px; clear: left}
+.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 2px 6px; clear: left; margin-bottom: 0}
 .layout-jetspeed .layout-edit-bar select{width: 200px;}
 .layout-jetspeed .layout-edit-bar input{margin-bottom: 5px; margin-top: 5px;}
 
@@ -567,10 +568,11 @@ background-position: 0px -30px
 
 .layout-jetspeed .portlet-edit-bar{
     background: url("../images/portlet-layout-bar-back.gif") no-repeat top left;
-    height: 18px;
-    margin: 10px;
+    height: 28px;
+    margin: 10px 10px 10px 5px;
     margin-bottom: -5px;
-    padding: 1px;
+    padding: 1px 1px 1px 8px;
+    border-top-left-radius: 15px;
 }
 .layout-jetspeed .portlet-edit-bar a{display: block ; float: left; margin-top: 2px;}
 .layout-jetspeed .portlet-edit-bar select{width: 120px;}

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-green/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-green/css/styles.css?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-green/css/styles.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-green/css/styles.css Thu Jul 16 23:19:09 2015
@@ -337,6 +337,7 @@ background-position: 0px -30px
     position: relative;
     top: 55px;
     left: -10px;
+    z-index: 1;
 }
 
 .FolderList
@@ -533,7 +534,7 @@ background-position: 0px -30px
 .layout-jetspeed .layout-title,
 .layout-jetspeed .layout-edit-bar b{font-weight: bold; background: #c2c2c2; color: #666666; padding: 5px; display: block; width: auto; margin-bottom: 5px;}
 
-.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 6px; clear: left}
+.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 2px 6px; clear: left; margin-bottom: 0}
 .layout-jetspeed .layout-edit-bar select{width: 200px;}
 .layout-jetspeed .layout-edit-bar input{margin-bottom: 5px; margin-top: 5px;}
 
@@ -567,10 +568,11 @@ background-position: 0px -30px
 
 .layout-jetspeed .portlet-edit-bar{
     background: url("../images/portlet-layout-bar-back.gif") no-repeat top left;
-    height: 18px;
-    margin: 10px;
+    height: 28px;
+    margin: 10px 10px 10px 5px;
     margin-bottom: -5px;
-    padding: 1px;
+    padding: 1px 1px 1px 8px;
+    border-top-left-radius: 15px;
 }
 .layout-jetspeed .portlet-edit-bar a{display: block ; float: left; margin-top: 2px;}
 .layout-jetspeed .portlet-edit-bar select{width: 120px;}

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-red/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-red/css/styles.css?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-red/css/styles.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap-red/css/styles.css Thu Jul 16 23:19:09 2015
@@ -337,6 +337,7 @@ background-position: 0px -30px
     position: relative;
     top: 55px;
     left: -10px;
+    z-index: 1;
 }
 
 .FolderList
@@ -533,7 +534,7 @@ background-position: 0px -30px
 .layout-jetspeed .layout-title,
 .layout-jetspeed .layout-edit-bar b{font-weight: bold; background: #c2c2c2; color: #666666; padding: 5px; display: block; width: auto; margin-bottom: 5px;}
 
-.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 6px; clear: left}
+.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 2px 6px; clear: left; margin-bottom: 0}
 .layout-jetspeed .layout-edit-bar select{width: 200px;}
 .layout-jetspeed .layout-edit-bar input{margin-bottom: 5px; margin-top: 5px;}
 
@@ -567,10 +568,11 @@ background-position: 0px -30px
 
 .layout-jetspeed .portlet-edit-bar{
     background: url("../images/portlet-layout-bar-back.gif") no-repeat top left;
-    height: 18px;
-    margin: 10px;
+    height: 28px;
+    margin: 10px 10px 10px 5px;
     margin-bottom: -5px;
-    padding: 1px;
+    padding: 1px 1px 1px 8px;
+    border-top-left-radius: 15px;
 }
 .layout-jetspeed .portlet-edit-bar a{display: block ; float: left; margin-top: 2px;}
 .layout-jetspeed .portlet-edit-bar select{width: 120px;}

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap/css/styles.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap/css/styles.css?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap/css/styles.css (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/layout/bootstrap/css/styles.css Thu Jul 16 23:19:09 2015
@@ -337,6 +337,7 @@ background-position: 0px -30px
     position: relative;
     top: 55px;
     left: -10px;
+    z-index: 1;
 }
 
 .FolderList
@@ -533,7 +534,7 @@ margin-left: 2px;
 .layout-jetspeed .layout-title,
 .layout-jetspeed .layout-edit-bar b{font-weight: bold; background: #c2c2c2; color: #666666; padding: 5px; display: block; width: auto; margin-bottom: 5px;}
 
-.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 6px; clear: left}
+.layout-jetspeed .layout-edit-bar label{width: 71px; display: block; float: left; text-align: right; padding: 2px 6px; clear: left; margin-bottom: 0}
 .layout-jetspeed .layout-edit-bar select{width: 200px;}
 .layout-jetspeed .layout-edit-bar input{margin-bottom: 5px; margin-top: 5px;}
 
@@ -567,10 +568,11 @@ padding: 4px;
 
 .layout-jetspeed .portlet-edit-bar{
 background: url("../images/portlet-layout-bar-back.gif") no-repeat top left; 
-height: 18px;
-margin: 10px;
+height: 28px;
+margin: 10px 10px 10px 5px;
 margin-bottom: -5px;
-padding: 1px;
+padding: 1px 1px 1px 8px;
+border-top-left-radius: 15px;
 }
 .layout-jetspeed .portlet-edit-bar a{display: block ; float: left; margin-top: 2px;}
 .layout-jetspeed .portlet-edit-bar select{width: 120px;}

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-layout-portlets/src/main/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java Thu Jul 16 23:19:09 2015
@@ -442,6 +442,31 @@ public class MultiColumnPortlet extends
                 return;
             }
 
+            // JS2-1331: since 2.3.0
+            if ( request.getParameter("jsChangeColumns" ) != null )
+            {
+                String columns = request.getParameter("jsNumberColumns");
+                if ( columns != null && columns.length() > 0 )
+                {
+                    PortletWindow window = requestContext.getActionWindow();
+                    ContentFragment targetFragment = requestPage.getFragmentById(window.getId().toString());
+                    if ( targetFragment != null )
+                    {
+                        try
+                        {
+                            int max = Integer.parseInt(columns);
+                            targetFragment.reorderColumns(max);
+                            clearLayoutAttributes(request);
+                        }
+                        catch (Exception e)
+                        {
+                            throw new PortletException("failed to change columns " + layout + " to page: " + requestPage+": "+e.getMessage(), e);
+                        }
+                    }
+                }
+                return;
+            }
+
             String theme = request.getParameter("theme");
             if ( theme != null && theme.length() > 0 )
             {
@@ -644,6 +669,7 @@ public class MultiColumnPortlet extends
                 }
                 return;
             }
+
         }
     }
         

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/layout/impl/PageLayoutComponentImpl.java Thu Jul 16 23:19:09 2015
@@ -2874,4 +2874,59 @@ public class PageLayoutComponentImpl imp
         }
         throw new PageNotRemovedException("Unable to classify page by type: "+((pageOrTemplate != null) ? pageOrTemplate.getClass().getName() : "null"));
     }
+
+    public void reorderColumns(ContentFragment contentFragment, int maxColumns) {
+        if (log.isDebugEnabled()) {
+            log.debug("PageLayoutComponentImpl.reorderColumns() invoked");
+        }
+        try {
+            // validate content fragment
+            ContentFragmentImpl contentFragmentImpl = (ContentFragmentImpl) contentFragment;
+            if (contentFragmentImpl.getDefinition() == null) {
+                throw new IllegalArgumentException("Transient content fragments are not mutable");
+            }
+            if (contentFragmentImpl.isLocked()) {
+                throw new IllegalArgumentException("Locked content fragment is not mutable");
+            }
+            if (!contentFragmentImpl.getDefinition().getPath().equals(contentFragmentImpl.getPageOrTemplate().getPath())) {
+                throw new IllegalArgumentException("Only page fragments can be modified");
+            }
+
+            // retrieve current page or template and fragment from page manager
+            BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentFragmentImpl.getPageOrTemplate().getPath());
+            BaseFragmentElement parentFragment = pageOrTemplate.getFragmentById(contentFragmentImpl.getFragment().getId());
+            if (!(parentFragment instanceof Fragment)) {
+                throw new IllegalArgumentException("New fragment cannot be added to parent fragment");
+            }
+            Fragment fragment = (Fragment) parentFragment;
+            if (!Fragment.LAYOUT.equals(fragment.getType())) {
+                throw new IllegalArgumentException("New fragment cannot be added to non-layout parent fragment");
+            }
+
+            // check for edit permission
+            fragment.checkAccess(JetspeedActions.EDIT);
+
+            // Perform ReOrder
+            int count = maxColumns - 1;
+            int row = 0;
+            for (Object f : contentFragmentImpl.getFragments()) {
+                ContentFragmentImpl impl = (ContentFragmentImpl)f;
+                impl.updateRowColumn(row, count);
+                count = count - 1;
+                if (count < 0) {
+                    count = maxColumns - 1;
+                    row++;
+                }
+            }
+
+            // update page in page manager
+            updatePage(pageOrTemplate);
+
+        } catch (Exception e) {
+            throw new PageLayoutComponentException("Unexpected exception: " + e, e);
+        }
+
+    }
+
+
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentFragmentImpl.java Thu Jul 16 23:19:09 2015
@@ -1738,4 +1738,12 @@ public class ContentFragmentImpl impleme
         this.refreshFunction = function;
     }
 
+    @Override
+    public void reorderColumns(int max) {
+        if (pageLayoutComponent != null)
+        {
+            // delegate to page layout component
+            pageLayoutComponent.reorderColumns(this, max);
+        }
+    }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/main/java/org/apache/jetspeed/om/page/impl/ContentPageImpl.java Thu Jul 16 23:19:09 2015
@@ -938,4 +938,5 @@ public class ContentPageImpl implements
     {
         this.inheritable = inheritable;
     }
+
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/layout/PageLayoutComponent.java Thu Jul 16 23:19:09 2015
@@ -478,4 +478,13 @@ public interface PageLayoutComponent
      * @param shortTitle page short title
      */
     void updateTitles(ContentPage contentPage, String title, String shortTitle);
+
+    /**
+     * Reorder portlet columns locations over maxColumns
+     *
+     * @param targetFragment
+     * @param maxColumns
+     */
+    void reorderColumns(ContentFragment targetFragment, int maxColumns);
+
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java?rev=1691459&r1=1691458&r2=1691459&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java Thu Jul 16 23:19:09 2015
@@ -699,4 +699,7 @@ public interface ContentFragment
     void setRefreshRate(long rate);
     String getRefreshFunction();
     void setRefreshFunction(String function);
+
+    void reorderColumns(int max);
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message