2010-02-23 Pablo de la Concepción <pablo.concepcion@artica.es>

* godmode/setup/gis_step_2.php, godmode/gis_maps/configure_gis_map.php: 
    Usability improvements, change some texts, added some contextual tips.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2407 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
pabloconcepcion 2010-02-23 14:47:41 +00:00
parent 1aa56e4dc6
commit 1c34f4ca70
3 changed files with 53 additions and 26 deletions

View File

@ -1,3 +1,8 @@
2010-02-23 Pablo de la Concepción <pablo.concepcion@artica.es>
* 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 <miguel.dedios@artica.es>
* include/functions_gis.php: change the function "activateAjaxRefresh" for

View File

@ -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] = "<table class='databox' border='0' id='map_connection'>
<td colspan='3'><div id='map' style='width: 300px; height: 300px; border: 1px solid black;'></div></td>
</tr>
<tr>
<td colspan='3'><a href=''>" . __("Refresh map view") . "</a></td>
<td colspan='3'><a href=''>" . __("Refresh map preview") . "</a></td>
</tr>
<tr>
<td>" . __("Add Map connection") . ": " . $iconError . "</td>
<td>" . __("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 . "</td>
<td>
" . print_select_from_sql('SELECT id_tmap_connection, conection_name FROM tgis_map_connection', 'map_connection', '', '', '', '0', true) ."
</td>
@ -310,10 +310,10 @@ $table->data[0][2] = "<table class='databox' border='0' id='map_connection'>
</tr> " . addConectionMapsInForm($map_connection_list) . "
</table>";
$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 "<h3>" . __('Layers') . "</h3>";
echo "<h3>" . __('Layers') . print_help_tip (__('Each layer can show agents from one group or the agents added to that layer or both.'), true). "</h3>";
$table->width = '90%';
$table->data = array ();
$table->valign[0] = 'top';
$table->valign[1] = 'top';
$table->data[0][0] = "<h4>List of layers</h4>";
$table->data[0][0] = "<h4>List of layers</h4>". print_help_tip (__('It is possible to edit, delete and reorder the layers.'), true);
$table->data[0][1] = '<div style="text-align: right;">' . print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub new"', true) . '</div>';
$table->data[1][0] = '<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_layers">' .
@ -375,7 +375,7 @@ $table->data[1][1] = '<div id="form_layer">
</tr>
<tr>
<td colspan="4">
<h4>' . __('List of Agents') . '</h4>
<h4>' . __('List of Agents to be shwon in the layer') . '</h4>
<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_agents">
</table>
</td>
@ -704,7 +704,7 @@ function deleteConnectionMap(idConnectionMap) {
}
function setFieldsRequestAjax(id_conexion) {
if (confirm('<?php echo __('Do you want to set default data of conexion in fields?');?>')) {
if (confirm('<?php echo __('Do you want to use the default data from the connection?');?>')) {
jQuery.ajax ({
data: "page=operation/gis_maps/ajax&opt=get_data_conexion&id_conection=" + idConnectionMap,
type: "GET",

View File

@ -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 "<h3>" . __('Basic configuration') . "</h3>";
@ -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 "<h3>" . __('Maps connection type') . "</h3>";
echo "<h3>" . __('Map connection type') . "</h3>";
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 = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">' .
'<tr class="row_0">' .
'<td>' . __("URL") . ':</td>' .
@ -160,18 +169,28 @@ $optionsConnectionOSMTable = '<table class="databox" border="0" cellpadding="4"
'</tr>' .
'</table>';
// Yahoo Map Connection
$optionsConnectionYAHOOTable = '<table class="databox" border="0" cellpadding="4" cellspacing="4" width="50%">' .
'<tr class="row_0">' .
'<td>' . __("URL") . ':</td>' .
'<td><input id="type" type="hidden" name="type" value="YAHOO" />' . print_input_text ('url', $mapConnectionDataUrl, '', 45, 90, true) . '</td>' .
'</tr>' .
'</table>';
if ($mapConnectionData != null) {
switch ($mapConnection_type) {
case 'OSM':
$optionsConnectionTypeTable = $optionsConnectionOSMTable;
break;
case 'YAHOO':
$optionsConnectionTypeTable = $optionsConnectionYAHOOTable;
break;
}
}
echo "<div id='form_map_connection_type'>" . $optionsConnectionTypeTable . "</div>";
echo "<h3>" . __('Preview and Select the center of the map and the default position of an agent without gis data') . "</h3>";
print_button('Load the map view','button_refresh', false, 'refreshMapView();', 'class="sub"');
echo "<h3>" . __('Preview to select the center of the map and the default position of an agent without gis data') . "</h3>";
print_button(__("Load preview map"),'button_refresh', false, 'refreshMapView();', 'class="sub"');
echo "<br /><br />";
echo "<div id='map' style='width: 300px; height: 300px; border: 1px solid black; float: left'></div>";
@ -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('<?php echo __("Refresh the map view");?>');
$("input[name=button_refresh]").val('<?php echo __("Refresh preview map");?>');
//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('<?php echo $optionsConnectionOSMTable; ?>');
break;
case 'YAHOO':
$('#form_map_connection_type').html('<?php echo $optionsConnectionYAHOOTable; ?>');
default:
$('#form_map_connection_type').html('');
break;
}
}
</script>
</script>