portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r499665 - /portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
Date Thu, 25 Jan 2007 05:01:26 GMT
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


Mime
View raw message