Fixed the error which caused the simple value elements disappear from the visual console after enable the grid

(cherry picked from commit ce150336a9473c19c2ed55e1e943ffcacaae3b8f)
This commit is contained in:
Alejandro Gallardo Escobar 2016-05-18 12:34:25 +02:00
parent 67f1765248
commit c4c37c1e15

View File

@ -1293,8 +1293,7 @@ function setModuleValue(id_data, process_simple_value, period) {
parameter.push ({name: "action", value: "get_module_value"}); parameter.push ({name: "action", value: "get_module_value"});
parameter.push ({name: "id_element", value: id_data}); parameter.push ({name: "id_element", value: id_data});
parameter.push ({name: "period", value: period}); parameter.push ({name: "period", value: period});
parameter.push ({name: "id_visual_console", parameter.push ({name: "id_visual_console", value: id_visual_console});
value: id_visual_console});
if (process_simple_value != undefined) { if (process_simple_value != undefined) {
parameter.push ({name: "process_simple_value", value: process_simple_value}); parameter.push ({name: "process_simple_value", value: process_simple_value});
} }
@ -1304,11 +1303,10 @@ function setModuleValue(id_data, process_simple_value, period) {
data: parameter, data: parameter,
type: "POST", type: "POST",
dataType: 'json', dataType: 'json',
success: function (data) success: function (data) {
{ var currentValue = $("#text_" + id_data).html();
text_value = $("#text_" + idItem).html(); currentValue = currentValue.replace(/_VALUE_/gi, data.value);
text_value = text_value.replace(/_VALUE_/gi,data.value); $("#text_" + id_data).html(currentValue);
$("#text_" + id_data).html(text_value);
} }
}); });
} }