Complex.min.js 35 KB

1234
  1. //编辑器
  2. //excel控件
  3. //编辑器
  4. Namespace.register("U.MD.UI.BTree");U.MD.UI.BTree=function(a,c,b,d,f,g,h,e,l,k,m){U.MD.UI.BTree.jsonStartLeft(a,g[0],c);U.MD.UI.BTree.jsonStartRight(g[1],c,b,d,f,h,e,l,k,m)};U.MD.UI.BTree.treeCreate=function(a,c,b){for(var d=0;d<a.length;d++){var f=$$("ul",{className:"U_MD_UI_Tree_a "+a[d].parentID},c),g=$$("li",{id:a[d].id,parentid:a[d].parentid,className:"U_MD_UI_Tree_listyle",parentid:a[d].id,deep:a[d].deep},f),h=$$("img",{onerror:U.MD.C.imgError,src:a[d].img_url,className:"U_MD_UI_Tree_imgstyle"},g);$$("span",{innerHTML:a[d].name,className:"spanstyle"},g);f.style.display="none";"1"==a[d].deep&&(f.style.display="block");h.aa=!1;var e=document.getElementsByClassName("U_MD_UI_Tree_a "+a[d].parentID)[0];f.style.display=e.style.display;g.onclick=function(){b(this);e=document.getElementsByClassName("U_MD_UI_Tree_a "+this.parentid);if(!0===h.aa){h.aa=!1;for(var a=0;a<e.length;a++)e[a].style.display="none"}else for(h.aa=!0,a=0;a<e.length;a++)e[a].style.display="block"};a[d].child&&U.MD.UI.BTree.treeCreate(a[d].child,f,b)}};U.MD.UI.BTree.JsonSelect=function(a,c){var b;for(b=0;b<a.length;b++){if(0==c)return a;if(a[b].id==c)return b=a[b].child;if(a[b].child)var d=U.MD.UI.BTree.JsonSelect(a[b].child,c)}return d};U.MD.UI.BTree.DirectoryCreate=function(a,c,b,d,f,g,h,e,l,k,m){0==k?(b[1].style.display="none",b[2].style.display="none"):(b[2].style.display="none",b[k].style.display="block");var n="\u4fee\u6539",q="\u5220\u9664";e&&l&&(q=n="");c[k].innerHTML="";b[k].parentID=d;b[k].deep=k+1;m&&(c[m].innerHTML="");if(a)for(var p=0;p<a.length;p++){var u=$$("ul",{className:"U_MD_UI_Tree_styleul",parentid:a[p].parentID,deep:a[p].deep},c[k]),r=$$("li",{className:"U_MD_UI_Tree_styleli",innerHTML:a[p].name,parentid:a[p].id},u),x=$$("input",{type:"button",pid:a[p].id,parentid:a[p].parentID,innerHTML:n,className:"U_MD_UI_Tree_button"},u),u=$$("input",{type:"button",pid:a[p].id,parentid:a[p].parentID,innerHTML:q,className:"U_MD_UI_Tree_button1"},u);x.onclick=function(){g(this,c,b,d,f,g,h,e,l,k)};u.onclick=function(){f(this,c,b,d,f,g,h,e,l,k)};r.onclick=function(){m?U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(a,this.parentid),c,b,this.parentid,f,g,h,e,l,m):2!=k&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(a,this.parentid),c,b,this.parentid,f,g,h,e,l,1,2)}}n=$(".U_MD_UI_Tree_add");n[k]&&b[k].removeChild(n[k]);$$("div",{className:"U_MD_UI_Tree_add",innerHTML:"\u6dfb\u52a0\u65b0\u5206\u7c7b"},b[k]).onclick=function(){h(this,c,b,d,f,g,h,e,l,k)}};U.MD.UI.BTree.jsonAdd=function(a,c){var b=c.parentID;if("0"==b)return a[a.length]=c,a;for(var d=0;d<a.length;d++){if(a[d].id==b){a[d].child||(a[d].child=[]);a[d].child[a[d].child.length]=c;break}if(a[d].child){var f=U.MD.UI.BTree.jsonAdd(a[d].child,c);a[d].child=f}}return a};U.MD.UI.BTree.jsonStartA=function(a,c,b,d,f,g,h,e,l,k,m){json=[];for(var n=0;n<a.length;n++)U.MD.UI.BTree.jsonAdd(json,a[n]);g.innerHTML="";U.MD.UI.BTree.jsonStartRight(g,c,b,d,f,h,e,l,k,m)};U.MD.UI.BTree.jsonStartRight=function(a,c,b,d,f,g,h,e,l,k){a=$$("ul",{className:"U_MD_UI_Tree_a "},a);a=$$("li",{className:"U_MD_UI_Tree_listyle",yid:"1"},a);$$("img",{onerror:U.MD.C.imgError,src:e,className:"U_MD_UI_Tree_imgstyle"},a);$$("span",{innerHTML:"\u76ee\u5f55\u7ba1\u7406",className:"U_MD_UI_Tree_spanstyle"},a);a.onclick=function(){c(this);U.MD.UI.BTree.DirectoryCreate(json,g,h,0,function(a,d,c,f,e,g,h,l,k,t){if(b(a.pid)){json=U.MD.UI.BTree.jsonDelete(json,a.pid);var m=$("#"+a.pid)[0];m&&m.parentNode.remove();1==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,a.parentid),d,c,f,e,g,h,l,k,1,2);2==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,a.parentid),d,c,f,e,g,h,l,k,2);0==t&&U.MD.UI.BTree.DirectoryCreate(json,d,c,f,e,g,h,l,k,0)}},function(a,b,c,f,e,g,h,l,k,t){var m=d(U.MD.UI.BTree.jsonSelectA(json,a.pid));json=U.MD.UI.BTree.jsonUpdate(json,m);var n=$("#"+a.pid)[0];n&&(n.childNodes[0].src=m.img_url,n.childNodes[1].innerHTML=m.name);1==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,a.parentid),b,c,f,e,g,h,l,k,1,2);2==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,a.parentid),b,c,f,e,g,h,l,k,2);0==t&&U.MD.UI.BTree.DirectoryCreate(json,b,c,f,e,g,h,l,k,0)},function(a,b,d,e,g,h,l,k,w,t){var m={};m.parentID=a.parentNode.parentID;m.deep=a.parentNode.deep;a=f(m);var n;if(a){if(n=$(".U_MD_UI_Tree_a")[1])n=0==a.parentID?$(".U_MD_UI_Tree_a")[0].parentNode:$("#"+a.parentID)[0].parentNode,_js=[],_js[0]=a,U.MD.UI.BTree.treeCreate(_js,n,c);json=U.MD.UI.BTree.jsonAdd(json,a);1==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,m.parentID),b,d,e,g,h,l,k,w,1,2);2==t&&U.MD.UI.BTree.DirectoryCreate(U.MD.UI.BTree.JsonSelect(json,m.parentID),b,d,e,g,h,l,k,w,2);0==t&&U.MD.UI.BTree.DirectoryCreate(json,b,d,e,g,h,l,k,w,0)}},l,k,0)}};U.MD.UI.BTree.jsonStartLeft=function(a,c,b){json=[];for(var d=0;d<a.length;d++)U.MD.UI.BTree.jsonAdd(json,a[d]);c.innerHTML="";U.MD.UI.BTree.treeCreate(json,c,b)};U.MD.UI.BTree.jsonDelete=function(a,c){for(var b=0;b<a.length;b++)if(a[b].id==c){a.splice(b,1);break}else a[b].child&&(a[b].child=U.MD.UI.BTree.jsonDelete(a[b].child,c));return a};U.MD.UI.BTree.jsonSelectA=function(a,c){for(var b=0;b<a.length;b++){if(a[b].id==c)return a[b];if(a[b].child){var d=U.MD.UI.BTree.jsonSelectA(a[b].child,c);if(d)return d}}return!1};U.MD.UI.BTree.jsonUpdate=function(a,c){for(var b=0;b<a.length;b++){if(a[b].id==c.id)return a[b]=c,a;if(a[b].child){var d=U.MD.UI.BTree.jsonUpdate(a[b].child,c);if(d)return a[b].child=d,a}}return!1};U.MD.UI.BTree.createID=function(a){for(var c=0,b=0;b<a.length;b++)parseInt(a[b].id)>c&&(c=parseInt(a[b].id));return c};Namespace.register("U.MD.UI.editor");U.MD.UI.Editor=U.MD.UI.editor=function(a,c){U.UF.DL.asynLoadCss({rel:"stylesheet",type:"text/css",href:"/css/Controls/Complex/Editor.css"});U.MD.UI.editor.createEditor(a);U.UF.E.initEditor($(".editor",a)[0],c);U.MD.UI.editor.EditorEventBind(a);U.MD.UI.editor.operateJson.editor=$(".editor",a)[0];return U.MD.UI.editor.operateJson};U.MD.UI.editor.operateJson={loadContent:function(a){this.editor.focus();U.UF.E.onpaste(null,this.editor,a)},getContent:function(){return this.editor.innerHTML}};U.MD.UI.editor.createEditor=function(a){a.innerHTML='\x3cdiv class\x3d\'toolbar\' style\x3d"width: 788px;background-color: #f5f5f5;border: 1px solid #c7d3e1;line-height: 0;padding: 6px;height: 25px;"\x3e\n \x3cbutton class\x3d"last" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/left.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"future" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/right.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n\x3cdiv class\x3d\'setFont\' style\x3d\'float: left;margin: 0 3px;position: relative;padding:0px\'\x3e\x3c/div\x3e \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n\x3cdiv class\x3d\'setSize\' style\x3d\'float: left;margin: 0 3px;position: relative;padding:0px\'\x3e\x3c/div\x3e \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n \x3clabel style\x3d"float: left;margin: 0 3px;position: relative;"\x3e\n \x3cbutton class\x3d"pic" style\x3d"outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/pic.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cinput multiple accept\x3d\'image/*\' type\x3d\'file\' class\x3d\'picUpload\' style\x3d\'display: none;\' /\x3e\n \x3c/label\x3e\n \x3clabel style\x3d"float: left;margin: 0 3px;position: relative;"\x3e\n \x3cbutton class\x3d"attachment" style\x3d"outline: none;cursor: pointer;border: 1px solid transparent;width: 25px;height: 25px;background: url(/img/YS2017.png) no-repeat;background-position: -1054px -593.5px;"\x3e\x3c/button\x3e\n \x3cinput multiple\x3d"" type\x3d"file" class\x3d"attachmentUpload" style\x3d"display: none;"\x3e\n \x3c/label\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n \x3cdiv style\x3d"float: left;margin: 0 3px;position: relative;padding:0px"\x3e\n \x3cbutton class\x3d"fontColor" style\x3d"outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/fontColor.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cdiv class\x3d\'fontColorBar colorBar\' style\x3d\'display:none;position: absolute;\'\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n \x3cdiv style\x3d"float: left;margin: 0 3px;position: relative;padding:0px"\x3e\n \x3cbutton class\x3d"backgroundColor" style\x3d"outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/blockColor.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cdiv class\x3d\'backgroundColorBar colorBar\' style\x3d\'display:none;position: absolute;\'\x3e\n \x3c/div\x3e\n \x3c/div\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n \x3cbutton class\x3d"bIcon" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/strong.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"iIcon" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/i.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"UIcon" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/x.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"SIcon" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/-S-.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;"\x3e\n\n \x3c/i\x3e\n \x3cbutton class\x3d"textLeft" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/textLeft.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"textCenter" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/textCenter.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"textRight" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/textRight.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3ci style\x3d"display: inline-block;width: 1px;height: 22px;background-color: #bcbcbc;float: left;margin: 0 3px;position: relative;" \x3e\n\n \x3c/i\x3e\n \x3cbutton class\x3d"a" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/a.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"b" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/b.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3cbutton class\x3d"c" style\x3d"float: left;margin: 0 3px;position: relative;outline: none;cursor: pointer;border: 1px solid transparent;height: 25px;width: 25px;background: url(\'/EditorImage/c.png\') no-repeat center;"\x3e\n \x3c/button\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"editor" contenteditable\x3d"true" style\x3d"width: 800px;min-height: 300px;border: 1px solid #E6E5E5;overflow: auto;"\x3e\n \x3c/div\x3e';$('input.picUpload[type\x3d"file"]',a)[0].onchange=function(){U.UF.E.picture(this,$(".editor",a)[0])};$('input.attachmentUpload[type\x3d"file"]',a)[0].onchange=function(){U.UF.E.attachment(this,$(".editor",a)[0])}};U.MD.UI.editor.EditorEventBind=function(a){var c=U.MD.UI.Font();c.style.cssText+="vertical-align: super;";var b=U.MD.UI.WordSize();b.style.cssText+="vertical-align: super;";$(".setFont",a).append(c);c.onchange=function(){U.UF.E.setRangeStyle({"font-family":c.value})};$(".setSize",a).append(b);b.onchange=function(){U.UF.E.setRangeStyle({"font-size":b.value})};$(".pic",a)[0].onclick=function(){$(".picUpload",a)[0].click()};$(".attachment",a)[0].onclick=function(){$(".attachmentUpload",a)[0].click()};$(".bIcon",a)[0].onclick=function(){U.UF.E.setRangeStyle({"font-weight":"bold"})};$(".iIcon",a)[0].onclick=function(){U.UF.E.setRangeStyle({"font-style":"italic"})};$(".UIcon",a)[0].onclick=function(){U.UF.E.setRangeStyle({"text-decoration":"underline"})};$(".SIcon",a)[0].onclick=function(){U.UF.E.setRangeStyle({"text-decoration":"line-through"})};$(".fontColor",a).bind("click",function(){"none"==$(".fontColorBar",a).css("display")&&(U.MD.UI.colorPicker($(".fontColorBar",a)[0],function(b){$(".MD_ColorPicker",$(".fontColorBar",a)[0]).remove();$(".fontColorBar",a).hide();U.UF.E.setRangeStyle({color:b})}),$(".fontColorBar",a).show())});$(".backgroundColor",a).bind("click",function(){"none"==$(".backgroundColorBar",a).css("display")&&(U.MD.UI.colorPicker($(".backgroundColorBar",a)[0],function(b){$(".MD_ColorPicker",$(".backgroundColorBar",a)[0]).remove();$(".backgroundColorBar",a).hide();U.UF.E.setRangeStyle({backgroundColor:b})}),$(".backgroundColorBar",a).show())});$(".a",a).bind("click",function(){U.UF.E.addHref()});$(".c",a).bind("click",function(){U.UF.E.clearStyle(U.UF.E.getRangeAt())});$(".textLeft",a).bind("click",function(){U.UF.E.setLineStyle({"text-align":"left"})});$(".textCenter",a).bind("click",function(){U.UF.E.setLineStyle({"text-align":"center"})});$(".textRight",a).bind("click",function(){U.UF.E.setLineStyle({"text-align":"right"})})};U.MD.UI.editor.Select=function(a,c,b,d){var f="";c.id&&(f=c.id)&&delete c.id;d=$$("div",{id:f},d||null);var f=$$("div",c,d),g=$$("div",{},f);$$("div",{style:{cssText:"border-width: 6px 4px; border-style: solid; border-color: rgb(166, 178, 192) transparent transparent; width: 0; position: absolute; right: 4px; top: 50%; margin-top: -3px"}},f);var h=$$("div",{datacontent:"",style:{cssText:"display: none;position: absolute; margin-top:-1px; min-width: 100%; max-width: 280px; max-height: 200px ;border: 1px solid silver; overflow-x: hidden; cursor: pointer;"}},d),e;c.style&&!c.style.position?d.style.position="relative":"";c.style&&!c.style.textIndent?g.style.textIndent="6px":"";g.style.whiteSpace="pre";g.style.overflow="hidden";g.style.width=d.offsetWidth-15+"px";for(var l in a)$$("div",{value:l,innerText:a[l],style:{cssText:"padding: 4px 6px; background: #fff"},onmouseover:function(){this.style.background="#ccc"},onmouseout:function(){this.style.background="#fff"},onclick:function(){g.innerText=this.innerText;U.UF.E.reSelectRange(e);b(this.value||this.innerText)}},h);for(l in a){g.innerText=a[l];break}g.style.lineHeight=parseInt(g.style.height)+"px";d.onclick=function(){var a=this.querySelector("div[datacontent]");U.UF.E.reSelectRange(e);"block"===a.style.display?a.style.display="none":a.style.display="block"};$(document).bind("click",function(){"none"!=h.style.display&&(h.style.display="none");$(".BD_BorderPicker")[0]&&"none"!=$(".BD_BorderPicker")[0].style.display&&($(".BD_BorderPicker")[0].style.display="none")},!1);$(d).bind("click",function(a){U.UF.EV.stopBubble(a)});d.onmousedown=function(){e=U.UF.E.getRangeAt()};return d};Namespace.register("U.MD.UI.excel");Namespace.register("U.MD.R");U.MD.R.data={PID:"",AID:"",URL:"",PageIndex:1,PageSize:20,AllCount:"",CB:null};U.MD.R.reply=function(a){U.MD.R.login.cookieLogin(function(){var c=a.type,b=a.el,d=a.cb;U.MD.R.data.PID=a.pid;U.MD.R.data.AID=U.MD.R.reply.getUrlHash();U.MD.R.data.URL=U.MD.R.reply.getUrl();U.MD.R.data.CB=d;c||(b=(new U.UF.UI.form("",$$("div"),{style:{width:"800px",height:"800px"}})).content);U.MD.R.reply.init(b);U.UF.DL.asynLoadCss({href:"/css/Controls/Basic/Picture.css",type:"text/css",rel:"stylesheet"});U.UF.DL.asynLoadJs({type:"text/javascript",src:"/js/Controls/Basic/Picture.js"})})};U.MD.R.reply.init=function(a){var c=U.MD.R.data.PageIndex,b=U.MD.R.data.PageSize;U.MD.R.initPrintHtml(a);U.MD.R.getReplyData(c,b,function(a){U.MD.R.data.AllCount=a[0][0]?Math.ceil(a[0][0].allcount/U.MD.R.data.PageSize):"";U.MD.R.printComment($("#U_MD_R_content_user_comment")[0],1,a,!1,!1,!1);U.MD.R.initLoadMoreBtn(a[0])})};U.MD.R.reply.getUrl=function(){return window.location.href};U.MD.R.reply.getUrlHash=function(){return U.UF.EC.SparkMD5.hash(window.location.href)};U.MD.R.getReplyData=function(a,c,b){U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_Reply","test",U.MD.R.data.AID,"1","",a,c],function(a){b&&b(a.value)})};U.MD.R.initPrintHtml=function(a){var c,b,d,f;a=$$("div",{className:"U_MD_R_comment"},a);a=$$("div",{className:"U_MD_R_content"},a);c=$$("div",{className:"U_MD_R_content_operation"},a);b=$$("div",{className:"U_MD_R_content_operation_userhead U_MD_R_Reply_Header"},c);b=$$("img",{className:"img",src:"/img/UserHead/UseHead.jpg",onerror:function(){this.src="/img/UserHead/UseHead.jpg"}},b);d=$$("div",{className:"U_MD_R_content_operation_right",style:{width:"calc(100% - 40px - 20px )"}},c);$(d).attr({"data-RPID":null,"data-RD":1,"data-RPUID":null});c=$$("div",{innerHTML:"\u767b\u5f55/\u6ce8\u518c",className:"U_MD_R_content_operation_userlogin U_MD_R_Reply_Name"},d);US.userInfo.userid?(c.innerHTML=US.userInfo.UserName,b.src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead):c.onclick=function(){U.MD.R.login()};c=$$("div",{id:"editorbox",className:"U_MD_R_Reply_Content",contenteditable:"true",style:{"min-height":"100px",background:"#fff",border:"1px solid black"}},d);b=document.documentElement.scrollTop;U.UF.E.initEditor(c);document.documentElement.scrollTop=b;c=$$("div",{className:"U_MD_R_content_operation_right_bottom"},d);$$("div",{className:"U_MD_R_content_operation_right_bottom_emoji",onclick:function(){U.UF.EV.stopBubble();U.MD.UI.face(this,$("#editorbox")[0]);$("#U_MD_UI_face").css({position:"relative",height:"140px","overflow-y":"scroll",top:"-150px",width:"450px",display:"block"})}},c);b=$$("div",{className:"U_MD_R_content_operation_right_bottom_picturewarp"},c);$$("img",{src:"/img/reply/img.png"},b);b=$$("input",{type:"file"},b);$$("div",{className:"U_MD_R_content_operation_right_bottom_release",innerHTML:"\u53d1\u8868\u8bc4\u8bba"},c).onclick=function(){""!=$(".U_MD_R_Reply_Content")[0].textContent||""!=$(".U_MD_R_Reply_Content")[0].innerHTML?U.MD.R.release(d,1,!1,1):U.alert("\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a\uff01")};f=$$("div",{className:"U_MD_R_content_operation_right_bottom_imgloadbox U_MD_R_Reply_Image"},d);$$("div",{className:"U_MD_R_content_comment",id:"U_MD_R_content_user_comment"},a);b.onchange=function(){U.MD.R.uploadImages(this,f)};U.MD.R.data.CB&&U.MD.R.data.CB()};U.MD.R.initLoadMoreBtn=function(a){var c=$$("div",{className:"U_MD_R_content_loading"},$(".U_MD_R_comment")[0]);0<a.length&&U.MD.R.data.PageIndex<U.MD.R.data.AllCount&&(c.innerHTML="\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a\u8bc4\u8bba",c.onclick=function(){var a=++U.MD.R.data.PageIndex,d=U.MD.R.data.PageSize;U.MD.R.data.PageIndex<=U.MD.R.data.AllCount?U.MD.R.getReplyData(a,d,function(a){U.MD.R.data.AllCount=Math.ceil(a[0][0].allcount/U.MD.R.data.PageSize);U.MD.R.printComment($("#U_MD_R_content_user_comment")[0],1,a,!1,!1,!1)}):$(c).hide()})};U.MD.R.printComment=function(a,c,b,d,f,g){if(1==U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_Reply","Reply_SelectTypeReplyEnable",U.MD.R.data.PID]).value[0].ProjectReplyEnable)for(var h,e=0;e<b[0].length;e++)h=g?b[0][e].TopReplyNum:0<U.Json.select(b[2],{ReplyID:b[0][e].ReplyID}).length?U.Json.select(b[2],{ReplyID:b[0][e].ReplyID})[0].AllReplyNum:"0",U.MD.R.printCommentHtml(a,c,{rid:b[0][e].ReplyID,rpid:b[0][e].ReplyParentID,deep:b[0][e].ReplyDeep,topid:b[0][e].ReplyID,uid:b[0][e].UserID,un:b[0][e].UserName,tx:b[0][e].ReplyUserThumbnailImageHead,time:b[0][e].ReplyAddTime,content:b[0][e].ReplyContent,shownum:h,likesnum:2==c?U.Json.select(b[4],{ReplyID:b[0][e].ReplyID})[0]:U.Json.select(b[1],{ReplyID:b[0][e].ReplyID})[0]},d,f,g);else $$("div",{className:"U_MD_R_content_loading"},$(".U_MD_R_comment")[0]).innerHTML="\u8be5\u8bc4\u8bba\u7cfb\u7edf\u5df2\u5173\u95ed",$("#U_MD_R_content_loading")[0].innerHTML=""};U.MD.R.viewComment=function(a,c){if(US.userInfo.userid){var b,d,f,g,h;b=new U.UF.UI.form("",$$("div",{style:{padding:"20px"}}),{style:{width:"800px",height:"600px"}});U.A.Request("http://cd.1473.cn/php",["db.1473.cn","UseStudio_Reply","Reply_SelectThisReply",a],function(a){d=a.value;U.MD.R.printComment(b.content,2,d,!0,!0,!0);c&&$(b.content).find(".U_MD_R_content_box_content_edit").show();f=$$("div",{className:"U_MD_R_content_warp_box"},b.content);for(a=0;a<d[1].length;a++){g=U.MD.R.printCommentHtml(f,2,{rid:d[1][a].ReplyID,rpid:d[1][a].ReplyParentID,deep:d[1][a].ReplyDeep,topid:d[1][a].ReplyTopID,uid:d[1][a].UserID,tx:d[1][a].ReplyUserThumbnailImageHead,un:d[1][a].UserName,time:d[1][a].ReplyAddTime,content:d[1][a].ReplyContent,likesnum:U.Json.select(d[3],{ReplyID:d[1][a].ReplyID})[0]},!1,!0,!0);h=$$("div",{className:"U_MD_R_content_warp_box"},g);$(h).attr({"data-replyid":d[1][a].ReplyID});for(var e=0;e<d[2].length;e++)d[1][a].ReplyID==d[2][e].ReplyParentID&&U.MD.R.printCommentHtml(h,3,{rid:d[2][e].ReplyID,rpid:d[2][e].ReplyParentID,deep:d[2][e].ReplyDeep,topid:d[2][e].ReplyTopID,uid:d[2][e].UserID,tx:d[2][e].ReplyUserThumbnailImageHead,un:d[2][e].UserName,time:d[2][e].ReplyAddTime,content:d[2][e].ReplyContent,likesnum:U.Json.select(d[3],{ReplyID:d[2][e].ReplyID})[0],replyinfo:{uid:d[2][e].uid,un:d[2][e].un,tx:d[2][e].tx}},!1,!0,!0)}})}else U.Alert("\u8bf7\u5148\u767b\u5f55")};U.MD.R.printCommentHtml=function(a,c,b,d,f,g){var h=b.rid,e=b.rpid,l=b.deep,k=b.topid,m=b.uid,n=b.tx,q=b.un,p=b.time,u=b.content,r=b.likesnum;f=b.shownum;var x=b.replyinfo?b.replyinfo.un:"",v,w,t,y,z;b=$$("div",{className:"U_MD_R_content_box"});d?$(a).append(b,0,$(a)[0].firstChild):$(a).append(b);v=$$("div",{className:"U_MD_R_content_box_warp"},b);$(v).attr({"data-rid":h,"data-RPID":e,"data-RD":l,"data-RBID":k,"data-RPUID":m});a=$$("div",{className:"U_MD_R_content_box_userhead"},v);$$("img",{src:n,onerror:"U.MD.R.imgError(this)"},a);a=$$("div",{className:"U_MD_R_content_box_content",style:{width:"calc(100% - 40px - 20px )"}},v);d=$$("div",{className:"U_MD_R_content_box_content_top"},a);n=$$("div",{className:"U_MD_R_content_box_content_top_name",innerHTML:q},d);3==c&&(n.innerHTML=q+"\u56de\u590d@"+x);$$("div",{className:"U_MD_R_content_box_content_top_time",innerHTML:p},d);q=$$("div",{className:"U_MD_R_content_box_content_text",innerHTML:u},a);0<$(q).find("img").length&&($(q).find("img")[0].onclick=function(){U.MD.UI.picture([this.src],0);$("#U_MD_UI_PictureForm").css("position","fixed");U.UF.F.topWindow($("#U_MD_UI_PictureForm")[0],!0)});q=$$("div",{className:"U_MD_R_content_box_content_bottom"},a);p=$$("div",{className:"U_MD_R_content_box_content_bottom_likeswarp"},q);p.onclick=function(){U.MD.R.like(this,h,US.userInfo.userid)};w=$$("img",{src:"/img/reply/NOFabulous.png"},p);p=$$("div",{className:"U_MD_R_content_box_content_bottom_likeswarp_text",innerHTML:0},p);r&&(p.innerHTML=r.ReplyNum,U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_SelectRepeatLikes_Moblie",h,US.userInfo.userid],function(a){w.src=1==a.value[0].mode?"/img/reply/NOFabulous.png":0==a.value[0].mode?"/img/reply/Fabulous.png":"/img/reply/NOFabulous.png"}));r=$$("div",{className:"U_MD_R_content_box_content_bottom_replywarp"},q);r.onclick=g?function(){U.MD.R.subsetReply(this)}:function(){U.MD.R.viewComment(h,!0)};$$("img",{src:"/img/reply/reply.png"},r);$$("div",{innerHTML:"\u56de\u590d",className:"U_MD_R_content_box_content_bottom_replywarp_text"},r);1==c&&(r=$$("div",{className:"U_MD_R_content_box_content_bottom_showmorewarp"},q),$$("img",{src:"/img/reply/list.png"},r),q=$$("div",{className:"U_MD_R_content_box_content_bottom_showmore_text"},r),g?(q.className="U_MD_R_content_box_content_bottom_showmore_text U_MD_R_content_box_content_bottom_showmore_text_secondary",q.innerHTML=f?"\u5171\u6709\uff08\x3cspan\x3e"+f+"\x3c/span\x3e\uff09\u6761\u8bc4\u8bba":"\u6ca1\u6709\u8bc4\u8bba(\x3cspan\x3e0\x3c/span\x3e)"):(q.className="U_MD_R_content_box_content_bottom_showmore_text U_MD_R_content_box_content_bottom_showmore_text_important",q.innerHTML=f?"\u67e5\u770b\u66f4\u591a\uff08\x3cspan\x3e"+f+"\x3c/span\x3e\uff09":"\u67e5\u770b\u66f4\u591a(\x3cspan\x3e0\x3c/span\x3e\uff09",r.onclick=function(){U.MD.R.viewComment(h,!1)}));1==c&&!g&&$(".U_MD_R_content_loading")[0]&&(U.MD.R.data.PageIndex<U.MD.R.data.AllCount?$(".U_MD_R_content_loading")[0].innerHTML="\u70b9\u51fb\u52a0\u8f7d\u66f4\u591a\u8bc4\u8bba":$(".U_MD_R_content_loading").hide());if(2==c||3==c||1==c&&g)return g=$$("div",{className:"U_MD_R_content_box_content_edit",style:{display:"none"}},a),_replyinput=$$("div",{className:"U_MD_R_Reply_Content",contenteditable:"true"},g),f=$$("div",{className:"U_MD_R_content_operation_right_bottom"},g),$$("div",{className:"U_MD_R_content_operation_right_bottom_emoji",onclick:function(){U.UF.EV.stopBubble();U.MD.UI.face(this,_replyinput);$(this)[0].append($("#U_MD_UI_face")[0]);$("#U_MD_UI_face").css({position:"relative",height:"140px","overflow-y":"scroll",top:"-150px",width:"450px",display:"block"})}},f),r=$$("div",{className:"U_MD_R_content_operation_right_bottom_picturewarp"},f),$$("img",{src:"/img/reply/img.png"},r),r=$$("input",{type:"file"},r),r.onchange=function(){U.MD.R.uploadImages(this,y)},f=$$("div",{className:"U_MD_R_content_operation_right_bottom_release",innerHTML:"\u53d1\u8868\u8bc4\u8bba"},f),f.onclick=function(){1==c?t=2:2==c?t=3:3==c&&(t=4);U.MD.R.release(v,c,!1,t)},y=$$("div",{className:"U_MD_R_content_operation_right_bottom_imgloadbox U_MD_R_Reply_Image"},g),3!=c&&(z=$$("div",{className:"U_MD_R_content_comment"},b)),z};U.MD.R.uploadImages=function(a,c){var b,d,f=/.*(jpg|png|gif|jpeg|JPG|PNG|GIF|JPEG)$/;$(c)[0].innerHTML="";b=$$("div",{},c);$$("img",{src:"/img/Reply/loading.gif",style:{width:"100px",height:"100px","margin-right":"10px"}},b);U.UF.UP.inputUpload([a],"http://disk.1473.cn/USUpfile.ashx?typename\x3dUseStudioEditor\x26UserId\x3dFA92AAC5-4134-449F-9659-0DC12F4F68E9",function(a){d=a.value[0].split(".")[1];d.match(f)?($(b).remove(),b=$$("div",{className:"U_MD_R_content_operation_right_bottom_imgloadbox_warp"},c),$$("img",{src:"http://fs.1473.cn/"+a.value[0]},b),$$("div",{className:"closebtn",onclick:"U.MD.R.uploadImages.close(this)"},b),U.alert("\u4e0a\u4f20\u6210\u529f")):U.alert("\u8bf7\u4e0a\u4f20\u56fe\u7247\u6587\u4ef6")},[])};U.MD.R.uploadImages.close=function(a){$(a).Parent().remove()};U.MD.R.subsetReply=function(a){a=$($(a).Parent(2)).find(".U_MD_R_content_box_content_edit");"block"==a[0].style.display?a.hide():a.show()};U.MD.R.release=function(a,c,b,d){if(US.userInfo.userid){var f=a,g=c,h=$(f).find(".U_MD_R_Reply_Content")[0];c=$(f).find(".U_MD_R_Reply_Image");var e=US.userInfo.userid,l=US.userInfo.UserName,k="http://fs.1473.cn/"+US.userInfo.UserImageHead;if(""!=h.innerHTML.trim()||0<c.find("img").length){var m=Guid.newGuid(),n=$(a).attr("data-rid"),q=U.MD.R.data.PID,p=U.MD.R.data.AID,u="",r=US.userInfo.RegisterIP,x=U.MD.R.data.URL,v=$(a).attr("data-rd");$(a).attr("data-rbid");var w=$(a).attr("data-rpuid");1==d?v=1:2==d||3==d?v=parseInt($(a).attr("data-rd"))+1:(v=3,n=$(a).attr("data-rpid"));u=0<$(c).find("img").length?h.innerHTML.trim()+c.find("img")[0].outerHTML:h.innerHTML;U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_InsertReply",m,n,q,p,e,l,k,u,r,x,null,v,w,1,U.MD.R.getNowFormatDate()],function(a){a=a.value[0];var c,e,l=$("div[data-rid\x3d'"+a.ReplyParentID+"']").find(".U_MD_R_content_box_content_bottom_showmore_text_important span")[0];$("div[data-rid\x3d'"+a.ReplyParentID+"']").find(".U_MD_R_content_box_content_bottom_showmore_text_secondary span");$(f).find(".U_MD_R_Reply_Content")[0].innerHTML="";U.UF.E.initEditor($(f).find(".U_MD_R_Reply_Content")[0]);$(f).find(".U_MD_R_Reply_Image")[0].innerHTML="";1==d?(e=!1,c=!0,f=$("#U_MD_R_content_user_comment")[0]):(e=!0,_val=l.innerText,2==d&&(f=$(f).Parent().nextSibling,g=2,c=!0),3==d&&(f=0<$($(f)[0].nextSibling).find(".U_MD_R_content_warp_box").length?$($(f)[0].nextSibling).find(".U_MD_R_content_warp_box"):$$("div",{className:"U_MD_R_content_warp_box"},$($(f)[0].nextSibling)[0]),g=2),4==d&&(f=$($(f).Parent()).Parent(),g=3),l.innerText=++_val,$($(h).Parent()).hide());U.MD.R.printCommentHtml(f,g,{rid:a.ReplyID,rpid:a.ReplyParentID,deep:a.ReplyDeep,topid:a.ReplyTopID,uid:a.UserID,tx:a.ReplyUserThumbnailImageHead,un:a.UserName,time:U.MD.R.getNowFormatDate()+".0",content:a.ReplyContent,replyinfo:{uid:a.uid,un:a.un,tx:a.tx}},c,b,e);U.alert("\u8bc4\u8bba\u6210\u529f")})}else U.alert("\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9")}else U.Alert("\u8bf7\u5148\u767b\u5f55")};U.MD.R.like=function(a,c,b){US.userInfo.userid?U.A.Request("http://cd.1473.cn/net",["db.1473.cn","UseStudio_Reply","Reply_SelectRepeatLikes",c,b],function(b){var c=$(a).find("img")[0],d=$(a).find(".U_MD_R_content_box_content_bottom_likeswarp_text")[0],h=parseInt(d.innerHTML);0==b.value[0].mode?(c.src="/img/reply/NOFabulous.png",d.innerHTML=--h):(c.src="/img/reply/Fabulous.png",d.innerHTML=++h)}):U.Alert("\u8bf7\u5148\u767b\u5f55")};U.MD.R.imgError=function(a){$(a)[0].src="/img/UserHead/UseHead.jpg"};U.MD.R.login=function(){$("#U_MD_HomeC_Pop")[0]?U.UF.F.windowTopCenter($("#U_MD_HomeC_Pop")[0]):(U.UF.CD.loadPageCrossDomain(function(){}),U.MD.U.L.setLoginCallBack(function(){U.MD.R.login.cb()}))};U.MD.R.login.cookieLogin=function(a){U.UF.Cookie.get("usestudiosso")&&U.UF.Cookie.get("usestudiosso","userid")[0]?U.UF.CD.loadPageCrossDomain(function(){U.MD.U.L.loginCallBack=function(){a&&a();$(".U_MD_R_content_operation_userhead img")[0].src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead;$(".U_MD_R_content_operation_userlogin")[0].innerHTML=US.userInfo.UserName}}):a&&a()};U.MD.R.login.cb=function(){$(".U_MD_R_content_operation_userhead img")[0].src="http://fs.1473.cn/"+US.userInfo.UserThumbnailImageHead;$(".U_MD_R_content_operation_userlogin")[0].innerHTML=US.userInfo.UserName};U.MD.R.getNowFormatDate=function(){var a=new Date,c=a.getMonth()+1,b=a.getDate();1<=c&&9>=c&&(c="0"+c);0<=b&&9>=b&&(b="0"+b);return a.getFullYear()+"-"+c+"-"+b+" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()};Namespace.register("U.MD.UI.table");U.MD.UI.table=function(a,c,b,d){U.MD.UI.table.thead(a,c,b,d)};U.MD.UI.table.thead=function(a,c,b,d,f,g){f||(f=1,g=a.length);var h,e;d=$$("table",{style:{"text-align":"center",position:"relative",width:" 100%","border-collapse":" collapse","border-width":" 1px","border-style":" solid","border-color":" rgb(213, 213, 213)","border-image":" initial",display:"table"}},d);h=$$("thead",{},d);h=$$("tr",{},h);for(e in c)"object"===typeof c[e]?$$("th",{innerHTML:c[e].name,style:{cssText:b[e],padding:"10px 0","font-weight":"normal",border:"1px solid #d5d5d5"},id:"th"},h):$$("th",{innerHTML:c[e],style:{cssText:b[e],padding:"10px 0","font-weight":"normal",border:"1px solid #d5d5d5"},id:"th"},h);e=$$("tbody",{style:{cssText:"width:100%;"},id:"tbody"},d);U.MD.UI.table.tbody(e,a,c,b,f,g);return e};U.MD.UI.table.tbody=function(a,c,b,d,f,g){for(var h,e,l,k=(f-1)*g;k<f*g&&k<c.length;k++){h=0!=k%2?$$("tr",{style:{cssText:"background-color: #FFF;"},id:"tr"},a):$$("tr",{style:{cssText:"background-color: #dde4ee;"},id:"tr"},a);for(var m in b)if(e=$$("td",{id:"td"},h),b[m].content)for(var n=0;n<b[m].content.length;n++){if(l=U.MD.UI.table.printDiv(e,b[m].content[n]),b[m].content[n].onclick)U.MD.UI.table.onclick(l,c[k],b[m].content[n].onclick)}else l=$$("div",{innerHTML:c[k][m],style:{overflow:"hidden",cssText:d[m]}},e),b[m].id&&(l.id=c[k][b[m].id])}};U.MD.UI.table.pageTable=function(a,c,b,d,f,g){g=$$("div",{style:{left:"0px",right:"0px",width:"100%",margin:"0 auto",top:"200px"}},g);var h=$$("div",{},g),e=U.MD.UI.table.thead(a,c,b,h,f,d);g=$$("div",{style:{width:"650px",margin:"20px auto 0 auto"}},g);new U.UF.P.page(g,a.length,d,f,function(f){U.MD.UI.table.delChild(e);U.MD.UI.table.tbody(e,a,c,b,f,d)})};U.MD.UI.table.delChild=function(a){for(var c=a.children.length-1;0<=c;c--)a.removeChild(a.children[c])};U.MD.UI.table.onclick=function(a,c,b){a.onclick=function(){b(c)}};U.MD.UI.table.printDiv=function(a,c){var b;"string"==typeof c.name&&(b=$$("div",{innerHTML:c.name},a));"object"==typeof c.name&&(b=c.name.cloneNode(!0),a.appendChild(b));return b};Namespace.register("U.MD.UI.Tree");U.MD.UI.Tree=function(a,c,b,d){json=[];for(var f=0;f<a.length;f++)U.MD.UI.Tree.jsonAdd(json,a[f]);c.innerHTML="";U.MD.UI.Tree.treeCreate(json,c,b);c.oncontextmenu=function(a){a.preventDefault()};c.onmousedown=function(a){2==a.button&&d(a,b)}};U.MD.UI.Tree.treeCreate=function(a,c,b){for(var d=0;d<a.length;d++){var f=$$("ul",{className:"U_MD_UI_Tree_a "+a[d].parentID},c),g=$$("li",{id:a[d].id,parentid:a[d].parentid,className:"U_MD_UI_Tree_listyle",parentid:a[d].id,deep:a[d].deep},f),h=$$("img",{onerror:U.MD.C.imgError,src:a[d].img_url,className:"U_MD_UI_Tree_imgstyle"},g);$$("span",{innerHTML:a[d].name,className:"spanstyle"},g);f.style.display="none";"1"==a[d].deep&&(f.style.display="block");h.aa=!1;var e=document.getElementsByClassName("U_MD_UI_Tree_a "+a[d].parentID)[0];f.style.display=e.style.display;g.onclick=function(){b(this);e=document.getElementsByClassName("U_MD_UI_Tree_a "+this.parentid);if(!0===h.aa){h.aa=!1;for(var a=0;a<e.length;a++)e[a].style.display="none"}else for(h.aa=!0,a=0;a<e.length;a++)e[a].style.display="block"};a[d].child&&U.MD.UI.Tree.treeCreate(a[d].child,f,b)}};U.MD.UI.Tree.jsonAdd=function(a,c){var b=c.parentID;if("0"==b)return a[a.length]=c,a;for(var d=0;d<a.length;d++){if(a[d].id==b){a[d].child||(a[d].child=[]);a[d].child[a[d].child.length]=c;break}if(a[d].child){var f=U.MD.UI.Tree.jsonAdd(a[d].child,c);a[d].child=f}}return a};U.MD.UI.Tree.rightOnclick=function(a,c){var b=$$("li",{className:"U_MD_UI_Tree_rightli",innerHTML:"\u65b0\u5efa\u6587\u4ef6\u5939",parentid:c.path[1].parentid,deep:parseInt(c.path[1].deep)+1},a),d=$$("li",{className:"U_MD_UI_Tree_rightli",innerHTML:"\u91cd\u547d\u540d",parentid:c.path[1].parentid,deep:parseInt(c.path[1].deep)+1},a),f=$$("li",{className:"U_MD_UI_Tree_rightli",innerHTML:"\u5220\u9664",parentid:c.path[1].parentid,deep:parseInt(c.path[1].deep+1)},a),g=[];g[0]=b;g[1]=d;g[2]=f;return g};U.MD.UI.Tree.createID=function(a){for(var c=0,b=0;b<a.length;b++)parseInt(a[b].id)>c&&(c=parseInt(a[b].id));return c};Namespace.register("U.MD.UI.txt");