mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 00:09:13 +01:00
new framework method to return javascript to call manual
This commit is contained in:
parent
e56d9e9503
commit
8b49db5a57
@ -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.'/*)*/;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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')";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user