Advertisement
Hiitmarqes

Untitled

Aug 18th, 2020
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. $(document).on('click', '.alledit', function (e) {
  2. e.preventDefault();
  3. var token = '{{ csrf_token() }}';
  4. var url_delete = "{{route('app.concreteregistrations.alledit')}}"
  5. e.preventDefault();
  6. var result = $("tr:has(:checked)");
  7. if(result.length > 0){
  8. swal({
  9. title: "Você tem certeza?",
  10. text: "Você irá editar todos esse(s) registro(s)!",
  11. type: "warning",
  12. showCancelButton: true,
  13. confirmButtonColor: "#DD6B55",
  14. confirmButtonText: "Sim, Editar agora!",
  15. closeOnConfirm: false,
  16. showLoaderOnConfirm: true
  17. },
  18. function() {
  19. setTimeout(function () {
  20. var json = result.map(function () {
  21. return [$(this).children().slice(1).map(function () {
  22. return $(this).text().trim()
  23. }).get()]
  24. }).get()
  25. var j0=[]
  26. result.each(function(){
  27. var tds=$(this).children().slice(1);
  28. j0.push(tds.eq(0).text().trim())
  29. })
  30. var dataIds = j0;
  31.  
  32. window.open(url_delete+'?ids='+dataIds)
  33. }, 600);
  34.  
  35. });
  36. }else {
  37. swal("Atenção!", "Você precisa selecinar algum registro", "warning");
  38. }
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement