Created
October 29, 2019 23:34
-
-
Save csidjalma/3a5f5fd50589a3bc935fdd8fdb5e210c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
?> | |
<script> | |
function csi_btn_importar_dados() { | |
var checked_records,i; | |
vls_check=""; | |
checked_records=$(".sc-ui-check-run").filter(":checked"); | |
for(i=0;i<=checked_records.length;i++){ | |
vls_check+=(vls_check!="")?";":""; | |
vls_check+=$(checked_records[i]).val(); | |
} | |
if(vls_check==""||vls_check=="0"||vls_check=="undefined"){ | |
scJs_alert("Selecionar dados"); | |
return; | |
} | |
document.FBtn_Run.nm_run_opt_sel.value=vls_check; | |
Swal.fire({ | |
title: 'Atenção!', | |
text: "Confirma a importação de pedidos ?", | |
type: 'info', | |
showCancelButton: true, | |
confirmButtonColor: '#59b479', | |
cancelButtonColor: '#e36e6e', | |
cancelButtonText: 'Cancelar', | |
confirmButtonText: 'Sim, importar agora!' | |
}).then((result) => { | |
if (result.value) { | |
console.log( sc_btn_importar_dados_ok() ); | |
// mensagem de conclusão de processamento | |
Swal.fire( | |
'Pronto!', | |
'Pedidos importados com sucesso.', | |
'success' | |
) | |
// recarregar o form grid_tbl_upload_arq_pedido | |
} else { | |
return; | |
} | |
}); | |
} | |
$(function(){ | |
setInterval(function(){ | |
$( "td.scGridToolbarPadding a" ).each( function( index ) { | |
if( $(this).attr("onclick")) { | |
var strOnClick = $(this).attr("onclick"); | |
var newAtributo = strOnClick.replace("sc_btn_importar_dados","csi_btn_importar_dados"); | |
$(this).attr("onclick",newAtributo); | |
} | |
}); | |
},1000); | |
}); | |
</script> | |
<?php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment