29 lines
1.0 KiB
PHP
29 lines
1.0 KiB
PHP
<script>
|
|
$(function(){
|
|
$(".serialize").unbind();
|
|
$(".serialize").on("submit",function(){
|
|
|
|
for (var i in CKEDITOR.instances) {
|
|
CKEDITOR.instances[i].updateElement();
|
|
};
|
|
var bu = $(this);
|
|
bu.find(".right-fixed button").attr("disabled","disabled").html("Processing...");
|
|
bu.find("[type='submit']").attr("disabled","disabled").html("Processing...");
|
|
$.ajax({
|
|
type : $(this).attr("method"),
|
|
url : $(this).attr("action"),
|
|
data : $(this).serialize(),
|
|
success: function(d){
|
|
bu.find(".right-fixed button").removeAttr("disabled").html("{{e2("Success")}}");
|
|
bu.find("[type='submit']").removeAttr("disabled").html("{{e2("Success")}}");
|
|
$(".result-ajax").html(d);
|
|
//bu.find("input").val()
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
});
|
|
</script> |