Handle, infolog->add link in sidebox menu via app.js, instead of using inline script on infolog_hook

This commit is contained in:
Hadi Nategh 2013-09-13 13:51:33 +00:00
parent 5517a29d47
commit 019db13e33
2 changed files with 9 additions and 3 deletions

View File

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

View File

@ -274,4 +274,12 @@ app.infolog = AppJS.extend(
} }
} }
}, },
/**
*
*/
add_link_sidemenu: function()
{
egw_openWindowCentered2(egw().link('/index.php?menuaction=infolog.infolog_ui.edit',false),'_blank',750,410,'yes');
},
}); });