new framework method to return javascript to call manual

This commit is contained in:
Ralf Becker 2010-06-07 22:06:35 +00:00
parent e56d9e9503
commit 8b49db5a57
3 changed files with 20 additions and 2 deletions

View File

@ -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.'/*)*/;

View File

@ -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);
}
/**

View File

@ -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')";
}
}