portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r592736 - in /portals/jetspeed-2/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/ jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/
Date Wed, 07 Nov 2007 12:55:49 GMT
Author: woonsan
Date: Wed Nov  7 04:55:48 2007
New Revision: 592736

URL: http://svn.apache.org/viewvc?rev=592736&view=rev
Log:
[JS2-808] Maximize on edit-defaults option
Implemented 'maximizeOnEditDefaults' option: portlet is maximizing in edit_defaults mode.

Modified:
    portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
    portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
    portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
    portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pipelines.xml

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java?rev=592736&r1=592735&r2=592736&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/AbstractDecoratorActionsFactory.java
Wed Nov  7 04:55:48 2007
@@ -40,6 +40,7 @@
 {
     private static ThreadLocal actionResourcesMap = new ThreadLocal();
     private boolean editMaximizesOption = false;
+    private boolean editDefaultsMaximizesOption = false;
     
     /**
      * When Edit is clicked, also maximize the window state
@@ -114,9 +115,14 @@
 
         WindowState ws;
         PortletMode pm;
-        if (editMaximizesOption)
+        if (editMaximizesOption || editDefaultsMaximizesOption)
         {
-            if (template.getAction().equals(JetspeedActions.EDIT))
+            if (editMaximizesOption && template.getAction().equals(JetspeedActions.EDIT))
+            {
+                ws = WindowState.MAXIMIZED;
+                pm = template.getCustomMode();
+            }
+            else if (editDefaultsMaximizesOption && template.getAction().equals(JetspeedActions.EDIT_DEFAULTS))
             {
                 ws = WindowState.MAXIMIZED;
                 pm = template.getCustomMode();
@@ -207,4 +213,13 @@
         return this.editMaximizesOption;
     }
     
+    public void setMaximizeOnEditDefaults(boolean maxOnEditDefaults)
+    {
+        this.editDefaultsMaximizesOption = maxOnEditDefaults;
+    }
+    
+    public boolean getMaximizeOnEditDefaults()
+    {
+        return this.editDefaultsMaximizesOption;
+    }
 }

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java?rev=592736&r1=592735&r2=592736&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
Wed Nov  7 04:55:48 2007
@@ -89,6 +89,11 @@
     
     private boolean maxOnEdit = false;
     
+    private boolean maxOnEditDefaults = false;
+
+    /**
+     * When edit_defaults mode is not supported by a portlet, support the mode automatically.
+     */
     private boolean autoSwitchingToEditDefaultsModes = true;
          
      /**
@@ -293,6 +298,7 @@
                 {
                     adapter = (DecoratorActionsFactory)Class.forName(decoratorActionsAdapterClassName).newInstance();
                     adapter.setMaximizeOnEdit(this.maxOnEdit);
+                    adapter.setMaximizeOnEditDefaults(this.maxOnEditDefaults);
                 }
                 catch (Exception e)
                 {
@@ -635,6 +641,17 @@
     public boolean getMaximizeOnEdit()
     {
         return this.maxOnEdit;
+    }
+    
+    public void setMaximizeOnEditDefaults(boolean maxOnEditDefaults)
+    {
+        this.maxOnEditDefaults = maxOnEditDefaults;
+        this.defaultDecoratorActionsFactory.setMaximizeOnEditDefaults(maxOnEditDefaults);
+    }
+    
+    public boolean getMaximizeOnEditDefaults()
+    {
+        return this.maxOnEditDefaults;
     }
     
     public void setAutoSwitchingToEditDefaultsModes(boolean autoSwitchingToEditDefaultsModes)

Modified: portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java?rev=592736&r1=592735&r2=592736&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
(original)
+++ portals/jetspeed-2/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecoratorActionsFactory.java
Wed Nov  7 04:55:48 2007
@@ -49,4 +49,16 @@
      */
     public boolean getMaximizeOnEdit();
     
+    /**
+     * Maximize portlet window when going into edit_defaults mode
+     * @param maxOnEditDefaults
+     */
+    void setMaximizeOnEditDefaults(boolean maxOnEditDefaults);
+    
+    /**
+     * Maximize portlet window when going into edit_defaults mode
+     * 
+     * @return
+     */
+    public boolean getMaximizeOnEditDefaults();
 }

Modified: portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pipelines.xml?rev=592736&r1=592735&r2=592736&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pipelines.xml
(original)
+++ portals/jetspeed-2/trunk/jetspeed-portal-resources/src/main/resources/webapp/WEB-INF/assembly/pipelines.xml
Wed Nov  7 04:55:48 2007
@@ -298,6 +298,8 @@
          -->
          <!-- When clicking on Edit Mode, also switch to Maximize -->
         <property name="maximizeOnEdit"><value>false</value></property>
        
+         <!-- When clicking on Edit_defaults Mode, also switch to Maximize -->
+        <property name="maximizeOnEditDefaults"><value>false</value></property>
        
         <property name="autoSwitchingToEditDefaultsModes"><value>false</value></property>
   </bean>
 



---------------------------------------------------------------------
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