51 lines
1.2 KiB
JavaScript
Executable File
51 lines
1.2 KiB
JavaScript
Executable File
function logout() {
|
|
return swal({
|
|
title: "Yakin?",
|
|
text: "Anda akan keluar dari sistem",
|
|
type: "warning",
|
|
showCancelButton: !0,
|
|
confirmButtonColor: "#DD6B55",
|
|
confirmButtonText: "Ya, logout!",
|
|
cancelButtonText: "Tidak, batal!",
|
|
closeOnConfirm: !1,
|
|
closeOnCancel: !1,
|
|
confirmButtonColor: "#f60e0e"
|
|
}, function (t) {
|
|
if (t) {
|
|
window.location.href = "/"
|
|
}else{
|
|
// close swal
|
|
swal.close()
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
function blockUI(message) {
|
|
$.blockUI({
|
|
message: message,
|
|
css: {
|
|
border: 'none',
|
|
padding: '15px',
|
|
backgroundColor: '#000',
|
|
'-webkit-border-radius': '10px',
|
|
'-moz-border-radius': '10px',
|
|
opacity: .5,
|
|
color: '#fff'
|
|
}
|
|
});
|
|
}
|
|
|
|
function notAvailable() {
|
|
return swal({
|
|
title: "Belum Tersedia",
|
|
text: "Maaf, fitur ini belum tersedia",
|
|
type: "info",
|
|
timer: 2000,
|
|
showConfirmButton: !1
|
|
})
|
|
}
|
|
|
|
function thousandSeparator(x) {
|
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
} |