Author: sshyrkov
Date: Wed Nov 21 14:16:14 2007
New Revision: 19244

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19244&repname=
=3Djahia
Log:
Check or existance of some JavaScript objects to prevent errors (in some en=
gines those objects are not defined)

Modified:
    trunk/core/src/webapp/jsp/jahia/javascript/jahia.js

Modified: trunk/core/src/webapp/jsp/jahia/javascript/jahia.js
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/javascript/jahia.js&rev=3D19244&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/jsp/jahia/javascript/jahia.js (original)
+++ trunk/core/src/webapp/jsp/jahia/javascript/jahia.js Wed Nov 21 14:16:14=
 2007
@@ -586,7 +586,7 @@
     if (theTree) theTree.clear();
     delete theTree;
     window["complexTree_tree1"] =3D null;
-    if (AjxCore._objectIds) {
+    if ((typeof AjxCore !=3D 'undefined') && AjxCore._objectIds) {
         for (var i =3D 0; i < AjxCore._objectIds.length; i++) {
             var obj =3D AjxCore._objectIds[i];
             if (obj) {
@@ -603,7 +603,8 @@
         AjxCore._objectIds =3D null;
     }
     window._dwtShell =3D null;
-    unloadZimbra();
+    if (typeof unloadZimbra =3D=3D 'function')
+        unloadZimbra();
 =

     window.onbeforeunload =3D null;
     var el =3D document.getElementById("tree1");
@@ -614,8 +615,8 @@
     document.close();
     document.clear();
     purge(document);
-    if (DBG) DBG =3D null;
-    if (AjxRpc._rpcCache) {
+    if (typeof DBG !=3D 'undefined') DBG =3D null;
+    if (typeof AjxRpc !=3D 'undefined' && AjxRpc._rpcCache) {
         for (i =3D 0; i < AjxRpc._rpcCache.length; i++) {
             if (AjxRpc._rpcCache[i]) {
                 AjxRpc._rpcCache[i].req._httpReq =3D null;

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to