μ΄ μ€λ₯λ Sweetalert2μμ "μ·¨μ" λ²νΌμ ν΄λ¦νλ©΄ νμλ©λλ€.
swal({
title: menu_title,
text: title,
input: "text",
showCancelButton: true,
animation: "slide-from-top",
showLoaderOnConfirm: true,
inputPlaceholder: lang.write_your_comment,
preConfirm: function(inputValue) {
return new Promise(function(resolve, reject) {
resolve('ok');
});
})
},
allowOutsideClick: false
}).then(function(result){
var res = $.parseJSON(result);
if(res.status){
swal({
title: lang.thankyou+"!",
text: lang.your_feedback_sent,
type: "success"
}).then(function(confirm){
location.reload();
});
} else{
swal({
title: lang.sorry+"!",
text: res.message,
type: "warning"
});
}
});
λ«κΈ° μμ΄μ½μ ν΄λ¦νλ©΄ μ€λ₯λ νμλ©λλ€.
μ‘νμ§ μμ μμΈ: λ«κΈ°
μ¬κΈ°μ κ²μν΄μΌ ν©λλ€: https://limonte.github.io/sweetalert2/
λκ΅°κ° μ¬κΈ° μμ λ§ν κ²½μ° ( sweetalert != sweetalert2
!)
swal({...})
λμ λ€μμ μΆκ°ν©λλ€. .catch(() => swal.close())
λͺ¨λ μ½μ ν¨μμλ μ€ν¨ μ½λ°±μ΄ νμν©λλ€.
@eminx λΉμ μ΄ λ΄ ν루λ₯Ό ꡬνμ΅λλ€ :)
@eminx λλ!!
κ°μ₯ μ μ©ν λκΈ
λκ΅°κ° μ¬κΈ° μμ λ§ν κ²½μ° (
sweetalert != sweetalert2
!)swal({...})
λμ λ€μμ μΆκ°ν©λλ€..catch(() => swal.close())
λͺ¨λ μ½μ ν¨μμλ μ€ν¨ μ½λ°±μ΄ νμν©λλ€.