-
Total de itens
13 -
Registro em
-
Última visita
Reputação
0 ComumSobre cfandrade
- Data de Nascimento 03/10/1990
Informações Pessoais
-
Sexo
Masculino
-
Localização
Presidente Venceslau
Contato
-
Site Pessoal
http://www.cfafinanceiro.com.br
-
javascript Como recuperar os valores usando sortable! do (id) de uma li e a posição atual do (id) da nova (ul)
cfandrade respondeu ao tópico de cfandrade em Javascript
obrigado @wanderval, era o que eu precisava, tb corrigi o bug aonde você identificou, esta funcionando corretamente -
javascript Como recuperar os valores usando sortable! do (id) de uma li e a posição atual do (id) da nova (ul)
cfandrade postou um tópico no fórum Javascript
Estou tentando fazer a mudança dos (li) desse sistema que chamei de PRONTUARIOS, apenas arrastando de uma (ul) atual para outra que chamei de CAIXA, estou tentando recuperar o valor do id do prontuario (li) e a caixa atual que o usuário deixou o prontuario caso tenha mudado para uma nova caixa (ul). se alguem puder me ajudar, preciso recuperar o valor desses ids e atualizar no banco de dados! <script type="text/javascript"> $(document).ready(function() { $("ul").sortable({ delay: 150, connectWith: ".parent", cursor: 'move', stop: function() { var caixaAtual = new Array(); var prontuario = ''; $('li .prontuario').each(function() { //caixaAtual = $("data-id").html(); //prontuario = $("data-id").val(this); }); console.log(prontuario); //updateOrder(prontuario,caixaAtual); } }); function updateOrder(id,caixa) { $.ajax({ url:"documentos/alterar_prontuario", type:'post', data:{id:id,caixa:caixa}, success:function(data){ toastr.success('Alterado com sucesso.'); } }) } }); <div class="container mx-auto mt-3 mb-5 text-center"> <h4 class="col-12 text-center mx-auto">LISTAGEM SEGUNDO VOLUME</h4> CAIXA N° 01 <ul id="c_01" class="col-12 parent mt-0 mb-2 ui-sortable"> <li id="239" data-id="239" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-5 align-middle mx-auto p-0 text-left">ADRIANO ALVES DE ALMEIDA</td> <td class="col-2 align-middle mx-auto p-0 text-center">617.598-8</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1257101/2020</td> <td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" </tr> </tbody></table> </li> <li id="247" data-id="247" class="col-12 mx-auto prontuario ui-sortable-handle" style="position: relative; left: 0px; top: 0px;"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">5</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEX JORGE MELO DA SILVA</td> <td class="col-2 align-middle mx-auto p-0 text-center">664.041-1</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1251911/2020</td> </tr> </tbody></table> </li><li id="241" data-id="241" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">2</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEF DA SILVA OLIVEIRA</td> <td class="col-2 align-middle mx-auto p-0 text-center">1.199.560-2</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center"></td> </tr> </tbody></table> </li> <li id="240" data-id="240" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">3</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEX ALVES CERQUEIRA</td> <td class="col-2 align-middle mx-auto p-0 text-center">340.704-6</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1809667/2020</td> </tr> </tbody></table> </li> <li id="248" data-id="248" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">6</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEX XAVIER PIAUI</td> <td class="col-2 align-middle mx-auto p-0 text-center">771.513-9</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1243357/2020</td> </tr> </tbody></table> </li> <li id="249" data-id="249" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">7</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEXANDRE DE OLIVEIRA MEDEIROS</td> <td class="col-2 align-middle mx-auto p-0 text-center">893.604-9</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1415815/2020</td> </tr> </tbody></table> </li><li id="246" data-id="246" class="col-12 mx-auto prontuario ui-sortable-handle" style="position: relative; left: 0px; top: 0px;"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">4</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEX EDUARDO DE JESUS LOURENCO</td> <td class="col-2 align-middle mx-auto p-0 text-center">236.643-3</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1392042/2020</td> </tr> </tbody></table> </li> <li id="250" data-id="250" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">8</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEXANDRE PEREIRA DA COSTA</td> <td class="col-2 align-middle mx-auto p-0 text-center">932.592-9</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1532754/2020</td> <td class="d-print-none col-1 align-middle mx-auto p-0 text-center"><a type="button" class="btn btn-outline-danger" href="http://10.14.101.160/cimic/?url=documentos/excluir_segundo_volume/250" title="APAGAR"><i class="fa fa-trash"></i></a></td> </tr> </tbody></table> </li> </ul> CAIXA N° 02 <ul id="c_02" class="col-12 parent mt-0 mb-2 ui-sortable"> <li id="242" data-id="242" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-5 align-middle mx-auto p-0 text-left">ALEXSANDRO HENRIQUE FRANCA CAMARGO DE MOURA</td> <td class="col-2 align-middle mx-auto p-0 text-center">1.224.350-7</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">2092453/2020</td> </tr> </tbody></table> </li> <li id="251" data-id="251" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">2</td> <td class="col-5 align-middle mx-auto p-0 text-left">AMAURI FERREIRA DA SILVA</td> <td class="col-2 align-middle mx-auto p-0 text-center">613.004-1</td> <td class="col-1 align-middle mx-auto p-0 text-center">3</td> <td class="col-2 align-middle mx-auto p-0 text-center">1243426/2020</td> </tr> </tbody></table> </li> <li id="prontuario" data-id="243" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0"> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">3</td> <td class="col-5 align-middle mx-auto p-0 text-left">ANDERSON LIMA RIBEIRO GONCALVES</td> <td class="col-2 align-middle mx-auto p-0 text-center">1.164.179-2</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center"></td> </tr> </tbody></table> </li> <li id="252" data-id="252" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">4</td> <td class="col-5 align-middle mx-auto p-0 text-left">ANDERSON SOUZA VELOSO</td> <td class="col-2 align-middle mx-auto p-0 text-center">277.426-3</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center"></td> </tr> </tbody></table> </li> <li id="244" data-id="244" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">5</td> <td class="col-5 align-middle mx-auto p-0 text-left">ANDRE ALMEIDA</td> <td class="col-2 align-middle mx-auto p-0 text-center">1.096.394-0</td> <td class="col-1 align-middle mx-auto p-0 text-center">2</td> <td class="col-2 align-middle mx-auto p-0 text-center"></td> </tr> </tbody></table> </li> <li id="245" data-id="245" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">6</td> <td class="col-5 align-middle mx-auto p-0 text-left">ANDRE LUIZ RODRIGUES</td> <td class="col-2 align-middle mx-auto p-0 text-center">465.133-7</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">2213488/2020</td> </tr> </tbody></table> </li> </ul> CAIXA N° 03 <ul id="c_03" class="col-12 parent mt-0 mb-2 ui-sortable"> <li id="253" data-id="253" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-5 align-middle mx-auto p-0 text-left">ANDREO LEONE FERREIRA LOBATO</td> <td class="col-2 align-middle mx-auto p-0 text-center">719.305-5</td> <td class="col-1 align-middle mx-auto p-0 text-center">2</td> <td class="col-2 align-middle mx-auto p-0 text-center">1359268/2020</td> </tr> </tbody></table> </li> <li id="254" data-id="254" class="col-12 mx-auto prontuario ui-sortable-handle"> <table class="table table-hover table-sm mb-0 "> <tbody><tr class="row col-12 mx-auto text-center"> <td class="col-1 align-middle mx-auto p-0 text-center">2</td> <td class="col-5 align-middle mx-auto p-0 text-left">AUGUSTO PEREIRA DA SILVA</td> <td class="col-2 align-middle mx-auto p-0 text-center">1.094.345-4</td> <td class="col-1 align-middle mx-auto p-0 text-center">1</td> <td class="col-2 align-middle mx-auto p-0 text-center">1183605/2020</td> </tr> </tbody></table> </li> </ul> </div>