Namespace.register("U.CD.LO");U.CD.LO.SetWH=function(){if(!document.body.clientHeight){location.href=location.href;}$("#UCD_TOP")[0].style.height="35px";$("#UCD_CT_Top_Tab")[0].style.height="20px";$("#UCD_CT_BT")[0].style.height="20px";$("#UCD_TT")[0].style.width="160px";$("#UCD_CT")[0].style.width=document.body.clientWidth-160+"px";$("#UCD_Bottom")[0].style.height=document.body.clientHeight-$("#UCD_TOP")[0].clientHeight-5+"px";var e=$("#UCD_Bottom")[0].clientHeight-$("#UCD_CT_Top_Tab")[0].clientHeight-$("#UCD_CT_BT")[0].clientHeight;if(e>0){$("#UCD_CT_CT")[0].style.height=e-10+"px";}$("#UCD_TT_Z")[0].style.height=$("#UCD_Bottom")[0].clientHeight-26-100+"px";var d=$("#UCD_TT")[0],c=$("#UCD_CT")[0],k=$("#UCD_RTree")[0],g=document.body.clientWidth,i=4;if(g!=0){if(d.style.display=="none"&&k.style.display=="none"){c.style.width=g-i+"px";}if(d.style.display=="none"&&k.style.display=="block"){c.style.width=g-k.clientWidth-i+"px";}if(d.style.display=="block"&&k.style.display=="none"){c.style.width=g-d.clientWidth-i+"px";}if(d.style.display=="block"&&k.style.display=="block"){c.style.width=g-d.clientWidth-k.clientWidth-i+"px";}}var f=$("#UCD_CT_SM_IF")[0],a=$("#UCD_CT_IF")[0];f.width=f.parentNode.clientWidth+"px";if(a.clientHeight-20>0){f.style.height=a.clientHeight-20+"px";}var h=$("#UCD_CT_Code")[0],j=$("#UCD_CT_HH_CT")[0],b=$("#UCD_CT_HH_Code")[0];h.style.width=b.clientWidth-j.clientWidth+"px";};U.CD.LO.HEToolbar=function(a){$("#UCD_TT")[0].style.display=$("#UCD_TT")[0].style.display=="none"?"block":"none";U.CD.LO.SetWH();};U.CD.LO.CloseZY=function(){$("#UCD_RTree")[0].style.display="none";U.CD.LO.SetWH();};U.CD.LO.OpenZY=function(){$("#UCD_RTree")[0].style.display="block";U.CD.LO.SetWH();};U.CD.LO.OCZY=function(){$("#UCD_RTree")[0].style.display=$("#UCD_RTree")[0].style.display=="none"?"block":"none";U.CD.LO.SetWH();};U.CD.LO.View=function(){var c=$("#UCD_CT_IF")[0],b=$("#UCD_CT_HH_Code")[0],a=$("#UCD_CT_SM_IF")[0];b.style.display="none";c.style.display="block";c.style.height="100%";U.CD.LO.SetWH();};U.CD.LO.Code=function(){var b=$("#UCD_CT_IF")[0],a=$("#UCD_CT_HH_Code")[0];b.style.display="none";a.style.display="block";a.style.height="100%";U.CD.LO.SetWH();};U.CD.LO.Split=function(){var b=$("#UCD_CT_IF")[0],a=$("#UCD_CT_HH_Code")[0];b.style.height="60%";a.style.height="40%";b.style.display="block";a.style.display="block";U.CD.LO.SetWH();};Namespace.register("U.CD.R");U.CD.R.LoadFC=function(d){if(U.UP.IsImg(d.Name)){var e=US.fs+d.Content.split("|")[1],a=US.fs+d.Content.split("|")[0];var b=$("#UCD_CT_SM_IF")[0].contentWindow.document.body;var c=$$("img",{"src":e,"onerror":[U.MD.C.imgError,(["this",2])]});b.innerHTML="";b.appendChild(c);$$("div",{"onselectstart":function(){return true;},"innerHTML":"图片路径�?+e+"
缩略图路径:"+a},b);return;}if(d.Content.split("|").length==2&&d.Content.replace(/\r\n/g,"\n").split("\n").length==1){alert("未知文件类型,非图片文件不能展示,请持续关注后续版本");return;}if(!U.CD.ExistTab(d)){U.CD.R.CreateTab(d);}};U.CD.CloseEdit=function(d,b,c){var a=d.getElementsByTagName("li");if(b==U.CD.U.CUser.CTab){if(a.length==1){U.CD.R.ClearTab();return;}if(b==a[0]){U.CD.ExistTab(a[1].Data);}else{U.CD.ExistTab(a[0].Data);}}d.removeChild(b);};U.CD.R.ClearTab=function(){U.CD.U.CUser.CTab=null;$("#UCD_CT_Code_CT")[0].innerHTML="";U.CD.CD.Init();$("#UCD_CT_Top_Tab")[0].getElementsByTagName("ul")[0].innerHTML="";};U.CD.ExistTab=function(d){var a=false;var e=$("#UCD_CT_Top_Tab")[0].getElementsByTagName("ul")[0];var c=e.getElementsByTagName("li");for(var b=0;b=c){var a=b.getElementsByTagName("li")[0];if(a==U.CD.U.CUser.CTab){U.CD.U.CUser.CTab=b.getElementsByTagName("li")[1];}b.removeChild(a);}};U.CD.R.FlushCodePage=function(a){if(a.Content==""){U.CD.CD.Init(a);}else{U.CD.CD.DisNode(a);}};U.CD.R.Save=function(a){$("#UCD_TOP_L_BC")[0].onclick=function(){var e=U.CD.U.IsUSelf();if(!e){U.CD.U.LoginApply();return;}if(!a){var c=U.CD.U.CUser.TNode[0].TNode,f=null,b;f=U.CD.U.CUser.CurrentNode;if(f){b="
该文件已经自动选取了项�?
";b+="
确认将建立新的index.htm文件�?"+f.Name+"'项目�?
";b+="
取消不做任何操作.建议在项目面板中新建文件�?/div>";U.UF.UI.Confirm(b,[U.CD.R.SaveNewFile,([f,e])],"");}else{U.UF.UI.Confirm("
您还未创建过项目!
确认将建立一个名为Test的项目,取消不做任何操作
",[U.CD.R.SaveNewFolder,([e])],"");}return;}var d=escape($("#UCD_CT_Code_CT")[0].innerHTML);U.A.Request(U.CD.AjaxUrl,(["Update_FileContent",e.userid,a.Deep,a.ID,d]),U.CD.R.SaveAsyn,(["",a]));};};U.CD.R.SaveAsyn=function(d){var b,c=d.context[1];if(d.value){var a=$("#UCD_CT_Top_Tab")[0].getElementsByTagName("ul")[0].getElementsByTagName("li");for(b=0;b0){U.CD.RT.CP_NF(U.CD.U.CUser.CurrentSO,a.userid,U.CD.U.CUser.CurrentNode);}else{U.CD.RT.CProject(a.userid,U.CD.U.CUser.TNode[0]);}};U.CD.R.run=function(){var c;if($("#UCD_IF")[0]){c=$("#UCD_IF")[0];}else{var a=$$("div",{"id":"UCD_RUN"},document.body);var b=$$("div",{"className":"UCD_RUN_Head"},a);$$("div",{"className":"UCD_RUN_Refesh","innerHTML":"重新运行"},b);$$("div",{"className":"UCD_RUN_Close","innerHTML":"关闭","onclick":function(){a.style.display="none";}},b);var c=$$("iframe",{"className":"UCD_RUN_Iframe","id":"UCD_IF"},a);}$("#UCD_RUN")[0].style.display="block";var c=$("#UCD_IF")[0];c.src="RS.htm";U.MD.IframeLoad(c,[[U.CD.CD.ILAsync,([c,$("#UCD_CT_Code_CT")[0]])]]);};U.CD.R.OpenRun=function(){var b=U.CD.CD.ExecIFText($("#UCD_CT_Code_CT")[0]);var d=$$("textarea",{"value":b});b=d.value;var a=window.open("javascript:void((function(){document.open();document.domain='1473.cn';document.close()})())","_blank","");var c=a.document.open("text/html","replace");a.opener=null;c.write(b);c.close();};U.CD.R.Stop=function(){if($("#UCD_RUN")[0]){$("#UCD_RUN")[0].style.display="none";}};Namespace.register("U.CD");U.UF.EV.addPrototype(Object,U.E.E);U.UF.S.FileName=/^([a-zA-Z0-9\s\._-]+)$/;U.UF.S.ZWFileName=/^[0-9a-zA-Z\u4e00-\u9fa5\._-]{1,40}\\*$/;U.CD.AjaxUrl="http://d-back.1473.cn:1337/";U.CD.AjaxCross="http://d-back.1473.cn:1337/CD.htm";U.CD.TipR=null;U.CD.Loading=null;U.CD.USLang="USHtml";U.CD.DType={"TW":"提问","ZY":"作业","JH":"精华","CT":"控件"};U.CD.Init=function(){U.CD.TipR=U.UF.E.GetSelectionRange(window,$("#UCD_CT_Code_CT")[0],{"TF":"UCD_CODE","CB":U.CD.R.Wrap});document.onclick=document.body.onmousedown=U.M.apply(this,[[U.CD.Tip.HidTip]]);U.UF.EV.addPrototype(Object,U.E.E);U.ACD=U.A;U.CD.AsynLI();U.CD.CD.Init();var a=U.M.GetUF();if(a){setTimeout(function(){U.CD.Url.AsynUrlGuide(a);},1000);}else{setTimeout(function(){U.CD.SL.Init();},1000);}U.CD.LO.SetWH();U.CD.Tip.Init();U.CD.Loading=$("#UCD_LD")[0];U.CD.Loading.style.display="none";};U.CD.AsynLI=function(){var e=document.createDocumentFragment(),c,b={"U_CD":"ACD","U_Main":"A","U_Disk":"Adisk","reply":"RY","TF":true},a=[["U_CD",U.CD.AjaxCross,"ACD"],["U_Main","http://main.1473.cn/index.htm","A"],["U_Disk","http://disk.1473.cn/index.htm","Adisk"],["UL_IF","http://www.1473.cn/NewPage.htm"],["reply","http://reply.1473.cn/index.htm","RY"]];U.D.ITF=a.length;for(var d=0;d"){b.push(e.substring(d,c+1));}}return b;};U.CD.CD.AppendHTML=function(f){var e=$("#UCD_CT_HH_CT")[0],g=$("#UCD_CT_Code_CT")[0];var l=U.CD.CD.SplitHTML(f.outerHTML);var a=g.getElementsByTagName("div");for(var d=0;d"){var b=a[d].innerText.indexOf(">")-1;for(var c=0;cd){if(f.substring(g,c).replace(/\s+/g,"")!=""){b.push(f.substring(g,c));}}d=c;}if(f.charAt(c)==">"){if(f.charAt(c+1)!="<"){g=c+1;}b.push(f.substring(d,c+1));}}return b;};U.CD.CD.DrawCode=function(c,e){var f=$("#UCD_CT_HH_CT")[0],d=$("#UCD_CT_Code_CT")[0];var b=U.CD.CD.SplitHTML(c,e),a;d.innerHTML="";f.innerHTML="";for(a=0;a<\/script>,否则会拒绝访问,请仔细检�?);};U.CD.CD.Is1473Domain=function(b){var a,c=b.replace(/\r\n/g,"\n").split("\n");for(a=0;a-1){return b;}}if(c.length>7){c.splice(5,0,"