function exiting(){var n=Sys.WebForms.PageRequestManager.getInstance();n.abortPostBack()}function gotStats(n){n=eval(n);$("#statis").html(n[0]);$("#spaceUsage").text(n[1])}function reTry(){$("#checking").text("正在联系服务器 ……");$("#btnTrigger").click()}function preOnlineUpdate(){return confirm("警告：\n1. 仅应对官方发行的标准版本应用更新，否则将丢失定制修改的特性；\n2. 建议更新前先备份系统；\n3. 更新后建议客户端清空浏览器缓存（临时文件）。\n\n是否继续？")?($("#ddlVers").prop("disabled",!0),$("#btnUpgrade,#upload").hide(),progressEleId="prog_online",showStatus("正在准备 …"),!0):!1}function showStatus(n){$("#"+progressEleId).text(n).show()}function getUpgradeStatus(){$("#ddlVers").prop("disabled",!0);$("#btnUpgrade,#upload").hide();$.get("ajax.aspx",{action:"getDownloadStatus"},function(n){switch(n){case"-2":case"0":showStatus("正在准备 …");setTimeout(getUpgradeStatus,2e3);break;case"-1":resetStatus();alert("获取更新包失败！");break;case"1":showStatus("下载完毕，准备更新 …");PageMethods.doUpgrade(null);setTimeout(CheckUpgradeStatus,1200);break;default:showStatus("已下载 "+n+" …");setTimeout(getUpgradeStatus,2e3)}})}function resetStatus(){$("#ddlVers").prop("disabled",!1);$("#btnUpgrade,#upload").show();$("#"+progressEleId).hide()}function preOfflineUpdate(){if(!confirm("警告：\n1. 仅应对官方发行的标准版本应用更新，否则将丢失定制修改的特性；\n2. 建议更新前先备份系统；\n3.更新后建议客户端清空浏览器缓存（临时文件）。\n\n确定要使用该更新包更新系统吗？"))return!1;progressEleId="prog_offline";$("#btnUpgrade,#upload").hide();showStatus("正在上传文件包 …");ajaxUpload($f("toUpload"),"get.aspx?action=upload","\\.(zip|rar)$",function(n){if(n){var t=n.files;t&&t.length>0&&(showStatus("上传完毕，准备更新 …"),PageMethods.doUpgrade(t[0]),setTimeout(CheckUpgradeStatus,1200))}})}function CheckUpgradeStatus(){upgraded||(jqxhr=$.ajax({url:"Temp/upgrading.txt",dataType:"text",cache:!1}).done(function(n){upgraded||(n=="1"||n=="9"||n=="0"?(resetStatus(),$("#loading").hide(),jqxhr.abort(),upgraded=!0,n=="1"?(winalert("更新完毕！请清空浏览器缓存。现在将重新打开系统。"),parent.location.reload(!0)):n=="0"?setTimeout(function(){winalert("开发版或演示版不允许执行更新操作！")},0):winalert("操作成功！")):showStatus(n))}),setTimeout(CheckUpgradeStatus,1200))}LoadEditor();var defTab=0,progressEleId,jqxhr,upgraded=!1;$(function(){$("#tabs").tabs({active:defTab,activate:tryFitParent}).fadeIn(300);PageMethods.getStatis(gotStats);bindCopy("btnCopy","tbMachineCode");MakeEditor("textarea.ck",null,250,!1,!1);$(".inlineBlock img").hover(function(){$(this).toggleClass("over")});var n=Sys.WebForms.PageRequestManager.getInstance();n.add_initializeRequest(showLoading);n.add_endRequest(hideLoading)})