You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sm...@apache.org on 2007/01/25 06:01:26 UTC

svn commit: r499665 - /portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm

Author: smilek
Date: Wed Jan 24 21:01:26 2007
New Revision: 499665

URL: http://svn.apache.org/viewvc?view=rev&rev=499665
Log:
added function getAddToLayoutId to extract optional jslayoutid query parameter from url so that it can be passed to jetspeed.addNewPortletDefinition and subsequently used as the target layout fragment for the added portlet

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm

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=499665&r1=499664&r2=499665
==============================================================================
--- 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 Wed Jan 24 21:01:26 2007
@@ -136,7 +136,7 @@
    //dojo.widget.byId("AddPortletDialog").hide();   
    var portletDef = new jetspeed.om.PortletDef( theNewPortlet );   
    var pagePath = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + getReturnPagePath();
-   jetspeed.addNewPortletDefinition( portletDef, null, pagePath );
+   jetspeed.addNewPortletDefinition( portletDef, null, pagePath, getAddToLayoutId() );
    selectorPortlets[theNewPortlet].count = selectorPortlets[theNewPortlet].count + 1;
    var cell = document.getElementById(theNewPortlet);
    if (cell != null)
@@ -226,6 +226,11 @@
    if ( jsPagePath == null )
       jsPagePath = "";
    return jsPagePath;
+}
+function getAddToLayoutId()
+{
+   var jsLayoutId = jetspeed.url.getQueryParameter( document.location.href, "jslayoutid" );
+   return jsLayoutId;
 }
 function getReturnURL()
 {



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