diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 60d8313180..4f5234c17e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,17 @@ +2010-02-23 Miguel de Dios + + * include/functions_gis.php: in function "activateAjaxRefresh" add the + posibility to change refresh time in execution time. + + * include/functions_ui.php: add in the "print_page_header" the feature to + pass a array of buttons/items. + + * include/javascript/openlayers.pandora.js: add the function + "changeRefreshTime" for change the refresh time. + + * operation/gis_maps/render_view.php: change the top of page for to + adapt the new header, and add refresh control. + 2010-02-23 Pablo de la ConcepciĆ³n * godmode/setup/gis_step_2.php, godmode/gis_maps/configure_gis_map.php: diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index fefd736e3b..46b0411201 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -214,6 +214,7 @@ function activateAjaxRefresh($layers = null, $lastTimeOfData = null) { var last_time_of_data = ; //This time use in the ajax query to next recent points. var refreshAjaxIntervalSeconds = 6000; var idIntervalAjax = null; + var oldRefreshAjaxIntervalSeconds = 6000; '; - if ($options != ""){ - $buffer .= ''; + if (is_array($options)) { + $buffer .= ''; + } + else { + if ($options != ""){ + $buffer .= ''; + } } $buffer .= '


'; diff --git a/pandora_console/include/javascript/openlayers.pandora.js b/pandora_console/include/javascript/openlayers.pandora.js index 4c1b06ee7e..e9bf478525 100755 --- a/pandora_console/include/javascript/openlayers.pandora.js +++ b/pandora_console/include/javascript/openlayers.pandora.js @@ -93,6 +93,16 @@ function js_printMap(id_div, initial_zoom, num_levels_zoom, center_latitude, cen ); } +/** + * Change the refresh time for the map. + * + * @param int time seconds + * @return none + */ +function changeRefreshTime(time) { + refreshAjaxIntervalSeconds = time * 1000; +} + /** * Make the layer in the map. * diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index e8efc7844c..0b799fd5d4 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -48,24 +48,39 @@ $controls = array('PanZoom', 'ScaleLine', 'Navigation', 'MousePosition', 'Overvi $layers = getLayers($idMap); // Render map -echo "

".__('Visual console')." » ".__('Map'); -echo " " . $map['map_name'] . "  "; + +$buttons = array(); if ($config["pure"] == 0) { - echo ''; - print_image ("images/fullscreen.png", false, array ("title" => __('Full screen mode'))); - echo ""; -} else { - echo ''; - print_image ("images/normalscreen.png", false, array ("title" => __('Back to normal mode'))); - echo ""; + $buttons[] = '' . + print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . ""; +} +else { + $buttons[] = '' . + print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . ""; } -echo " "; - if (give_acl ($config["id_user"], $map['group_id'], "AW")) - echo ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).''; -echo "

"; + $buttons [] = ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).''; + +$buttonsString = '  Agent - test_gis1