R54043 - /branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php

Author: ralfbecker
New Revision: 54043

URL: http://svn.stylite.de/viewvc/egroupware?rev=54043&view=rev
Log:
fix tutorial popup opens with navbar in idots

Modified:
branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php (contents, props changed)

Modified: branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php?rev=54043&r1=54042&r2=54043&view=diff

— branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php (original)
+++ branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php Sat Oct 24 13:15:33 2015
@@ -7,11 +7,11 @@

    • @version $Id:$
    • @version $Id$
      */

-class home_tutorial_ui {

+class home_tutorial_ui
+{
/**
* Methods callable via menuaction
*
@@ -20,16 +20,17 @@
public $public_functions = array(
‘popup’ => true
);

  • /**
    • Popup window to display youtube video
    • @param type $content
    • @param array $content
      */
      function popup ($content=null)
      {
      //Allow youtube frame to pass the CSP check
      egw_framework::csp_frame_src_attrs(array(‘www.youtube.com’));
  •   $tmpl = new etemplate_new('home.tutorial');
      if (!is_array($content))
      {
    

@@ -48,7 +49,7 @@
// 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;
    

@@ -84,10 +85,10 @@
$content = array();
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);
    
    }
  • /**
    • Ajax function to get videos links as json
      */
      @@ -96,12 +97,11 @@
      $response = egw_json_response::get();
      $response->data(json_decode(self::getJsonData()));
      }
  • /**
    • Function to fetch data from tutorials.json file
    • @return string returns json string
    • @TODO: implement tree level caching
      */
      static function getJsonData()
      {
      @@ -111,9 +111,9 @@
      // 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;
    
    }
    -}
    +}

Propchange: branches/14.2/egroupware/home/inc/class.home_tutorial_ui.inc.php

svn:keywords = Id


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs