mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Salvar cambios en ui-delete modal & alaerts
This commit is contained in:
@ -62,14 +62,27 @@ if (session()->has('error')) {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="imn-alert" class="alert alert-warning alert-dismissible d-flex d-none align-items-baseline" role="alert">
|
||||
<div id="sk-alert">
|
||||
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
||||
<span class="alert-icon alert-icon-lg text-primary me-2">
|
||||
<i class="ti ti-check ti-sm"></i>
|
||||
</span>
|
||||
<div class="d-flex flex-column ps-1">
|
||||
<h5 class="alert-heading mb-2"><?= lang('Basic.global.Warning') ?></h5>
|
||||
<p class="mb-0"><?= $warningMessage; ?></p>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
$('#sk-alert').on('click', function (e) {
|
||||
|
||||
$(this).fadeOut("slow");
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,5 @@
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
@ -169,14 +169,12 @@
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
<?php } ?>
|
||||
|
||||
$('#confirm2delete').on('show.bs.modal', function (e) {
|
||||
$(this).find('.btn-confirm').attr('href', $(e.relatedTarget).data('href'));
|
||||
});
|
||||
|
||||
|
||||
function toggleAllCheckboxes($cssClass, $io=null) {
|
||||
$('.'+$cssClass).prop('checked', $io);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?=$this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@ -43,11 +43,12 @@ const lastColNr = $('#tableOfTarifasacabado').find("tr:first th").length - 1;
|
||||
return `
|
||||
<td class="text-right py-0 align-middle">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i>
|
||||
<i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i>
|
||||
<a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i></a>
|
||||
</div>
|
||||
</td>`;
|
||||
};
|
||||
|
||||
theTable = $('#tableOfTarifasacabado').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
@ -123,9 +124,7 @@ const lastColNr = $('#tableOfTarifasacabado').find("tr:first th").length - 1;
|
||||
}
|
||||
});
|
||||
|
||||
$('#imn-alert').on('click', function (e) {
|
||||
$(this).toggleClass('d-none');
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user