26 lines
620 B
JavaScript
26 lines
620 B
JavaScript
//"warning" "error" "success" "info"
|
|
function swalfun(title, text, type, confirmButtonText='حسنا') {
|
|
Swal.fire({
|
|
title,
|
|
text,
|
|
type,
|
|
confirmButtonText
|
|
})
|
|
}
|
|
function swalthen(title, text, type, href) {
|
|
swal.fire({
|
|
title,
|
|
text,
|
|
type,
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'نعم',
|
|
cancelButtonText: 'لا'
|
|
}).then((result) => {
|
|
if (result.value) {
|
|
document.location.href = href;
|
|
}
|
|
})
|
|
}
|