2014-08-12 Miguel de Dios <miguel.dedios@artica.es>

* images/clippy_icon.png, images/pandorin.png,
	include/help/clippy/homepage.php, general/header.php: yes there is
	a octopus another time in Pandora.

2014-08-12  Miguel de Dios <miguel.dedios@artica.es>
	
	* include/functions_clippy.php,
	include/help/clippy/godmode_agentes_modificar_agente.php,
	include/help/clippy/godmode_agentes_configurar_agente.php: fixed the
	execution of help tour when never it started. Sorry the clippy is
	less annoying.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10407 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-08-12 11:41:55 +00:00
parent 2181c4a1bd
commit e1e77b6bc1
8 changed files with 100 additions and 73 deletions

View File

@ -1,3 +1,11 @@
2014-08-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_clippy.php,
include/help/clippy/godmode_agentes_modificar_agente.php,
include/help/clippy/godmode_agentes_configurar_agente.php: fixed the
execution of help tour when never it started. Sorry the clippy is
less annoying.
2014-08-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_clippy.php: changed to modal version.

View File

@ -58,10 +58,16 @@ config_check();
$table->cellspacing = 0;
$table->head = array ();
$table->data = array ();
$table->style[0] = $table->style[1] = $table->style[3] =
$table->style[4] = $table->style[5] =
$table->style[6] = $table->style[8] =
$table->style[9] = $table->style['qr'] =
$table->style[0] =
$table->style['clippy'] =
$table->style[1] =
$table->style[3] =
$table->style[4] =
$table->style[5] =
$table->style[6] =
$table->style[8] =
$table->style[9] =
$table->style['qr'] =
'width: 22px; text-align:center; height: 22px; padding-right: 9px;';
$table->style[7] = 'width: 20px; padding-right: 9px;';
$table->style['searchbar'] = 'width: 180px; min-width: 180px;';
@ -126,7 +132,7 @@ config_check();
$table->data[0]['clippy'] =
'<a href="javascript: show_clippy();">' .
html_print_image(
"images/heart_col.png",
"images/clippy_icon.png",
true,
array("id" => 'clippy',
"class" => 'clippy',

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -49,7 +49,9 @@ function clippy_clean_help() {
set_cookie('clippy', null);
}
function clippy_write_javascript_helps_steps($helps) {
function clippy_write_javascript_helps_steps($helps,
$force_first_step_by_default = true) {
global $config;
$clippy = get_cookie('clippy', false);
@ -58,76 +60,82 @@ function clippy_write_javascript_helps_steps($helps) {
//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'];
if ($force_first_step_by_default) {
if (empty($steps)) {
//Get the first by default
$temp = reset($helps);
$steps = $temp['steps'];
}
}
$conf = $helps[$clippy]['conf'];
if (empty($conf)) {
//Get the first by default
$temp = reset($helps);
$conf = $temp['conf'];
if ($force_first_step_by_default) {
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;
if (!empty($steps)) {
$name_obj_tour = 'intro';
if (!empty($conf['name_obj_tour'])) {
$name_obj_tour = $conf['name_obj_tour'];
}
$(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']); ?>,
nextLabel: "<?php echo __('Next &rarr;'); ?>",
prevLabel: "<?php echo __('&larr; Back'); ?>",
skipLabel: "<?php echo __('Skip'); ?>",
doneLabel: "<?php echo __('Done'); ?>",
exitOnOverlayClick: false,
exitOnEsc: true, //false,
})
.onexit(function(value) {
exit = confirm("<?php echo __("Do you want to exit the help tour?"); ?>");
return exit;
});
<?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
}
?>
});
$autostart = true;
if (!is_null($conf['autostart'])) {
$autostart = $conf['autostart'];
}
<?php echo $other_js; ?>
</script>
<?php
$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']); ?>,
nextLabel: "<?php echo __('Next &rarr;'); ?>",
prevLabel: "<?php echo __('&larr; Back'); ?>",
skipLabel: "<?php echo __('Skip'); ?>",
doneLabel: "<?php echo __('Done'); ?>",
exitOnOverlayClick: false,
exitOnEsc: true, //false,
})
.onexit(function(value) {
exit = confirm("<?php echo __("Do you want to exit the help tour?"); ?>");
return exit;
});
<?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
}
}
?>

View File

@ -121,6 +121,6 @@ function clippy_start_page() {
//==================================================================
clippy_write_javascript_helps_steps($helps);
clippy_write_javascript_helps_steps($helps, false);
}
?>

View File

@ -66,6 +66,6 @@ function clippy_start_page() {
$helps['monitoring_server_step_2']['conf']['next_help'] = 'monitoring_server_step_3';
//==================================================================
clippy_write_javascript_helps_steps($helps);
clippy_write_javascript_helps_steps($helps, false);
}
?>

View File

@ -35,7 +35,12 @@ function clippy_start_page_homepage() {
$helps['homepage']['steps'] = array();
$helps['homepage']['steps'][] = array(
'element'=> '#clippy',
'intro' => __('Could I help you?<br/><br/>I am Pandorin, the annoying clippy for Pandora. You could follow my advices for to make common and basic tasks in Pandora.')
'intro' => __('Could I help you?<br/><br/>I am Pandorin, the annoying clippy for Pandora. You could follow my advices for to make common and basic tasks in Pandora.') .
'<div style="position:relative;">
<div id="pandorin" style="display: block; position: absolute; left: -100px; top: 20px;">' .
html_print_image('images/pandorin.png', true) .
'</div>
</div>'
);
$helps['homepage']['steps'][] = array(
'element'=> '#clippy',