From 4de7d2f432e294f2cdec027e288379e4adb7bc20 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 10 Apr 2013 10:05:17 +0000 Subject: [PATCH] Add a warning if application js object was not loaded --- etemplate/inc/class.etemplate.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 55cb9006e2..1ae9a63d1c 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -193,7 +193,8 @@ class etemplate_new extends etemplate_widget_template if(typeof app["'.$app.'"] == "function") { (function() { new app["'.$app.'"]();}).call(); - } + } ' . (!file_exists(EGW_SERVER_ROOT.'/'.$app.'/js/app.js') ? '' :' + } else { egw.debug("warn", "Did not load '.$app.' JS object"); }').' if(typeof app["'.$app.'"] == "object") { callback = function() {new app["'.$app.'"]()}; @@ -220,7 +221,8 @@ class etemplate_new extends etemplate_widget_template if(typeof app["'.$app.'"] == "function") { (function() { new app["'.$app.'"]();}).call(); - } + } ' . (!file_exists(EGW_SERVER_ROOT.'/'.$app.'/js/app.js') ? '' :' + } else { egw.debug("warn", "Did not load '.$app.' JS object"); }') . ' if(typeof app["'.$app.'"] == "object") { callback = function(et2) {app["'.$app.'"].et2_ready(et2)};