portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r533251 - in /portals/jetspeed-2/trunk: applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/ applications/j2-admin/src/webapp/WEB-INF/view/selectors/ layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/ s...
Date Fri, 27 Apr 2007 22:58:59 GMT
Author: taylor
Date: Fri Apr 27 15:58:58 2007
New Revision: 533251

URL: http://svn.apache.org/viewvc?view=rev&rev=533251
Log:
https://issues.apache.org/jira/browse/JS2-668
contribution Vivek Kumar

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/CategoryPortletSelector.java
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
    portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
    portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/CategoryPortletSelector.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/CategoryPortletSelector.java?view=diff&rev=533251&r1=533250&r2=533251
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/CategoryPortletSelector.java
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/java/org/apache/jetspeed/portlets/selector/CategoryPortletSelector.java
Fri Apr 27 15:58:58 2007
@@ -84,8 +84,10 @@
     protected final static String PORTLETS = "category.selector.portlets";
     protected final static String CATEGORIES = "category.selector.categories";
     protected final static String PAGE = "category.selector.page";
+    protected final static String LAYOUT = "category.selector.layout";
     
     private final String JSPAGE = "jspage";
+    private final String JSLAYOUT = "jslayoutid";
 	private final String CATEGORY = "category";
 	private final String PAGENUMNER = "pageNumber";
 	private final String FILTER = "filter";
@@ -179,7 +181,17 @@
         {
             request.getPortletSession().setAttribute(PAGE, page);
         }
-        this.getContext(request).put(JSPAGE, page);        
+        String layout = request.getParameter(JSLAYOUT);
+        this.getContext(request).put(JSPAGE, page); 
+        if (layout == null || layout.equals(""))
+        {
+            layout = (String)request.getPortletSession().getAttribute(LAYOUT);
+        }
+        else
+        {
+            request.getPortletSession().setAttribute(LAYOUT, layout);
+        }
+        this.getContext(request).put(JSLAYOUT, layout);                
     }
     
     public List retrieveCategories(RenderRequest request)

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm?view=diff&rev=533251&r1=533250&r2=533251
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
Fri Apr 27 15:58:58 2007
@@ -17,7 +17,7 @@
 #set ($refreshLink = $renderResponse.createActionURL())
 $refreshLink.setParameter("reset","true")
 #set ($renderLink = $renderResponse.createActionURL())
-#set ($pagePath = $renderRequest.getParameter("jspage"))
+
 #set ($portalContextPath=$renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext").request.contextPath)
 <!-- Search Form -->
 <form id='jsSelectorForm' onSubmit='return false;' style="height:21px; padding: 2px; margin:10px">
@@ -30,7 +30,7 @@
 <input type="submit" value="Refresh" onClick="javascript:performRefresh()">
 <input type="hidden" value="$category" id="category" name="category">
 <input type="hidden" value="$pageNumber" id="pageNumber" name="pageNumber">
-<input type="hidden" value="$pagePath" id="pageNumber" name="jspage">
+<input type="hidden" value="$jspage" id="pagePath" name="pagePath">
 </td>
 <td nowrap>
 <a href='' id='previousButton'><img style="border:none" src="${portalContextPath}/images/portlets/go-previous.png"></a>
@@ -336,7 +336,7 @@
 {
    var jsPagePath = jetspeed.url.getQueryParameter( document.location.href, "jspage" );
    if ( jsPagePath == null )
-		jsPagePath = "$pagePath";
+		jsPagePath = "$jspage";
    return jsPagePath;
 }
 function getPageCount(portletCount,portletPerPage)
@@ -351,6 +351,8 @@
 function getAddToLayoutId()
 {
    var jsLayoutId = jetspeed.url.getQueryParameter( document.location.href, "jslayoutid"
);
+   if ( jsLayoutId == null )
+		jsLayoutId = "$jslayoutid";
    return jsLayoutId;
 }
 function getReturnURL()

Modified: portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties?view=diff&rev=533251&r1=533250&r2=533251
==============================================================================
--- portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
(original)
+++ portals/jetspeed-2/trunk/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/resources/LayoutResource_en.properties
Fri Apr 27 15:58:58 2007
@@ -44,7 +44,7 @@
 portal.page.editing.changetheme=Change Theme
 portal.page.editing.changethemeall=Change Portlets Theme
 portal.page.customizer.name=Page/Folder Customizer
-portal.page.editing.addlayout=Add portlet
+portal.page.editing.addlayout=Add Layout
 portal.page.editing.page=Page Name:
 portal.page.editing.page.title=Title:
 portal.page.editing.page.shorttitle=Short Title:

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm?view=diff&rev=533251&r1=533250&r2=533251
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm Fri
Apr 27 15:58:58 2007
@@ -97,7 +97,7 @@
     <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}")
+          #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>



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