Included dhtmlx js files in egw_menu_dhtmlx.js, fixed problem with removing action objects, improved egw_include_mgr a bit

This commit is contained in:
Andreas Stöckel 2011-09-09 14:03:18 +00:00
parent e998a1fed5
commit 50ad9e4ba0
3 changed files with 25 additions and 11 deletions

View File

@ -188,6 +188,12 @@ class egw_include_mgr
// a file with the given name exists inside the directory of the
// base file
if (count($entry) == 1)
{
if ($entry[0][0] == "/")
{
$uses_path = $this->translate_params($entry[0], null, '');
}
else
{
// Assemble a filename
$filename = dirname($path).'/'.$entry[0].'.js';
@ -204,6 +210,7 @@ class egw_include_mgr
$uses_path = $this->translate_params($entry[0], null, 'phpgwapi');
}
}
}
else if (count($entry) == 2)
{
$uses_path = $this->translate_params($entry[0], $entry[1], 'phpgwapi');
@ -267,7 +274,8 @@ class egw_include_mgr
*/
private function translate_params($package, $file, $app)
{
if ($package[0] == '/' && is_readable(EGW_SERVER_ROOT.(parse_url($path = $package, PHP_URL_PATH))) ||
if ($package[0] == '/' && (is_readable(EGW_SERVER_ROOT.(parse_url($path = $package, PHP_URL_PATH))) ||
is_readable(EGW_SERVER_ROOT.($path = $package))) ||
is_readable(EGW_SERVER_ROOT.($path="/$app/js/$package/$file.js")) ||
$app != 'phpgwapi' && is_readable(EGW_SERVER_ROOT.($path="/phpgwapi/js/$package/$file.js")))
{

View File

@ -879,9 +879,12 @@ egwActionObject.prototype.remove = function() {
{
var idx = this.parent.children.indexOf(this);
if (idx >= 0)
{
this.parent.children.splice(idx, 1);
}
}
}
/**
* Searches for the root object in the action object tree and returns it.

View File

@ -11,6 +11,9 @@
/*egw:uses
egw_menu;
/phpgwapi/js/dhtmlxtree/dhtmlxMenu/codebase/dhtmlxmenu.js;
/phpgwapi/js/dhtmlxtree/dhtmlxMenu/codebase/ext/dhtmlxmenu_ext.js;
/phpgwapi/js/dhtmlxtree/dhtmlxMenu/codebase/dhtmlxcommon.js;
*/
function egwMenuImpl(_structure)