#10807 fixed GIS MAP creation/editing view styles

This commit is contained in:
Jorge Rincon 2023-10-11 09:55:44 +02:00
parent dda7c2a0c0
commit a8713264e2

View File

@ -560,21 +560,23 @@ html_print_table($table);
$user_groups = users_get_groups($config['user'], 'AR', false); $user_groups = users_get_groups($config['user'], 'AR', false);
echo '<h3>'.__('Layers').'</h3>'; echo '<fieldset class="margin-bottom-10"><legend>'.__('Layers').'</legend>';
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters';
$table->valign = []; $table->valign = [];
$table->valign[0] = 'top'; $table->valign[0] = 'top; width: 50%';
$table->valign[1] = 'top'; $table->valign[1] = 'top; width: 50%';
$table->data = []; $table->data = [];
$table->data[0][0] = '<h4>'.__('List of layers').'</h4>'; $table->data[0][0] = '<h4>'.__('List of layers').'</h4>';
$table->data[0][1] = '<div class="right">'.html_print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add "', true).'</div>'; $table->data[0][1] = '<div class="right">'.html_print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add "', true).'</div>';
$table->data[1][0] = '<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_layers"></table>'; $table->data[1][0] = '<div id="form_layer" class="invisible">
$table->data[1][1] = '<div id="form_layer" class="invisible">
<table id="form_layer_table" class="" border="0" cellpadding="4" cellspacing="4"> <table id="form_layer_table" class="" border="0" cellpadding="4" cellspacing="4">
<tr>
<td colspan="4"><hr/></td>
</tr>
<tr> <tr>
<td>'.__('Layer name').':</td> <td>'.__('Layer name').':</td>
<td>'.html_print_input_text('layer_name_form', '', '', 20, 40, true).'</td> <td>'.html_print_input_text('layer_name_form', '', '', 20, 40, true).'</td>
@ -592,10 +594,6 @@ $table->data[1][1] = '<div id="form_layer" class="invisible">
<td>'.__('Agent').':</td> <td>'.__('Agent').':</td>
<td colspan="3">'; <td colspan="3">';
$table->data[1][1] .= html_print_button(__('Add agent'), 'add_agent', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
$params = []; $params = [];
$params['return'] = true; $params['return'] = true;
$params['show_helptip'] = true; $params['show_helptip'] = true;
@ -608,12 +606,13 @@ $params['javascript_function_action_after_select'] = 'active_button_add_agent';
$params['javascript_is_function_select'] = true; $params['javascript_is_function_select'] = true;
$params['disabled_javascript_on_blur_function'] = false; $params['disabled_javascript_on_blur_function'] = false;
$table->data[1][1] .= ui_print_agent_autocomplete_input($params); $table->data[1][0] .= ui_print_agent_autocomplete_input($params);
$buttonAgent = html_print_button(__('Add agent'), 'add_agent', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
$table->data[1][0] .= '</td>
$table->data[1][1] .= '</td>
</tr> </tr>
<tr>
<td colspan="4" align="right">'.$buttonAgent.'</td>
</tr>
<tr> <tr>
<td colspan="4"> <td colspan="4">
<h4>'.__('List of Agents to be shown in the layer').'</h4> <h4>'.__('List of Agents to be shown in the layer').'</h4>
@ -641,7 +640,7 @@ $params['disabled_javascript_on_blur_function'] = false;
$agent_for_group_input = ui_print_agent_autocomplete_input($params); $agent_for_group_input = ui_print_agent_autocomplete_input($params);
$add_group_btn = html_print_button(__('Add'), 'add_group', true, '', ['mode' => 'secondary', 'icon' => 'next'], true); $add_group_btn = html_print_button(__('Add'), 'add_group', true, '', ['mode' => 'secondary', 'icon' => 'next'], true);
$table->data[1][1] .= '<tr><td colspan="4"><hr /></td></tr> $table->data[1][0] .= '<tr><td colspan="4"><hr /></td></tr>
<tr> <tr>
<td>'.__('Group').':</td> <td>'.__('Group').':</td>
<td colspan="3">'.$group_select.'</td> <td colspan="3">'.$group_select.'</td>
@ -661,7 +660,7 @@ $table->data[1][1] .= '<tr><td colspan="4"><hr /></td></tr>
</td> </td>
</tr>'; </tr>';
$table->data[1][1] .= '<tr> $table->data[1][0] .= '<tr>
<td align="right" colspan="4">'.html_print_button(__('Save Layer'), 'save_layer', false, 'javascript:saveNewLayer();', 'class="sub wand"', true).' <td align="right" colspan="4">'.html_print_button(__('Save Layer'), 'save_layer', false, 'javascript:saveNewLayer();', 'class="sub wand"', true).'
'.html_print_input_hidden('current_edit_layer_id', '', true).' '.html_print_input_hidden('current_edit_layer_id', '', true).'
</td> </td>
@ -669,7 +668,12 @@ $table->data[1][1] .= '<tr>
</table> </table>
</div>'; </div>';
$table->data[1][1] = '<fieldset>
<legend>'.__('Layers list').'</legend>
<table class="databox invisible" border="0" id="list_layers"></table>
</fieldset>';
html_print_table($table); html_print_table($table);
echo '</fieldset>';
switch ($action) { switch ($action) {
case 'save_new': case 'save_new':
@ -1229,6 +1233,8 @@ function getLayerRow (layerId, layerData) {
.append($editCol) .append($editCol)
.append($deleteCol); .append($deleteCol);
$("#list_layers").removeClass('invisible');
return $row; return $row;
} }