From a93947e60a707c1e7f615b9f573aad464098b531 Mon Sep 17 00:00:00 2001 From: valentina Date: Tue, 6 Aug 2024 11:37:45 +0200 Subject: [PATCH] Fix per totali ristretti alla selezione --- assets/src/js/functions/datatables.js | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/assets/src/js/functions/datatables.js b/assets/src/js/functions/datatables.js index 52f65cd35..521eae2b2 100755 --- a/assets/src/js/functions/datatables.js +++ b/assets/src/js/functions/datatables.js @@ -538,11 +538,7 @@ function getTable(selector) { getSelectedRowsFooter: function () { let ids = this.getSelectedRows(); - let summable_results = []; - let avg_results = []; - let results = []; - - summable_results = $.ajax({ + return $.ajax({ url: globals.rootdir + "/ajax.php", type: "POST", dataType: "json", @@ -553,25 +549,10 @@ function getTable(selector) { ids: ids, } }); - - avg_results = $.ajax({ - url: globals.rootdir + "/ajax.php", - type: "POST", - dataType: "json", - data: { - id_module: this.id_module, - id_plugin: this.id_plugin, - op: "avg-results", - ids: ids, - } - }); - - results = $.when(summable_results, avg_results); - return results; }, /** - * Aggiornamento dei campi summable e avg + * Aggiornamento dei campi summable */ updateFooterForSelectedRows: function () { let datatable = this.datatable; @@ -583,9 +564,6 @@ function getTable(selector) { $(sel).css("text-align", "right") .attr("id", "summable") .html(value); - $(sel).css("text-align", "right") - .attr("id", "avg") - .html(value); } }); },