diff --git a/etemplate/inc/class.manual_widget.inc.php b/etemplate/inc/class.manual_widget.inc.php index 185f4a9b60..42e7d9a851 100644 --- a/etemplate/inc/class.manual_widget.inc.php +++ b/etemplate/inc/class.manual_widget.inc.php @@ -82,11 +82,11 @@ { $link['referer'] = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; } - $link = $GLOBALS['egw']->link('/index.php',$link); + $link = egw::link('/index.php',$link); $cell['type'] = 'button'; $cell['size'] = 'manual-small'; - $cell['onclick'] = "window.open('$link','manual','width=800,height=600,scrollbars=yes,resizable=yes'); return false;"; + $cell['onclick'] = $GLOBALS['egw']->framework->open_manual_js($link).'; return false;'; if (!$cell['label']) $cell['label'] = 'Manual'; if (!$cell['help']) $cell['help'] = /*lang(*/'Open the online help.'/*)*/; diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index c1982d28b8..7ddc508468 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -964,6 +964,13 @@ abstract class egw_framework return $content; } + + /** + * Return javascript (eg. for onClick) to open manual with given url + * + * @param string $url + */ + abstract function open_manual_js($url); } /** diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index 131ef1ced2..08e3634d2c 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -746,4 +746,15 @@ class idots_framework extends egw_framework } return $this->tpl->parse('out',$block); } + + /** + * Return javascript (eg. for onClick) to open manual with given url + * + * @param string $url + * @return string + */ + function open_manual_js($url) + { + return "egw_openWindowCentered2('$url','manual',800,600,'yes')"; + } }