发帖时,输入一大篇文章,点击发布的时候,编辑器变成堵塞状态,有个小轮转啊转
请看 ajaxStart 和 ajaxComplete 两个方法
$(document).ready(function() { $('#f_title').focus(); $('#form_thread').ajaxForm({ dataType: 'json', success: function(json) { if(json.msg){ $('#error_msg').hide(); $('#error_msg').html(json.msg); $('#error_msg').show("fast"); } else if(json.id){ location.href = "$link.root("bbs/thread/")" + json.id; } } }); $('#form_thread').bind('form-pre-serialize', function(event,form,options,veto){ tinyMCE.triggerSave(); }); $("#form_thread").ajaxStart(function(){ if(tinyMCE && tinyMCE.get('f_content')) tinyMCE.get('f_content').setProgressState(1); // Show progress }); $("#form_thread").ajaxComplete(function(event,request, settings){ if(tinyMCE && tinyMCE.get('f_content')) tinyMCE.get('f_content').setProgressState(0); // Show progress }); });