portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r481200 - /portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/selectors/category-portlet-selector.vm
Date Fri, 01 Dec 2006 09:35:02 GMT
Author: smilek
Date: Fri Dec  1 01:35:02 2006
New Revision: 481200

URL: http://svn.apache.org/viewvc?view=rev&rev=481200
Log:
added portlet and return fixed to work in desktop

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=481200&r1=481199&r2=481200
==============================================================================
--- 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 Dec  1 01:35:02 2006
@@ -135,7 +135,7 @@
 {                                                      
    //dojo.widget.byId("AddPortletDialog").hide();   
    var portletDef = new jetspeed.om.PortletDef( theNewPortlet );   
-   var pagePath = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + "$jspage";
+   var pagePath = jetspeed.url.basePortalUrl() + jetspeed.url.path.AJAX_API + getReturnPagePath();
    jetspeed.addNewPortletDefinition( portletDef, null, pagePath );
    selectorPortlets[theNewPortlet].count = selectorPortlets[theNewPortlet].count + 1;
    var cell = document.getElementById(theNewPortlet);
@@ -220,9 +220,16 @@
      prevButton.setAttribute('href', getReturnURL());
      displayPortlets("All");
 }
+function getReturnPagePath()
+{
+   var jsPagePath = jetspeed.url.getQueryParameter( document.location.href, "jspage" );
+   if ( jsPagePath == null )
+      jsPagePath = "";
+   return jsPagePath;
+}
 function getReturnURL()
 {
-   return jetspeed.url.basePortalUrl() + jetspeed.url.path.JETSPEED + "/portal" + "$jspage";
+   return jetspeed.url.basePortalUrl() + jetspeed.url.path.JETSPEED + jetspeed.url.servletPath()
+ getReturnPagePath();
 }
 
 window.selectorPortlets = new Array();



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