Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).on('click', '.alledit', function (e) {
- e.preventDefault();
- var token = '{{ csrf_token() }}';
- var url_delete = "{{route('app.concreteregistrations.alledit')}}"
- e.preventDefault();
- var result = $("tr:has(:checked)");
- if(result.length > 0){
- swal({
- title: "Você tem certeza?",
- text: "Você irá editar todos esse(s) registro(s)!",
- type: "warning",
- showCancelButton: true,
- confirmButtonColor: "#DD6B55",
- confirmButtonText: "Sim, Editar agora!",
- closeOnConfirm: false,
- showLoaderOnConfirm: true
- },
- function() {
- setTimeout(function () {
- var json = result.map(function () {
- return [$(this).children().slice(1).map(function () {
- return $(this).text().trim()
- }).get()]
- }).get()
- var j0=[]
- result.each(function(){
- var tds=$(this).children().slice(1);
- j0.push(tds.eq(0).text().trim())
- })
- var dataIds = j0;
- window.open(url_delete+'?ids='+dataIds)
- }, 600);
- });
- }else {
- swal("Atenção!", "Você precisa selecinar algum registro", "warning");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement