Allow app.appcode.function(); calls in sidebox in addition to global functions. Needs the (); at the end though.

This commit is contained in:
Nathan Gray 2013-11-14 16:50:16 +00:00
parent 9643d31dd1
commit a97ca723d3
2 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class infolog_hooks
$file = array(
'infolog list' => egw::link('/index.php',array(
'menuaction' => 'infolog.infolog_ui.index' )),
'Add' => "javascript:app.infolog.add_link_sidemenu()",
'Add' => "javascript:app.infolog.add_link_sidemenu();",
);
display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file);
}

View File

@ -69,6 +69,10 @@
if (matches.length > 1 && matches[2] !== undefined) args = JSON.parse('['+matches[2].replace(/'/g,'"')+']');
window[matches[1]].apply(window.framework, args);
}
else if (matches && matches[1].indexOf('app.') == 0)
{
return et2_call(matches[1],matches[2]);
}
else
{
alert('Do NOT know how to execute '+this.href);