You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/10/29 16:54:44 UTC

svn commit: r1536777 - /myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Author: lofwyr
Date: Tue Oct 29 15:54:44 2013
New Revision: 1536777

URL: http://svn.apache.org/r1536777
Log:
TOBAGO-1219: Introduce jQuery UI Widget Factory to Tobago

Modified:
    myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1536777&r1=1536776&r2=1536777&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Tue Oct 29 15:54:44 2013
@@ -2277,7 +2277,10 @@ Tobago.Updater = {
         if (typeof this.afterDoUpdateNotModified == 'function') {
           this.afterDoUpdateNotModified();
         }
-        overlay.overlay("destroy");
+        // todo: find out a better method to check if there is an overlay.
+        if (overlay.data("tobago-overlay") !== undefined) {
+          overlay.overlay("destroy");
+        }
         break;
       case Tobago.Updater.CODE_ERROR:
         if (typeof this.afterDoUpdateError == 'function') {
@@ -2285,12 +2288,14 @@ Tobago.Updater = {
         }
         // XXX Here also a double click will be logged, but "warn" is not appropriate.
         LOG.warn("ERROR 500 when updating component id = '" + data.ajaxId + "'"); // @DEV_ONLY
-//        overlay.overlay("destroy");
         overlay.overlay({error: true, ajax: true});
         break;
       default:
         LOG.error('Unknown response code: ' + data.responseCode + " for component id = '" + data.ajaxId + "'"); // @DEV_ONLY
-        overlay.overlay("destroy");
+        // todo: find out a better method to check if there is an overlay.
+        if (overlay.data("tobago-overlay") !== undefined) {
+          overlay.overlay("destroy");
+        }
         break;
     }
   }