function preSubmit(){if($("#cbMsg,#cbMail,#cbSms,#cbWeixin").filter(":checked").length==0)return showAndExit("请至少选择一种发送方式！");if($("#rbAssigned").prop("checked")&&$("#cbUser,#cbRole,#cbUnit,#cbRel").filter(":checked").length==0)return showAndExit("请指定接收人！");if($.trim($("#tbSubject").val())=="")return showAndExit("请输入主题！");var n=CKEDITOR.instances.ckContent.getData();return n==""?showAndExit("请输入内容！"):$("#cbSms:checked").length>0&&$(n).text().length>200?showAndExit("当前内容超过了200字，不适合使用短信提醒方式！"):(UpdateEditorElement(),!0)}function showAll(){$("#divRole,#related,#exclude").removeClass("hide");$("#showMore").hide()}function sent(n,t){hideLoading();$("#resultArea").show();$("#mainArea").hide();$("#resultMsg").html(t.replace("\n","<br />"))}function toContinue(){$("#resultArea").hide();$("#mainArea").show()}LoadEditor();$(function(){MakeEditor("#ckContent","Lesser",233,!1,!1);$("#tbUsers,#tbRoles,#tbUnits,#tbNoUsers").focus(function(){$(this).prevAll(":checkbox:first").prop("checked",!0)});$("#related :checkbox,#ddlLevels").not("#cbRel").change(function(){$("#cbRel").prop("checked",!0);!$(this).is("#cbLevel")&&$(this).isIn("#spanLevels")&&$("#cbLevel").prop("checked",!0)});var n=Sys.WebForms.PageRequestManager.getInstance();n.add_initializeRequest(showLoading);n.add_endRequest(hideLoading);$(window).load(function(){setTimeout(function(){AutoComplete($(":text[acfid],textarea[acfid]"));$("#tbUsers").val()==""?$("#tbUsers").focus():setTimeout(function(){CKEDITOR.instances.ckContent.focus()},300)},50)})})