");var l=$("#pathRenameTextarea"),r=l.get(0);if("folder"==n)l.select();else{var c=s.length-n.length-1;if(Global.isIE){var d=r.createTextRange();d.moveEnd("character",-r.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else r.setSelectionRange(0,c)}l.unbind("focus").focus(),l.keydown(function(r){if(13==r.keyCode){r.preventDefault(),stopPP(r),e=l.attr("value"),"oexe"==n&&(e+=".oexe");var c=e;e!=s?(a=urlEncode(G.this_path+s),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){o(c)})})):("oexe"==n&&(s=s.replace(".oexe","")),$(i).find(".title").html(s))}27==r.keyCode&&("oexe"==n&&(s=s.replace(".oexe","")),$(i).find(".title").html(s))}),l.unbind("blur").blur(function(){e=$("#pathRenameTextarea").attr("value"),"oexe"==n&&(e+=".oexe");var l=e;e!=s?(a=urlEncode(G.this_path+s),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){o(l)})})):("oexe"==n&&(s=s.replace(".oexe","")),$(i).find(".title").html(s))})},_=function(){ui.f5(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)};return{appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var a=Global.fileListSelect.attr("data-app"),i=json_decode(urlDecode(a));i.path=G.this_path+fileLight.name(Global.fileListSelect),t.appEdit(i)}},appList:function(){t.appList(p().path)},appInstall:function(){t.appInstall(p().path)},openEditor:function(){a.openEditor(p().path)},openIE:function(){a.openIE(p().path)},download:function(){a.download(p().path)},open:function(e){if(void 0!=e)return a.open(e),void 0;var t=p(),i=Global.fileListSelect;if(inArray(core.filetype.image,t.type))return"icon"==G.list_type?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0;if("oexe"==t.type){var s=i.attr("data-app");t.path=json_decode(urlDecode(s))}a.open(t.path,t.type)},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var t=fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(G.this_path+fileLight.name($(this)));e.push(a)}}),a.play(e,"music")}},pathOperate:t,search:function(){core.search("",p().path)},fav:function(){t.fav(p().path)},remove:function(){t.remove(p(!0),_),fileLight.clear()},copy:function(){t.copy(p(!0))},cute:function(){t.cute(p(!0),ui.f5)},zip:function(){t.zip(p(!0),_)},unZip:function(){t.unZip(p().path,ui.f5)},cuteDrag:function(e){t.cuteDrag(p(!0),e,_)},copyDrag:function(e,a){t.copyDrag(p(!0),e,function(e){fileLight.clear(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){a&&o(e.data)})})},info:function(){t.info(p(!0))},past:function(){fileLight.clear(),t.past(G.this_path,function(e){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){o(e.data)})})},back:f,next:h,list:u,newFile:m,newFolder:v,rname:g,setSelectByChar:l,setSelectByFilename:o,clipboard:t.clipboard}}),define("app/common/pathOperate",["../tpl/fileinfo","../tpl/app"],function(e){var t=e("../tpl/fileinfo"),a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/ : * ? " < > |',!1),!1):!0},s=function(e){var t="list=[";for(var a in e)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',a!=e.length-1&&(t+=",");return t+"]"},n=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},o=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},l=function(e,t,a){e&&t&&e!=t&&i(core.pathThis(t))&&$.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},r=function(e,t){if(!(1>e.length)){var a=e[0].path;a.length>20&&(a=a.substr(-20)+"..."),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.5,content:a+"
"+LNG.remove_info+"【"+e.length+"】",ok:function(){$.ajax({url:"index.php?explorer/pathDelete",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},p=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)
+},error:core.ajaxError,success:function(e){e.code?core.tips.close(e.info):core.tips.close(e),"function"==typeof t&&t(e)}})}},u=function(e){if(1>e.length&&(e=[{path:G.this_path,type:"folder"}]),e.length>1)return f(e),void 0;e=e[0];var a="folder"==e.type?"path_info":"file_info";$.ajax({url:"index.php?explorer/pathInfo&type="+e.type+"&path="+urlEncode2(e.path),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(i){if(!i.code)return core.tips.close(i),void 0;core.tips.close(LNG.get_success,!0);var s=template.compile(t[a]);i.data.LNG=LNG,$.dialog({padding:5,fixed:!0,title:core.pathThis(e.path).substr(0,20)+"... "+LNG.info,content:s(i.data),width:"350px",cancel:!0})}})},f=function(e){$.ajax({url:"index.php?explorer/pathInfoMuti",type:"POST",data:s(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(e){if(!e.code)return core.tips.close(e),void 0;core.tips.close(LNG.get_success,!0);var a=template.compile(t.path_info_more);e.data.LNG=LNG,$.dialog({padding:5,fixed:!0,width:"350px",title:LNG.info,content:a(e.data),cancel:!0})}})},h=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,core.tips.tips(e),"function"==typeof t&&t(e)}})},m=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,"function"==typeof t&&t(e)}})}},v=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:s(e)+"&path="+urlEncode2(t),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code&&"function"==typeof a&&a(e)}})},g=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:s(e)+"&path="+urlEncode2(t),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code&&"function"==typeof a&&a(e)}})},_=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},y=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},b=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},N=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")})},x=function(t,a,i){var s,n,o,l=LNG.app_create,r=UUID(),c=e("../tpl/app"),d=G.basic_path+"static/images/app/",p=template.compile(c.html);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=json_decode(t)),"user_edit"==i||"root_edit"==i?(l=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:r,data:t})):o=p({LNG:LNG,iconPath:d,uuid:r,data:{}}),$.dialog({fixed:!0,width:450,height:310,id:r,padding:15,title:l,content:o,button:[{name:LNG.preview,callback:function(){var e=b(s);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=b(s);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);n="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":n="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":n="./index.php?app/add&name="+e.name;break;case"root_edit":n="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:n,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),s=$("."+r),t.group&&s.find("option").eq(t.group).attr("selected",1),s.find(".aui_content").css("overflow","inherit"),i){case"user_edit":s.find(".name").addClass("hidden"),s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":s.find("option[value="+t.group+"]").attr("selected",!0);break;default:}N(s)},k=function(){core.appStore()},w=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:e,desc:"",group:"others",type:"url",icon:"internet.png",name:a,resize:1,simple:0,height:"70%",width:"80%"},s=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+s,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:x,appList:k,appAddURL:w,newFile:n,newFolder:o,rname:l,unZip:m,zip:h,copy:c,cute:d,info:u,remove:r,cuteDrag:v,copyDrag:g,past:p,clipboard:_,fav:y}});var file_info="
{{LNG.file_type}}:
{{ext}} {{LNG.file}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info="
{{LNG.type}}:
{{LNG.folder}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.contain}}:
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info_more="
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.file}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.parent_permission}}:
{{mode}}
";define("app/tpl/fileinfo",[],function(){return{file_info:file_info,path_info:path_info,path_info_more:path_info_more}}),define("app/tpl/app",[],function(){return{html:"
{{LNG.app_group}}
{{LNG.app_group_others}} {{LNG.app_group_game}} {{LNG.app_group_tools}} {{LNG.app_group_reader}} {{LNG.app_group_movie}} {{LNG.app_group_music}} {{LNG.app_group_life}}
{{LNG.app_code}}
{{LNG.app_url}}
"}}),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("swf"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if("oexe"==t)return core.openApp(e),void 0;if("pdf"==t){var r="pdf"+UUID(),i=core.path2url(e),c='
";return $.dialog({resize:!0,fixed:!0,title:core.pathThis(e),width:800,height:400,padding:0,content:c}),new PDFObject({url:i}).embed(r),void 0}if("html"==t||"htm"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var i=urlDecode(e);return-1==e.indexOf("http:")&&(i=core.path2url(i)),MaskView.image(i),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=core.path2url(e);return l(i,t),void 0}if(inArray(core.filetype.doc,t)){var i=core.path2url(e);return o(i,t),void 0}return inArray(core.filetype.bindary,t)?(a(e),void 0):(n(e),void 0)}},a=function(e){if(e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e),a='
'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},i=function(e){if(void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a){if(e){void 0==a&&(a="openWindow"+UUID());var i="
";art.dialog.through({id:a,title:t,width:"70%",height:"65%",padding:0,content:i,resize:!0})}},n=function(e){if(e){var t=core.pathExt(e),a=core.pathThis(e);if(inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t))return core.tips.tips(t+LNG.edit_can_not,!1),void 0;if(void 0==window.top.frames.OpenopenEditor){var i="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e)),n=a+" ——"+LNG.edit;s(i,n.substring(n.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},o=function(e,t){var a,i,s;switch(t){case"doc":case"docx":case"docm":case"dot":a="http://sg1b-word-view.officeapps.live.com/wv/wordviewerframe.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"ppt":case"pptm":case"pptx":a="http://sg1b-powerpoint.officeapps.live.com/p/PowerPointFrame.aspx?PowerPointView=ReadingView&ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"xls":case"xlsb":case"xlsm":case"xlsx":a="http://sg1b-excel.officeapps.live.com/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;default:}i="http://sg1b-15-view-wopi.wopi.live.net:808/oh/wopi/files/@/wFileId?wFileId=",i+=urlEncode(e),s=a+urlEncode(i)+"&access_token=1&access_token_ttl=0";var n=core.pathThis(urlDecode(e));art.dialog.open(s,{title:n,width:"70%",height:"65%",resize:!0})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:n,openIE:i,download:a}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,n;"music_player"==t?(a=e[G.musictheme],i="music player",n=!1):(a=e[G.movietheme],i="movie player",n=!0);var o=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,title:i,width:a.width,height:a.height,content:o,resize:n,padding:0,fixed:!0,close:function(){var e=s(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,s;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),s=core.pathThis(e[t])):(i=e[t],s=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='
'}return a},s=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},n=function(e,t){var a=i(e),n=s(t);if(n){n.config("play_mode","normal");var o=n.list().length;n.list_xml(a,!0),n.sendEvent("view_play",o+1)}};return{changeTheme:function(t,a){var i,n,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=s(i),o&&(n=e[a],window.top.art.dialog.list[i+"_dialog"].size(n.width,n.height),o.sendEvent("skin_load","skins/"+n.path+".zip"))},play:function(e,i){var o=t(i),l=s(o);l?(n(e,o),window.top.art.dialog.list[o+"_dialog"].display(!0)):(a(o),setTimeout(function(){n(e,o)},1e3))}}});
\ No newline at end of file
diff --git a/static/js/app/src/edit/main.js b/static/js/app/src/edit/main.js
index cbab8e3..bdb7a22 100644
--- a/static/js/app/src/edit/main.js
+++ b/static/js/app/src/edit/main.js
@@ -1,2 +1,2 @@
-var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","./taskTap","./toolbar","./edit","./mode","../../common/core","../../tpl/search","../../tpl/upload"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),Editor=e("./edit"),core=e("../../common/core"),rightMenu=Tap.rightMenu,preview=Toolbar.preview,$(document).ready(function(){Tap.init(),Toolbar.init(),""!=G.frist_file&&Editor.add(G.frist_file),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){Editor.remove($(this).attr("uuid")),stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},a=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{close:{name:LNG.close,icon:"remove",accesskey:"d"},close_right:{name:LNG.close_right,icon:"remove-sign",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",accesskey:"o"},sep1:"--------",create:{name:LNG.newfile,icon:"plus",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",accesskey:"p"}},callback:function(e,t){var a=t.$trigger,i=a.attr("uuid");switch(e){case"close":Editor.remove();break;case"close_right":var s=$(".edit_tab .tabs .tab").index(a);$(".edit_tab .tabs .tab:gt("+s+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=i&&Editor.remove(e)});break;case"create":Editor.add();break;case"preview":Toolbar.doAction("preview");break;default:}}})},i=function(){var e,t,a,i,s=!1,o=!1,n=0,l=0,r=0,c=0,d=0,p=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),s=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return m(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}))});var u=function(i){o=!0,n=i.pageX,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),a=e.clone().addClass("draggable-dragging").prependTo("body"),c=parseInt(t.css("margin-right")),d=$tab_parent.width(),p=$tab_parent.get(0).getBoundingClientRect().left,p+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,r=parseInt(t.css("width"));var s=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),u=i.clientX-n+l;$("body").prepend("
"),a.css({width:r+"px",top:s,left:u}),e.css("opacity",0)},f=function(i){if(s){0==o&&u(i);var f=i.clientX-n+l;p>f||f>p+d-r||(a.css("left",f),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(f>t&&t+r/2+c>f){if(e.attr("uuid")==$(this).attr("uuid"))return;h($(this).attr("uuid"),"left")}if(f>t-r/2+c&&t>f){if(e.attr("uuid")==$(this).attr("uuid"))return;h($(this).attr("uuid"),"right")}}))}},h=function(a,s){if(!e.is(":animated")||i!=a){i=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var o=e.width(),n=$(".edit_tab .tab_"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(n).css("width","0px"):(e.before(n).css("width","0px"),n.before(l)),e.animate({width:o+"px"},animate_time),l.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},m=function(){s=!1,o=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(l=e.get(0).getBoundingClientRect().left,a.animate({left:l+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e,t,a){var i=1.5*animate_time,s=122,o=s,n=$(".edit_tab .tab"),l=$(".edit_tab .tabs").width()-4,r=parseInt(n.css("margin-right"))+parseInt(n.css("border-right")),c=parseInt($(".edit_tab .add").outerWidth())+2*r,d=n.length,p=Math.floor((l-c)/(s+r));switch(d>p&&(o=Math.floor((l-c)/d)-r),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:o}).animate({"margin-top":"0px"},i),n.animate({width:o+"px"},i);break;case"remove":void 0!=a&&Editor.select(a),t.animate({width:"0","margin-top":"+=30"},i,function(){t.remove()}),n.animate({width:o+"px"},i);break;case"resize":n.css("width",o+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:s,init:function(){$("body").live("resize",function(){s("resize")}),e(),i(),a(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,Editor.save()})}}}),define("app/src/edit/toolbar",[],function(){var e=function(){$(window).bind("resize",function(){i.resize()}),$("#fontsize li").mouseenter(function(){$(this).addClass("lihover"),$(this).unbind("click").click(function(){var e=$(this).text();$("a.font span").text(e),Editor.config("fontsize",e),$(".dropbox").css("display","none"),$("#fontsize li.this").removeClass("this"),$(this).addClass("this"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){$(this).toggleClass("lihover")}),$(".tools a[action=wordbreak],.tools a[action=display],.tools a[action=auto_complete]").bind("click",function(){$(this).toggleClass("select")}),$(".tools a").bind("click",function(){var e=$(this).attr("action");t(e),Editor.current()&&Editor.current().focus()}),$("#codetheme li").mouseenter(function(){$(this).addClass("lihover"),$(this).unbind("click").click(function(){var e=$(this).attr("theme");Editor.config("theme",e),$("a[action=codetheme] span").text($(this).html()),$(".dropbox").css("display","none"),$("#codetheme li.this").removeClass("this"),$(this).addClass("this")})}).mouseleave(function(){$(this).toggleClass("lihover")}),$(".tools .left a").tooltip({placement:"bottom"})},t=function(e){switch(e){case"max":FrameCall.father("core.editorFull","''");break;default:}if(Editor.current())switch(e){case"save":Editor.save();break;case"saveall":Editor.saveall();break;case"pre":Editor.current().undo();break;case"next":Editor.current().redo();break;case"find":Editor.current().execCommand("find");break;case"gotoline":Editor.current().commands.exec("gotoline",Editor.current());break;case"font":"block"==$("#fontsize").css("display")?$("#fontsize").fadeOut(100):$("#fontsize").fadeIn(100);break;case"codetheme":"block"==$("#codetheme").css("display")?$("#codetheme").fadeOut(100):$("#codetheme").fadeIn(100);break;case"wordbreak":Editor.config("wrap");break;case"display":Editor.config("display");break;case"setting":Editor.config("setting");break;case"auto_complete":Editor.config("auto_complete");break;case"preview":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),i.open(t);break;case"close":Editor.remove();break;default:}},a=function(){$(".frame_right input").keyEnter(i.refresh);var e=!1,t=0,a=0;$drag=$(".frame_right .resize"),$box_left=$(".frame_left"),$box=$drag.parent(),$drag.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(s(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){o(e)}),$(document).one("mouseup",function(e){return n(e),this.releaseCapture&&this.releaseCapture(),!1}),void 0)});var s=function(i){e=!0,t=i.pageX,a=$box.width(),$drag.addClass("resize_active"),$("body").css("cursor","col-resize"),$box.append('
')},o=function(i){if(!e)return!0;var s=i.pageX-t,o=a-s,n=$(window).width();o>=n-50&&(o=n-50),100>=o&&(o=100),$box_left.css("width",n-o).find(".edit_body").css("width",n-o),$box.width(o),Tap.resetWidth("resize"),Editor.config("resize")},n=function(){return e?(e=!1,$drag.removeClass("resize_active"),$("body").css("cursor","default"),$box.find(".mask_view").remove(),void 0):!1}},i=function(){var e=$(".frame_right"),t=$(".frame_left"),a=e.find("input"),s=400;return{open:function(t){if("block"!=e.css("display")){e.css("display","block").css("width",s);var o=$(window).width()-s;$(".frame_left").css("width",o).find(".edit_body").css("width",o)}a.val(t),e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t),i.resize()},resize:function(){if("block"==e.css("display")){var a=e.width(),i=$(window).width();a>=i-50&&(a=i-50),100>=a&&(a=100),e.width(a),t.css("width",i-a).find(".edit_body").css("width",i-a)}Tap.resetWidth("resize"),Editor.config("resize")},close:function(){e.css("display","none"),a.val(""),e.find("iframe").attr("src",""),$(".frame_left").css("width","100%").find(".edit_body").css("width","100%"),Tap.resetWidth("resize"),Editor.config("resize")},refresh:function(){var t=a.attr("value");e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t)}}}();return{preview:i,doAction:t,init:function(){e(),a()}}}),define("app/src/edit/edit",["./mode"],function(e){var t={theme:G.codetheme,auto_complete:!0,fontsize:14,wrap:!0,display:!1},a={},i=void 0,s=e("./mode");ace.require("ace/ext/language_tools");var o=function(e,t){if(void 0==t||void 0==e||1>a.length)return"";for(var i in a)if(a[i].kod[e]==t)return a[i].kod.uuid;return""},n=function(e){var t,i="id_"+UUID();if(void 0==e)return t={uuid:i,name:"newfile.txt",charset:"utf-8",filename:"",mode:s.get("txt")},l(t),r(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this"),void 0;t={charset:"utf-8",uuid:i,name:core.pathThis(urlDecode(urlDecode(e))),filename:e,mode:s.get(core.pathExt(urlDecode(e)))},l(t,!0);var o=art.dialog({title:!1,content:LNG.getting,icon:"warning"});$.ajax({dataType:"json",url:"./?editor/fileGet&filename="+e,error:function(){o.close(),v(t.uuid),Tips.tips(LNG.system_error,!1)},success:function(e){if(o.close(),!e.code)return Tips.tips(e),v(t.uuid),void 0;var s=e.data;a[i]=void 0,$("pre#"+i).text(s.content),r(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this");var n=a[i];n.kod.charset=s.charset,n.navigateTo(0),n.moveCursorTo(0,0)}})},l=function(e,t){var a='";$(a).insertBefore(".edit_tab .add");var i='
';if($(".edit_body .tabs").append(i),c(e.uuid),t){var s=animate_time;animate_time=1,Tap.resetWidth("add"),animate_time=s}else Tap.resetWidth("add")},r=function(e){var s=ace.edit(e.uuid);s.setTheme("ace/theme/"+t.theme),void 0!=e.mode&&s.getSession().setMode("ace/mode/"+e.mode),s.getSession().setTabSize(4),s.getSession().setUseSoftTabs(!0),s.getSession().setUseWrapMode(t.wrap),s.setShowPrintMargin(!1),s.setDragDelay(100),s.setShowInvisibles(t.display),s.setFontSize(t.fontsize),s.setOptions({enableBasicAutocompletion:t.auto_complete,enableSnippets:!0}),s.on("change",function(e){t.auto_complete&&2>s.multiSelect.rangeCount&&"insertText"==e.data.action&&s.commands.exec("startAutocomplete",s),u(s,!0)}),s.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){f(e.kod.uuid)}}),s.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){preview.open(),Toolbar.doAction("preview")}}),s.kod={uuid:e.uuid,name:e.name,charset:"ansii",filename:e.filename},a[e.uuid]=s,i=e.uuid,a[i].focus()},c=function(e,t){$(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,void 0!=a[e]&&a[e].focus(),1==t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.3},100).animate({opacity:.8},100).animate({opacity:.5},40).animate({opacity:1},40,function(){a[e].focus()})},d=function(e,t){void 0!=e&&""!=e&&(c(e,t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+e).addClass("this"))},p=function(e,i,s){var o=a;void 0!=s&&(o={},o[s]=a[s]);for(var n in o){var l=o[n];switch(e){case"resize":l.resize();break;case"theme":t[e]=i,l.setTheme("ace/theme/"+i);break;case"fontsize":t[e]=i,l.setFontSize(i);break;case"wrap":t[e]=!l.getSession().getUseWrapMode(),l.getSession().setUseWrapMode(t[e]);break;case"display":t[e]=!l.getShowInvisibles(),l.setShowInvisibles(t[e]);break;case"setting":l.commands.exec("showSettingsMenu",l);break;case"auto_complete":t[e]=!l.$enableBasicAutocompletion,l.$enableBasicAutocompletion=t[e];break;default:}}"theme"==e&&$.ajax({url:"?setting/set&k=codetheme&v="+i,dataType:"json",success:function(e){tips(e)}})},u=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},f=function(e,t){if(void 0!=i){void 0==e&&(e=i),void 0==t&&(t=!1);var s=a[e];if(s.hasChanged){if(void 0==s||""==s)return tips(LNG.data_error,"warning"),void 0;b().focus();var o=urlEncode2(s.getValue()),n=s.kod.filename;$.ajax({type:"POST",async:!1,dataType:"json",url:"?editor/fileSave",data:"path="+n+"&charset="+s.kod.charset+"&filestr="+o,beforeSend:function(){Tips.loading(LNG.sending)},error:core.ajaxError,success:function(a){Tips.close(a),a.code&&(u(s,!1),t&&v(e))}})}}},h=function(){for(var e in a)f(e)},m=function(e){if(void 0==e&&(e=i),void 0!=a[e]){var t=a[e];t.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:t.kod.name+"
"+LNG.if_save_file,padding:30,button:[{name:LNG.button_save,focus:!0,callback:function(){f(e,!0)}},{name:LNG.button_not_save,callback:function(){v(e)}},{name:LNG.button_cancle,callback:function(){b().focus()}}]}):v(e)}},v=function(e){delete a[e];var t="",i=$(".edit_tab .tab"),s=$(".edit_tab .tab_"+e),o=$(".edit_body pre#"+e);s.hasClass("this")?(i.length>1&&($(i[0]).attr("uuid")==e?t=$(i[1]).attr("uuid"):i.each(function(){var a=$(this).attr("uuid");return a==e?!1:(t=a,void 0)})),""!=t&&$(".edit_body pre#"+t).addClass("this"),o.remove(),Tap.resetWidth("remove",s,t)):(o.remove(),Tap.resetWidth("remove",s))},g=function(){for(var e in a)if(a[e].hasChanged)return!0;return!1},_=function(e){core.setSkin(e,"app_code_edit.css")},b=function(){return i&&a[i]?a[i]:!1};return{current:b,hasFileSave:g,config:p,setTheme:_,select:d,remove:m,save:f,saveall:h,add:function(e){var t=o("filename",e);""!=t?d(t,!0):n(e)}}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","tpl","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash",".bashrc"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","ini","log"],textile:["textile"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a}}),define("app/common/core",["../tpl/search","../tpl/upload"],function(require,exports){return{filetype:{music:["mp3","wma","wav","mid","aac","ogg","oga","midi","ram","ac3","aif","aiff","m3a","m4a","m4b","mka","mp1","mx3","mp2"],movie:["avi","flv","f4v","wmv","3gp","rmvb","mp4","rm","rmvb","flv","mkv","wmv","asf","avi","aiff","mp4","divx","dv","m4v","mov","mpeg","vob","mpg","mpv","ogm","ogv","qt"],image:["jpg","jpeg","png","bmp","gif","ico","tif","tiff","dib","rle"],code:["html","htm","js","css","less","scss","sass","py","php","rb","erl","lua","pl","c","cpp","m","h","java","jsp","cs","asp","sql","as","go","lsp","yml","json","tpl","xml","cmd","reg","bat","vbs","sh"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","ini","inc","inf","conf","oexe","md","htaccess","csv","log","asc","tsv"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf"]},contextmenu:function(e){rightMenu.hidden();var t=e||window.event;return t&&($.nodeName(t.target,"TEXTAREA")||$.nodeName(t.target,"INPUT"))?!0:void 0},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];return""==a&&(a=t[t.length-2]),a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),e.substring(0,G.public_path.length)==G.public_path)return G.app_host+"data/public/"+e.replace(G.public_path,"");if(G.is_root){if(e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.basic_path.replace(G.web_root,"")+"/";return t=G.web_host+t,t+"index.php?explorer/fileProxy&path="+urlEncode(e)}return G.web_host+G.web_root+e},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t='
'+e.responseText+"
",a=$.dialog.list.ajaxErrorDialog;a?a.content(t):$.dialog({id:"ajaxErrorDialog",fixed:!0,resize:!0,title:"ajax error",width:450,height:200,content:t})},setting:function(e){void 0==e&&(e=""),void 0==window.top.frames.Opensetting_mode?$.dialog.open("?setting#"+e,{id:"setting_mode",fixed:!0,resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,resize:!0,title:LNG.app_store,width:800,height:500})},openApp:function(app){if("url"==app.type)"number"!=typeof app.width&&-1==app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1==app.height.search("%")&&(app.height=parseInt(app.height)),$.dialog.open(app.content,{title:app.name,fixed:!0,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height});else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz");require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e){void 0==e&&(e=""),$.dialog.open("?/explorer&type=iframe&path="+e,{resize:!0,fixed:!0,title:LNG.ui_filemanage,width:880,height:550})},setSkin:function(e,t){var a="./../../../style/skin/"+e+t,i=G.static_path+"style/skin/"+e+t;require.async(a,function(){$("#link_css_list").attr("href",i),$("link[rel=stylesheet]").each(function(){var e=$(this).attr("href");e.substring(e.length-t.length)==t&&"link_css_list"!=$(this).attr("id")&&$(this).remove()})})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},createFlash:function(e,t,a){var i='
'+' '+' '+' '+' '+' '+" ";return i},search:function(e,t){var a,i,s=require("../tpl/search"),o=function(){var o=template.compile(s.html);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,resize:!0,title:LNG.search,width:450,content:o(i)}),r(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),n(),$.dialog.list.dialog_do_search.display(!0))},n=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},r(i)},l=function(){$("#search_value,#search_ext,#search_path").keyEnter(n),$(".search_header a.button").die("click").live("click",n),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},r=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");return e.search&&e.path?($.ajax({url:"index.php?explorer/search",dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'
').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s.list);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}}),void 0):(a.hide().html(LNG.search_info).fadeIn(t),void 0)};o()},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);uploader.option("server","index.php?explorer/fileUpload&path="+G.upload_path);var t=30>=e.length?e:"..."+e.substr(e.length-30);if(0!=$(".dialog_file_upload").length)return $(".file_upload .upload_path b").html(t),$.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload"),i=template.compile(a.html),s=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,height:430,resize:!0,id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:s}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .upload_path").tooltip({placement:"bottom",title:function(){return G.upload_path}}),$(".file_upload .upload_path b").html(t),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box .submit input").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},server_dwonload:function(e){var t=[];$(".list input").each(function(){""!=$(this).val()&&t.push($(this).val())}),core.tips.tips(t.length+LNG.server_dwonload_desc);for(var a=0;t.length>a;a++)$.ajax({url:"?explorer/serverDownload&save_path="+e+"&url="+urlEncode2(t[a]),dataType:"json",error:core.ajaxError,success:function(e){e.code&&FrameCall.father("ui.f5",""),core.tips.tips(e)}})},upload_init:function(){var e="#thelist",t="span.state";uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,fileSizeLimit:G.upload_max,resize:!1});var a=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){var i,s=$(e),i=t.fullPath;(void 0==i||"undefined"==i)&&(i=t.name),$(e).find(".item").length>0&&(s=$(e).find(".item:eq(0)"));var o='
'+'
'+i+' '+LNG.upload_ready+'
';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),a.push(t.name),uploader.upload()}).on("uploadProgress",function(e,a){var i=$("#"+e.id),s=i.find(".progress .progress-bar");s.length||(s=$('
').appendTo(i).find(".progress-bar")),i.find(t).text((100*a).toFixed(2)+"%"),s.css("width",100*a+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t}).on("uploadSuccess",function(e){var i=e.serverData;i.code?$("#"+e.id).find(t).text(i.data):$("#"+e.id).find(t).addClass("error").text(i.data),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut();var s=a;ui.f5_callback(function(){ui.path.setSelectByFilename(s)})}).on("uploadError",function(e){$("#"+e.id).find(t).addClass("error").text(LNG.upload_error)}).on("uploadFinished",function(){$(e).find(".item").delay(2e3).each(function(e){$(this).delay(300*e).slideUp(600)}),a=[],"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)}).on("error",function(){});var i;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),i&&window.clearTimeout(i)},dragLeave=function(e){stopPP(e),i&&window.clearTimeout(i),i=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){e=e.originalEvent||e;var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?(ui.path.pathOperate.appAddURL(t),console.log(t)):core.upload(),stopPP(e),inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/search",[],function(){var e="
{{LNG.name}} {{LNG.type}} {{LNG.size}} {{LNG.path}}
",t="{{each folderlist as v i}}
{{v.name}} {{LNG.folder}} 0 {{v.path}} {{/each}} {{each filelist as v i}}
{{v.name}} {{v.ext}} {{v.size_friendly}} {{v.path}} {{/each}}";return{html:e,list:t}}),define("app/tpl/upload",[],function(){return{html:"
{{LNG.save_path}}:
{{LNG.upload_select}}
{{LNG.upload_max_size}}:{{maxsize}}
"}
+var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","./taskTap","./toolbar","./edit","./mode","../../common/core","../../tpl/search","../../tpl/upload"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),Editor=e("./edit"),core=e("../../common/core"),rightMenu=Tap.rightMenu,preview=Toolbar.preview,Global={topbar_height:40,isIE:!-[1]},$(document).ready(function(){Tap.init(),Toolbar.init(),""!=G.frist_file&&Editor.add(G.frist_file),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){Editor.remove($(this).attr("uuid")),stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},a=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{close:{name:LNG.close,icon:"remove",accesskey:"d"},close_right:{name:LNG.close_right,icon:"remove-sign",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",accesskey:"o"},sep1:"--------",create:{name:LNG.newfile,icon:"plus",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",accesskey:"p"}},callback:function(e,t){var a=t.$trigger,i=a.attr("uuid");switch(e){case"close":Editor.remove();break;case"close_right":var s=$(".edit_tab .tabs .tab").index(a);$(".edit_tab .tabs .tab:gt("+s+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=i&&Editor.remove(e)});break;case"create":Editor.add();break;case"preview":Toolbar.doAction("preview");break;default:}}})},i=function(){var e,t,a,i,s=!1,o=!1,n=0,l=0,r=0,c=0,d=0,p=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),s=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return m(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}))});var u=function(i){o=!0,n=i.pageX,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),a=e.clone().addClass("draggable-dragging").prependTo("body"),c=parseInt(t.css("margin-right")),d=$tab_parent.width(),p=$tab_parent.get(0).getBoundingClientRect().left,p+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,r=parseInt(t.css("width"));var s=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),u=i.clientX-n+l;$("body").prepend("
"),a.css({width:r+"px",top:s,left:u}),e.css("opacity",0)},f=function(i){if(s){0==o&&u(i);var f=i.clientX-n+l;p>f||f>p+d-r||(a.css("left",f),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(f>t&&t+r/2+c>f){if(e.attr("uuid")==$(this).attr("uuid"))return;h($(this).attr("uuid"),"left")}if(f>t-r/2+c&&t>f){if(e.attr("uuid")==$(this).attr("uuid"))return;h($(this).attr("uuid"),"right")}}))}},h=function(a,s){if(!e.is(":animated")||i!=a){i=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var o=e.width(),n=$(".edit_tab .tab_"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(n).css("width","0px"):(e.before(n).css("width","0px"),n.before(l)),e.animate({width:o+"px"},animate_time),l.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},m=function(){s=!1,o=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(l=e.get(0).getBoundingClientRect().left,a.animate({left:l+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e,t,a){var i=1.5*animate_time,s=122,o=s,n=$(".edit_tab .tab"),l=$(".edit_tab .tabs").width()-4,r=parseInt(n.css("margin-right"))+parseInt(n.css("border-right")),c=parseInt($(".edit_tab .add").outerWidth())+2*r,d=n.length,p=Math.floor((l-c)/(s+r));switch(d>p&&(o=Math.floor((l-c)/d)-r),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:o}).animate({"margin-top":"0px"},i),n.animate({width:o+"px"},i);break;case"remove":void 0!=a&&Editor.select(a),t.animate({width:"0","margin-top":"+=30"},i,function(){t.remove()}),n.animate({width:o+"px"},i);break;case"resize":n.css("width",o+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:s,init:function(){$("body").live("resize",function(){s("resize")}),e(),i(),a(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,Editor.save()})}}}),define("app/src/edit/toolbar",[],function(){var e=function(){$(window).bind("resize",function(){i.resize()}),$("#fontsize li").mouseenter(function(){$(this).addClass("lihover"),$(this).unbind("click").click(function(){var e=$(this).text();$("a.font span").text(e),Editor.config("fontsize",e),$(".dropbox").css("display","none"),$("#fontsize li.this").removeClass("this"),$(this).addClass("this"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){$(this).toggleClass("lihover")}),$(".tools a[action=wordbreak],.tools a[action=display],.tools a[action=auto_complete]").bind("click",function(){$(this).toggleClass("select")}),$(".tools a").bind("click",function(){var e=$(this).attr("action");t(e),Editor.current()&&Editor.current().focus()}),$("#codetheme li").mouseenter(function(){$(this).addClass("lihover"),$(this).unbind("click").click(function(){var e=$(this).attr("theme");Editor.config("theme",e),$("a[action=codetheme] span").text($(this).html()),$(".dropbox").css("display","none"),$("#codetheme li.this").removeClass("this"),$(this).addClass("this")})}).mouseleave(function(){$(this).toggleClass("lihover")}),$(".tools .left a").tooltip({placement:"bottom"})},t=function(e){switch(e){case"max":FrameCall.father("core.editorFull","''");break;default:}if(Editor.current())switch(e){case"save":Editor.save();break;case"saveall":Editor.saveall();break;case"pre":Editor.current().undo();break;case"next":Editor.current().redo();break;case"find":Editor.current().execCommand("find");break;case"gotoline":Editor.current().commands.exec("gotoline",Editor.current());break;case"font":"block"==$("#fontsize").css("display")?$("#fontsize").fadeOut(100):$("#fontsize").fadeIn(100);break;case"codetheme":"block"==$("#codetheme").css("display")?$("#codetheme").fadeOut(100):$("#codetheme").fadeIn(100);break;case"wordbreak":Editor.config("wrap");break;case"display":Editor.config("display");break;case"setting":Editor.config("setting");break;case"auto_complete":Editor.config("auto_complete");break;case"preview":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),i.open(t);break;case"close":Editor.remove();break;default:}},a=function(){$(".frame_right input").keyEnter(i.refresh);var e=!1,t=0,a=0;$drag=$(".frame_right .resize"),$box_left=$(".frame_left"),$box=$drag.parent(),$drag.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(s(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){o(e)}),$(document).one("mouseup",function(e){return n(e),this.releaseCapture&&this.releaseCapture(),!1}),void 0)});var s=function(i){e=!0,t=i.pageX,a=$box.width(),$drag.addClass("resize_active"),$("body").css("cursor","col-resize"),$box.append('
')},o=function(i){if(!e)return!0;var s=i.pageX-t,o=a-s,n=$(window).width();o>=n-50&&(o=n-50),100>=o&&(o=100),$box_left.css("width",n-o).find(".edit_body").css("width",n-o),$box.width(o),Tap.resetWidth("resize"),Editor.config("resize")},n=function(){return e?(e=!1,$drag.removeClass("resize_active"),$("body").css("cursor","default"),$box.find(".mask_view").remove(),void 0):!1}},i=function(){var e=$(".frame_right"),t=$(".frame_left"),a=e.find("input"),s=400;return{open:function(t){if("block"!=e.css("display")){e.css("display","block").css("width",s);var o=$(window).width()-s;$(".frame_left").css("width",o).find(".edit_body").css("width",o)}a.val(t),e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t),i.resize()},resize:function(){if("block"==e.css("display")){var a=e.width(),i=$(window).width();a>=i-50&&(a=i-50),100>=a&&(a=100),e.width(a),t.css("width",i-a).find(".edit_body").css("width",i-a)}Tap.resetWidth("resize"),Editor.config("resize")},close:function(){e.css("display","none"),a.val(""),e.find("iframe").attr("src",""),$(".frame_left").css("width","100%").find(".edit_body").css("width","100%"),Tap.resetWidth("resize"),Editor.config("resize")},refresh:function(){var t=a.attr("value");e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t)}}}();return{preview:i,doAction:t,init:function(){e(),a()}}}),define("app/src/edit/edit",["./mode"],function(e){var t={theme:G.codetheme,auto_complete:!0,fontsize:14,wrap:!0,display:!1},a={},i=void 0,s=e("./mode");ace.require("ace/ext/language_tools");var o=function(e,t){if(void 0==t||void 0==e||1>a.length)return"";for(var i in a)if(a[i].kod[e]==t)return a[i].kod.uuid;return""},n=function(e){var t,i="id_"+UUID();if(void 0==e)return t={uuid:i,name:"newfile.txt",charset:"utf-8",filename:"",mode:s.get("txt")},l(t),r(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this"),void 0;t={charset:"utf-8",uuid:i,name:core.pathThis(urlDecode(urlDecode(e))),filename:e,mode:s.get(core.pathExt(urlDecode(e)))},l(t,!0);var o=art.dialog({title:!1,content:LNG.getting,icon:"warning"});$.ajax({dataType:"json",url:"./index.php?editor/fileGet&filename="+e,error:function(e,a,i){o.close(),v(t.uuid),core.ajaxError(e,a,i)},success:function(e){if(o.close(),!e.code)return Tips.tips(e),v(t.uuid),void 0;var s=e.data;a[i]=void 0,$("pre#"+i).text(s.content),r(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this");var n=a[i];n.kod.charset=s.charset,n.navigateTo(0),n.moveCursorTo(0,0)}})},l=function(e,t){var a='";$(a).insertBefore(".edit_tab .add");var i='
';if($(".edit_body .tabs").append(i),c(e.uuid),t){var s=animate_time;animate_time=1,Tap.resetWidth("add"),animate_time=s}else Tap.resetWidth("add")},r=function(e){var s=ace.edit(e.uuid);s.setTheme("ace/theme/"+t.theme),void 0!=e.mode&&s.getSession().setMode("ace/mode/"+e.mode),s.getSession().setTabSize(4),s.getSession().setUseSoftTabs(!0),s.getSession().setUseWrapMode(t.wrap),s.setShowPrintMargin(!1),s.setDragDelay(100),s.setShowInvisibles(t.display),s.setFontSize(t.fontsize),s.setOptions({enableBasicAutocompletion:t.auto_complete,enableSnippets:!0}),s.on("change",function(e){t.auto_complete&&2>s.multiSelect.rangeCount&&"insertText"==e.data.action&&s.commands.exec("startAutocomplete",s),u(s,!0)}),s.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){f(e.kod.uuid)}}),s.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){preview.open(),Toolbar.doAction("preview")}}),s.kod={uuid:e.uuid,name:e.name,charset:"ansii",filename:e.filename},a[e.uuid]=s,i=e.uuid,a[i].focus()},c=function(e,t){$(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,void 0!=a[e]&&a[e].focus(),1==t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.3},100).animate({opacity:.8},100).animate({opacity:.5},40).animate({opacity:1},40,function(){a[e].focus()})},d=function(e,t){void 0!=e&&""!=e&&(c(e,t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+e).addClass("this"))},p=function(e,i,s){var o=a;void 0!=s&&(o={},o[s]=a[s]);for(var n in o){var l=o[n];switch(e){case"resize":l.resize();break;case"theme":t[e]=i,l.setTheme("ace/theme/"+i);break;case"fontsize":t[e]=i,l.setFontSize(i);break;case"wrap":t[e]=!l.getSession().getUseWrapMode(),l.getSession().setUseWrapMode(t[e]);break;case"display":t[e]=!l.getShowInvisibles(),l.setShowInvisibles(t[e]);break;case"setting":l.commands.exec("showSettingsMenu",l);break;case"auto_complete":t[e]=!l.$enableBasicAutocompletion,l.$enableBasicAutocompletion=t[e];break;default:}}"theme"==e&&$.ajax({url:"./index.php?setting/set&k=codetheme&v="+i,dataType:"json",success:function(e){tips(e)}})},u=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},f=function(e,t){if(void 0!=i){void 0==e&&(e=i),void 0==t&&(t=!1);var s=a[e];if(s.hasChanged){if(void 0==s||""==s)return tips(LNG.data_error,"warning"),void 0;b().focus();var o=urlEncode2(s.getValue()),n=s.kod.filename;$.ajax({type:"POST",async:!1,dataType:"json",url:"./index.php?editor/fileSave",data:"path="+n+"&charset="+s.kod.charset+"&filestr="+o,beforeSend:function(){Tips.loading(LNG.sending)},error:core.ajaxError,success:function(a){Tips.close(a),a.code&&(u(s,!1),t&&v(e))}})}}},h=function(){for(var e in a)f(e)},m=function(e){if(void 0==e&&(e=i),void 0!=a[e]){var t=a[e];t.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:t.kod.name+"
"+LNG.if_save_file,padding:30,button:[{name:LNG.button_save,focus:!0,callback:function(){f(e,!0)}},{name:LNG.button_not_save,callback:function(){v(e)}},{name:LNG.button_cancle,callback:function(){b().focus()}}]}):v(e)}},v=function(e){delete a[e];var t="",i=$(".edit_tab .tab"),s=$(".edit_tab .tab_"+e),o=$(".edit_body pre#"+e);s.hasClass("this")?(i.length>1&&($(i[0]).attr("uuid")==e?t=$(i[1]).attr("uuid"):i.each(function(){var a=$(this).attr("uuid");return a==e?!1:(t=a,void 0)})),""!=t&&$(".edit_body pre#"+t).addClass("this"),o.remove(),Tap.resetWidth("remove",s,t)):(o.remove(),Tap.resetWidth("remove",s))},g=function(){for(var e in a)if(a[e].hasChanged)return!0;return!1},_=function(e){core.setSkin(e,"app_code_edit.css")},b=function(){return i&&a[i]?a[i]:!1};return{current:b,hasFileSave:g,config:p,setTheme:_,select:d,remove:m,save:f,saveall:h,add:function(e){var t=o("filename",e);""!=t?d(t,!0):n(e)}}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","tpl","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash",".bashrc"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","ini","log"],textile:["textile"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a}}),define("app/common/core",["../tpl/search","../tpl/upload"],function(require,exports){return{filetype:{music:["mp3","wma","wav","mid","aac","ogg","oga","midi","ram","ac3","aif","aiff","m3a","m4a","m4b","mka","mp1","mx3","mp2"],movie:["avi","flv","f4v","wmv","3gp","rmvb","mp4","rm","rmvb","flv","mkv","wmv","asf","avi","aiff","mp4","divx","dv","m4v","mov","mpeg","vob","mpg","mpv","ogm","ogv","qt"],image:["jpg","jpeg","png","bmp","gif","ico","tif","tiff","dib","rle"],code:["html","htm","js","css","less","scss","sass","py","php","rb","erl","lua","pl","c","cpp","m","h","java","jsp","cs","asp","sql","as","go","lsp","yml","json","tpl","xml","cmd","reg","bat","vbs","sh"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","ini","inc","inf","conf","oexe","md","htaccess","csv","log","asc","tsv"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf"]},contextmenu:function(e){rightMenu.hidden();var t=e||window.event;return t&&($.nodeName(t.target,"TEXTAREA")||$.nodeName(t.target,"INPUT"))?!0:void 0},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];return""==a&&(a=t[t.length-2]),a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),e.substring(0,G.public_path.length)==G.public_path)return G.app_host+"data/public/"+e.replace(G.public_path,"");if(G.is_root){if(e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.basic_path.replace(G.web_root,"")+"/";return t=G.web_host+t,t+"index.php?explorer/fileProxy&path="+urlEncode(e)}return G.web_host+G.web_root+e},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='
'+t+"
",i=$.dialog.list.ajaxErrorDialog;return""==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",fixed:!0,resize:!0,title:"ajax error",width:450,height:200,content:a}),void 0)},setting:function(e){void 0==e&&(e=""),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,resize:!0,title:LNG.app_store,width:800,height:500})},openApp:function(app){if("url"==app.type)"number"!=typeof app.width&&-1==app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1==app.height.search("%")&&(app.height=parseInt(app.height)),$.dialog.open(app.content,{title:app.name,fixed:!0,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height});else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz");require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e){void 0==e&&(e=""),$.dialog.open("?/explorer&type=iframe&path="+e,{resize:!0,fixed:!0,title:LNG.ui_filemanage,width:880,height:550})},setSkin:function(e,t){var a="./../../../style/skin/"+e+t,i=G.static_path+"style/skin/"+e+t;require.async(a,function(){$("#link_css_list").attr("href",i),$("link[rel=stylesheet]").each(function(){var e=$(this).attr("href");e.substring(e.length-t.length)==t&&"link_css_list"!=$(this).attr("id")&&$(this).remove()})})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},createFlash:function(e,t,a){var i='
'+' '+' '+' '+' '+' '+" ";return i},search:function(e,t){var a,i,s=require("../tpl/search"),o=function(){var o=template.compile(s.html);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,resize:!0,title:LNG.search,width:450,content:o(i)}),r(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),n(),$.dialog.list.dialog_do_search.display(!0))},n=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},r(i)},l=function(){$("#search_value,#search_ext,#search_path").keyEnter(n),$(".search_header a.button").die("click").live("click",n),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},r=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");return e.search&&e.path?1>=e.search.length?(a.hide().html("too short!").fadeIn(t),void 0):($.ajax({url:"index.php?explorer/search",dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'
').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s.list);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}}),void 0):(a.hide().html(LNG.search_info).fadeIn(t),void 0)};o()},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);uploader.option("server","index.php?explorer/fileUpload&path="+G.upload_path);var t=30>=e.length?e:"..."+e.substr(e.length-30);if(0!=$(".dialog_file_upload").length)return $(".file_upload .upload_path b").html(t),$.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload"),i=template.compile(a.html),s=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,height:430,resize:!0,id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:s}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .upload_path").tooltip({placement:"bottom",title:function(){return G.upload_path}}),$(".file_upload .upload_path b").html(t),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box .submit input").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},server_dwonload:function(e){var t=[];$(".list input").each(function(){""!=$(this).val()&&t.push($(this).val())}),core.tips.tips(t.length+LNG.server_dwonload_desc);for(var a=0;t.length>a;a++)$.ajax({url:"./index.php?explorer/serverDownload&save_path="+e+"&url="+urlEncode2(t[a]),dataType:"json",error:core.ajaxError,success:function(e){e.code&&FrameCall.father("ui.f5",""),core.tips.tips(e)}})},upload_init:function(){var e="#thelist",t="span.state";uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,fileSizeLimit:G.upload_max,resize:!1});var a=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){var i,s=$(e),i=t.fullPath;(void 0==i||"undefined"==i)&&(i=t.name),$(e).find(".item").length>0&&(s=$(e).find(".item:eq(0)"));var o='
'+'
'+i+' '+LNG.upload_ready+'
';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),a.push(t.name),uploader.upload()}).on("uploadProgress",function(e,a){var i=$("#"+e.id),s=i.find(".progress .progress-bar");s.length||(s=$('
').appendTo(i).find(".progress-bar")),i.find(t).text((100*a).toFixed(2)+"%"),s.css("width",100*a+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t}).on("uploadSuccess",function(e){var i=e.serverData;i.code?$("#"+e.id).find(t).text(i.data):$("#"+e.id).find(t).addClass("error").text(i.data),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut();var s=a;ui.f5_callback(function(){ui.path.setSelectByFilename(s)})}).on("uploadError",function(e){$("#"+e.id).find(t).addClass("error").text(LNG.upload_error)}).on("uploadFinished",function(){$(e).find(".item").delay(2e3).each(function(e){$(this).delay(300*e).slideUp(600)}),a=[],"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)}).on("error",function(){});var i;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),i&&window.clearTimeout(i)},dragLeave=function(e){stopPP(e),i&&window.clearTimeout(i),i=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){e=e.originalEvent||e;var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?(ui.path.pathOperate.appAddURL(t),console.log(t)):core.upload(),stopPP(e),inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/search",[],function(){var e="
{{LNG.name}} {{LNG.type}} {{LNG.size}} {{LNG.path}}
",t="{{each folderlist as v i}}
{{v.name}} {{LNG.folder}} 0 {{v.path}} {{/each}} {{each filelist as v i}}
{{v.name}} {{v.ext}} {{v.size_friendly}} {{v.path}} {{/each}}";return{html:e,list:t}}),define("app/tpl/upload",[],function(){return{html:"
{{LNG.save_path}}:
{{LNG.upload_select}}
{{LNG.upload_max_size}}:{{maxsize}}
"}
});
\ No newline at end of file
diff --git a/static/js/app/src/editor/main.js b/static/js/app/src/editor/main.js
index 515a32e..14704c3 100644
--- a/static/js/app/src/editor/main.js
+++ b/static/js/app/src/editor/main.js
@@ -1,3 +1,3 @@
-define("app/src/editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/search","../../tpl/upload","../../common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo","../../tpl/app","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"index.php?explorer/treeList&app=editor"},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree,$(document).ready(function(){ui.init(),TaskTap.init(),core.update(),rightMenu.initEditor(),$(".init_loading").fadeOut(600)})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("click").live("click",function(){var e=$(this).attr("id"),t=art.dialog.list[e],a=$("."+e);"hidden"!=a.css("visibility")?t.display(!1):t.display(!0)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},s=function(){var e,t,i,s,o=!1,n=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(){e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1})});var f=function(a){n=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));var s=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("
"),i.css({width:c+"px",top:s,left:o}),e.css("opacity",0)},h=function(a){if(o){0==n&&f(a);var s=a.clientX-r+l;u>s||s>u+p-c||(i.css("left",s),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(s>t&&t+c/2+d>s){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(s>t-c/2+d&&t>s){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,o){if(!e.is(":animated")||s!=i){s=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var n=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==o?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:n+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,n=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},o=function(e){var t=110,i=t,s=t+12,o=$(".task_tab .tab"),n=$(".task_tab .tabs").width()-50,r=o.length,l=Math.floor(n/s);switch(r>l&&(i=Math.floor(n/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":o.animate({width:i+"px"},a);break;case"resize":o.css("width",i+"px");break;default:}},n=function(t,a){$(".task_tab").removeClass("hidden");var i='";$(i).insertBefore(".task_tab .last"),o("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),o("close"),0==$(".tabs .tab").length&&$(".task_tab").addClass("hidden")})};return{add:n,focus:r,close:l,init:function(){var e='
';$(e).appendTo("body"),$(window).bind("resize",function(){o("resize")}),i(),s()}}}),define("app/common/core",["../tpl/search","../tpl/upload"],function(require,exports){return{filetype:{music:["mp3","wma","wav","mid","aac","ogg","oga","midi","ram","ac3","aif","aiff","m3a","m4a","m4b","mka","mp1","mx3","mp2"],movie:["avi","flv","f4v","wmv","3gp","rmvb","mp4","rm","rmvb","flv","mkv","wmv","asf","avi","aiff","mp4","divx","dv","m4v","mov","mpeg","vob","mpg","mpv","ogm","ogv","qt"],image:["jpg","jpeg","png","bmp","gif","ico","tif","tiff","dib","rle"],code:["html","htm","js","css","less","scss","sass","py","php","rb","erl","lua","pl","c","cpp","m","h","java","jsp","cs","asp","sql","as","go","lsp","yml","json","tpl","xml","cmd","reg","bat","vbs","sh"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","ini","inc","inf","conf","oexe","md","htaccess","csv","log","asc","tsv"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf"]},contextmenu:function(e){rightMenu.hidden();var t=e||window.event;return t&&($.nodeName(t.target,"TEXTAREA")||$.nodeName(t.target,"INPUT"))?!0:void 0},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];return""==a&&(a=t[t.length-2]),a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),e.substring(0,G.public_path.length)==G.public_path)return G.app_host+"data/public/"+e.replace(G.public_path,"");if(G.is_root){if(e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.basic_path.replace(G.web_root,"")+"/";return t=G.web_host+t,t+"index.php?explorer/fileProxy&path="+urlEncode(e)}return G.web_host+G.web_root+e},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t='
'+e.responseText+"
",a=$.dialog.list.ajaxErrorDialog;a?a.content(t):$.dialog({id:"ajaxErrorDialog",fixed:!0,resize:!0,title:"ajax error",width:450,height:200,content:t})},setting:function(e){void 0==e&&(e=""),void 0==window.top.frames.Opensetting_mode?$.dialog.open("?setting#"+e,{id:"setting_mode",fixed:!0,resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,resize:!0,title:LNG.app_store,width:800,height:500})},openApp:function(app){if("url"==app.type)"number"!=typeof app.width&&-1==app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1==app.height.search("%")&&(app.height=parseInt(app.height)),$.dialog.open(app.content,{title:app.name,fixed:!0,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height});else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz");require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e){void 0==e&&(e=""),$.dialog.open("?/explorer&type=iframe&path="+e,{resize:!0,fixed:!0,title:LNG.ui_filemanage,width:880,height:550})},setSkin:function(e,t){var a="./../../../style/skin/"+e+t,i=G.static_path+"style/skin/"+e+t;require.async(a,function(){$("#link_css_list").attr("href",i),$("link[rel=stylesheet]").each(function(){var e=$(this).attr("href");e.substring(e.length-t.length)==t&&"link_css_list"!=$(this).attr("id")&&$(this).remove()})})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},createFlash:function(e,t,a){var i='
'+' '+' '+' '+' '+' '+" ";return i},search:function(e,t){var a,i,s=require("../tpl/search"),o=function(){var o=template.compile(s.html);0==$(".dialog_do_search").length?(r(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,resize:!0,title:LNG.search,width:450,content:o(i)}),l(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),n(),$.dialog.list.dialog_do_search.display(!0))},n=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},l(i)},r=function(){$("#search_value,#search_ext,#search_path").keyEnter(n),$(".search_header a.button").die("click").live("click",n),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},l=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");return e.search&&e.path?($.ajax({url:"index.php?explorer/search",dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'
').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s.list);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}}),void 0):(a.hide().html(LNG.search_info).fadeIn(t),void 0)};o()},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);uploader.option("server","index.php?explorer/fileUpload&path="+G.upload_path);var t=30>=e.length?e:"..."+e.substr(e.length-30);if(0!=$(".dialog_file_upload").length)return $(".file_upload .upload_path b").html(t),$.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload"),i=template.compile(a.html),s=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,height:430,resize:!0,id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:s}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .upload_path").tooltip({placement:"bottom",title:function(){return G.upload_path}}),$(".file_upload .upload_path b").html(t),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box .submit input").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},server_dwonload:function(e){var t=[];$(".list input").each(function(){""!=$(this).val()&&t.push($(this).val())}),core.tips.tips(t.length+LNG.server_dwonload_desc);for(var a=0;t.length>a;a++)$.ajax({url:"?explorer/serverDownload&save_path="+e+"&url="+urlEncode2(t[a]),dataType:"json",error:core.ajaxError,success:function(e){e.code&&FrameCall.father("ui.f5",""),core.tips.tips(e)}})},upload_init:function(){var e="#thelist",t="span.state";uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,fileSizeLimit:G.upload_max,resize:!1});var a=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){var i,s=$(e),i=t.fullPath;(void 0==i||"undefined"==i)&&(i=t.name),$(e).find(".item").length>0&&(s=$(e).find(".item:eq(0)"));var o='
'+'
'+i+' '+LNG.upload_ready+'
';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),a.push(t.name),uploader.upload()}).on("uploadProgress",function(e,a){var i=$("#"+e.id),s=i.find(".progress .progress-bar");s.length||(s=$('
').appendTo(i).find(".progress-bar")),i.find(t).text((100*a).toFixed(2)+"%"),s.css("width",100*a+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t}).on("uploadSuccess",function(e){var i=e.serverData;i.code?$("#"+e.id).find(t).text(i.data):$("#"+e.id).find(t).addClass("error").text(i.data),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut();var s=a;ui.f5_callback(function(){ui.path.setSelectByFilename(s)})}).on("uploadError",function(e){$("#"+e.id).find(t).addClass("error").text(LNG.upload_error)}).on("uploadFinished",function(){$(e).find(".item").delay(2e3).each(function(e){$(this).delay(300*e).slideUp(600)}),a=[],"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)}).on("error",function(){});var i;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),i&&window.clearTimeout(i)},dragLeave=function(e){stopPP(e),i&&window.clearTimeout(i),i=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){e=e.originalEvent||e;var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?(ui.path.pathOperate.appAddURL(t),console.log(t)):core.upload(),stopPP(e),inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/search",[],function(){var e="
{{LNG.name}} {{LNG.type}} {{LNG.size}} {{LNG.path}}
",t="{{each folderlist as v i}}
{{v.name}} {{LNG.folder}} 0 {{v.path}} {{/each}} {{each filelist as v i}}
{{v.name}} {{v.ext}} {{v.size_friendly}} {{v.path}} {{/each}}";return{html:e,list:t}}),define("app/tpl/upload",[],function(){return{html:"
{{LNG.save_path}}:
{{LNG.upload_select}}
{{LNG.upload_max_size}}:{{maxsize}}
"}}),define("app/common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuApp",s=".menuTreeFav",o=".menuTreeRoot",n=".menuTreeFolder",r=".menuTreeFile",l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),p(),h(),m(),_(),y(),x(),N(),v(),j(),C(),L(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected")},c=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),f(),v(),u(),h(),m(),C(),j(),_(),L(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected")},d=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),x(),v(),C(),j(),k(),w(),L()},p=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e,t){g(e,t)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload,className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye",accesskey:"b"},sep1:"--------",listIcon:{name:LNG.list_type,accesskey:"v",icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"seticon",icon:"th",accesskey:"i",className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"setlist",icon:"list",accesskey:"l",className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"o",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},set_sort_up:{name:LNG.sort_up,className:"set_sort_up",icon:"sort-up",className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"set_sort_down",icon:"sort-down",className:"menu_set_desc set_sort_down"}}},sep2:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},app_create:{name:LNG.app_create,className:"app_create",icon:"puzzle-piece",accesskey:"k"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},newfileOther:{name:LNG.newothers,items:{newfile_html:{name:"html "+LNG.file},newfile_php:{name:"php "+LNG.file},newfile_js:{name:"js "+LNG.file},newfile_css:{name:"css "+LNG.file}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},u=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},f=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){g(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"},sortBy:{name:LNG.order_type,accesskey:"o",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},set_sort_up:{name:LNG.sort_up,className:"set_sort_up",icon:"sort-up",className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"set_sort_down",icon:"sort-down",className:"menu_set_desc set_sort_down"}}},sep1:"--------",upload:{name:LNG.upload,className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye",accesskey:"b"},sep2:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},app_create:{name:LNG.app_create,className:"app_create",icon:"puzzle-piece",accesskey:"k"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},newfileOther:{name:LNG.newothers,items:{newfile_html:{name:"html "+LNG.file},newfile_php:{name:"php "+LNG.file},newfile_js:{name:"js "+LNG.file},newfile_css:{name:"css "+LNG.file}}},sep3:"--------",full:{name:LNG.full_screen,className:"full",icon:"fullscreen",accesskey:"m"},setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"w"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"s"}}})},h=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t,callback:function(e){b(e)},items:{open:{name:LNG.open,className:"open",icon:"folder-open-alt",accesskey:"o"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},m=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:t,callback:function(e){b(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit,className:"open_text",icon:"edit",accesskey:"e"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},newfileOther:{name:LNG.open_with,accesskey:"h",items:{open_text:{name:LNG.edit,className:"open_text",icon:"edit"},open_kindedit:{name:LNG.others,className:"open_kindedit",icon:"edit"}}},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:t,callback:function(e){"editor"==Config.pageApp?z(e):b(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:t,callback:function(e){b(e)},items:{copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile();break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"full":ui.fullScreen();break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},b=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();case"open_kindedit":break;case"playmedia":ui.path.play();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"info":ui.path.info();break;default:}},y=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){z(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"},sep1:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},x=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){z(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},sep3:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},N=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){z(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},k=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){z(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep4:"--------",remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"},sep5:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})
-},w=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){z(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},openIE:{name:LNG.open_ie,className:"openIE",icon:"globe",accesskey:"b"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"},quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},C=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"o"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"o"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},j=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit:{name:LNG.close,icon:"remove",accesskey:"o"},hide:{name:LNG.dialog_min,icon:"minus",accesskey:"o"},refresh:{name:LNG.refresh,icon:"refresh",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit":i.close();break;case"hide":i.display(!1);break;case"refresh":i.refresh();break;default:}}})},z=function(e){switch(e){case"app_edit":ui.tree.appEdit();break;case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"openIE":ui.tree.openIE();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:c,initExplorer:l,initEditor:d,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/editor/ui",[],function(){var e=function(){var e=!1,t=0,a=0,i=0,s=$(".frame-left"),o=$(".frame-resize"),n=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(r(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){l(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var r=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=a+l;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),s.css("width",c),o.css("left",c-5),n.css("left",c+1)},c=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,FrameCall.top("OpenopenEditor","Editor.save","")})},setTheme:function(e){core.setSkin(e,"app_editor.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")}}}),define("app/common/tree",["./pathOperate","../tpl/fileinfo","../tpl/app","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),s=!1;ui.pathOpen=i;var o=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
'+LNG.system_error+"
")},success:function(e){if(!e.code)return $("#folderList").html('
'+LNG.system_error+"
"),void 0;var t=e.data;$.fn.zTree.init($("#folderList"),r,t)}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){n(e,"up")}).bind("down",function(e){n(e,"down")}).bind("left",function(e){n(e,"left")}).bind("right",function(e){n(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},n=function(e,t){stopPP(e);var a=$.fn.zTree.getZTreeObj("folderList"),i=a.getSelectedNodes()[0];if(void 0!=i)switch(t){case"up":var s=i.getPreNode();if(s){if(s.open&&s.children.length>0)for(;s.open&&s.children&&s.children.length>=1;)s=s.children[s.children.length-1]}else s=i.getParentNode();a.selectNode(s);break;case"down":if(i.open&&i.children.length>=1)s=i.children[0];else{var o=i,s=o.getNextNode()||o.getParentNode().getNextNode();try{for(;!s;)o=o.getParentNode(),s=o.getNextNode()||o.getParentNode().getNextNode()}catch(e){}}a.selectNode(s);break;case"left":i.isParent?i.open?a.expandNode(i,!1):a.selectNode(i.getParentNode()):a.selectNode(i.getParentNode());break;case"right":i.open?a.selectNode(i.children[0]):a.expandNode(i,!0);break;default:}},r={async:{enable:!0,url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),s=$("#"+t.tId+"_ico");if(i.remove(),s.before(i),"file"==t.type&&s.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&s.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var o="
";i.before(o)}var n="";"explorer"==Config.pageApp?("__fav__"==t.ext&&(n="menuTreeFav"),"__root__"==t.ext&&(n="menuTreeRoot"),"folder"==t.type&&(n="menuTreeFolder")):"editor"==Config.pageApp&&("__fav__"==t.ext&&(n="menuTreeFav"),"__root__"==t.ext&&(n="menuTreeRoot"),"file"==t.type&&(n="menuTreeFile"),"folder"==t.type&&(n="menuTreeFolder"),"oexe"==t.ext&&(n="menuApp"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(n).attr("title",r)}},callback:{onClick:function(e,t,a){var i=$.fn.zTree.getZTreeObj("folderList");return i.selectNode(a),i.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&"__fav__"!=a.ext&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){var a=$.fn.zTree.getZTreeObj("folderList");a.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(){"function"==typeof t&&(t(),t=void 0)},onRename:function(e,i,s){var o=$.fn.zTree.getZTreeObj("folderList"),n=s.getParentNode();if(o.getNodesByParam("name",s.name,n).length>1)return core.tips.tips(LNG.name_isexists,!1),o.removeNode(s),void 0;if(s.create){var r=s.path+"/"+s.name;"folder"==s.type?a.newFolder(r,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})}):a.newFile(r,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})})}else{var l=s.path+s.beforeName,p=s.path+s.name;a.rname(l,p,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})})}}}},l=function(e){var t=$.fn.zTree.getZTreeObj("folderList");if(t){var a=t.getSelectedNodes()[0],i="",s="";return a?(a.father?i=a.father+a.name:a.this_path?i=a.this_path:""!=a.path?i=a.path+a.name:""==a.path&&(i="/"+a.name),s=a.ext,("_null_"==s||void 0==s)&&(s="folder"),"file"==s&&(s=a.ext),e?[{path:i,type:s,node:a}]:{path:i,type:s,node:a}):{path:"",type:""}}},c=function(e){var t=$.fn.zTree.getZTreeObj("folderList");void 0==e&&(e=t.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode()),t.reAsyncChildNodes(e,"refresh")},d=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:o,refresh:c,openEditor:function(){i.openEditor(l().path)},openIE:function(){i.openIE(l().path)},download:function(){i.download(l().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=l();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(l().path)},search:function(){core.search("",l().path)},appEdit:function(){var e=l(),t=e.node;t.path=e.path,a.appEdit(t,function(){c(e.node.getParentNode())})},info:function(){a.info(l(!0))},copy:function(){a.copy(l(!0))},cute:function(){a.cute(l(!0))},past:function(){var e=l();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){d(),c(e.node)})},remove:function(){var e=l(!0),t=e[0].node.getParentNode();t?a.remove(e,function(){d(),c(t)}):$.dialog({fixed:!0,resize:!1,icon:"warning",drag:!0,title:LNG.tips,content:LNG.remove_not,ok:!0})},checkIfChange:function(e){if(!s){s=!0;var t=$.fn.zTree.getZTreeObj("folderList");t&&(t.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e?(c(t),!0):!1},!0),setTimeout(function(){s=!1},1e3))}},explorer:function(){var e=l().path;e||(e=G.this_path),core.explorer(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var a=$.fn.zTree.getZTreeObj("folderList"),i=a.getSelectedNodes();if(0>=i.length){var s=a.getNodeByParam("ext","__root__",null);a.selectNode(s)}var o=l(),n=o.node,r=n.getParentNode(),d="newfile",p=0,u=LNG.newfolder;if("folder"==e){for(;a.getNodesByParam("name",u+"("+p+")",r).length>0;)p++;newNode={name:u+"("+p+")",ext:"",type:"folder",create:!0,path:o.path}}else if("file"==e){for(;a.getNodesByParam("name",d+"("+p+").txt",r).length>0;)p++;newNode={name:d+"("+p+").txt",ext:"txt",type:"file",create:!0,path:o.path}}void 0!=n.children?(treeNodeNew=a.addNodes(n,newNode),a.editName(treeNodeNew[0])):("folder"!=n.type&&(n=n.getParentNode()),t=function(){treeNodeNew=a.addNodes(n,newNode),a.editName(treeNodeNew[0])},c(n))},rname:function(){var e=$.fn.zTree.getZTreeObj("folderList"),t=e.getSelectedNodes()[0];e.editName(t),t.beforeName=t.name}}}),define("app/common/pathOperate",["../tpl/fileinfo","../tpl/app"],function(e){var t=e("../tpl/fileinfo"),a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/ : * ? " < > |',!1),!1):!0},s=function(e){var t="list=[";for(var a in e)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',a!=e.length-1&&(t+=",");return t+"]"},o=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},n=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},r=function(e,t,a){e&&t&&e!=t&&i(core.pathThis(t))&&$.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},l=function(e,t){if(!(1>e.length)){var a=e[0].path;a.length>20&&(a=a.substr(-20)+"..."),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.5,content:a+"
"+LNG.remove_info+"【"+e.length+"】",ok:function(){$.ajax({url:"index.php?explorer/pathDelete",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},p=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){e.code?core.tips.close(e.info):core.tips.close(e),"function"==typeof t&&t(e)}})}},u=function(e){if(1>e.length&&(e=[{path:G.this_path,type:"folder"}]),e.length>1)return f(e),void 0;e=e[0];var a="folder"==e.type?"path_info":"file_info";$.ajax({url:"index.php?explorer/pathInfo&type="+e.type+"&path="+urlEncode2(e.path),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(i){if(!i.code)return core.tips.close(i),void 0;core.tips.close(LNG.get_success,!0);var s=template.compile(t[a]);i.data.LNG=LNG,$.dialog({padding:5,fixed:!0,title:core.pathThis(e.path).substr(0,20)+"... "+LNG.info,content:s(i.data),width:"350px",cancel:!0})}})},f=function(e){$.ajax({url:"index.php?explorer/pathInfoMuti",type:"POST",data:s(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(e){if(!e.code)return core.tips.close(e),void 0;core.tips.close(LNG.get_success,!0);var a=template.compile(t.path_info_more);e.data.LNG=LNG,$.dialog({padding:5,fixed:!0,width:"350px",title:LNG.info,content:a(e.data),cancel:!0})}})},h=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,core.tips.tips(e),"function"==typeof t&&t(e)}})},m=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,"function"==typeof t&&t(e)}})}},v=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:s(e)+"&path="+urlEncode2(t),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code&&"function"==typeof a&&a(e)}})},_=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},g=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},b=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},y=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")})},x=function(t,a,i){var s,o,n,r=LNG.app_create,l=UUID(),c=e("../tpl/app"),d=G.basic_path+"static/images/app/",p=template.compile(c.html);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=json_decode(t)),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,n=p({LNG:LNG,iconPath:d,uuid:l,data:t})):n=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,height:310,id:l,padding:15,title:r,content:n,button:[{name:LNG.preview,callback:function(){var e=b(s);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=b(s);switch(i){case"user_add":var n=urlEncode2(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+n;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":o="./index.php?app/add&name="+e.name;break;case"root_edit":o="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),s=$("."+l),t.group&&s.find("option").eq(t.group).attr("selected",1),s.find(".aui_content").css("overflow","inherit"),i){case"user_edit":s.find(".name").addClass("hidden"),s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":s.find("option[value="+t.group+"]").attr("selected",!0);break;default:}y(s)},N=function(){core.appStore()},k=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:e,desc:"",group:"others",type:"url",icon:"internet.png",name:a,resize:1,simple:0,height:"70%",width:"80%"},s=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+s,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:x,appList:N,appAddURL:k,newFile:o,newFolder:n,rname:r,unZip:m,zip:h,copy:c,cute:d,info:u,remove:l,cuteDrag:v,past:p,clipboard:_,fav:g}});var file_info="
{{LNG.file_type}}:
{{ext}} {{LNG.file}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info="
{{LNG.type}}:
{{LNG.folder}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.contain}}:
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info_more="
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.file}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.parent_permission}}:
{{mode}}
";define("app/tpl/fileinfo",[],function(){return{file_info:file_info,path_info:path_info,path_info_more:path_info_more}}),define("app/tpl/app",[],function(){return{html:"
{{LNG.app_group}}
{{LNG.app_group_others}} {{LNG.app_group_game}} {{LNG.app_group_tools}} {{LNG.app_group_reader}} {{LNG.app_group_movie}} {{LNG.app_group_music}} {{LNG.app_group_life}}
{{LNG.app_code}}
{{LNG.app_url}}
"}}),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("swf"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if("oexe"==t)return core.openApp(e),void 0;if("pdf"==t){var l="pdf"+UUID(),i=core.path2url(e),c='
";return $.dialog({resize:!0,fixed:!0,title:core.pathThis(e),width:800,height:400,padding:0,content:c}),new PDFObject({url:i}).embed(l),void 0}if("html"==t||"htm"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var i=urlDecode(e);return-1==e.indexOf("http:")&&(i=core.path2url(i)),MaskView.image(i),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=core.path2url(e);return r(i,t),void 0}if(inArray(core.filetype.doc,t)){var i=core.path2url(e);return n(i,t),void 0}return inArray(core.filetype.bindary,t)?(a(e),void 0):(o(e),void 0)}},a=function(e){if(e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e),a='
'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},i=function(e){if(void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a){if(e){void 0==a&&(a="openWindow"+UUID());var i="
";art.dialog.through({id:a,title:t,width:"70%",height:"65%",padding:0,content:i,resize:!0})}},o=function(e){if(e){var t=core.pathExt(e),a=core.pathThis(e);if(inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t))return core.tips.tips(t+LNG.edit_can_not,!1),void 0;if(void 0==window.top.frames.OpenopenEditor){var i="?editor/edit&filename="+urlEncode(urlEncode2(e)),o=a+" ——"+LNG.edit;s(i,o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},n=function(e,t){var a,i,s;switch(t){case"doc":case"docx":case"docm":case"dot":a="http://sg1b-word-view.officeapps.live.com/wv/wordviewerframe.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"ppt":case"pptm":case"pptx":a="http://sg1b-powerpoint.officeapps.live.com/p/PowerPointFrame.aspx?PowerPointView=ReadingView&ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"xls":case"xlsb":case"xlsm":case"xlsx":a="http://sg1b-excel.officeapps.live.com/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;default:}i="http://sg1b-15-view-wopi.wopi.live.net:808/oh/wopi/files/@/wFileId?wFileId=",i+=urlEncode(e),s=a+urlEncode(i)+"&access_token=1&access_token_ttl=0";var o=core.pathThis(urlDecode(e));art.dialog.open(s,{title:o,width:"70%",height:"65%",resize:!0})},r=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:r,openEditor:o,openIE:i,download:a}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")
-},a=function(t){var a,i,o;"music_player"==t?(a=e[G.musictheme],i="music player",o=!1):(a=e[G.movietheme],i="movie player",o=!0);var n=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),r={id:t+"_dialog",simple:!0,title:i,width:a.width,height:a.height,content:n,resize:o,padding:0,fixed:!0,close:function(){var e=s(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(r):$.dialog(r)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,s;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),s=core.pathThis(e[t])):(i=e[t],s=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='
'}return a},s=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},o=function(e,t){var a=i(e),o=s(t);if(o){o.config("play_mode","normal");var n=o.list().length;o.list_xml(a,!0),o.sendEvent("view_play",n+1)}};return{changeTheme:function(t,a){var i,o,n;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),n=s(i),n&&(o=e[a],window.top.art.dialog.list[i+"_dialog"].size(o.width,o.height),n.sendEvent("skin_load","skins/"+o.path+".zip"))},play:function(e,i){var n=t(i),r=s(n);r?(o(e,n),window.top.art.dialog.list[n+"_dialog"].display(!0)):(a(n),setTimeout(function(){o(e,n)},1e3))}}});
\ No newline at end of file
+define("app/src/editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/search","../../tpl/upload","../../common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo","../../tpl/app","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"index.php?explorer/treeList&app=editor"},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree,$(document).ready(function(){ui.init(),TaskTap.init(),core.update(),rightMenu.initEditor(),$(".init_loading").fadeOut(600)})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("click").live("click",function(){var e=$(this).attr("id"),t=art.dialog.list[e],a=$("."+e);"hidden"!=a.css("visibility")?t.display(!1):t.display(!0)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},s=function(){var e,t,i,s,o=!1,n=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(){e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1})});var f=function(a){n=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));var s=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("
"),i.css({width:c+"px",top:s,left:o}),e.css("opacity",0)},h=function(a){if(o){0==n&&f(a);var s=a.clientX-r+l;u>s||s>u+p-c||(i.css("left",s),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(s>t&&t+c/2+d>s){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(s>t-c/2+d&&t>s){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,o){if(!e.is(":animated")||s!=i){s=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var n=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==o?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:n+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,n=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},o=function(e){var t=110,i=t,s=t+12,o=$(".task_tab .tab"),n=$(".task_tab .tabs").width()-50,r=o.length,l=Math.floor(n/s);switch(r>l&&(i=Math.floor(n/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":o.animate({width:i+"px"},a);break;case"resize":o.css("width",i+"px");break;default:}},n=function(t,a){$(".task_tab").removeClass("hidden");var i='";$(i).insertBefore(".task_tab .last"),o("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),o("close"),0==$(".tabs .tab").length&&$(".task_tab").addClass("hidden")})};return{add:n,focus:r,close:l,init:function(){var e='
';$(e).appendTo("body"),$(window).bind("resize",function(){o("resize")}),i(),s()}}}),define("app/common/core",["../tpl/search","../tpl/upload"],function(require,exports){return{filetype:{music:["mp3","wma","wav","mid","aac","ogg","oga","midi","ram","ac3","aif","aiff","m3a","m4a","m4b","mka","mp1","mx3","mp2"],movie:["avi","flv","f4v","wmv","3gp","rmvb","mp4","rm","rmvb","flv","mkv","wmv","asf","avi","aiff","mp4","divx","dv","m4v","mov","mpeg","vob","mpg","mpv","ogm","ogv","qt"],image:["jpg","jpeg","png","bmp","gif","ico","tif","tiff","dib","rle"],code:["html","htm","js","css","less","scss","sass","py","php","rb","erl","lua","pl","c","cpp","m","h","java","jsp","cs","asp","sql","as","go","lsp","yml","json","tpl","xml","cmd","reg","bat","vbs","sh"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["txt","ini","inc","inf","conf","oexe","md","htaccess","csv","log","asc","tsv"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf"]},contextmenu:function(e){rightMenu.hidden();var t=e||window.event;return t&&($.nodeName(t.target,"TEXTAREA")||$.nodeName(t.target,"INPUT"))?!0:void 0},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];return""==a&&(a=t[t.length-2]),a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),e.substring(0,G.public_path.length)==G.public_path)return G.app_host+"data/public/"+e.replace(G.public_path,"");if(G.is_root){if(e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.basic_path.replace(G.web_root,"")+"/";return t=G.web_host+t,t+"index.php?explorer/fileProxy&path="+urlEncode(e)}return G.web_host+G.web_root+e},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='
'+t+"
",i=$.dialog.list.ajaxErrorDialog;return""==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",fixed:!0,resize:!0,title:"ajax error",width:450,height:200,content:a}),void 0)},setting:function(e){void 0==e&&(e=""),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,resize:!0,title:LNG.app_store,width:800,height:500})},openApp:function(app){if("url"==app.type)"number"!=typeof app.width&&-1==app.width.search("%")&&(app.width=parseInt(app.width)),"number"!=typeof app.height&&-1==app.height.search("%")&&(app.height=parseInt(app.height)),$.dialog.open(app.content,{title:app.name,fixed:!0,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height});else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz");require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e){void 0==e&&(e=""),$.dialog.open("?/explorer&type=iframe&path="+e,{resize:!0,fixed:!0,title:LNG.ui_filemanage,width:880,height:550})},setSkin:function(e,t){var a="./../../../style/skin/"+e+t,i=G.static_path+"style/skin/"+e+t;require.async(a,function(){$("#link_css_list").attr("href",i),$("link[rel=stylesheet]").each(function(){var e=$(this).attr("href");e.substring(e.length-t.length)==t&&"link_css_list"!=$(this).attr("id")&&$(this).remove()})})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},createFlash:function(e,t,a){var i='
'+' '+' '+' '+' '+' '+" ";return i},search:function(e,t){var a,i,s=require("../tpl/search"),o=function(){var o=template.compile(s.html);0==$(".dialog_do_search").length?(r(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,resize:!0,title:LNG.search,width:450,content:o(i)}),l(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),n(),$.dialog.list.dialog_do_search.display(!0))},n=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},l(i)},r=function(){$("#search_value,#search_ext,#search_path").keyEnter(n),$(".search_header a.button").die("click").live("click",n),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},l=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");return e.search&&e.path?1>=e.search.length?(a.hide().html("too short!").fadeIn(t),void 0):($.ajax({url:"index.php?explorer/search",dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'
').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s.list);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}}),void 0):(a.hide().html(LNG.search_info).fadeIn(t),void 0)};o()},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);uploader.option("server","index.php?explorer/fileUpload&path="+G.upload_path);var t=30>=e.length?e:"..."+e.substr(e.length-30);if(0!=$(".dialog_file_upload").length)return $(".file_upload .upload_path b").html(t),$.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload"),i=template.compile(a.html),s=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,height:430,resize:!0,id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:i({LNG:LNG,maxsize:s}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .upload_path").tooltip({placement:"bottom",title:function(){return G.upload_path}}),$(".file_upload .upload_path b").html(t),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box .submit input").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},server_dwonload:function(e){var t=[];$(".list input").each(function(){""!=$(this).val()&&t.push($(this).val())}),core.tips.tips(t.length+LNG.server_dwonload_desc);for(var a=0;t.length>a;a++)$.ajax({url:"./index.php?explorer/serverDownload&save_path="+e+"&url="+urlEncode2(t[a]),dataType:"json",error:core.ajaxError,success:function(e){e.code&&FrameCall.father("ui.f5",""),core.tips.tips(e)}})},upload_init:function(){var e="#thelist",t="span.state";uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:3,fileSizeLimit:G.upload_max,resize:!1});var a=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){var i,s=$(e),i=t.fullPath;(void 0==i||"undefined"==i)&&(i=t.name),$(e).find(".item").length>0&&(s=$(e).find(".item:eq(0)"));var o='
'+'
'+i+' '+LNG.upload_ready+'
';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),a.push(t.name),uploader.upload()}).on("uploadProgress",function(e,a){var i=$("#"+e.id),s=i.find(".progress .progress-bar");s.length||(s=$('
').appendTo(i).find(".progress-bar")),i.find(t).text((100*a).toFixed(2)+"%"),s.css("width",100*a+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t}).on("uploadSuccess",function(e){var i=e.serverData;i.code?$("#"+e.id).find(t).text(i.data):$("#"+e.id).find(t).addClass("error").text(i.data),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut();var s=a;ui.f5_callback(function(){ui.path.setSelectByFilename(s)})}).on("uploadError",function(e){$("#"+e.id).find(t).addClass("error").text(LNG.upload_error)}).on("uploadFinished",function(){$(e).find(".item").delay(2e3).each(function(e){$(this).delay(300*e).slideUp(600)}),a=[],"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)}).on("error",function(){});var i;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),i&&window.clearTimeout(i)},dragLeave=function(e){stopPP(e),i&&window.clearTimeout(i),i=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){e=e.originalEvent||e;var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?(ui.path.pathOperate.appAddURL(t),console.log(t)):core.upload(),stopPP(e),inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/search",[],function(){var e="
{{LNG.name}} {{LNG.type}} {{LNG.size}} {{LNG.path}}
",t="{{each folderlist as v i}}
{{v.name}} {{LNG.folder}} 0 {{v.path}} {{/each}} {{each filelist as v i}}
{{v.name}} {{v.ext}} {{v.size_friendly}} {{v.path}} {{/each}}";return{html:e,list:t}}),define("app/tpl/upload",[],function(){return{html:"
{{LNG.save_path}}:
{{LNG.upload_select}}
{{LNG.upload_max_size}}:{{maxsize}}
"}}),define("app/common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuApp",s=".menuTreeFav",o=".menuTreeRoot",n=".menuTreeFolder",r=".menuTreeFile",l=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),p(),h(),m(),g(),y(),x(),N(),v(),j(),C(),L(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected")},c=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),f(),v(),u(),h(),m(),C(),j(),g(),L(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected")},d=function(){$('').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),x(),v(),C(),j(),k(),w(),L()},p=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e,t){_(e,t)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload,className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye",accesskey:"b"},sep1:"--------",listIcon:{name:LNG.list_type,accesskey:"v",icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"seticon",icon:"th",accesskey:"i",className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"setlist",icon:"list",accesskey:"l",className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"o",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},set_sort_up:{name:LNG.sort_up,className:"set_sort_up",icon:"sort-up",className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"set_sort_down",icon:"sort-down",className:"menu_set_desc set_sort_down"}}},sep2:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},app_create:{name:LNG.app_create,className:"app_create",icon:"puzzle-piece",accesskey:"k"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},newfileOther:{name:LNG.newothers,items:{newfile_html:{name:"html "+LNG.file},newfile_php:{name:"php "+LNG.file},newfile_js:{name:"js "+LNG.file},newfile_css:{name:"css "+LNG.file}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},u=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},f=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"},sortBy:{name:LNG.order_type,accesskey:"o",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},set_sort_up:{name:LNG.sort_up,className:"set_sort_up",icon:"sort-up",className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"set_sort_down",icon:"sort-down",className:"menu_set_desc set_sort_down"}}},sep1:"--------",upload:{name:LNG.upload,className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye",accesskey:"b"},sep2:"--------",app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},app_create:{name:LNG.app_create,className:"app_create",icon:"puzzle-piece",accesskey:"k"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},newfileOther:{name:LNG.newothers,items:{newfile_html:{name:"html "+LNG.file},newfile_php:{name:"php "+LNG.file},newfile_js:{name:"js "+LNG.file},newfile_css:{name:"css "+LNG.file}}},sep3:"--------",full:{name:LNG.full_screen,className:"full",icon:"fullscreen",accesskey:"m"},setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"w"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"s"}}})},h=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t,callback:function(e){b(e)},items:{open:{name:LNG.open,className:"open",icon:"folder-open-alt",accesskey:"o"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},m=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:t,callback:function(e){b(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit,className:"open_text",icon:"edit",accesskey:"e"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},newfileOther:{name:LNG.open_with,accesskey:"h",items:{open_text:{name:LNG.edit,className:"open_text",icon:"edit"},open_kindedit:{name:LNG.others,className:"open_kindedit",icon:"edit"}}},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:t,callback:function(e){"editor"==Config.pageApp?z(e):b(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:t,callback:function(e){b(e)},items:{copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"m"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile();break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"full":ui.fullScreen();break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},b=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();case"open_kindedit":break;case"playmedia":ui.path.play();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"info":ui.path.info();break;default:}},y=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){z(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"},sep1:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},x=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){z(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},sep3:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},N=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){z(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})
+},k=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){z(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep3:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},sep4:"--------",remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"},sep5:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},w=function(){$('
').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){z(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},openIE:{name:LNG.open_ie,className:"openIE",icon:"globe",accesskey:"b"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"},quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},L=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".taskBarMenu",items:{quitOthers:{name:LNG.close_others,className:"quitOthers",icon:"remove-circle",accesskey:"o"},quit:{name:LNG.close,className:"quit",icon:"remove",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},C=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"o"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"o"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},j=function(){$('').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit:{name:LNG.close,icon:"remove",accesskey:"o"},hide:{name:LNG.dialog_min,icon:"minus",accesskey:"o"},refresh:{name:LNG.refresh,icon:"refresh",accesskey:"q"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit":i.close();break;case"hide":i.display(!1);break;case"refresh":i.refresh();break;default:}}})},z=function(e){switch(e){case"app_edit":ui.tree.appEdit();break;case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"openIE":ui.tree.openIE();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:c,initExplorer:l,initEditor:d,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/editor/ui",[],function(){var e=function(){var e=!1,t=0,a=0,i=0,s=$(".frame-left"),o=$(".frame-resize"),n=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(r(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){l(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var r=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=a+l;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),s.css("width",c),o.css("left",c-5),n.css("left",c+1)},c=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,FrameCall.top("OpenopenEditor","Editor.save","")})},setTheme:function(e){core.setSkin(e,"app_editor.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")}}}),define("app/common/tree",["./pathOperate","../tpl/fileinfo","../tpl/app","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),s=!1;ui.pathOpen=i;var o=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('
'+LNG.system_error+"
")},success:function(e){if(!e.code)return $("#folderList").html('
'+LNG.system_error+"
"),void 0;var t=e.data;$.fn.zTree.init($("#folderList"),r,t)}}),$(".ztree .switch").die("mouseenter").live("mouseenter",function(){$(this).addClass("switch_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("switch_hover")}),"editor"==Config.pageApp&&(Mousetrap.bind("up",function(e){n(e,"up")}).bind("down",function(e){n(e,"down")}).bind("left",function(e){n(e,"left")}).bind("right",function(e){n(e,"right")}),Mousetrap.bind("enter",function(){tree.open()}).bind(["del","command+backspace"],function(){tree.remove()}).bind("f2",function(e){stopPP(e),tree.rname()}).bind(["ctrl+f","command+f"],function(e){stopPP(e),tree.search()}).bind(["ctrl+c","command+c"],function(){tree.copy()}).bind(["ctrl+x","command+x"],function(){tree.cute()}).bind(["ctrl+v","command+v"],function(){tree.past()}).bind("alt+m",function(){tree.create("folder")}).bind("alt+n",function(){tree.create("file")}))},n=function(e,t){stopPP(e);var a=$.fn.zTree.getZTreeObj("folderList"),i=a.getSelectedNodes()[0];if(void 0!=i)switch(t){case"up":var s=i.getPreNode();if(s){if(s.open&&s.children.length>0)for(;s.open&&s.children&&s.children.length>=1;)s=s.children[s.children.length-1]}else s=i.getParentNode();a.selectNode(s);break;case"down":if(i.open&&i.children.length>=1)s=i.children[0];else{var o=i,s=o.getNextNode()||o.getParentNode().getNextNode();try{for(;!s;)o=o.getParentNode(),s=o.getNextNode()||o.getParentNode().getNextNode()}catch(e){}}a.selectNode(s);break;case"left":i.isParent?i.open?a.expandNode(i,!1):a.selectNode(i.getParentNode()):a.selectNode(i.getParentNode());break;case"right":i.open?a.selectNode(i.children[0]):a.expandNode(i,!0);break;default:}},r={async:{enable:!0,url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),s=$("#"+t.tId+"_ico");if(i.remove(),s.before(i),"file"==t.type&&s.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&s.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var o="
";i.before(o)}var n="";"explorer"==Config.pageApp?("__fav__"==t.ext&&(n="menuTreeFav"),"__root__"==t.ext&&(n="menuTreeRoot"),"folder"==t.type&&(n="menuTreeFolder")):"editor"==Config.pageApp&&("__fav__"==t.ext&&(n="menuTreeFav"),"__root__"==t.ext&&(n="menuTreeRoot"),"file"==t.type&&(n="menuTreeFile"),"folder"==t.type&&(n="menuTreeFolder"),"oexe"==t.ext&&(n="menuApp"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(n).attr("title",r)}},callback:{onClick:function(e,t,a){var i=$.fn.zTree.getZTreeObj("folderList");return i.selectNode(a),i.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&"__fav__"!=a.ext&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){var a=$.fn.zTree.getZTreeObj("folderList");a.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(){"function"==typeof t&&(t(),t=void 0)},onRename:function(e,i,s){var o=$.fn.zTree.getZTreeObj("folderList"),n=s.getParentNode();if(o.getNodesByParam("name",s.name,n).length>1)return core.tips.tips(LNG.name_isexists,!1),o.removeNode(s),void 0;if(s.create){var r=s.path+"/"+s.name;"folder"==s.type?a.newFolder(r,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})}):a.newFile(r,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})})}else{var l=s.path+s.beforeName,p=s.path+s.name;a.rname(l,p,function(e){e.code&&(c(n),t=function(){var e=o.getNodesByParam("name",s.name,n)[0];o.selectNode(e),d()})})}}}},l=function(e){var t=$.fn.zTree.getZTreeObj("folderList");if(t){var a=t.getSelectedNodes()[0],i="",s="";return a?(a.father?i=a.father+a.name:a.this_path?i=a.this_path:""!=a.path?i=a.path+a.name:""==a.path&&(i="/"+a.name),s=a.ext,("_null_"==s||void 0==s)&&(s="folder"),"file"==s&&(s=a.ext),e?[{path:i,type:s,node:a}]:{path:i,type:s,node:a}):{path:"",type:""}}},c=function(e){var t=$.fn.zTree.getZTreeObj("folderList");void 0==e&&(e=t.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode()),t.reAsyncChildNodes(e,"refresh")},d=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:o,refresh:c,openEditor:function(){i.openEditor(l().path)},openIE:function(){i.openIE(l().path)},download:function(){i.download(l().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=l();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(l().path)},search:function(){core.search("",l().path)},appEdit:function(){var e=l(),t=e.node;t.path=e.path,a.appEdit(t,function(){c(e.node.getParentNode())})},info:function(){a.info(l(!0))},copy:function(){a.copy(l(!0))},cute:function(){a.cute(l(!0))},past:function(){var e=l();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){d(),c(e.node)})},remove:function(){var e=l(!0),t=e[0].node.getParentNode();t?a.remove(e,function(){d(),c(t)}):$.dialog({fixed:!0,resize:!1,icon:"warning",drag:!0,title:LNG.tips,content:LNG.remove_not,ok:!0})},checkIfChange:function(e){if(!s){s=!0;var t=$.fn.zTree.getZTreeObj("folderList");t&&(t.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e?(c(t),!0):!1},!0),setTimeout(function(){s=!1},1e3))}},explorer:function(){var e=l().path;e||(e=G.this_path),core.explorer(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var a=$.fn.zTree.getZTreeObj("folderList"),i=a.getSelectedNodes();if(0>=i.length){var s=a.getNodeByParam("ext","__root__",null);a.selectNode(s)}var o=l(),n=o.node,r=n.getParentNode(),d="newfile",p=0,u=LNG.newfolder;if("folder"==e){for(;a.getNodesByParam("name",u+"("+p+")",r).length>0;)p++;newNode={name:u+"("+p+")",ext:"",type:"folder",create:!0,path:o.path}}else if("file"==e){for(;a.getNodesByParam("name",d+"("+p+").txt",r).length>0;)p++;newNode={name:d+"("+p+").txt",ext:"txt",type:"file",create:!0,path:o.path}}void 0!=n.children?(treeNodeNew=a.addNodes(n,newNode),a.editName(treeNodeNew[0])):("folder"!=n.type&&(n=n.getParentNode()),t=function(){treeNodeNew=a.addNodes(n,newNode),a.editName(treeNodeNew[0])},c(n))},rname:function(){var e=$.fn.zTree.getZTreeObj("folderList"),t=e.getSelectedNodes()[0];e.editName(t),t.beforeName=t.name}}}),define("app/common/pathOperate",["../tpl/fileinfo","../tpl/app"],function(e){var t=e("../tpl/fileinfo"),a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/ : * ? " < > |',!1),!1):!0},s=function(e){var t="list=[";for(var a in e)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',a!=e.length-1&&(t+=",");return t+"]"},o=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},n=function(e,t){if(e){var a=core.pathThis(e);i(a)&&$.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},r=function(e,t,a){e&&t&&e!=t&&i(core.pathThis(t))&&$.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},l=function(e,t){if(!(1>e.length)){var a=e[0].path;a.length>20&&(a=a.substr(-20)+"..."),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.5,content:a+"
"+LNG.remove_info+"【"+e.length+"】",ok:function(){$.ajax({url:"index.php?explorer/pathDelete",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:s(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},p=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){e.code?core.tips.close(e.info):core.tips.close(e),"function"==typeof t&&t(e)}})}},u=function(e){if(1>e.length&&(e=[{path:G.this_path,type:"folder"}]),e.length>1)return f(e),void 0;e=e[0];var a="folder"==e.type?"path_info":"file_info";$.ajax({url:"index.php?explorer/pathInfo&type="+e.type+"&path="+urlEncode2(e.path),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(i){if(!i.code)return core.tips.close(i),void 0;core.tips.close(LNG.get_success,!0);var s=template.compile(t[a]);i.data.LNG=LNG,$.dialog({padding:5,fixed:!0,title:core.pathThis(e.path).substr(0,20)+"... "+LNG.info,content:s(i.data),width:"350px",cancel:!0})}})},f=function(e){$.ajax({url:"index.php?explorer/pathInfoMuti",type:"POST",data:s(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(e){if(!e.code)return core.tips.close(e),void 0;core.tips.close(LNG.get_success,!0);var a=template.compile(t.path_info_more);e.data.LNG=LNG,$.dialog({padding:5,fixed:!0,width:"350px",title:LNG.info,content:a(e.data),cancel:!0})}})},h=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:s(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,core.tips.tips(e),"function"==typeof t&&t(e)}})},m=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code=100,"function"==typeof t&&t(e)}})}},v=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:s(e)+"&path="+urlEncode2(t),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code&&"function"==typeof a&&a(e)}})},g=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:s(e)+"&path="+urlEncode2(t),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),e.code&&"function"==typeof a&&a(e)}})},_=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},b=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},y=function(e){var t={};return t.type=e.find("input[type=radio]:checked").val(),t.content=e.find("textarea").val(),t.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");t[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");t[e]="checked"==$(this).attr("checked")?1:0}),t},x=function(e){e.find(".type input").change(function(){var t=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+t+"]").removeClass("hidden")})},N=function(t,a,i){var s,o,n,r=LNG.app_create,l=UUID(),c=e("../tpl/app"),d=G.basic_path+"static/images/app/",p=template.compile(c.html);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=json_decode(t)),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,n=p({LNG:LNG,iconPath:d,uuid:l,data:t})):n=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,height:310,id:l,padding:15,title:r,content:n,button:[{name:LNG.preview,callback:function(){var e=y(s);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=y(s);switch(i){case"user_add":var n=urlEncode2(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+n;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":o="./index.php?app/add&name="+e.name;break;case"root_edit":o="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),s=$("."+l),t.group&&s.find("option").eq(t.group).attr("selected",1),s.find(".aui_content").css("overflow","inherit"),i){case"user_edit":s.find(".name").addClass("hidden"),s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":s.find(".desc").addClass("hidden"),s.find(".group").addClass("hidden"),s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":s.find("[apptype=url]").attr("checked",!0),s.find("[data-type=url] input[name=resize]").attr("checked",!0),s.find("input[name=width]").attr("value","800"),s.find("input[name=height]").attr("value","600"),s.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":s.find("option[value="+t.group+"]").attr("selected",!0);break;default:}x(s)},k=function(){core.appStore()},w=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:e,desc:"",group:"others",type:"url",icon:"internet.png",name:a,resize:1,simple:0,height:"70%",width:"80%"},s=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+s,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:N,appList:k,appAddURL:w,newFile:o,newFolder:n,rname:r,unZip:m,zip:h,copy:c,cute:d,info:u,remove:l,cuteDrag:v,copyDrag:g,past:p,clipboard:_,fav:b}});var file_info="
{{LNG.file_type}}:
{{ext}} {{LNG.file}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info="
{{LNG.type}}:
{{LNG.folder}}
{{LNG.address}}:
{{path}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.contain}}:
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}
{{LNG.create_time}}
{{ctime}}
{{LNG.modify_time}}
{{mtime}}
{{LNG.last_time}}
{{atime}}
{{LNG.permission}}:
{{mode}}
",path_info_more="
{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.file}}
{{LNG.size}}:
{{size_friendly}} ({{size}} Byte)
{{LNG.parent_permission}}:
{{mode}}
";define("app/tpl/fileinfo",[],function(){return{file_info:file_info,path_info:path_info,path_info_more:path_info_more}}),define("app/tpl/app",[],function(){return{html:"
{{LNG.app_group}}
{{LNG.app_group_others}} {{LNG.app_group_game}} {{LNG.app_group_tools}} {{LNG.app_group_reader}} {{LNG.app_group_movie}} {{LNG.app_group_music}} {{LNG.app_group_life}}
{{LNG.app_code}}
{{LNG.app_url}}
"}}),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("swf"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if("oexe"==t)return core.openApp(e),void 0;if("pdf"==t){var l="pdf"+UUID(),i=core.path2url(e),c='
";return $.dialog({resize:!0,fixed:!0,title:core.pathThis(e),width:800,height:400,padding:0,content:c}),new PDFObject({url:i}).embed(l),void 0}if("html"==t||"htm"==t){var i=core.path2url(e);return s(i,core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var i=urlDecode(e);return-1==e.indexOf("http:")&&(i=core.path2url(i)),MaskView.image(i),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=core.path2url(e);return r(i,t),void 0}if(inArray(core.filetype.doc,t)){var i=core.path2url(e);return n(i,t),void 0}return inArray(core.filetype.bindary,t)?(a(e),void 0):(o(e),void 0)}},a=function(e){if(e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e),a='
'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},i=function(e){if(void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a){if(e){void 0==a&&(a="openWindow"+UUID());var i="
";art.dialog.through({id:a,title:t,width:"70%",height:"65%",padding:0,content:i,resize:!0})}},o=function(e){if(e){var t=core.pathExt(e),a=core.pathThis(e);if(inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t))return core.tips.tips(t+LNG.edit_can_not,!1),void 0;
+if(void 0==window.top.frames.OpenopenEditor){var i="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e)),o=a+" ——"+LNG.edit;s(i,o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},n=function(e,t){var a,i,s;switch(t){case"doc":case"docx":case"docm":case"dot":a="http://sg1b-word-view.officeapps.live.com/wv/wordviewerframe.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"ppt":case"pptm":case"pptx":a="http://sg1b-powerpoint.officeapps.live.com/p/PowerPointFrame.aspx?PowerPointView=ReadingView&ui=zh-CN&rs=zh-CN&WOPISrc=";break;case"xls":case"xlsb":case"xlsm":case"xlsx":a="http://sg1b-excel.officeapps.live.com/x/_layouts/xlviewerinternal.aspx?ui=zh-CN&rs=zh-CN&WOPISrc=";break;default:}i="http://sg1b-15-view-wopi.wopi.live.net:808/oh/wopi/files/@/wFileId?wFileId=",i+=urlEncode(e),s=a+urlEncode(i)+"&access_token=1&access_token_ttl=0";var o=core.pathThis(urlDecode(e));art.dialog.open(s,{title:o,width:"70%",height:"65%",resize:!0})},r=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:r,openEditor:o,openIE:i,download:a}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,o;"music_player"==t?(a=e[G.musictheme],i="music player",o=!1):(a=e[G.movietheme],i="movie player",o=!0);var n=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),r={id:t+"_dialog",simple:!0,title:i,width:a.width,height:a.height,content:n,resize:o,padding:0,fixed:!0,close:function(){var e=s(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(r):$.dialog(r)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,s;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),s=core.pathThis(e[t])):(i=e[t],s=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='
'}return a},s=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},o=function(e,t){var a=i(e),o=s(t);if(o){o.config("play_mode","normal");var n=o.list().length;o.list_xml(a,!0),o.sendEvent("view_play",n+1)}};return{changeTheme:function(t,a){var i,o,n;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),n=s(i),n&&(o=e[a],window.top.art.dialog.list[i+"_dialog"].size(o.width,o.height),n.sendEvent("skin_load","skins/"+o.path+".zip"))},play:function(e,i){var n=t(i),r=s(n);r?(o(e,n),window.top.art.dialog.list[n+"_dialog"].display(!0)):(a(n),setTimeout(function(){o(e,n)},1e3))}}});
\ No newline at end of file
diff --git a/static/js/app/src/explorer/main.js b/static/js/app/src/explorer/main.js
index c7423d4..32da6a7 100644
--- a/static/js/app/src/explorer/main.js
+++ b/static/js/app/src/explorer/main.js
@@ -1,4 +1,4 @@
-define("app/src/explorer/main",["lib/jquery-lib","lib/util","lib/webuploader/webuploader-min","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","./ui","./fileSelect","../../common/taskTap","../../common/core","../../tpl/search","../../tpl/upload","../../common/rightMenu","../../common/tree","../../common/pathOperate","../../tpl/fileinfo","../../tpl/app","../../common/pathOpen","../../common/CMPlayer","./path"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?explorer/treeList&app=explorer",AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/webuploader/webuploader-min"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),ui=e("./ui"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui.tree=e("../../common/tree"),ui.path=e("./path"),fileSelect=e("./fileSelect"),fileLight=fileSelect.fileLight,$(document).ready(function(){Global.topbar_height="none"==$(".topbar").css("display")?0:$(".topbar").height(),$(".init_loading").fadeOut(600),ui.init(),ui.tree.init(),TaskTap.init(),core.update(),core.upload_init(),fileSelect.init(),rightMenu.initExplorer()})}),define("app/src/explorer/ui",["./fileSelect"],function(require,exports){var fileSelect=require("./fileSelect"),fileLight=fileSelect.fileLight,MyPicasa=new Picasa;PicasaOpen=!1;var _ajaxLive=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,MyPicasa.initData(),$(".fileContiner .picture img").lazyload({container:$(".bodymain")})},_initListType=function(e){$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),"list"==e?($(Config.FileBoxSelector).removeClass("fileList_icon").addClass("fileList_list"),$("#list_type_list").html('
'+LNG.name+"
"+'
'+LNG.type+"
"+'
'+LNG.size+"
"+'
'+LNG.modify_time+"
"+'
'+"
"),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:19,padding:4})):($(Config.FileBoxSelector).removeClass("fileList_list").addClass("fileList_icon"),$("#list_type_list").html(""),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:32,padding:4})),$(".menu_seticon").removeClass("selected"),$(".set_set"+G.list_type).addClass("selected")},_setListType=function(e,t){G.list_type=e,void 0==t?$.ajax({url:"index.php?setting/set&k=list_type&v="+e,dataType:"json",success:function(){_initListType(e),_f5(!1,!1)}}):(_initListType(e),_f5(!1,!0))},_sortBy=function(e,t){var t="down"==t?-1:1;return function(a,i){return a=a[e],i=i[e],i>a?-1*t:a>i?1*t:void 0}},_setListSort=function(e,t){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=t&&(G.sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")),_f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+G.sort_field+","+G.sort_order})},_jsonSortTitle=function(){var up='
',down='
';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.sort_field+"]").addClass("this").attr("id",G.sort_order).find("span").html(eval(G.sort_order))},_bindEventSort=function(){$("#main_title div").die("click").live("click",function(){"up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),_setListSort($(this).attr("field"),$(this).attr("id"))})},_bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");_toolsAction(e)})},_bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(){ui.setTheme(e)}}),$(".dropdown-menu li").removeClass("this"),$(this).addClass("this")})},_bindFrameSizeEvent=function(){var e=!1,t=0,a=0,i=0,s=$(".frame-left"),n=$(".frame-resize"),o=$(".frame-right");n.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(l(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){r(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var l=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),n.addClass("active")},r=function(l){if(!e)return!0;var r=l.pageX-t,c=a+r;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),s.css("width",c),n.css("left",c-5),o.css("left",c+1),ui.setStyle()},c=function(){return e?(e=!1,n.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),void 0):!1}},_bindHotKey=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var a=!1;if(Global.ctrlKey||t.keyCode==e||t.ctrlKey)switch(a=!0,Global.ctrlKey=!0,t.keyCode){case 8:ui.path.remove(),a=!0;break;case 65:fileSelect.selectPos("all");break;case 8:ui.path.next(),a=!0;break;case 67:ui.path.copy();break;case 88:ui.path.cute();break;case 83:break;case 86:ui.path.past();break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:a=!1}else if(t.shiftKey)Global.shiftKey=!0;else switch(t.keyCode){case 8:ui.path.back(),a=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),a=!0;break;case 38:fileSelect.selectPos("up");break;case 39:fileSelect.selectPos("right"),a=!0;break;case 40:fileSelect.selectPos("down");break;case 13:ui.path.open(),a=!1;break;case 46:ui.path.remove();break;case 113:ui.path.rname();break;default:a=!1}return a&&(stopPP(t),t.keyCode=0,t.returnValue=!1),!0}).keyup(function(t){t.shiftKey||(Global.shiftKey=!1),t.keyCode!=e&&t.ctrlKey||(Global.ctrlKey=!1)})},_menuActionBind=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}})};this._getFolderBox=function(e){var t="";return t+=""},this._getFileBox=function(e){var t="";if("oexe"==e.ext&&void 0!=e.icon){var a=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(a=G.static_path+"images/app/"+e.icon);var i=urlEncode(json_encode(e)),s=e.name.replace(".oexe","");t=""}else if(inArray(core.filetype.image,e.ext)){var n=core.path2url(G.this_path+e.name),o="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);t+=""}else t+="";return t},this._getFolderBoxList=function(e){var t="";return t+=""},this._getFileBoxList=function(e){var t="";if("oexe"==e.ext){var a=urlEncode(json_encode(e));t="