From 725a4925a78ebb921affe8c9f047e53112dc9b8a Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 6 Apr 2016 10:17:11 +0200 Subject: [PATCH] New maps in progress... (Fixed error in nodes dialog) --- pandora_console/include/ajax/map.ajax.php | 15 +++++---------- .../include/javascript/map/MapController.js | 12 ++++++++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/ajax/map.ajax.php b/pandora_console/include/ajax/map.ajax.php index d572690012..ea8e18e7bf 100644 --- a/pandora_console/include/ajax/map.ajax.php +++ b/pandora_console/include/ajax/map.ajax.php @@ -267,7 +267,7 @@ if (is_ajax ()) { $table->head['type'] = __('Agent'); } else { - $node_name = db_get_all_rows_sql("SELECT nombre + $node_name = db_get_all_rows_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = " . $id_node_data); $node_name = $node_name[0]; @@ -281,15 +281,10 @@ if (is_ajax ()) { $table->data = array(); $table->data[0][0] = __('Label'); - $table->data[0][1] = $node_style; - $table->data[1][0] = __('Image'); - $table->data[1][1] = $node_style['image']; - $table->data[2][0] = __('Width'); - $table->data[2][1] = $node_style['width']; - $table->data[3][0] = __('Height'); - $table->data[3][1] = $node_style['height']; - $table->data[4][0] = __('Shape'); - $table->data[4][1] = html_print_select(array( + $table->data[0][1] = html_print_input_text('label', + $node_style['label'], '', 5, 10, true); + $table->data[3][0] = __('Shape'); + $table->data[3][1] = html_print_select(array( 'circle' => __('Circle'), 'square' => __('Square'), 'rhombus' => __('Rhombus')), 'shape', '', diff --git a/pandora_console/include/javascript/map/MapController.js b/pandora_console/include/javascript/map/MapController.js index 0f6fd563d0..88ed53dfc1 100644 --- a/pandora_console/include/javascript/map/MapController.js +++ b/pandora_console/include/javascript/map/MapController.js @@ -2399,10 +2399,14 @@ MapController.prototype.editNode = function(self, target) { type: "POST", url: "ajax.php", success: function (data) { - $(target).append(""); - $("#edit_node_dialog").append(data); - $("#edit_node_dialog").dialog({ autoOpen: false }); - $("#edit_node_dialog").dialog("open"); + $(target).append(""); + $("#edit_node_dialog_" + node_id).append(data); + $("#edit_node_dialog_" + node_id).dialog({ + autoOpen: false, + closeOnEscape: true + }); + $("#edit_node_dialog_" + node_id).dialog("open"); + } }); }