Author: mwringe
Date: 2011-10-21 16:14:01 -0400 (Fri, 21 Oct 2011)
New Revision: 7836
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
GTNPORTAL-2230: fix a problem 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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_en.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -18,7 +18,7 @@
*/
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";
eXo.i18n.I18NMessage.PreviousMonth="Previous Month";
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -18,7 +18,7 @@
*/
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";
eXo.i18n.I18NMessage.PreviousMonth="Mois précédent";
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -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:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-10-21
16:24:58 UTC (rev 7835)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-10-21
20:14:01 UTC (rev 7836)
@@ -536,7 +536,10 @@
} else {
target = document.getElementById(blockToUpdate.blockId) ;
}
- if(target == null)
alert(eXo.i18n.I18NMessage.getMessage("TargetBlockNotFound", new Array
(blockToUpdate.blockId))) ;
+ if(target == null) {
+ alert(eXo.i18n.I18NMessage.getMessage("TargetBlockNotFound", new
Array (blockToUpdate.blockId))) ;
+ return ;
+ }
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))) ;
@@ -622,9 +625,10 @@
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout")))
instance.ajaxTimeout(request) ;
}
//Handle the portal responses
- instance.updateBlocks(response.blocksToUpdate) ;
+ if (instance.updateBlocks(response.blocksToUpdate) != null) {
instance.updateHtmlHead(response);
instance.executeScript(response.script) ;
+ }
/**
* 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"