Merge branch 'ent-9620-borrado-masivo-de-elementos-en-cv-no-funciona' into 'develop'

Ent 9620 borrado masivo de elementos en cv no funciona

See merge request artica/pandorafms!5252
This commit is contained in:
Diego Muñoz-Reja 2022-11-22 09:16:07 +00:00
commit ad812e1643
1 changed files with 18 additions and 2 deletions

View File

@ -886,6 +886,7 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
}
function submit_delete_multiple_items() {
event.preventDefault();
delete_items = [];
jQuery.each($("input[name='multiple_delete_items']:checked"),
function(i, item) {
@ -893,7 +894,22 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
}
);
$("input[name='id_item_json']").val(JSON.stringify(delete_items));
$("#form_multiple_delete").submit();
$.ajax({
type: "POST",
url: "ajax.php",
data: {
page: "godmode/reporting/visual_console_builder",
action: "multiple_delete",
tab: "list_elements",
id_item_json: JSON.stringify(delete_items),
id_visual_console: "<?php echo (is_metaconsole() === true) ? $idVisualConsole : $visualConsole['id']; ?>",
},
dataType: "json",
complete: function (data) {
location.reload();
}
});
return false;
}
</script>