Author: mwringe
Date: 2011-10-26 11:48:44 -0400 (Wed, 26 Oct 2011)
New Revision: 7895
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
JBEPP-1191: fix an issue which occurs if a ajax request is trying to update a component
which no longer exists (which causes a cryptic error message and a page reload due to a
timeout). Now the alert message will be more clear on the issue and recommend that a
refresh may be in order (but does not automatically perform this refresh).
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Tema por Defecto";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "La session a expir\u00e9 ! Veuillez recharger
la page.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Style par Défaut";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "기본 테마";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "\u0921\u093f\u092b\u094c\u0932\u094d\u091f
\u0925\u0940\u092e";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default theme";
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js 2011-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -18,6 +18,6 @@
*/
eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your
browser.";
-eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not
found : {0}";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "Cannot complete request as the component
to update cannot be found (blockId: {0}). If the page's contents have changed, a page
refresh may be needed."
eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found :
{0}";
eXo.i18n.I18NMessage.DefaultTheme = "Default Theme";
\ No newline at end of file
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-10-26
15:20:53 UTC (rev 7894)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-10-26
15:48:44 UTC (rev 7895)
@@ -524,7 +524,9 @@
} else {
target = document.getElementById(blockToUpdate.blockId) ;
}
- if(target == null)
alert(eXo.i18n.I18NMessage.getMessage("TargetBlockNotFound", new Array
(blockToUpdate.blockId))) ;
+ if(target == null) {
+ throw new
Error(eXo.i18n.I18NMessage.getMessage("TargetBlockNotFound", new Array
(blockToUpdate.blockId)));
+ }
var newData = eXo.core.DOMUtil.findDescendantById(blockToUpdate.data,
blockToUpdate.blockId) ;
//var newData = blockToUpdate.data.getElementById(blockToUpdate.blockId) ;
if(newData == null)
alert(eXo.i18n.I18NMessage.getMessage("BlockUpdateNotFound", new Array
(blockToUpdate.blockId))) ;
@@ -610,8 +612,14 @@
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout")))
instance.ajaxTimeout(request) ;
}
//Handle the portal responses
- instance.updateBlocks(response.blocksToUpdate) ;
- instance.executeScript(response.script) ;
+ try {
+ instance.updateBlocks(response.blocksToUpdate);
+ instance.updateHtmlHead(response);
+ instance.executeScript(response.script) ;
+ }
+ catch (error) {
+ alert(error.message) ;
+ }
/**
* Clears the instance.to timeout if the request takes less time than expected to
get response
* Removes the transparent mask so the UI is available again, with cursor
"auto"
Show replies by date