Fixed error window in visual console

Former-commit-id: 97def5509195b687a1607810043076e58dd72fe0
This commit is contained in:
Daniel Maya 2019-05-09 15:06:03 +02:00
parent c775d0359c
commit dab12ecdc5
2 changed files with 19 additions and 5 deletions

View File

@ -674,12 +674,17 @@ function update_button_palette_callback() {
return false;
}
}
if (values["module"] == 0) {
var radio_value = $("input[name='radio_choice']:checked").val();
if (values["agent"] == "" && radio_value == "module_graph") {
dialog_message("#message_alert_no_agent");
return false;
}
if (values["module"] == 0 && radio_value == "module_graph") {
dialog_message("#message_alert_no_module");
return false;
}
if (values["agent"] == "") {
dialog_message("#message_alert_no_agent");
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
dialog_message("#message_alert_no_custom_graph");
return false;
}
if ($("input[name=width_module_graph]").val() == "") {
@ -1425,11 +1430,12 @@ function create_button_palette_callback() {
break;
case "module_graph":
if (values["module"] == 0) {
var radio_value = $("input[name='radio_choice']:checked").val();
if (values["module"] == 0 && radio_value == "module_graph") {
dialog_message("#message_alert_no_module");
validate = false;
}
if (values["id_custom_graph"] == 0) {
if (values["id_custom_graph"] == 0 && radio_value == "module_graph") {
if (values["agent"] == "") {
dialog_message("#message_alert_no_agent");
validate = false;
@ -1439,6 +1445,10 @@ function create_button_palette_callback() {
validate = false;
}
}
if (values["id_custom_graph"] == 0 && radio_value == "custom_graph") {
dialog_message("#message_alert_no_custom_graph");
validate = false;
}
if (
values["height_module_graph"] == "" ||
values["height_module_graph"] == 0

View File

@ -1386,6 +1386,10 @@ function visual_map_editor_print_hack_translate_strings()
echo "<p style='text-align: center;font-weight: bold;'>".__('Could not be save.').'</p>';
echo '</div>';
echo "<div id='message_alert_no_custom_graph' title='".__('Visual Console Builder Information')."' style='display:none;'>";
echo "<p style='text-align: center;font-weight: bold;'>".__('No custom graph defined.').'</p>';
echo '</div>';
}