Moved removal of standard javascript files from egw_framework class to

egw_json, as it did not work in all cases
This commit is contained in:
Ralf Becker 2010-06-24 11:33:51 +00:00
parent f42ee4b026
commit fccbe5fcbd
2 changed files with 4 additions and 8 deletions

View File

@ -81,14 +81,6 @@ abstract class egw_framework
$GLOBALS['egw']->framework = $this;
}
$this->template_dir = '/phpgwapi/templates/'.$template;
// for Ajax: no need to load the "standard" files, they are already loaded
// in fact jquery has a problem if loaded twice
if ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
{
self::$js_include_files = array();
}
error_log(array2string($_SERVER));
}
/**

View File

@ -122,6 +122,10 @@ class egw_json_request
$ajaxClass = CreateObject($appName.'.'.$className);
}
// for Ajax: no need to load the "standard" javascript files,
// they are already loaded, in fact jquery has a problem if loaded twice
egw_framework::js_files(array());
$parameters = translation::convert($parameters, 'utf-8');
call_user_func_array(array($ajaxClass, $functionName), $parameters);