Author: mwringe
Date: 2011-08-30 10:41:33 -0400 (Tue, 30 Aug 2011)
New Revision: 7253
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
JBEPP-1131: Properly handle more than 2 levels in navigation nodes. Patch merged in from
r7252 (from GTNPORTAL-1957).
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-30
11:40:26 UTC (rev 7252)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-30
14:41:33 UTC (rev 7253)
@@ -228,7 +228,7 @@
String gadgetUrl = GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
String metadataUrl = gadgetServerUrl + (gadgetServerUrl.endsWith("/")
? "" : "/") + "metadata";
String queryString =
"{\"context\":{\"ignoreCache\":\"true\"},\"gadgets\":["
+ "{\"url\":\"" + gadgetUrl + "\"}]}";
-
event.getRequestContext().getJavascriptManager().addJavascript("ajaxAsyncRequest('"
+ metadataUrl + "', true, 'POST', '" + queryString +
"');");
+
event.getRequestContext().getJavascriptManager().addJavascript("ajaxRequest('POST',
'" + metadataUrl + "', true, '" + queryString +
"');");
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-30
11:40:26 UTC (rev 7252)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-30
14:41:33 UTC (rev 7253)
@@ -624,28 +624,35 @@
} ;
/**
- * Create a ajax GET request
+ * Create an ajax GET request
* @param {String} url - Url
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
function ajaxAsyncGetRequest(url, async) {
- ajaxAsyncRequest("GET", url, async);
+ return ajaxRequest("GET", url, async);
}
/**
- * Create a ajax request
+ * Create an ajax request
* @param {String} method - GET, POST, etc
* @param {String} url - Url
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
-function ajaxAsyncRequest(method, url, async, queryString) {
+function ajaxRequest(method, url, async, queryString) {
if(async == undefined) async = true ;
var request = eXo.core.Browser.createHttpRequest() ;
request.open(method, url, async) ;
request.setRequestHeader("Cache-Control", "max-age=86400") ;
- request.send((queryString != undefined && queryString != null) ? queryString :
null) ;
+ if(queryString)
+ {
+ request.send(queryString) ;
+ }
+ else
+ {
+ request.send(null);
+ }
eXo.session.itvDestroy() ;
if(eXo.session.canKeepState && eXo.session.isOpen &&
eXo.env.portal.accessMode == 'private') {
eXo.session.itvInit() ;
Show replies by date