diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cf21a26a83..60d8313180 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-02-23 Pablo de la ConcepciĆ³n + + * godmode/setup/gis_step_2.php, godmode/gis_maps/configure_gis_map.php: + Usability improvements, change some texts, added some contextual tips. + 2010-02-23 Miguel de Dios * include/functions_gis.php: change the function "activateAjaxRefresh" for diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index 8ddd2fbadb..2fb0d36abd 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -148,8 +148,8 @@ switch ($action) { } $layer_list = $arrayLayers; - print_result_message ($mapCreatedOk, __('Successfully created'), - __('Could not be created')); + print_result_message ($mapCreatedOk, __('Map successfully created'), + __('Map could not be created')); break; case 'new_map': print_input_hidden('action', 'save_new'); @@ -268,8 +268,8 @@ switch ($action) { } $layer_list = $arrayLayers; - print_result_message ($mapCreatedOk, __('Successfully update'), - __('Could not be update')); + print_result_message ($mapCreatedOk, __('Map successfully update'), + __('Map could not be update')); print_input_hidden('action', 'update_saved'); print_input_hidden('map_id', $idMap); @@ -279,7 +279,7 @@ switch ($action) { $table->width = '90%'; $table->data = array (); -$table->data[0][0] = __('Name') . ':'; +$table->data[0][0] = __('Map Name') . print_help_tip (__('Descriptive name for the map'), true). ':'; $table->data[0][1] = print_input_text ('map_name', $map_name, '', 30, 60, true); $table->rowspan[0][2] = 9; @@ -295,10 +295,10 @@ $table->data[0][2] = " - + - + @@ -310,10 +310,10 @@ $table->data[0][2] = "
" . __("Refresh map view") . "" . __("Refresh map preview") . "
" . __("Add Map connection") . ": " . $iconError . "" . __("Add Map connection") . print_help_tip (__('At least one map connection must be deffined, it will be possible to change betwwen the connections in the map'), true). ": " . $iconError . " " . print_select_from_sql('SELECT id_tmap_connection, conection_name FROM tgis_map_connection', 'map_connection', '', '', '', '0', true) ."
" . addConectionMapsInForm($map_connection_list) . "
"; -$table->data[1][0] = __('Group') . ':'; +$table->data[1][0] = __('Group') . print_help_tip (__('Group that owns the map'), true). ':'; $table->data[1][1] = print_select_from_sql('SELECT id_grupo, nombre FROM tgrupo', 'map_group_id', $map_group_id, '', '', '0', true); -$table->data[2][0] = __('Zoom level') . ':'; +$table->data[2][0] = __('Zoom level') . print_help_tip (__('Default zoom level when opening the map'), true). ':'; $table->data[2][1] = print_input_text ('map_zoom_level', $map_zoom_level, '', 2, 4, true); $table->data[3][0] = __('Center Longitude') . ':'; @@ -336,14 +336,14 @@ $table->data[8][1] = print_input_text ('map_default_altitude', $map_default_alti print_table($table); -echo "

" . __('Layers') . "

"; +echo "

" . __('Layers') . print_help_tip (__('Each layer can show agents from one group or the agents added to that layer or both.'), true). "

"; $table->width = '90%'; $table->data = array (); $table->valign[0] = 'top'; $table->valign[1] = 'top'; -$table->data[0][0] = "

List of layers

"; +$table->data[0][0] = "

List of layers

". print_help_tip (__('It is possible to edit, delete and reorder the layers.'), true); $table->data[0][1] = '
' . print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub new"', true) . '
'; $table->data[1][0] = '' . @@ -375,7 +375,7 @@ $table->data[1][1] = '
@@ -704,7 +704,7 @@ function deleteConnectionMap(idConnectionMap) { } function setFieldsRequestAjax(id_conexion) { - if (confirm('')) { + if (confirm('')) { jQuery.ajax ({ data: "page=operation/gis_maps/ajax&opt=get_data_conexion&id_conection=" + idConnectionMap, type: "GET", diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 1a6dc1c1b3..640f1db65c 100755 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -97,6 +97,11 @@ switch ($action) { $mapConnectionData = array('type' => 'OSM', 'url' => $mapConnection_OSM_url); break; + case 'YAHOO': + $mapConnection_YAHOO_url= get_parameter('url'); + $mapConnectionData = array('type' => 'YAHOO', + 'url' => $mapConnection_YAHOO_url); + break; } //TODO VALIDATE PARAMETERS @@ -116,17 +121,17 @@ switch ($action) { $table->width = '90%'; $table->data = array(); -$table->data[0][0] = __('Name') . ":"; +$table->data[0][0] = __('Connection Name') .print_help_tip (__('Descriptive name for the connection'), true). ":"; $table->data[0][1] = print_input_text ('name', $mapConnection_name, '', 30, 60, true); -$table->data[1][0] = __("Group") . ":"; +$table->data[1][0] = __("Group") .print_help_tip (__('Group that owns the connection'), true) . ":"; $table->data[1][1] = print_select_from_sql('SELECT id_grupo, nombre FROM tgrupo', 'group', $mapConnection_group, '', '', '0', true); -$table->data[2][0] = __('Num levels zoom') . ":"; +$table->data[2][0] = __('Number of zoom levels') . ":"; $table->data[2][1] = print_input_text ('num_levels_zoom', $mapConnection_numLevelsZoom, '', 4, 10, true); -$table->data[3][0] = __('Default zoom level') . ":"; +$table->data[3][0] = __('Default zoom level') .print_help_tip (__('Zoom level used when the map is opened'), true). ":"; $table->data[3][1] = print_input_text ('initial_zoom', $mapConnection_defaultZoom, '', 4, 10, true); echo "

" . __('Basic configuration') . "

"; @@ -134,12 +139,13 @@ print_table($table); $table->width = '60%'; $table->data = array(); -$types[0] = __('Please select the type'); +$types[0] = __('Please select the connection type'); $types["OSM"] = __('Open Street Maps'); +$types["YAHOO"] = __('Yahoo Maps'); $table->data[0][0] = __('Type') . ":"; $table->data[0][1] = print_select($types, 'sel_type', $mapConnection_type, "selMapConnectionType();", '', 0, true); -echo "

" . __('Maps connection type') . "

"; +echo "

" . __('Map connection type') . "

"; print_table ($table); $optionsConnectionTypeTable = ''; @@ -150,9 +156,12 @@ if ($mapConnectionData != null) { case 'OSM': $mapConnectionDataUrl = $mapConnectionData['url']; break; + case 'YAHOO': + $mapConnectionDataUrl = $mapConnectionData['url']; + break; } } - +// Open Street Map Connection $optionsConnectionOSMTable = '
-

' . __('List of Agents') . '

+

' . __('List of Agents to be shwon in the layer') . '

' . '' . '' . @@ -160,18 +169,28 @@ $optionsConnectionOSMTable = '
' . __("URL") . ':
' . '
'; +// Yahoo Map Connection +$optionsConnectionYAHOOTable = '' . + '' . + '' . + '' . + '' . + '
' . __("URL") . ':' . print_input_text ('url', $mapConnectionDataUrl, '', 45, 90, true) . '
'; if ($mapConnectionData != null) { switch ($mapConnection_type) { case 'OSM': $optionsConnectionTypeTable = $optionsConnectionOSMTable; break; + case 'YAHOO': + $optionsConnectionTypeTable = $optionsConnectionYAHOOTable; + break; } } echo "
" . $optionsConnectionTypeTable . "
"; -echo "

" . __('Preview and Select the center of the map and the default position of an agent without gis data') . "

"; -print_button('Load the map view','button_refresh', false, 'refreshMapView();', 'class="sub"'); +echo "

" . __('Preview to select the center of the map and the default position of an agent without gis data') . "

"; +print_button(__("Load preview map"),'button_refresh', false, 'refreshMapView();', 'class="sub"'); echo "

"; echo "
"; @@ -180,10 +199,10 @@ $table->data = array(); //$table->colspan[0][3] = 3; $table->data[0][0] = ''; -$table->data[0][1] = __('Center map connection'); +$table->data[0][1] = __('Map Center').print_help_tip (__('Position to center the map when the map is opened'), true) ; $table->data[0][2] = __("Default position for agents without GIS data"); -$table->data[1][0] = __('Modify in map'); +$table->data[1][0] = __('Change in the map'). print_help_tip (__('This selects what to change by clicking on the map'), true); $table->data[1][1] = print_radio_button_extended('radio_button', 1, '', 1, false, "changeSetManualPosition(true, false)", '', true); $table->data[1][2] = print_radio_button_extended('radio_button', 2, '', 0, false, "changeSetManualPosition(false, true)", '', true); @@ -281,7 +300,7 @@ function refreshMapView() { GISDefaultPositionPoint = null; //Change the text to button. - $("input[name=button_refresh]").val(''); + $("input[name=button_refresh]").val(''); //Obtain data of map of fields. inital_zoom = $('input[name=initial_zoom]').val(); @@ -317,9 +336,12 @@ function selMapConnectionType() { case 'OSM': $('#form_map_connection_type').html(''); break; + case 'YAHOO': + $('#form_map_connection_type').html(''); + default: $('#form_map_connection_type').html(''); break; } } - \ No newline at end of file +