5 lines
129 KiB
JavaScript
Executable File
5 lines
129 KiB
JavaScript
Executable File
/*! power by kodexplorer ver3.41(2017-03-06) [build 1488797373403] */
|
||
define("app/src/share_editor/main",["lib/jquery-lib","lib/util","lib/ztree/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../share_common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../common/pathOpen","../../common/myPlayer","../../share_common/topbar"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"index.php?share/treeList&app=editor&user="+G.user+"&sid="+G.sid},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree;var t=e("../../share_common/topbar");$(document).ready(function(){core.init(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),t.init(),G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),rightMenu.initEditor()})}),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,u=0,f=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")),u=$tab_parent.width(),f=$tab_parent.get(0).getBoundingClientRect().left,f+=$(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;f>n||n>f+u-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:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep100:"--------",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"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);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:}}})},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()}}})},u=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(),u(),o()}}}),define("app/common/core",[],function(require,exports){search_box_tpl=require("./tpl/search.html"),search_list_tpl=require("./tpl/search_list.html"),upload_tpl=require("./tpl/upload.html");var search=require("./core.search"),tools=require("./core.tools"),upload=require("./core.upload"),api=require("./core.api"),playSound=require("./core.playSound");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("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,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"],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&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},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='<div class="ajaxError">'+t+"</div>",a=$.dialog.list.ajaxErrorDialog;return Tips.close(LNG.system_error,!1),"<!--user login-->"==t.substr(0,17)?(setTimeout(function(){window.location.reload()},500),void 0):(a?a.content(i):$.dialog({id:"ajaxErrorDialog",padding:0,width:"60%",height:"50%",fixed:!0,resize:!0,ico:core.icon("error"),title:"ajax error",content:i}),void 0)},fileGet:function(e,t){var i="./index.php?editor/fileGet&filename="+urlEncode(e);G.share_page!==void 0&&(i="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(e)),$.ajax({url:i,dataType:"json",beforeSend:function(){Tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){Tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},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:950,height:600})},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;return r>=100&&(r=100),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' 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-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-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/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(search_box_tpl);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(search_list_tpl);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()},u=function(e){return a==t[0]&&-1==e[t[37]]()[t[39]](s)?(o(),!1):!0},f=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:u,systemData:f};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),u=$('<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 f,h=function(e){clearTimeout(f),f=!1,f=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,u.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.addClass("error").text(e.data),clearInterval(s),s=!1,clearTimeout(r),r=!1,u.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;t=core.fileSize(a)+"/s"}if(d.data("progcess",i),0==i.length)d.find(".progress-bar").css("width","0%"),p.text(LNG.loading);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(upload_tpl),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("1"==Cookie.get("forceWap"))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){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]);return 0>=s&&(s=0),s=core.fileSize(s)+"/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){var i=urlEncode(e.file.fullPath);(void 0==i||"undefined"==i)&&(i=""),t.fullPath=i,t.upload_to=e.file.upload_to}).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];a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(n),$("#"+e.id).find(".remove").addClass("icon-ok").addClass("open").removeClass("icon-remove").removeClass("remove")):($("#"+e.id).addClass("error").find(".state").addClass("error"),$("#"+e.id).find(".state").text(n).attr("title",n))}uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),e.fullPath||pathReload(!1)}).on("uploadError",function(e,t){var i=LNG.upload_error+"("+t+")";if(e.serverData)if(e.serverData.data){var a=e.serverData.data;i=LNG[a]?LNG[a]:a}else e.serverData._raw&&(i=e.serverData._raw);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/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/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",i=".menuMore",a=".menuTreeRoot",n=".menuTreeFolder",o=".menuTreeFile",s={listIcon:{name:LNG.list_type,icon:"eye-open",items:{seticon:{name:LNG.list_icon,className:"menu_seticon set_seticon"},setlist:{name:LNG.list_list,className:"menu_seticon set_setlist"}}},sortBy:{name:LNG.order_type,accesskey:"y",icon:"sort",items:{set_sort_name:{name:LNG.name,className:"menu_set_sort set_sort_name"},set_sort_ext:{name:LNG.type,className:"menu_set_sort set_sort_ext"},set_sort_size:{name:LNG.size,className:"menu_set_sort set_sort_size"},set_sort_mtime:{name:LNG.modify_time,className:"menu_set_sort set_sort_mtime"},sep105:"--------",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"}}}},r=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),c(),d(),p(),u(),m(),_(),x(),y(),b(),$(".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")},l=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),m(),y(),x(),v(),g(),b(),$(".context-menu-root").addClass("animated fadeIn")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){f(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:s.listIcon,sortBy:s.sortBy,setFileIconSize:s.setFileIconSize,sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},d=function(){$('<i class="'+t.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:t,className:t.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},p=function(){$('<i class="'+e.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:e,className:e.substr(1),callback:function(e){h(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},u=function(){$('<i class="'+i.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,className:i.substr(1),callback:function(e){h(e)},items:{down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},f=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");
|
||
break;case"info":ui.path.info();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"open":ui.path.open();break;default:}},h=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"open_text":ui.path.openEditor();break;case"playmedia":ui.path.play();break;case"search":ui.path.search();break;case"show_file":ui.path.show_file();break;case"openProject":ui.path.openProject();break;case"info":ui.path.info();break;default:}},m=function(){$('<i class="'+a.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_=function(){$('<i class="'+n.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},v=function(){$('<i class="'+n.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:n,callback:function(e){k(e)},items:{download:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},g=function(){$('<i class="'+o.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:o,callback:function(e){k(e)},items:{edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},show_file:{name:LNG.show_file,className:"show_file",icon:"globe",accesskey:"b"},sep1:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},b=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()}}})},y=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:}}})},x=function(){$('<i class="dialog_menu"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".dialog_menu",items:{quit_dialog:{name:LNG.close,className:"quit_dialog",icon:"remove",accesskey:"q"},hide_dialog:{name:LNG.dialog_min,className:"hide_dialog",icon:"minus",accesskey:"h"},refresh:{name:LNG.refresh,className:"refresh",icon:"refresh",accesskey:"r"},open_window:{name:LNG.open_ie,className:"open_window",icon:"globe",accesskey:"b"},sep101:"--------",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"quit_dialog":a.close();break;case"hide_dialog":a.display(!1);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:}}})},k=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"info":ui.tree.info();break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"show_file":ui.tree.showFile();break;case"download":ui.tree.download();break;case"search":ui.tree.search();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initExplorer:r,initEditor:l,show:function(e,t,i){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:i}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(t.hasClass("dialog_menu")){var i=t.attr("id"),a=$.dialog.list[i];a.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menufile")){var n=ui.fileLight.type(ui.fileLight.fileListSelect());"zip"==n?e.find(".unzip").show():e.find(".unzip").hide(),"html"==n||"htm"==n||"oexe"==n?e.find(".open_text").show():e.find(".open_text").hide()}if(t.hasClass("menuMore")){var o=0;ui.fileLight.fileListSelect().each(function(){var e=core.pathExt(ui.fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(o+=1)}),0==o?e.find(".playmedia").hide():e.find(".playmedia").show()}}},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/share_editor/ui",[],function(){var e=function(){var e=!1,t=0,i=0,a=0,n=$(".frame-left"),o=$(".frame-resize"),s=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(r(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){l(e)}),$(document).one("mouseup",function(e){return c(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(e),!1)});var r=function(a){e=!0,t=a.pageX,i=$(".frame-left").width(),o.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=i+l;a>c&&(c=a),c>$(document).width()-200&&(c=$(document).width()-200),n.css("width",c),o.css("left",c-5),s.css("left",c+1)},c=function(){return e?(e=!1,o.removeClass("active"),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,ShareData.frameTop("OpenopenEditor",function(e){e.Editor.save()})})},setTheme:function(e){core.setSkin(e,"app_editor.css"),ShareData.frameTop("OpenopenEditor",function(t){t.Editor.setTheme(e)})},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},fileHistory:function(e){var t=G.project;if(G.sid!==void 0&&(t=t+"__"+G.sid),t="editorHistory_"+t,void 0==e){var i=LocalData.get(t);return i=jsonDecode(i),$.isArray(i)||(i=[]),i}LocalData.set(t,jsonEncode(e))}}}),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,f().type)&&a.open(f().path,f().type)},r=function(e,t){if(e&&e[0]&&-1!==$.inArray(e[0].menuType,["menuTreeGroup","menuTreeFav"]))return e;for(var i=[],a=[],n=0;e.length>n;n++)e[n].drop=!1,e[n].drag=!1,e[n].name=e[n].name,e[n].isParent&&e[n].children&&(e[n].children=r(e[n].children)),e[n].is_writeable,"folder"==e[n].type?a.push(e[n]):i.push(e[n]);return t?e:(a=a.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),i=i.sort(function(e,t){var e=e.name,t=t.name;return ui.pathOperate.strSort(e,t)}),a.concat(i))},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"),u,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},u={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")}},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)}))}}},f=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),ui.f5()},_=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,init:c,refresh:h,refreshPath:v,refreshFav:m,refreshGroup:_,zTree:function(){return o},openEditor:function(){a.openEditor(f().path)},openWindow:function(){a.openWindow(f().path)},share:function(){i.share(f())},download:function(){"folder"==f().type?i.zipDownload(f(!0)):a.download(f().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=f();"oexe"==e.type&&(e.path=e.node),a.open(e.path,e.type)}},fav:function(){var e=f();e.name=e.node.name,e.node="null",i.fav(e)},createLink:function(e){var t=f();i.createLink(t.path,t.node.name,t.type,e,g)},search:function(){core.search("",f().path)},appEdit:function(){var e=f(),t=e.node;t.path=e.path,i.appEdit(t,function(){h(e.node.getParentNode())})},info:function(){i.info(f(!0))},copy:function(){i.copy(f(!0))},cute:function(){i.cute(f(!0))},copyTo:function(){core.api.pathSelect({type:"folder",title:LNG.copy_to},function(e){i.copyDrag(f(!0),e,"",!1)})},cuteTo:function(){core.api.pathSelect({type:"folder",title:LNG.cute_to},function(e){i.cuteDrag(f(!0),e,function(){v()})})},favRemove:function(){i.favRemove(f().node.name,function(e){Tips.tips(e),m()})},past:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.past(e.path,function(){g(),h(e.node)})},clone:function(){var e=f();e.node.isParent||(e.node=e.node.getParentNode()),i.copyDrag(f(!0),core.pathFather(e.path),function(){g(),"folder"==e.type?h(e.node.getParentNode()):h(e.node)},!0)},remove:function(){var e=f(!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=f().path;"folder"!=f().type&&(i=core.pathFather(i)),core.explorer(i)},openProject:function(){core.explorerCode(f().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=f(),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 u=o.addNodes(s,newNode)[0];o.editName(u)}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="+f().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"list="+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,u=Math.max(r.length,l.length);u>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 f=o(oFxNcL,oFyNcL);if(0!=f)return f}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&&t(e.info)}}),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){"function"==typeof t&&(Tips.close(e),t(e.info))}}),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&&i(e.info)}}),void 0):("function"==typeof i&&i(),void 0):void 0},d=function(e,t,i){if(!(1>e.length)){var a=LNG.remove_title,o=LNG.remove_info,s="index.php?explorer/pathDelete",r=n(e);"share"==e[0].type&&(o=LNG.share_remove_tips,s="index.php?userShare/del",a=LNG.share_remove),("recycle_clear"==e[0].type||G.USER_RECYCLE&&G.this_path==G.USER_RECYCLE)&&(o=LNG.recycle_clear_info,s="index.php?explorer/pathDeleteRecycle",a=LNG.recycle_clear,"recycle_clear"==e[0].type&&(r={})),e.length>1&&(o+=' ... <span class="badge">'+e.length+"</span>");var l=function(){$.ajax({url:s,type:"POST",dataType:"json",data:r,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 n=$.dialog.list.share_dialog;void 0!=n&&n.close()}a==LNG.recycle_clear?core.playSound("recycle_clear"):core.playSound("file_remove"),"function"==typeof t&&t(i)}})};i===!0?l():$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:a,padding:"40px 80px 40px 30px",lock:!0,background:"#000",opacity:.1,content:o,ok:l,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)}})},u=function(e){var t=e.path,i=core.pathPre(t);if(i==G.KOD_GROUP_PATH||i==G.KOD_GROUP_SHARE||i==G.USER_SHARE)return Tips.tips(LNG.path_can_not_action,!1),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)Tips.tips("该分享已存在",!0),f(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(),f(e.data)):(Tips.tips(e),f(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"))}))})}}})},f=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.myhome+"/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))},x=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"}),k(r,t)})},k=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)),$.dialog({icon:"succeed",title:!1,time:2,content:LNG.download_ready+"..."}),$('<iframe src="'+t+'" style="display:none;width:0px;height:0px;"></iframe>').appendTo("body")}})}},L=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){Tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){Tips.close(e),Tips.tips(e),e.code&&core.playSound("drag_drop"),"function"==typeof t&&t(e.info)}})},N=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)}})},T=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)}}))},S=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)})}})},j=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)},E=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()}})}},z=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(z(n)),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=z(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()},O=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;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:O,share:u,shareBox:f,setBackground:_,createLink:v,createProject:g,newFile:r,newFolder:l,rname:c,unZip:N,zipDownload:w,zip:L,copy:p,cute:b,info:x,remove:d,cuteDrag:C,copyDrag:T,past:y,clipboard:S,fav:E,favRemove:j}}),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="">{{LNG.share_code_read}}\n </label>\n <label>\n <input type="checkbox" name="not_download" class="kui-checkbox size-small" value="">{{LNG.share_not_download}}\n </label>\n <label class="label_can_upload">\n <input type="checkbox" name="can_upload" class="kui-checkbox size-small" value="">{{LNG.share_can_upload}}\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>\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 {{/if}}\n\n <div class='line'></div>\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 <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 <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 <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\n \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</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 <div class='line'></div>\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 <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 <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 <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/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=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("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:core.pathThis(e),ext:t}]),void 0}return"pdf"==t?(core.fileLink(e,function(i){var a="./lib/plugins/pdfjs/web/viewer.html?file="+urlEncode(i);if(canvasSupport())core.openDialog(a,core.icon(t),htmlEncode(core.pathThis(e)));else{var n="pdf"+UUID(),o='<div id="'+n+'" style="height:100%;"> <a href="'+i+'" 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:o}),new PDFObject({url:i}).embed(n)}}),void 0):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)}if("string"==typeof e){var n=e;"string"!=typeof e&&(n=e.content.split("'")[1]),core.fileGet(n,function(e){var t=jsonDecode(e);t.name=core.pathThis(n),core.openApp(t)})}else core.openApp(e)}},i=function(e,t){var i='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+"</span><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+"..."}),$('<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&path="+urlEncode(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(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.config.id).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)),core.openDialog(n,core.icon("edit"),htmlEncode(e),"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&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,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(u){}},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,u(!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),u(!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),u(!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})},u=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"),f(n.find(".player-bg")),void 0):(t=0,n.find(".item-title").html(" "),i.jPlayer("destroy"),i.find(".jPlayer-container").children().remove(),void 0)},f=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}}(),u=function(a){var o=s(a[0].ext);o==n?e.async(["lib/jPlayer/kod.flat/movie.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){t=e,d(a)}):e.async(["lib/jPlayer/kod.flat/music.html","lib/jPlayer/jquery.jplayer.min.js","lib/jPlayer/kod.flat/control.js","lib/jPlayer/kod.flat/style.css"],function(e){i=e,d(a)})},f=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:u,playSound:f}}),define("app/share_common/topbar",[],function(){var e="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,t="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid;"1"==G.param_rewrite&&(e=e.replace("index.php?","index.php/"));var i=function(){"file"!=G.share_info.type&&G.path!==void 0?(t+="&path="+G.path,e+="&path="+G.path,$(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()):($(".btn.button_my_share").show(),$(".share_info_user .btn-group").hide()),"file"==G.share_info.type&&($(".btn.button_my_share").hide(),$(".share_info_user .btn-group").show()),"1"==G.share_info.not_download&&(e="javascript:Tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var i=date("Y/m/d H:i:s",G.share_info.mtime);$(".topbar .time").html(i),"file"==G.share_info.type&&$(".topbar .size").html(G.share_info.size),$(".topbar .info").html(LNG.share_view_num+G.share_info.num_view+" "+LNG.share_download_num+G.share_info.num_download),$("#button_share").die("click").live("click",function(){share()})};return{init:i}}); |