Add a warning if application js object was not loaded

This commit is contained in:
Nathan Gray 2013-04-10 10:05:17 +00:00
parent 23f2d8eddf
commit 4de7d2f432

View File

@ -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)};