2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @package Include
|
|
|
|
* @subpackage Clippy
|
|
|
|
*/
|
|
|
|
|
|
|
|
function clippy_start($sec2) {
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
if ($sec2 === false) {
|
|
|
|
$sec2 = 'homepage';
|
|
|
|
}
|
|
|
|
|
|
|
|
$sec2 = str_replace('/', '_', $sec2);
|
|
|
|
|
2014-08-11 16:30:09 +02:00
|
|
|
if ($sec2 != 'homepage') {
|
|
|
|
if (is_file("include/help/clippy/" . $sec2 . ".php")) {
|
|
|
|
require("include/help/clippy/" . $sec2 . ".php");
|
|
|
|
|
|
|
|
clippy_start_page();
|
|
|
|
}
|
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
|
|
|
|
2014-08-11 16:30:09 +02:00
|
|
|
//Add homepage for all pages for to show the "task sugestions"
|
|
|
|
require("include/help/clippy/homepage.php");
|
|
|
|
clippy_start_page_homepage();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
require("include/help/clippy/homepage.php");
|
|
|
|
clippy_start_page_homepage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function clippy_clean_help() {
|
|
|
|
set_cookie('clippy', null);
|
|
|
|
}
|
|
|
|
|
|
|
|
function clippy_write_javascript_helps_steps($helps) {
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
$clippy = get_cookie('clippy', false);
|
|
|
|
set_cookie('clippy', null);
|
|
|
|
|
|
|
|
|
|
|
|
//Get the help steps from a task
|
|
|
|
$steps = $helps[$clippy]['steps'];
|
|
|
|
if (empty($steps)) {
|
|
|
|
//Get the first by default
|
|
|
|
$temp = reset($helps);
|
|
|
|
$steps = $temp['steps'];
|
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
|
|
|
}
|
2014-08-11 16:30:09 +02:00
|
|
|
|
|
|
|
$conf = $helps[$clippy]['conf'];
|
|
|
|
if (empty($conf)) {
|
|
|
|
//Get the first by default
|
|
|
|
$temp = reset($helps);
|
|
|
|
$conf = $temp['conf'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$name_obj_tour = 'intro';
|
|
|
|
if (!empty($conf['name_obj_tour'])) {
|
|
|
|
$name_obj_tour = $conf['name_obj_tour'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$autostart = true;
|
|
|
|
if (!is_null($conf['autostart'])) {
|
|
|
|
$autostart = $conf['autostart'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$other_js = '';
|
|
|
|
if (!empty($conf['other_js'])) {
|
|
|
|
$other_js = $conf['other_js'];
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var <?php echo $name_obj_tour; ?> = null;
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
<?php echo $name_obj_tour; ?> = introJs();
|
|
|
|
|
|
|
|
<?php echo $name_obj_tour; ?>.setOptions({
|
|
|
|
steps: <?php echo json_encode($steps); ?>,
|
|
|
|
showBullets: <?php echo json_encode($conf['showBullets']); ?>,
|
|
|
|
showStepNumbers: <?php echo json_encode($conf['showStepNumbers']); ?>,
|
2014-08-12 11:36:05 +02:00
|
|
|
nextLabel: "<?php echo __('Next →'); ?>",
|
|
|
|
prevLabel: "<?php echo __('← Back'); ?>",
|
|
|
|
skipLabel: "<?php echo __('Skip'); ?>",
|
|
|
|
doneLabel: "<?php echo __('Done'); ?>",
|
|
|
|
exitOnOverlayClick: false,
|
|
|
|
exitOnEsc: true, //false,
|
|
|
|
})
|
|
|
|
.onexit(function(value) {
|
2014-08-12 12:20:53 +02:00
|
|
|
exit = confirm("<?php echo __("Do you want to exit the help tour?"); ?>");
|
|
|
|
return exit;
|
2014-08-12 11:36:05 +02:00
|
|
|
});
|
2014-08-11 16:30:09 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
if (!empty($conf['next_help'])) {
|
|
|
|
?>
|
|
|
|
clippy_set_help('<?php echo $conf['next_help']; ?>');
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if ($autostart) {
|
|
|
|
?>
|
|
|
|
<?php echo $name_obj_tour; ?>.start();
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
});
|
|
|
|
|
|
|
|
<?php echo $other_js; ?>
|
|
|
|
</script>
|
|
|
|
<?php
|
2014-08-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/homepage.php,
include/help/clippy/godmode_agentes_configurar_agente.php,
include/javascript/intro.js,
include/javascript/introjs.css,
include/javascript/clippy.js,
include/functions_ui.php,
include/functions_clippy.php,
index.php,
general/header.php: first version of the new feature a annoying
clippy such as the lovely micro$oft mascot.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10393 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2014-08-08 17:11:00 +02:00
|
|
|
}
|
|
|
|
?>
|