From 91b51b4f7c1a05c93e2cb487302fd62e4be9502e Mon Sep 17 00:00:00 2001 From: Dasc3er Date: Mon, 14 Sep 2020 11:06:35 +0200 Subject: [PATCH] Miglioramento richiesta AJAX per righe --- modules/contratti/edit.php | 3 ++- modules/ddt/edit.php | 3 ++- modules/fatture/edit.php | 3 ++- modules/interventi/edit.php | 9 ++++++--- modules/ordini/edit.php | 3 ++- modules/preventivi/edit.php | 3 ++- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/contratti/edit.php b/modules/contratti/edit.php index 9ccfc0877..ad4af3fdc 100755 --- a/modules/contratti/edit.php +++ b/modules/contratti/edit.php @@ -397,7 +397,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } diff --git a/modules/ddt/edit.php b/modules/ddt/edit.php index d49cc00a7..0669fbed9 100755 --- a/modules/ddt/edit.php +++ b/modules/ddt/edit.php @@ -409,7 +409,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } diff --git a/modules/fatture/edit.php b/modules/fatture/edit.php index 32bf3d342..44be79b29 100755 --- a/modules/fatture/edit.php +++ b/modules/fatture/edit.php @@ -866,7 +866,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } diff --git a/modules/interventi/edit.php b/modules/interventi/edit.php index 54e0c4137..be2b7dc8f 100755 --- a/modules/interventi/edit.php +++ b/modules/interventi/edit.php @@ -496,7 +496,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } @@ -508,7 +509,8 @@ function caricaTecnici() { let container = $("#tecnici"); localLoading(container, true); - return container.load("'.$structure->fileurl('ajax_tecnici.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('ajax_tecnici.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } @@ -520,7 +522,8 @@ function caricaCosti() { let container = $("#costi"); localLoading(container, true); - return container.load("'.$structure->fileurl('ajax_costi.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('ajax_costi.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } diff --git a/modules/ordini/edit.php b/modules/ordini/edit.php index 6418340fd..a64eb53ca 100755 --- a/modules/ordini/edit.php +++ b/modules/ordini/edit.php @@ -288,7 +288,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); } diff --git a/modules/preventivi/edit.php b/modules/preventivi/edit.php index 12ad1ca32..d204901de 100755 --- a/modules/preventivi/edit.php +++ b/modules/preventivi/edit.php @@ -295,7 +295,8 @@ function caricaRighe() { let container = $("#righe"); localLoading(container, true); - return container.load("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function() { + return $.get("'.$structure->fileurl('row-list.php').'?id_module='.$id_module.'&id_record='.$id_record.'", function(data) { + container.html(data); localLoading(container, false); }); }