diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8cb447e7e5..e9100e60f9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2014-08-12 Miguel de Dios + + * 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 * include/functions_clippy.php: changed to modal version. diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index be10dc4df6..32eab67bb8 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -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'] = '' . html_print_image( - "images/heart_col.png", + "images/clippy_icon.png", true, array("id" => 'clippy', "class" => 'clippy', diff --git a/pandora_console/images/clippy_icon.png b/pandora_console/images/clippy_icon.png new file mode 100644 index 0000000000..b83a871ce6 Binary files /dev/null and b/pandora_console/images/clippy_icon.png differ diff --git a/pandora_console/images/pandorin.png b/pandora_console/images/pandorin.png new file mode 100644 index 0000000000..73124eab68 Binary files /dev/null and b/pandora_console/images/pandorin.png differ diff --git a/pandora_console/include/functions_clippy.php b/pandora_console/include/functions_clippy.php index 96100b034c..79202f26b6 100644 --- a/pandora_console/include/functions_clippy.php +++ b/pandora_console/include/functions_clippy.php @@ -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']; - } - - ?> - - + + \ No newline at end of file diff --git a/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php b/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php index a2f1fd2bc1..d962d44593 100644 --- a/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php +++ b/pandora_console/include/help/clippy/godmode_agentes_configurar_agente.php @@ -121,6 +121,6 @@ function clippy_start_page() { //================================================================== - clippy_write_javascript_helps_steps($helps); + clippy_write_javascript_helps_steps($helps, false); } ?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php b/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php index c0fbff9b68..914b56df3e 100644 --- a/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php +++ b/pandora_console/include/help/clippy/godmode_agentes_modificar_agente.php @@ -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); } ?> \ No newline at end of file diff --git a/pandora_console/include/help/clippy/homepage.php b/pandora_console/include/help/clippy/homepage.php index 06c7641d94..3afa3f0519 100644 --- a/pandora_console/include/help/clippy/homepage.php +++ b/pandora_console/include/help/clippy/homepage.php @@ -35,7 +35,12 @@ function clippy_start_page_homepage() { $helps['homepage']['steps'] = array(); $helps['homepage']['steps'][] = array( 'element'=> '#clippy', - 'intro' => __('Could I help you?

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?

I am Pandorin, the annoying clippy for Pandora. You could follow my advices for to make common and basic tasks in Pandora.') . + '
+
' . + html_print_image('images/pandorin.png', true) . + '
+
' ); $helps['homepage']['steps'][] = array( 'element'=> '#clippy',