fix tutorial popup opens with navbar in idots

This commit is contained in:
Ralf Becker 2015-10-24 11:15:33 +00:00
parent 1141805153
commit 3637ed12b4

View File

@ -7,11 +7,11 @@
* @author Hadi Nategh [hn@stylite.de]
* @copyright (c) 2015 by Stylite AG <info-AT-stylite.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id:$
* @version $Id$
*/
class home_tutorial_ui {
class home_tutorial_ui
{
/**
* Methods callable via menuaction
*
@ -23,7 +23,8 @@ class home_tutorial_ui {
/**
* Popup window to display youtube video
* @param type $content
*
* @param array $content
*/
function popup ($content=null)
{
@ -48,7 +49,7 @@ class home_tutorial_ui {
// read tutorials json file to fetch data
$tutorials = json_decode(self::getJsonData(), true);
$apps = array('introduction' => lang('Introduction'));
foreach ($tutorials as $app => $val)
foreach (array_keys($tutorials) as $app)
{
// show only apps user has access to them
if (in_array($app, array_keys($GLOBALS['egw_info']['user']['apps']))) $apps [$app] = $app;
@ -85,7 +86,7 @@ class home_tutorial_ui {
egw_framework::message(lang('You do not have permission to see this tutorial!'));
}
$tmpl->exec('home.home_tutorial_ui.popup', $content,$sel_options,array(),array(),array(),2);
$tmpl->exec('home.home_tutorial_ui.popup', $content, $sel_options, array(), array(), 2);
}
/**
@ -99,9 +100,8 @@ class home_tutorial_ui {
/**
* Function to fetch data from tutorials.json file
* @return string returns json string
*
* @TODO: implement tree level caching
* @return string returns json string
*/
static function getJsonData()
{
@ -111,7 +111,7 @@ class home_tutorial_ui {
// Fallback tutorials.json
if (!$json) $json = file_get_contents('home/setup/tutorials.json');
// Cache the json object for two hours
egw_cache::setCache(egw_cache::TREE, 'home', 'egw_tutorial_json', $json, 720);
egw_cache::setCache(egw_cache::TREE, 'home', 'egw_tutorial_json', $json, 7200);
}
return $json;