37 lines
885 B
JavaScript
37 lines
885 B
JavaScript
|
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'
|
||
|
}
|
||
|
});
|
||
|
}
|