diff --git a/include/common/importa.php b/include/common/importa.php index 352b94958..d42799440 100755 --- a/include/common/importa.php +++ b/include/common/importa.php @@ -265,6 +265,12 @@ echo '

'.tr('Righe da importare').'

+
+
+ {["type":"checkbox", "label":"'.tr('Seleziona/Deseleziona tutto').'", "name":"import_all", "value":"1"]} +
+
+ @@ -310,7 +316,7 @@ foreach ($righe as $i => $riga) { // Checkbox - da evadere? echo ' - '; + '; $descrizione = ($riga->isArticolo() ? $riga->articolo->codice.' - ' : '').$riga['descrizione']; @@ -618,4 +624,20 @@ echo ' } }); }); + + $("#import_all").click(function(){ + if( $(this).is(":checked") ){ + $(".check").each(function(){ + if( !$(this).is(":checked") ){ + $(this).trigger("click"); + } + }); + }else{ + $(".check").each(function(){ + if( $(this).is(":checked") ){ + $(this).trigger("click"); + } + }); + } + }); ';