function attrShown(){$("#pop_upOptions .hasItems:visible").mouseover(function(){var n=Math.max(50,this.scrollHeight);$(this).height(n)}).mouseout(function(){sorted||within(this,getEvent())||$(this).removeAttr("style")});$("#pop_options:visible").sortable({items:"span[hash]",handle:"label",opacity:.7,ghosting:!0,start:function(){sorted=!0},update:function(n,t){t.item.html(t.item.html())}});sorted=!1}function updateOrder(){var n,t;sorted&&(n=$("#pop_options:visible span[hash]"),n.length>0&&(t="",n.each(function(){t+=$(this).attr("hash")+"|"}),$("#__EVENTARGUMENT").val(t)))}function InitTable(){$("#upRpt").sortable({items:"> table.hr:not(.header)",handle:".h",helper:"clone",opacity:.7,ghosting:!0,update:function(){var n="",t;$("#upRpt table.hr:not(.header)").each(function(i){t=this.id.substr(2);n+=t+",0,"+i+"|"});$.post("ajax.aspx",{action:"saveLayout",layoutType:5,layout:n})}});$("table.hr:not(.header) tr").hover(function(){$(this).toggleClass("RowMouseOver")}).dblclick(function(){var n=$(this).closest("table").attr("id").substr(2);return viewAttribu(n)}).attr("title","双击编辑字段");$("#upRpt .h").attr("title","拖动调整字段顺序");tryFitParent()}function chkEnter(){var n=getEvent(),i=n.srcElement||n.target,t=n.keyCode||n.which;return t!=13}function confirmChg(n){if($f("curFieldId").value!="0")if(confirm("修改字段的数据类型将有可能导致该字段的数据丢失或失效！\n确实要修改吗？如果是，请修改之后及时检查并修正该模板类型的所有记录中该字段的值。"))__doPostBack(n.id,"");else return!1;__doPostBack(n.id,"")}function viewAttribu(n){var t=getEvent(),i=t.srcElement||t.target;return $f("curFieldId").value=n,__doPostBack("btnAddItem",""),!1}function toConfirm(n){var t=objCount>0&&n==!1?"该模板已有"+objCount+"条数据记录，若删除此字段，将同时删除这些记录的该字段中的数据！\n确定要删除吗？":"确定要删除该字段吗？";return delConfirm(t)}function helperListChanged(n){var t=n.options[n.selectedIndex].value,i;t!=""&&("+-*/()".indexOf(t)==-1&&(t="["+t+"]"),i=$("#pop_formula"),i.focus().val(i.val()+t));n.selectedIndex=0}function SelectedDir(n){__doPostBack("pop$selectedDir",n)}function addCond(){var n=getEventSrc(),t=$(n).closest("fieldset");return t.find("div.hide:first").removeClass("hide"),$(n).hide(),!1}function cbCustomChanged(){var n=$("#pop_cbCustom");n.prevAll(":checkbox,select").prop("disabled",n.prop("checked"))}function setAcOptions(){var n=$("#pop_acOptions");n.length>0&&($("#pop_ddlTopn").val()!="1"&&$("#pop_rbResult1_Ac").is(":checked")?($("#pop_cbAutoFill,label[for='pop_cbAutoFill']").addClass("hide"),$("#pop_cbEnMutiItems,label[for='pop_cbEnMutiItems'],#pop_ddlChars").removeClass("hide"),setDisEdit()):($("#pop_cbAutoFill,label[for='pop_cbAutoFill']").removeClass("hide"),$("#pop_cbEnMutiItems,label[for='pop_cbEnMutiItems'],#pop_ddlChars").addClass("hide"),setDisEdit()),$("#pop_cbLimit,label[for='pop_cbLimit']").css("display",$("#pop_rbResult1_Ac").prop("checked")?"":"none"))}function setDisEdit(){$("#pop_cbAutoFill").is(":checked:visible")?$("#pop_cbDisEdit,label[for='pop_cbDisEdit']").removeClass("hide"):$("#pop_cbDisEdit,label[for='pop_cbDisEdit']").addClass("hide")}function checkCondMode(n){$("option:selected",n).text().indexOf("包含")>-1?ToShowPopHelp("ContainMode"):HideMsgPop()}function switchNo(){$("#divNo").css("display",$("#pop_cbRandom").is(":checked")?"none":"")}var sorted=!1;$(function(){var n=Sys.WebForms.PageRequestManager.getInstance();n.add_initializeRequest(showLoading);n.add_endRequest(hideLoading)})