Update Teruss
This commit is contained in:
@@ -577,9 +577,9 @@ $("#example10").DataTable({
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Aksi ketika tombol dengan ID tombol-logout ditekan
|
// Apapun tombolnya, selama dia mengarah ke link logout, tangkap!
|
||||||
$(document).on('click', '.tombol-logout', function(e) {
|
$('a[href*="login/logout"]').on('click', function(e) {
|
||||||
e.preventDefault(); // Mencegah link langsung pindah
|
e.preventDefault();
|
||||||
var link = $(this).attr('href');
|
var link = $(this).attr('href');
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -590,15 +590,14 @@ $("#example10").DataTable({
|
|||||||
confirmButtonColor: '#3085d6',
|
confirmButtonColor: '#3085d6',
|
||||||
cancelButtonColor: '#d33',
|
cancelButtonColor: '#d33',
|
||||||
confirmButtonText: 'Ya, Keluar!',
|
confirmButtonText: 'Ya, Keluar!',
|
||||||
cancelButtonText: 'Batal',
|
cancelButtonText: 'Batal'
|
||||||
reverseButtons: true
|
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
window.location.href = link; // Lanjutkan proses logout jika klik Ya
|
window.location.href = link;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user