Author: rkanter
Date: Tue Oct 29 16:45:02 2013
New Revision: 1536803

URL: http://svn.apache.org/r1536803
Log:
OOZIE-1542 When extjs isn't installed, the web UI is unhelpfully blank (rkanter)

Modified:
    oozie/trunk/release-log.txt
    oozie/trunk/webapp/src/main/webapp/oozie-console.js

Modified: oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1536803&r1=1536802&r2=1536803&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue Oct 29 16:45:02 2013
@@ -65,6 +65,7 @@ OOZIE-1440 Build fails in certain enviro
 
 -- Oozie 4.0.1 release (unreleased)
 
+OOZIE-1542 When extjs isn't installed, the web UI is unhelpfully blank 
(rkanter)
 OOZIE-1565 OOZIE-1481 should only affect v2 of the API, not v1 (rkanter)
 OOZIE-1551 Change hadoop-2 profile to use 2.2.0 (rkanter,rohini,mona via 
rkanter)
 OOZIE-1573 coord:tzOffset() gives incorrect offset for daylight saving 
timezones (rohini)

Modified: oozie/trunk/webapp/src/main/webapp/oozie-console.js
URL: 
http://svn.apache.org/viewvc/oozie/trunk/webapp/src/main/webapp/oozie-console.js?rev=1536803&r1=1536802&r2=1536803&view=diff
==============================================================================
--- oozie/trunk/webapp/src/main/webapp/oozie-console.js (original)
+++ oozie/trunk/webapp/src/main/webapp/oozie-console.js Tue Oct 29 16:45:02 2013
@@ -16,16 +16,19 @@
  * limitations under the License.
  */
 
-// Warn about dependencies
-if (typeof Ext == 'undefined'){
-    var warning = 'Missing JavaScript dependencies.';
-    var dependencies = document.getElementById('dependencies');
-    if (dependencies){
-        warning += "\n" + (dependencies.innerText || dependencies.textContent);
-        dependencies.style.display = '';
+// Warn about dependencies; this has to be done on .ready so that the divs 
will all be loaded and exist.  Otherwise, it won't find
+// the 'dependencies' element
+$(document).ready(function() {
+    if (typeof Ext == 'undefined'){
+        var warning = 'Missing JavaScript dependencies.';
+        var dependencies = document.getElementById('dependencies');
+        if (dependencies){
+            warning += "\n" + (dependencies.innerText || 
dependencies.textContent);
+            dependencies.style.display = '';
+        }
+        throw new Error(warning);
     }
-    throw new Error(warning);
-}
+});
 
 //so it works from remote browsers, "http://localhost:8080";;
 var oozie_host = "";


Reply via email to