diff --git a/ChangeLog.md b/ChangeLog.md
index b0db943..551f95c 100755
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,23 @@
 
+###ver3.11 `2015/3/30`
+-----
+####update:
+ - 用户没有权限,提示优化
+ - 用户配置数据保存,写入失败提示
+
+####fix bug
+ - 分享mp3,音乐播放路径问题
+ - 火狐bug修复
+ - 分享页面、文件夹;office预览问题
+ - 编辑器
+     中文光标错位问题
+     tab 宽度根据标签个数自动缩放(ie 火狐不兼容问题)
+     当前文件路径对应到title;
+     工具栏火狐兼容性bug
+
+
 ###ver3.1 `2015/3/26`
+-----
 ####update:
  - 分享可以修改路径;避免文件移动后原始分享路径失效问题
  - 分享后自动刷新当前目录;跟新配置数据
diff --git a/config/config.php b/config/config.php
index 972feb3..7d3c285 100755
--- a/config/config.php
+++ b/config/config.php
@@ -45,10 +45,10 @@ define('STATIC_PATH',"./static/");//静态文件目录
  可以使程序更安全, 就不用限制用户的扩展名权限了;
  */
 define('USER_PATH',     DATA_PATH .'User/');        //用户目录
-//自定义用户目录;需要先将data/User移到别的地方 例如修改成如下地址
+//自定义用户目录;需要先将data/User移到别的地方 再修改配置,例如:
 //define('USER_PATH',   DATA_PATH .'/Library/WebServer/Documents/User');
 define('PUBLIC_PATH',   DATA_PATH .'public/');     //公共目录
-//公共共享目录,读写权限跟随用户目录的读写权限 例如修改成如下地址
+//公共共享目录,读写权限跟随用户目录的读写权限 再修改配置,例如:
 //define('PUBLIC_PATH','/Library/WebServer/Documents/Public/');
 /*
  * office服务器配置;默认调用的微软的接口,程序需要部署到外网。
diff --git a/config/setting.php b/config/setting.php
index 56db436..9ef5bdd 100755
--- a/config/setting.php
+++ b/config/setting.php
@@ -16,7 +16,7 @@ $config['setting_all'] = array(
 	'moviethemeall'	=> "webplayer,qqplayer,vplayer,tvlive,youtube"
 );
 
-// 默认配置
+//新用户初始化配置
 $config['setting_default'] = array(
 	'list_type'			=> "icon",		// list||icon
 	'list_sort_field'	=> "name",		// name||size||ext||mtime
@@ -28,7 +28,7 @@ $config['setting_default'] = array(
 	'movietheme'		=> "webplayer"	// movie player theme
 );
 
-//初始系统配置
+//初始化系统配置
 $config['setting_system_default'] = array(
 	'system_password'	=> rand_string(10),
 	'system_name'		=> "KodExplorer",
@@ -40,7 +40,7 @@ $config['setting_system_default'] = array(
 	'new_user_folder'	=> "download,music,image,desktop"
 );
 
-//默认菜单配置
+//初始化默认菜单配置
 $config['setting_menu_default'] = array(
 	array('name'=>'desktop','type'=>'system','url'=>'index.php?desktop','target'=>'_self','use'=>'1'),
 	array('name'=>'explorer','type'=>'system','url'=>'index.php?explorer','target'=>'_self','use'=>'1'),
diff --git a/config/version.php b/config/version.php
index 093f6f0..5f8f83a 100755
--- a/config/version.php
+++ b/config/version.php
@@ -1,2 +1,2 @@
 <?php 
-define('KOD_VERSION','3.1');
\ No newline at end of file
+define('KOD_VERSION','3.11');
\ No newline at end of file
diff --git a/controller/setting.class.php b/controller/setting.class.php
index 0720421..56f0f6a 100755
--- a/controller/setting.class.php
+++ b/controller/setting.class.php
@@ -46,7 +46,7 @@ class setting extends Controller{
         }
         $setting = $GLOBALS['config']['setting_system'];
         foreach ($data as $key => $value){
-            $setting[$key] = $value;
+            $setting[$key] = rawurldecode($value);
         }
         //$setting['menu'] = $GLOBALS['config']['setting_menu_default'];
         //为了保存更多的数据;不直接覆盖文件 $data->setting_file;
diff --git a/data/i18n/en/main.php b/data/i18n/en/main.php
index 692c4f7..e4fc913 100755
--- a/data/i18n/en/main.php
+++ b/data/i18n/en/main.php
@@ -64,6 +64,8 @@ $L = array(
 	"unknow_file_tips"  		=>"not to support the open",
 	"unknow_file_download"  	=>"Download",
 	"unknow_file_office"  		=>"office preview,this process needs to be deployed in the network",
+	"config_save_error_auth"	=> 'error,no permission!',
+	"config_save_error_file"	=> 'error,file no permission write!',
 
 	//editor
 	"shortcut"  			  	=> 'Shortcuts',
@@ -129,6 +131,7 @@ Even as webIDE, can be directly online development. You can also integrate the t
 	"kod_name"  				=> "KodExplorer",
 	"kod_name_desc" 			=> "kod online explorer",
 	"kod_power_by"  			=> " - Powered by KodExplorer",
+	"kod_name_copyright"  		=> "kod online explorer",
 
 	//login
 	"login"                      =>	"login",
diff --git a/data/i18n/zh_CN/main.php b/data/i18n/zh_CN/main.php
index e0cab61..ac6913b 100755
--- a/data/i18n/zh_CN/main.php
+++ b/data/i18n/zh_CN/main.php
@@ -63,6 +63,9 @@ $L= array(
 	"unknow_file_tips"  		=>"暂不支持打开",
 	"unknow_file_download"  	=>"下载到本地",
 	"unknow_file_office"  		=>"office预览,此程序需要部署在外网",
+	"config_save_error_auth"	=> '配置保存失败,管理员禁止了此权限!',
+	"config_save_error_file"	=> '配置保存失败,kod目录需要有写权限!',
+
 
 	//editor
 	"shortcut"  			  	=> '快捷键',
@@ -129,7 +132,7 @@ $L= array(
 	"kod_name"  				=> "KodExplorer",
 	"kod_name_desc"  			=> "芒果云•资源管理器",
 	"kod_power_by"  			=> " - Powered by KodExplorer",
-
+	"kod_name_copyright"  		=> "芒果云•资源管理器",
 
 	//login
 	"login"                      =>	"登陆 ",
@@ -143,12 +146,12 @@ $L= array(
 	"code_error"                 =>	"验证码错误",
 	"user_not_exists"            =>	"用户名不存在!",
 	"password_error"             =>	"密码错误!",
-	"password_not_null"          =>	"密码不能为空!",	
+	"password_not_null"          =>	"密码不能为空!",
 	"old_password_error"         =>	"原密码错误!",
 	"permission"                 =>	"权限!",
 	"permission_edit"            =>	"修改权限",
-	"no_permission"              =>	"您没有此权限!",
-	"no_permission_ext"          =>	"您没有该类型文件权限",
+	"no_permission"              =>	"管理员禁止了此权限!",
+	"no_permission_ext"          =>	"管理员禁止了该类型文件权限",
 	"dialog_min"                 =>	"最小化",
 	"dialog_min_all"             =>	"最小化所有",	
 	"dialog_display_all"         =>	"显示所有窗口",
diff --git a/data/i18n/zh_TW/main.php b/data/i18n/zh_TW/main.php
index 61bedd6..f1487e6 100755
--- a/data/i18n/zh_TW/main.php
+++ b/data/i18n/zh_TW/main.php
@@ -64,6 +64,8 @@ $L= array(
 	"unknow_file_tips"  		=>"暫不支持打開",
 	"unknow_file_download"  	=>"下載到本地",
 	"unknow_file_office"  		=>"office預覽,此程序需要部署在外網",
+	"config_save_error_auth"	=> '配置保存失败,管理员禁止了此权限!',
+	"config_save_error_file"	=> '配置保存失败,kod目录需要有写权限!',
 
 	//editor
 	"shortcut"  			  	=> '快捷鍵',
@@ -130,6 +132,7 @@ $L= array(
 	"kod_name"  				=> "KodExplorer",
 	"kod_name_desc"  			=> "芒果雲•資源管理器",
 	"kod_power_by"  			=> " - Powered by KodExplorer",
+	"kod_name_copyright"  		=> "芒果雲•資源管理器",
 
 
 	"login"                      =>	"登六",
diff --git a/lib/function/web.function.php b/lib/function/web.function.php
index f9e3157..1872341 100755
--- a/lib/function/web.function.php
+++ b/lib/function/web.function.php
@@ -388,6 +388,7 @@ function get_file_mime($ext){
 		"dll" => "application/x-msdownload",
 		"dms" => "application/octet-stream",
 		"doc" => "application/msword",
+		"docx" => "application/msword",
 		"dot" => "application/msword",
 		"dvi" => "application/x-dvi",
 		"dxr" => "application/x-director",
@@ -472,6 +473,7 @@ function get_file_mime($ext){
 		"ppm" => "image/x-portable-pixmap",
 		"pps" => "application/vnd.ms-powerpoint",
 		"ppt" => "application/vnd.ms-powerpoint",
+		"pptx" => "application/vnd.ms-powerpoint",
 		"prf" => "application/pics-rules",
 		"ps" => "application/postscript",
 		"pub" => "application/x-mspublisher",
@@ -534,6 +536,7 @@ function get_file_mime($ext){
 		"xlc" => "application/vnd.ms-excel",
 		"xlm" => "application/vnd.ms-excel",
 		"xls" => "application/vnd.ms-excel",
+		"xlsx" => "application/vnd.ms-excel",
 		"xlt" => "application/vnd.ms-excel",
 		"xlw" => "application/vnd.ms-excel",
 		"xof" => "x-world/x-vrml",
diff --git a/static/js/app/src/app/main.js b/static/js/app/src/app/main.js
index 429cfad..e92ebb9 100755
--- a/static/js/app/src/app/main.js
+++ b/static/js/app/src/app/main.js
@@ -1 +1 @@
-define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),App.init()}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var a=G.static_path+"images/file_16/",t=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,t);return-1==i?a+"file.png":a+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a&&$(a.target).is("textarea")||$(a.target).is("input")||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var a=e.split("/"),t=a[a.length-1];if(""==t&&(t=a[a.length-2]),0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var a=t.split("/");t=a[a.length-1],""==t&&(t=a[a.length-2])}return t},pathFather:function(e){e=e.replace(/\\/g,"/");var a=e.lastIndexOf("/");return e.substr(0,a+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var a=e.lastIndexOf(".");return e=e.substr(a+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var a=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(a=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),core.tips.tips(a,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var a=e.responseText,t='<div class="ajaxError">'+a+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==a.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:t}),void 0)},file_get:function(e,a){var t="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),a=template.compile(e),t=a({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:t})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var a=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(a,function(a){try{a.todo(e)}catch(t){}})},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:a,width:880,height:550})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,a){var t=G.static_path+"style/skin/"+e+a;$("body").append('<img src="'+t+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,a){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,a,Global.topbar_height)},tips:function(e,a){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,a,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,t){var i='<object type="application/x-shockwave-flash" id="'+t+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+a+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,a){var t,i,n=require("../tpl/search.html"),o=require("../tpl/search_list.html"),s=function(){var o=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:a,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:o(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(a),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),a=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(a):"explorer"==Config.pageApp?ui.path.list(a+"/","tips"):core.explorer(a+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var a=150;$("#search_value").focus(),$(".search_result .list").remove();var t=$(".search_result .message td");if(!e.search||!e.path)return t.hide().html(LNG.search_info).fadeIn(a),void 0;if(1>=e.search.length)return t.hide().html("too short!").fadeIn(a),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(a)},error:core.ajaxError,success:function(e){if(!e.code)return t.hide().html(e.data).fadeIn(a),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.hide().html(LNG.search_null).fadeIn(a),void 0;t.hide();var i=template.compile(o);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(a)}})};s()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var a=$(".download_box"),t=a.find("#download_list"),i=a.find("input").val();if(a.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),o='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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>';t.find(".item").length>0?$(o).insertBefore(t.find(".item:eq(0)")):t.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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,a,t){core.ajaxError(e,a,t),clearInterval(s),s=!1,clearTimeout(r),s=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(s),s=!1,clearTimeout(r),s=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var i=(t.size-l.size)/(t.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;a=core.file_size(i)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+a+")")}d.find(".size").text(core.file_size(t.length)),l=t}}}})};r=setTimeout(function(){h(),s=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var a={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var t in a)if(e>=a[t])return(e/a[t]).toFixed(1)+t;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload.html"),t=template.compile(a),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",a=!0;$.browser.msie&&(a=!1);var t=10485760;t>=G.upload_max&&(t=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:a,chunkRetry:3,chunkSize:t}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var a=$(this).find("span.title").attr("title");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");uploader.skipFile(a),uploader.removeFile(a,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,o="0B/s",s=function(e,a){var t=e.size*a,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),t]]:i>=e.speed.length?e.speed.push([time(),t]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),t]));var n=e.speed[e.speed.length-1],s=e.speed[0],r=(n[1]-s[1])/((n[0]-s[0])/1e3);return r=core.file_size(r)+"/s",o=r,r},r=[];uploader.on("uploadBeforeSend",function(e,a){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),a.fullPath=t}).on("fileQueued",function(a){if(!core.upload_check())return uploader.skipFile(a),uploader.removeFile(a),void 0;var t,n=$(e),t=a.fullPath;a.finished=!1,(void 0==t||"undefined"==t)&&(t=a.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var o='<div id="'+a.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+t+'">'+core.pathThis(t)+"</span>"+'<span class="size">'+core.file_size(a.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>';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),uploader.upload()}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+o+")");var t=s(e,a),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*a)+"%("+t+")"),l.css("width",100*a+"%")}).on("uploadAccept",function(e,a){e.file.serverData=a;try{r.push(core.pathThis(a.info))}catch(t){}}).on("uploadSuccess",function(e){var a=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(a),n++;var t=e.serverData;if(t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(t.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(t.data).attr("title",t.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,a){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+a+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)?ui.pathOperate.appAddURL(a):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/src/app/page",[],function(){var e,a=function(){e=location.hash.split("#",2)[1],e||(e="all"),i(e),$("ul.setting li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).click(function(){e=$(this).attr("id"),i(e)}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,type:"json",success:function(e){tips(e.data,e.code)}})}),$("a.create_app").bind("click",function(){FrameCall.father("ui.path.pathOperate.appEdit",'"","","root_add"')}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var a=json_decode(urlDecode($(this).attr("data"))),t=$(e.target).attr("action");switch(t){case"preview":core.openApp(a);break;case"add":FrameCall.father("get","G.this_path");var n=share.data("create_app_path"),o=urlEncode(n+a.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:"data="+urlEncode2(json_encode(a)),error:core.ajaxError,success:function(e){tips(e.data,e.code),e.code&&FrameCall.father("ui.f5","")}});break;case"edit":window.parent&&window.parent.ui.path.pathOperate.appEdit(a,"","root_edit");break;case"del":$.ajax({url:"./index.php?app/del&name="+urlEncode(a.name),dataType:"json",error:core.ajaxError,success:function(e){tips(e.data,e.code),e.code&&i()}});break;default:}}})},t=function(e){var a="",t="<button type='button' class='btn btn-sm btn-default dropdown-toggle' data-toggle='dropdown'>				    <span class='caret'></span>				    <span class='sr-only'>Toggle Dropdown</span>				</button>				<ul class='dropdown-menu' role='menu'>					<li><a action='edit' href='javascript:;'>编辑</a></li>					<li><a action='del' href='javascript:;'>删除</a></li>				</ul>";G.is_root||(t="");for(var i in e){var n=e[i].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/app/"+n),a+="<li class='app_li' data="+urlEncode(json_encode(e[i]))+">				<a action='preview' href='javascript:;' class='icon'><img action='preview' src='"+n+"'></a>				<p><span class='title'>"+e[i].name+"</span>				<span class='info'>"+e[i].desc+"</span></p>"+"<div class='btn-group'>				<button type='button' class='btn btn-sm btn-default' action='add'>添加</button>"+t+"</div><div style='clear:both;'></div></li>"}return a+="<div style='clear:both;'></div>"},i=function(a){(void 0==a||""==a)&&(a=e),window.location.href="#"+a,$(".selected").removeClass("selected"),$("ul.setting li#"+a).addClass("selected"),$(".main").find(".h1").html($(".selected").html());var i=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+a,dataType:"json",beforeSend:function(){},success:function(e){i.html(t(e.data)),$("body").scrollTop(0)}})};return{reload:i,init:a}});
\ No newline at end of file
+define("app/src/app/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","./page"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),App=e("./page"),App.init()}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var a=G.static_path+"images/file_16/",t=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,t);return-1==i?a+"file.png":a+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a?a&&$(a.target).is("textarea")||$(a.target).is("input")||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){e=e.replace(/\\/g,"/");var a=e.split("/"),t=a[a.length-1];if(""==t&&(t=a[a.length-2]),0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var a=t.split("/");t=a[a.length-1],""==t&&(t=a[a.length-2])}return t},pathFather:function(e){e=e.replace(/\\/g,"/");var a=e.lastIndexOf("/");return e.substr(0,a+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var a=e.lastIndexOf(".");return e=e.substr(a+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var a=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(a=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),core.tips.tips(a,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var a=e.responseText,t='<div class="ajaxError">'+a+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==a.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:t}),void 0)},file_get:function(e,a){var t="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),a=template.compile(e),t=a({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var a=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(a,function(a){try{a.todo(e)}catch(t){}})},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:a,width:880,height:550})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,a){var t=G.static_path+"style/skin/"+e+a;$("body").append('<img src="'+t+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,a){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,a,core.tips.topHeight())},tips:function(e,a){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,a,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,t){var i='<object type="application/x-shockwave-flash" id="'+t+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+a+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,a){var t,i,n=require("../tpl/search.html"),o=require("../tpl/search_list.html"),s=function(){var o=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:a,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:o(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(a),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),a=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(a):"explorer"==Config.pageApp?ui.path.list(a+"/","tips"):core.explorer(a+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var a=150;$("#search_value").focus(),$(".search_result .list").remove();var t=$(".search_result .message td");if(!e.search||!e.path)return t.hide().html(LNG.search_info).fadeIn(a),void 0;if(1>=e.search.length)return t.hide().html("too short!").fadeIn(a),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(a)},error:core.ajaxError,success:function(e){if(!e.code)return t.hide().html(e.data).fadeIn(a),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.hide().html(LNG.search_null).fadeIn(a),void 0;t.hide();var i=template.compile(o);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(a)}})};s()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var a=$(".download_box"),t=a.find("#download_list"),i=a.find("input").val();if(a.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),o='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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>';t.find(".item").length>0?$(o).insertBefore(t.find(".item:eq(0)")):t.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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,a,t){core.ajaxError(e,a,t),clearInterval(s),s=!1,clearTimeout(r),s=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(s),s=!1,clearTimeout(r),s=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",t=e.data;if(s){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var i=(t.size-l.size)/(t.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;a=core.file_size(i)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var o=100*(t.size/t.length);d.find(".progress-bar").css("width",o+"%"),p.text(parseInt(o)+"%("+a+")")}d.find(".size").text(core.file_size(t.length)),l=t}}}})};r=setTimeout(function(){h(),s=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var a={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var t in a)if(e>=a[t])return(e/a[t]).toFixed(1)+t;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload.html"),t=template.compile(a),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",a=!0;$.browser.msie&&(a=!1);var t=10485760;t>=G.upload_max&&(t=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:a,chunkRetry:3,chunkSize:t}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var a=$(this).find("span.title").attr("title");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");uploader.skipFile(a),uploader.removeFile(a,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,o="0B/s",s=function(e,a){var t=e.size*a,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),t]]:i>=e.speed.length?e.speed.push([time(),t]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),t]));var n=e.speed[e.speed.length-1],s=e.speed[0],r=(n[1]-s[1])/((n[0]-s[0])/1e3);return r=core.file_size(r)+"/s",o=r,r},r=[];uploader.on("uploadBeforeSend",function(e,a){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),a.fullPath=t}).on("fileQueued",function(a){if(!core.upload_check())return uploader.skipFile(a),uploader.removeFile(a),void 0;var t,n=$(e),t=a.fullPath;a.finished=!1,(void 0==t||"undefined"==t)&&(t=a.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var o='<div id="'+a.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+t+'">'+core.pathThis(t)+"</span>"+'<span class="size">'+core.file_size(a.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>';$(e).find(".item").length>0?$(o).insertBefore($(e).find(".item:eq(0)")):$(e).append(o),uploader.upload()}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+o+")");var t=s(e,a),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*a)+"%("+t+")"),l.css("width",100*a+"%")}).on("uploadAccept",function(e,a){e.file.serverData=a;try{r.push(core.pathThis(a.info))}catch(t){}}).on("uploadSuccess",function(e){var a=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(a),n++;var t=e.serverData;if(t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(t.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(t.data).attr("title",t.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,a){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+a+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)?ui.pathOperate.appAddURL(a):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/src/app/page",[],function(){var e,a=function(){e=location.hash.split("#",2)[1],e||(e="all"),i(e),$("ul.setting li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).click(function(){e=$(this).attr("id"),i(e)}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:e,type:"json",success:function(e){tips(e.data,e.code)}})}),$("a.create_app").bind("click",function(){FrameCall.father("ui.path.pathOperate.appEdit",'"","","root_add"')}),$(".app-list .app_li").die("click").live("click",function(e){if($(e.target).attr("action")){var a=json_decode(urlDecode($(this).attr("data"))),t=$(e.target).attr("action");switch(t){case"preview":core.openApp(a);break;case"add":FrameCall.father("get","G.this_path");var n=share.data("create_app_path"),o=urlEncode(n+a.name),s="./index.php?app/user_app&action=add&path="+o;$.ajax({url:s,dataType:"json",type:"POST",data:"data="+urlEncode2(json_encode(a)),error:core.ajaxError,success:function(e){tips(e.data,e.code),e.code&&FrameCall.father("ui.f5","")}});break;case"edit":window.parent&&window.parent.ui.path.pathOperate.appEdit(a,"","root_edit");break;case"del":$.ajax({url:"./index.php?app/del&name="+urlEncode(a.name),dataType:"json",error:core.ajaxError,success:function(e){tips(e.data,e.code),e.code&&i()}});break;default:}}})},t=function(e){var a="",t="<button type='button' class='btn btn-sm btn-default dropdown-toggle' data-toggle='dropdown'>				    <span class='caret'></span>				    <span class='sr-only'>Toggle Dropdown</span>				</button>				<ul class='dropdown-menu' role='menu'>					<li><a action='edit' href='javascript:;'>编辑</a></li>					<li><a action='del' href='javascript:;'>删除</a></li>				</ul>";G.is_root||(t="");for(var i in e){var n=e[i].icon;-1==n.search(G.static_path)&&"http"!=n.substring(0,4)&&(n=G.static_path+"images/app/"+n),a+="<li class='app_li' data="+urlEncode(json_encode(e[i]))+">				<a action='preview' href='javascript:;' class='icon'><img action='preview' src='"+n+"'></a>				<p><span class='title'>"+e[i].name+"</span>				<span class='info'>"+e[i].desc+"</span></p>"+"<div class='btn-group'>				<button type='button' class='btn btn-sm btn-default' action='add'>添加</button>"+t+"</div><div style='clear:both;'></div></li>"}return a+="<div style='clear:both;'></div>"},i=function(a){(void 0==a||""==a)&&(a=e),window.location.href="#"+a,$(".selected").removeClass("selected"),$("ul.setting li#"+a).addClass("selected"),$(".main").find(".h1").html($(".selected").html());var i=$(".main .app-list");$.ajax({url:"./index.php?app/get&group="+a,dataType:"json",beforeSend:function(){},success:function(e){i.html(t(e.data)),$("body").scrollTop(0)}})};return{reload:i,init:a}});
\ No newline at end of file
diff --git a/static/js/app/src/desktop/main.js b/static/js/app/src/desktop/main.js
index f6fb7ca..e9069df 100755
--- a/static/js/app/src/desktop/main.js
+++ b/static/js/app/src/desktop/main.js
@@ -1,4 +1,4 @@
-define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","./fileSelect","./ui","../explorer/path","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),fileSelect=e("./fileSelect"),ui=e("./ui"),ui.path=e("../explorer/path"),fileLight=fileSelect.fileLight,$(document).ready(function(){ui.init(),TaskTap.init(),core.update(),fileSelect.init(),rightMenu.initDesktop(),e.async("lib/webuploader/webuploader-min",function(){core.upload_init()}),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none")}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=art.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each(art.dialog.list,function(a,t){t.display(e)})}})})}),define("app/common/taskTap",[],function(){var e={},a="",t=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var a=$(this).attr("id"),t=art.dialog.list[a],i=$("."+a);"hidden"==i.css("visibility")?t.display(!0):i.hasClass("aui_state_focus")?t.display(!1):t.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,a,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(a){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(a),!1});var h=function(t){s=!0,r=t.pageX,$tab_parent=$(".task_tab"),a=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(a.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(a.css("width"));var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=t.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(t){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),a.each(function(){var a=$(this).get(0).getBoundingClientRect().left;if(n>a&&a+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>a-c/2+d&&a>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),a=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),a=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var a=110,i=a,n=a+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},t);case"close":s.animate({width:i+"px"},t);break;case"resize":s.css("width",i+"px");break;default:}},o=function(a,t){$(".task_tab").removeClass("hidden");var i=t.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+a+'" title="'+i+'">'+t+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[a]={id:a,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),a=e},l=function(a){delete e[a],$(".task_tab #"+a).animate({width:0},t,function(){$(".task_tab #"+a).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var a=G.static_path+"images/file_16/",t=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,t);return-1==i?a+"file.png":a+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a&&$(a.target).is("textarea")||$(a.target).is("input")||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var a=e.split("/"),t=a[a.length-1];if(""==t&&(t=a[a.length-2]),0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var a=t.split("/");t=a[a.length-1],""==t&&(t=a[a.length-2])}return t},pathFather:function(e){e=e.replace(/\\/g,"/");var a=e.lastIndexOf("/");return e.substr(0,a+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var a=e.lastIndexOf(".");return e=e.substr(a+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var a=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(a=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),core.tips.tips(a,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var a=e.responseText,t='<div class="ajaxError">'+a+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==a.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:t}),void 0)},file_get:function(e,a){var t="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),a=template.compile(e),t=a({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:t})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var a=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(a,function(a){try{a.todo(e)}catch(t){}})},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:a,width:880,height:550})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,a){var t=G.static_path+"style/skin/"+e+a;$("body").append('<img src="'+t+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,a){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,a,Global.topbar_height)},tips:function(e,a){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,a,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,t){var i='<object type="application/x-shockwave-flash" id="'+t+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+a+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,a){var t,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:a,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(a),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),a=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(a):"explorer"==Config.pageApp?ui.path.list(a+"/","tips"):core.explorer(a+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var a=150;$("#search_value").focus(),$(".search_result .list").remove();var t=$(".search_result .message td");if(!e.search||!e.path)return t.hide().html(LNG.search_info).fadeIn(a),void 0;if(1>=e.search.length)return t.hide().html("too short!").fadeIn(a),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(a)},error:core.ajaxError,success:function(e){if(!e.code)return t.hide().html(e.data).fadeIn(a),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.hide().html(LNG.search_null).fadeIn(a),void 0;t.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(a)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var a=$(".download_box"),t=a.find("#download_list"),i=a.find("input").val();if(a.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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>';t.find(".item").length>0?$(s).insertBefore(t.find(".item:eq(0)")):t.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,a,t){core.ajaxError(e,a,t),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",t=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var i=(t.size-l.size)/(t.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;a=core.file_size(i)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(t.size/t.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+a+")")}d.find(".size").text(core.file_size(t.length)),l=t}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var a={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var t in a)if(e>=a[t])return(e/a[t]).toFixed(1)+t;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload.html"),t=template.compile(a),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",a=!0;$.browser.msie&&(a=!1);var t=10485760;t>=G.upload_max&&(t=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:a,chunkRetry:3,chunkSize:t}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var a=$(this).find("span.title").attr("title");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");uploader.skipFile(a),uploader.removeFile(a,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,a){var t=e.size*a,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),t]]:i>=e.speed.length?e.speed.push([time(),t]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,a){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),a.fullPath=t}).on("fileQueued",function(a){if(!core.upload_check())return uploader.skipFile(a),uploader.removeFile(a),void 0;var t,n=$(e),t=a.fullPath;a.finished=!1,(void 0==t||"undefined"==t)&&(t=a.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+a.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+t+'">'+core.pathThis(t)+"</span>"+'<span class="size">'+core.file_size(a.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var t=o(e,a),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*a)+"%("+t+")"),l.css("width",100*a+"%")}).on("uploadAccept",function(e,a){e.file.serverData=a;try{r.push(core.pathThis(a.info))}catch(t){}}).on("uploadSuccess",function(e){var a=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(a),n++;var t=e.serverData;if(t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(t.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(t.data).attr("title",t.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,a){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+a+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)?ui.pathOperate.appAddURL(a):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")
-},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,a){_menuBody(e,a)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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,a){var t=a.$trigger.attr("id"),i=art.dialog.list[t];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,a){t!=e&&a.close()});break;case"quit":i.close()}}})},_bindTask=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,a){var t=a.$trigger.attr("id");switch(art.dialog.list[t],e){case"showAll":$.each(art.dialog.list,function(e,a){a.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,a){a.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,a){a.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,a){var t=a.$trigger.attr("id"),i=art.dialog.list[t];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,a,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:a,y:t}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),a=$(".context-menu-active");if(0!=e.length&&0!=a.length){if(e.find(".disable").addClass("disabled"),a.hasClass("menufile")){var t=fileLight.type(Global.fileListSelect);"zip"==t?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,t)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==t?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,t)||inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.bindary,t)||inArray(core.filetype.doc,t)?e.find(".open_text").hide():e.find(".open_text").show()}if(a.hasClass("dialog_menu")){var i=a.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(a.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var a=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",t="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(a).removeClass(t),$("ul.menufolder").find(a).removeClass(t),$("ul.fileContiner_menu").find(a).removeClass(t),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(a).addClass(t),$("ul.menufolder").find(a).addClass(t),$("ul.fileContiner_menu").find(a).addClass(t),$(".tools-left button").addClass("disabled"))},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/desktop/fileSelect",[],function(){var e=!1,a=!1,t=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(Config.FileBoxClass).live("mouseenter",function(){a&&($(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)||$(this).hasClass("menuRecycleButton"))&&$(this).addClass("selectDragTemp"),e||a||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?t=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var a=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,a);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>a?c(a,i):a>n?c(n,a):a>i&&n>a&&c(i,a)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&t&&(t=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).unbind("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.pathInfo():ui.path.open()}),$(Config.FileBoxTittleClass).unbind("dblclick").live("dblclick",function(e){return ui.path.rname(),stopPP(e),!1})},s=function(){var t,i,n,s=100,o=50,r=30,l=80-Global.topbar_height,c=0,p=!1,u=0,h=0;$(Config.FileBoxClass).unbind("mousedown").live("mousedown",function(a){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=a.which||e?!0:(t=$(this),f(a),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(a),!1)});var f=function(e){rightMenu.hidden(),a=!0,c=$.now(),u=e.pageY,h=e.pageX,i=$(document).height(),n=$(document).width()},m=function(e){if(!a)return!0;$.now()-c>s&&!p&&_();var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=i-50?i-50:e.clientY;t=0>=t?0:t,r=0>=r?0:r,t-=o,r-=l,$(".draggable-dragging").css("left",t),$(".draggable-dragging").css("top",r),Global.isIE&&$("."+Config.TypeFolderClass+",div.menuRecycleButton").each(function(){var a=e.pageX,t=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();a>i.left&&i.left+n>a&&t>i.top&&i.top+s>t?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},v=function(e){if(!a)return!1;a=!1,p=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()});var t=G.this_path,i=0==$(".selectDragTemp").length;i||(t+=d.name($(".selectDragTemp"))),Global.ctrlKey?(Math.abs(e.pageX-h)>r||Math.abs(e.pageY-u)>r)&&ui.path.copyDrag(t,i):i||($(".selectDragTemp").hasClass("menuRecycleButton")?ui.path.remove():ui.path.cuteDrag(t))},_=function(){p=!0,$("body").css("cursor","move"),t.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+t.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var t=null,i=null,n=null;$(Config.BodyContent).unbind("mousedown").live("mousedown",function(e){return ui.isEdit()?!0:a||1!=e.which?!0:(s(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){o(e)}),$(document).one("mouseup",function(e){r(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()}),stopPP(e),!1)});var s=function(a){$(a.target).parent().hasClass(Config.FileBoxClassName)||$(a.target).parent().parent().hasClass(Config.FileBoxClassName)||$(a.target).hasClass("fix")||(rightMenu.hidden(),a.ctrlKey||a.shiftKey||d.clear(),0==$(a.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),t=a.pageX,i=a.pageY-Global.topbar_height,e=!0))},o=function(a){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=a.pageX,o=a.pageY-Global.topbar_height;n.css({left:Math.min(s,t),top:Math.min(o,i),width:Math.abs(s-t),height:Math.abs(o-i)});for(var r=n.offset().left,l=n.offset().top-Global.topbar_height,c=n.width(),p=n.height(),u=Global.fileListNum,h=0;u>h;h++){var f=Global.fileListAll[h],m=$(Global.fileListAll[h]),v=f.offsetWidth+f.offsetLeft,_=f.offsetHeight+f.offsetTop;if(v>r&&_>l&&r+c>f.offsetLeft&&l+p>f.offsetTop){if(!m.hasClass("selectDragTemp")){if(m.hasClass("selectToggleClass"))continue;if(m.hasClass(Config.SelectClassName)){m.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(m);continue}m.addClass("selectDragTemp")}}else m.removeClass("selectDragTemp"),m.hasClass("selectToggleClass")&&m.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},r=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,t=null,i=null,void 0):!1}},r=function(e){var a=0,t=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(t.attr(Config.FileOrderAttr));switch(e){case"up":a=0>=s?s:s-1;break;case"left":a=n>s?0:s-n;break;case"down":a=s>=i-1?s:s+1;break;case"right":a=s+n>=i-1?i-1:s+n;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(t.first().attr(Config.FileOrderAttr)),r=parseInt(t.last().attr(Config.FileOrderAttr));switch(e){case"up":a=a=0>=o?o:o-1;break;case"left":break;case"down":a=r>=i?r:r+1;break;case"right":a=r+n>=i?r:r+n;break;default:}}};return n(),Global.fileListAll.eq(a)},l=function(e){var a;switch(e){case"home":a=Global.fileListAll.first();break;case"end":a=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":a=r(e);break;case"all":a=Global.fileListAll;break;default:}d.clear(),a.addClass(Config.SelectClassName),d.select()},c=function(e,a){d.clear();for(var t=e;a>=t;t++)$(Global.fileListAll[t]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e)},setInView:function(){},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){e.removeClass("menufile menufolder menuDefault").addClass("menuMore")},resumeMenu:function(e){var a={fileBox:"menufile",folderBox:"menufolder",systemBox:"menuDefault"};for(var t in a)e.hasClass(t)&&e.removeClass("menuMore").addClass(a[t]);$(".menuRecycleButton").removeClass("menuDefault")},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var a=Global.fileListSelect;return a.each(function(){e.push(d.name($(this)))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;
-e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0}}};return{init:i,fileLight:d,selectPos:l}}),define("app/src/desktop/ui",[],function(){var e=new Picasa;PicasaOpen=!1;var a=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,e.initData()},t=function(e,a){var a="down"==a?-1:1;return function(t,i){return t=t[e],i=i[e],i>t?-1*a:t>i?1*a:void 0}},i=function(e,a){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=a&&(G.sort_order=a,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+a).addClass("selected")),r(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+G.sort_field+","+G.sort_order})},n=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(a){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var t=!1;if(Global.ctrlKey||a.keyCode==e||a.ctrlKey)switch(t=!0,Global.ctrlKey=!0,a.keyCode){case 8:ui.path.remove(),t=!0;break;case 65:fileSelect.selectPos("all");break;case 67:ui.path.copy();break;case 88:ui.path.cute();break;case 83:break;case 86:ui.path.past();break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:t=!1}else if(a.shiftKey)Global.shiftKey=!0;else switch(a.keyCode){case 8:t=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),t=!0;break;case 38:fileSelect.selectPos("up");break;case 39:fileSelect.selectPos("right"),t=!0;break;case 40:fileSelect.selectPos("down");break;case 13:ui.path.open(),t=!1;break;case 46:ui.path.remove(),t=!0;break;case 113:ui.path.rname(),t=!0;break;default:t=!1}return t&&(stopPP(a),a.keyCode=0,a.returnValue=!1),!0}).keyup(function(a){a.shiftKey&&(Global.shiftKey=!1),a.keyCode!=e&&a.ctrlKey||(Global.ctrlKey=!1)})},s=function(){var e=10,a=10,t=85,i=100,n=10,s=$(document).height()-50,o=Math.floor((s-e)/(i+n)),r=0,l=0,c=0,d=0;$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){r=s%o,l=Math.floor(s/o),c=a+(t+n)*l,d=e+(i+n)*r,$(this).css({left:c,top:d})})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var a="<div class='file folderBox menufolder' "+_hover_title(e)+">";return a+="<div class='folder ico' filetype='folder'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"},this._getFileBox=function(e){var a="";if("oexe"==e.ext&&void 0!=e.icon){var t=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(t=G.static_path+"images/app/"+e.icon);var i=urlEncode(json_encode(e)),n=e.name.replace(".oexe","");a="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">","app_link"==e.type?(a+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(n)+" ico'":"<div class='folder ico'",a+=' filetype="oexe"></div><div class="app_link"></div>'):a+="<div class='ico' filetype='oexe' style='background-image:url("+t+")'></div>",a+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+n+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);a+="<div class='file fileBox menufile'"+_hover_title(e)+">",a+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;;'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"}else a+="<div class='file fileBox menufile'"+_hover_title(e)+">",a+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>";return a};var o=function(e){var i="",n=G.json_data.folderlist,o=G.json_data.filelist;n="size"==G.sort_field||"ext"==G.sort_field?n.sort(t("name",G.sort_order)):n.sort(t(G.sort_field,G.sort_order)),o=o.sort(t(G.sort_field,G.sort_order)),G.json_data.folderlist=n,G.json_data.filelist=o;for(var r="",l="",c=0;o.length>c;c++)r+=this._getFileBox(o[c]);for(var c=0;n.length>c;c++)l+=this._getFolderBox(n[c]);i+="up"==G.sort_order?l+r:r+l;var d="";$(".systemBox").each(function(){d+=$(this).get(0).outerHTML}),i=d+i,i+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),a(),s()},r=function(e,a,t){if(void 0==e&&(e=!0),void 0==a&&(a=!1),e)$.ajax({url:"index.php?explorer/pathList&path="+G.this_path,dataType:"json",error:core.ajaxError,success:function(e){return e.code?(G.json_data=e.data,c(),o(a),"function"==typeof t&&t(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}}),$.ajax({url:"index.php?explorer/pathList&type=desktop&path=*recycle*/",dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var a=G.static_path+"images/app/recycle_full.png";if(0==e.data.folderlist.length&&0==e.data.filelist.length)var a=G.static_path+"images/app/recycle.png";$(".menuRecycleButton .ico").css("background-image",'url("'+a+'")')}});else{var i=fileLight.getAllName();o(a),ui.path.setSelectByFilename(i)}},l=function(e){r(!0,!1,e)},c=function(){for(var e=0;G.json_data.filelist.length>e;e++)G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)};return{f5:r,f5_callback:l,picasa:e,setListSort:i,sort_list:s,init:function(){$(".hidden").removeClass("hidden"),s(),l(),n(),$(window).bind("resize",function(){ui.setStyle(),0!=PicasaOpen&&e.setFrameResize(),s()}),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),FrameCall.top("OpenopenEditor","Editor.save","")});var a,t=0,i="",o=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(e){var n=String.fromCharCode(e.charCode);return 0==t?(t=time(),i=n,a=setTimeout(function(){ui.path.setSelectByChar(i),t=0},o),void 0):n==i.substr(-1)?(ui.path.setSelectByChar(i),t=0,void 0):(o>time()-t&&(t=time(),i+=n,clearTimeout(a),a=setTimeout(function(){ui.path.setSelectByChar(i),t=0},o)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["ctrl+u","command+u"],function(e){stopPP(e),core.upload()}),Mousetrap.bind(["ctrl+e","command+e"],function(e){stopPP(e),ui.path.openEditor()}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),Mousetrap.bind(["alt+n","alt+n"],function(e){stopPP(e),ui.path.newFile()}),Mousetrap.bind(["alt+m","alt+m"],function(e){stopPP(e),ui.path.newFolder()}),PicasaOpen=!1,e.init(".picasaImage"),e.initData()},setTheme:function(e){core.setSkin(e,"app_desktop.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},setWall:function(e){$(".wallbackground").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")")})},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},setStyle:function(){Global.fileRowNum=function(){var e=$(Config.FileBoxSelector).width(),a=parseInt($(Config.FileBoxClass).css("width"))+parseInt($(Config.FileBoxClass).css("border-left-width"))+parseInt($(Config.FileBoxClass).css("border-right-width"))+parseInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/a)}()}}}),define("app/src/explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var a=e("../../common/pathOperate"),t=e("../../common/pathOpen"),n=void 0;ui.pathOpen=t;var s=function(e,a,t){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=a&&""!=a&&core.tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var i="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),i&&$(".dialog_file_upload").css("visibility","hidden")}ui.f5_callback(function(){"function"==typeof t&&t()})}},o=function(e,a){var t,i,n=0,s=G.json_data.folderlist,o=G.json_data.filelist;if("desktop"==Config.pageApp&&(n=$(".menuDefault").length),"folder"==a){for(t=0;s.length>t&&!(s[t].name>=e);t++);return"up"==G.sort_order?t+n:o.length+t+n}if("file"==a){for(i=0;o.length>i&&!(o[i].name>=e);i++);return"down"==G.sort_order?i+n:s.length+i+n}return-1},r=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(a){var t=fileLight.name($(this));-1!=$.inArray(t,e)&&$(Global.fileListAll).eq(a).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==n||G.this_path!=n.path||e!=n.key){var a=[];$(".fileContiner .file").each(function(){var t=fileLight.name($(this));t&&e==t.substring(0,e.length).toLowerCase()&&a.push(t)}),n={key:e,path:G.this_path,index:0,list:a}}0!=n.list.length&&(r(n.list[n.index++]),n.index==n.list.length&&(n.index=0))}},c=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(a){var t=fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(a).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},d=function(e,a,t){var n=e.length;for(i=0;n>i;i++)if(e[i][a]==t)return e[i]},p=function(e){var a="",t=0;return null!=G.json_data.filelist&&(a=d(G.json_data.filelist,"name",e),null!=a&&(t=1)),null!=G.json_data.folderlist&&(a=d(G.json_data.folderlist,"name",e),null!=a&&(t=1)),t},u=function(e,a){var t,i=0;if(void 0==a){if(!p(e))return e;for(t=e+"(0)";p(t);)i++,t=e+"("+i+")";return t}if(!p(e+"."+a))return e+"."+a;for(t=e+"(0)."+a;p(t);)i++,t=e+"("+i+")."+a;return t},h=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyBack",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},f=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyNext",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},m=function(e){fileLight.clear(),void 0==e&&(e="txt");var t="newfile",t=u(t,e),i=o(t,"file");i=0==i?-1:i-1;var n='<div class="file select menufile"  id="makefile">			<div class="'+e+' ico"></div>				<div class="titleBox">					<span class="title">					<div class="textarea">						<textarea class="newfile fix">'+t+'</textarea>					</span>				</div>			</div>			<div style="clear:both;"></div>		</div>';-1==i?$(Config.FileBoxSelector).html(n+$(Config.FileBoxSelector).html()):$(n).insertAfter(Config.FileBoxSelector+" .file:eq("+i+")"),"desktop"==Config.pageApp&&ui.sort_list();var s=$(".newfile"),l=s.get(0),c=t.length-e.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c);s.focus(),s.unbind("keydown").keydown(function(e){return(13==e.keyCode||27==e.keyCode)&&(stopPP(e),e.preventDefault(),filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):a.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})),!0}),s.unbind("blur").blur(function(){filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFile(e)):a.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})})},v=function(){fileLight.clear();var e=LNG.newfolder,e=u(e),t=o(e,"folder");t=0==t?-1:t-1;var i='<div class="file select menufolder" id="makefile">';i+='<div class="folder ico" filetype="folder"></div>',i+='<div  class="titleBox"><span class="title">',i+='<div class="textarea"><textarea class="newfile fix">'+e+'</textarea></span></div></div><div style="clear:both;"></div></div>',-1==t?$(Config.FileBoxSelector).html(i+$(Config.FileBoxSelector).html()):$(i).insertAfter(Config.FileBoxSelector+" .file:eq("+t+")"),"desktop"==Config.pageApp&&ui.sort_list(),$(".newfile").select(),$(".newfile").focus(),$(".newfile").unbind("keydown").keydown(function(e){if(13==e.keyCode||27==e.keyCode){stopPP(e),e.preventDefault();var t=$(".newfile").attr("value");p(t)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):a.newFolder(G.this_path+t,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(t)})})}}),$(".newfile").unbind("blur").blur(function(){filename=$(".newfile").attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFolder()):a.newFolder(G.this_path+filename,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(filename)})})})},_=function(){var e="",t="",i=Global.fileListSelect,n=fileLight.name(i),s=fileLight.type(i);if(1==i.length){if(i.hasClass("menuSharePath"))return ui.path.share_edit(),void 0;s="folder"==s?"folder":s,$(i).find(".title").html("<div class='textarea'><textarea class='fix' id='pathRenameTextarea'>"+$(i).find(".title").text()+"</textarea><div>");var o=$("#pathRenameTextarea"),l=o.get(0);if("folder"==s)o.select();else{var c=n.length-s.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c)}o.unbind("focus").focus(),o.keydown(function(l){if(13==l.keyCode){l.preventDefault(),stopPP(l),e=o.attr("value"),"oexe"==s&&(e+=".oexe");var c=e;e!=n?(t=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),a.rname(t,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(c)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}27==l.keyCode&&("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}),o.unbind("blur").blur(function(){e=$("#pathRenameTextarea").attr("value"),"oexe"==s&&(e+=".oexe");var o=e;e!=n?(t=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),a.rname(t,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(o)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))})}},g=function(){ui.f5(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)},y=function(e){if(e){var a=[];return 0==Global.fileListSelect.length?a:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),t="folder"==fileLight.type($(this))?"folder":"file";"*share*/"==G.this_path&&(e=$(this).attr("data-path"),t="share"),a.push({path:e,type:t})}),a)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var t=Global.fileListSelect,i=G.this_path+fileLight.name(t),n=fileLight.type(t);return"*share*/"==G.this_path&&(i=t.attr("data-path"),n="share"),{path:i,type:n}};return{appEdit:function(e){if(e)a.appEdit(0,0,"user_add");else{var t=Global.fileListSelect.attr("data-app"),i=json_decode(urlDecode(t));i.path=G.this_path+fileLight.name(Global.fileListSelect),a.appEdit(i)}},appList:function(){a.appList(y().path)},appInstall:function(){a.appInstall(y().path)},openEditor:function(){t.openEditor(y().path)},openIE:function(){t.openIE(y().path)},open:function(e){if(0!=y().path.length){if("*recycle*/"==G.this_path)return ui.path.info(),void 0;if("*share*/"==G.this_path)return ui.path.share_open_window(),void 0;if(void 0!=e)return t.open(e),void 0;var a=y(),i=Global.fileListSelect;if(inArray(core.filetype.image,a.type)){if(!core.authCheck("explorer:fileDownload",LNG.no_permission_download))return;return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0}if("oexe"==a.type){var n=i.attr("data-app");a.path=json_decode(urlDecode(n))}t.open(a.path,a.type)}},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var a=fileLight.type($(this));if(inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)){var t=core.path2url(G.this_path+fileLight.name($(this)));e.push(t)}}),t.play(e,"music")}},pathOperate:a,share:function(){a.share(y())},setBackground:function(){a.setBackground(y().path)},createLink:function(){a.createLink(y().path,y().type,function(e){ui.f5_callback(function(){r(e.info)})})},createProject:function(){a.createProject(y().path,function(e){ui.f5_callback(function(){r(e.info)})})},download:function(){var e=y(!0);1==e.length&&"file"==e[0].type?t.download(y().path):a.zipDownload(e)},share_edit:function(){var e=y().path,t=G.json_data.share_list[e];a.share_box(t)},share_open_window:function(){var e=y().path,a=G.json_data.share_list[e],t=a.type;"folder"==a.type&&(t=1==a.code_read?"code_read":"folder");var i="./index.php?share/"+t+"&user="+G.user_name+"&sid="+a.sid;window.open(i)},share_open_path:function(){var e=y().path,a=G.json_data.share_list[e],t=core.pathFather(a.path),i=core.pathThis(a.path);ui.path.list(t,"",function(){r(i)})},recycle_clear:function(){$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.2,content:LNG.recycle_clear_info,ok:function(){$.ajax({url:"index.php?explorer/pathDeleteRecycle",beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),ui.f5(),FrameCall.father("ui.f5","1,1"),"function"==typeof callback&&callback(e)}})},cancel:!0})},explorer:function(){core.explorer(y().path)},explorerNew:function(){window.open("index.php?/explorer&path="+y().path)},openProject:function(){core.explorerCode(y().path)},search:function(){core.search("",y().path)},fav:function(){a.fav(y().path)},remove:function(){a.remove(y(!0),g),fileLight.clear()},copy:function(){a.copy(y(!0))},cute:function(){a.cute(y(!0),ui.f5)},zip:function(){a.zip(y(!0),function(e){ui.f5_callback(function(){r(e.info)})})},unZip:function(){a.unZip(y().path,ui.f5)},cuteDrag:function(e){a.cuteDrag(y(!0),e,g)},copyDrag:function(e,t){a.copyDrag(y(!0),e,function(e){fileLight.clear(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){t&&e.data&&r(e.data)})})},info:function(){if("share"==y().type){var e=y().path,t=G.json_data.share_list[e],i=t.path;a.info([{path:i,type:t.type}])}else a.info(y(!0))},past:function(){fileLight.clear(),a.past(G.this_path,function(e){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(e)})})},back:h,next:f,list:s,newFile:m,newFolder:v,rname:_,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:a.clipboard}}),define("app/common/pathOperate",[],function(e){var a={};a.file_info=e("../tpl/fileinfo/file_info.html"),a.path_info=e("../tpl/fileinfo/path_info.html"),a.path_info_more=e("../tpl/fileinfo/path_info_more.html");var t=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var a=function(e,a){for(var t=a.length,i=0;t>i;i++)if(e.indexOf(a[i])>0)return!0;return!1};return a(e,t)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var a="list=[",t=0;e.length>t;t++)a+='{"type":"'+e[t].type+'","path":"'+urlEncode2(e[t].path)+'"}',e.length-1>t&&(a+=",");return a+"]"},s=function(e,a){if(e){var t=core.pathThis(e);return i(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0)}},o=function(e,a){if(e){var t=core.pathThis(e);return i(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0)}},r=function(e,a,t){return e&&a&&e!=a?i(core.pathThis(a))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(a),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0):void 0},l=function(e,a){if(!(1>e.length)){var t=e[0].path,i=LNG.remove_title,s=t+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(t){if(core.tips.close(t),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof a&&a(t)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var a=e.path,t="folder"==e.type?"folder":"file";1>a.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(a),dataType:"json",success:function(e){e.code?p(e.data):p(void 0,function(){$(".content_info input[name=type]").val(t),$(".content_info input[name=path]").val(a),$(".content_info input[name=name]").val(core.pathThis(a)),"file"==t&&$(".label_code_read").addClass("hidden")})}})},p=function(a,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(a),void 0!=t&&t()})},u=function(a){var t=e("../tpl/share.html"),i=template.compile(t),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{a=e,$(".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=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 t=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:a.sid}]),"*share*/"==G.this_path&&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 a=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(a=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+a}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var a=e.val().length;if(Global.isIE){var i=t.createTextRange();i.moveEnd("character",-t.value.length),i.moveEnd("character",a),i.moveStart("character",0),i.select()}else t.setSelectionRange(0,a)})};o(a),r()},h=function(e){if(!(1>e.length)){var a=core.path2url(e);FrameCall.father("ui.setWall",'"'+a+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(a),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,a,t){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==a?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},m=function(e,a){if(!(1>e.length)){var t=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,a){if(e){var t="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(t){if(!t.code)return core.tips.close(t),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(a[i]),o=UUID();t.data.LNG=LNG,t.data.atime=date(LNG.time_type_info,t.data.atime),t.data.ctime=date(LNG.time_type_info,t.data.ctime),t.data.mtime=date(LNG.time_type_info,t.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(t.data),width:"350px",cancel:!0}),y(o,e)}})},y=function(e,a){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(a),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)})}})})},b=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var a="index.php?explorer/zipDownload";G.share_page!==void 0&&(a="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var a="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(a="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var t='<iframe src="'+a+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:t});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,a){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof a&&a(e)}})},k=function(e,a){if(e){var t="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:t,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})}},N=function(e,a,t){a&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(a+"/"),beforeSend:function(){core.tips.loading(LNG.moving)
-},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},w=function(e,a,t){a&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(a+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var a="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+a)}},j=function(e){var a={};return a.type=e.find("input[type=radio]:checked").val(),a.content=e.find("textarea").val(),a.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");a[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");a[e]="checked"==$(this).attr("checked")?1:0}),a},T=function(e){e.find(".type input").change(function(){var a=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+a+"]").removeClass("hidden")})},S=function(a,t,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(a=a),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:a})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(a.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+a.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),a.group&&n.find("option").eq(a.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),i){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+a.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="+a.group+"]").attr("selected",!0);break;default:}T(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(a){var t=a.data;core.tips.close(a);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:t,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:S,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:b,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:N,copyDrag:w,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var a=function(e,a){if(void 0!=e){if(void 0==a&&(a=core.pathExt(e)),a=a.toLowerCase(),"folder"==a)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=a){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==a){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==a){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==a||"htm"==a){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,a)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)){var n=core.path2url(e);return l(n,a),void 0}return inArray(core.filetype.doc,a)?(r(e),void 0):inArray(core.filetype.text,a)||inArray(core.filetype.code,a)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(a+LNG.edit_can_not,!1):t(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var a=json_decode(e);a.name=core.pathThis(p),core.openApp(a)})}else core.openApp(e)}},t=function(e,a){var t='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+a+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(a="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var t='<iframe src="'+a+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:t});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var a=core.path2url(e);window.open(a)}},s=function(e,a,t,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:t,ico:a,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t))return a(e,t),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var a=document.domain;if(""==G.office_server){if(0==a.search("localhost")||0==a.search("192.168.")||0==a.search("127.0.0"))return t(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}$.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(a){if(0==a.code)return core.tips.tips(a),void 0;var t=G.app_host+"./index.php?user/public_link&fid="+a.data,i=G.office_server+urlEncode(t),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(a,t){a&&("string"==typeof a&&(a=[a]),CMPlayer=e("./CMPlayer"),CMPlayer.play(a,t))};return{open:a,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},a=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},t=function(a){var t,i,s,o;"music_player"==a?(o=core.ico("mp3"),t=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),t=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+t.path+".zip",a),l={id:a+"_dialog",simple:!0,ico:o,title:i,width:t.width+10,height:t.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(a);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var a,t="";for(a=e.length-1;a>=0;a--){var i,n;-1==e[a].search("fileProxy")?(i=urlEncode(e[a]),n=core.pathThis(e[a])):(i=e[a],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),t+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return t},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,a){var t=n(a),s=i(e);try{t.config("play_mode","normal");var o=t.list().length;t.list_xml(s,!0),t.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var t=n(a("movie"));t&&(t.addEventListener("control_load","new_play"),t.addEventListener("control_play","new_play"))}};return{changeTheme:function(a,t){var i,s,o;"music"==a?(G.musictheme=t,i="music_player"):"movie"==a&&(G.movietheme=t,i="movie_player"),o=n(i),o&&(s=e[t],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=a(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{t(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var a;a=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var t=function(e){var a='<object id="the_wmp_player" ',t=navigator.userAgent;return-1!=t.indexOf("MSIE")?a+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=t.indexOf("Firefox")||-1!=t.indexOf("Chrome")||-1!=t.indexOf("Opera")||-1!=t.indexOf("Safari"))&&(a+='type="application/x-ms-wmp" '),a+='width="100%" height="100%">',a+='<param name="URL" value="'+e+'">',a+='<param name="autoStart" value="true">',a+='<param name="autoSize" value="true">',a+='<param name="invokeURLs" value="false">',a+='<param name="playCount" value="100">',a+='<param name="Volume" value="100">',a+='<param name="defaultFrame" value="datawindow">',a+="</object>"};try{var i=a.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=t(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};
\ No newline at end of file
+define("app/src/desktop/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","./fileSelect","./ui","../explorer/path","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",pageApp:"desktop",navbar:"navbar",AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),fileSelect=e("./fileSelect"),ui=e("./ui"),ui.path=e("../explorer/path"),fileLight=fileSelect.fileLight,$(document).ready(function(){ui.init(),TaskTap.init(),core.update(),fileSelect.init(),rightMenu.initDesktop(),e.async("lib/webuploader/webuploader-min",function(){core.upload_init()}),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".bodymain").click(function(){"block"==$("#menuwin").css("display")&&$("#menuwin").css("display","none")}),$(".start").click(function(){"block"==$("#menuwin").css("display")?$("#menuwin").css("display","none"):$("#menuwin").css("display","block")}),$("#menuwin").click(function(){$("#menuwin").css("display","none")}),$(".copyright").click(function(){core.copyright()}),$(".tab_hide_all").click(function(){if(0!=art.dialog.list.length){$(this).toggleClass("this");var e=!$(this).hasClass("this");$.each(art.dialog.list,function(a,t){t.display(e)})}})})}),define("app/common/taskTap",[],function(){var e={},a="",t=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var a=$(this).attr("id"),t=art.dialog.list[a],i=$("."+a);"hidden"==i.css("visibility")?t.display(!0):i.hasClass("aui_state_focus")?t.display(!1):t.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,a,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(a){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(a),!1});var h=function(t){s=!0,r=t.pageX,$tab_parent=$(".task_tab"),a=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=$sizeInt(a.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=$sizeInt(a.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=t.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(t){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(t);var n=t.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),a.each(function(){var a=$(this).get(0).getBoundingClientRect().left;if(n>a&&a+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>a-c/2+d&&a>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),a=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},t),l.animate({width:"0px"},t,function(){$(this).remove(),a=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},t,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var a=110,i=a,n=a+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},t);case"close":s.animate({width:i+"px"},t);break;case"resize":s.css("width",i+"px");break;default:}},o=function(a,t){$(".task_tab").removeClass("hidden");var i=t.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+a+'" title="'+i+'">'+t+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[a]={id:a,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),a=e},l=function(a){delete e[a],$(".task_tab #"+a).animate({width:0},t,function(){$(".task_tab #"+a).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var a=G.static_path+"images/file_16/",t=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,t);return-1==i?a+"file.png":a+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(a){}var a=e||window.event;return a?a&&$(a.target).is("textarea")||$(a.target).is("input")||0!=$(a.target).parents(".topbar").length||0!=$(a.target).parents(".edit_body").length||0!=$(a.target).parents(".aui_state_focus").length?!0:!1:!0},pathThis:function(e){e=e.replace(/\\/g,"/");var a=e.split("/"),t=a[a.length-1];if(""==t&&(t=a[a.length-2]),0==t.search("fileProxy")){t=urlDecode(t.substr(t.search("&path=")));var a=t.split("/");t=a[a.length-1],""==t&&(t=a[a.length-2])}return t},pathFather:function(e){e=e.replace(/\\/g,"/");var a=e.lastIndexOf("/");return e.substr(0,a+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var a=e.lastIndexOf(".");return e=e.substr(a+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var a=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(a=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),a},authCheck:function(e,a){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==a&&(a=LNG.no_permission),core.tips.tips(a,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var a=e.responseText,t='<div class="ajaxError">'+a+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==a.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(t):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:t}),void 0)},file_get:function(e,a){var t="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(t="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof a&&a(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),a=template.compile(e),t=a({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:t})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var a=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(a,function(a){try{a.todo(e)}catch(t){}})},explorer:function(e,a){void 0==e&&(e=""),void 0==a&&(a=core.pathThis(e));var t="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(t="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:a,width:880,height:550})},explorerCode:function(e){void 0==e&&(e="");var a="index.php?/editor&project="+e;G.share_page!==void 0&&(a="./index.php?share/code_read&user="+G.user+"&sid="+G.sid+"&project="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,a){var t=G.static_path+"style/skin/"+e+a;$("body").append('<img src="'+t+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,a){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,a,core.tips.topHeight())},tips:function(e,a){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,a,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,a,t){var i='<object type="application/x-shockwave-flash" id="'+t+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+a+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,a){var t,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:a,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},t=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(a),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),a=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(a):"explorer"==Config.pageApp?ui.path.list(a+"/","tips"):core.explorer(a+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var a=150;$("#search_value").focus(),$(".search_result .list").remove();var t=$(".search_result .message td");if(!e.search||!e.path)return t.hide().html(LNG.search_info).fadeIn(a),void 0;if(1>=e.search.length)return t.hide().html("too short!").fadeIn(a),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){t.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(a)},error:core.ajaxError,success:function(e){if(!e.code)return t.hide().html(e.data).fadeIn(a),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return t.hide().html(LNG.search_null).fadeIn(a),void 0;t.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(a)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var a=$(".download_box"),t=a.find("#download_list"),i=a.find("input").val();if(a.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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>';t.find(".item").length>0?$(s).insertBefore(t.find(".item:eq(0)")):t.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,a,t){core.ajaxError(e,a,t),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var a="",t=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(t){if(t.size=parseFloat(t.size),t.time=parseFloat(t.time),l){var i=(t.size-l.size)/(t.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;a=core.file_size(i)+"/s"}if(0==t.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(t.size/t.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+a+")")}d.find(".size").text(core.file_size(t.length)),l=t}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var a={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var t in a)if(e>=a[t])return(e/a[t]).toFixed(1)+t;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var a=require("../tpl/upload.html"),t=template.compile(a),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:t({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,a){uploader.skipFile(a),uploader.removeFile(a)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",a=!0;$.browser.msie&&(a=!1);var t=10485760;t>=G.upload_max&&(t=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:a,chunkRetry:3,chunkSize:t}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var a=$(this).find("span.title").attr("title");ui.pathOpen.open(a),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var a=$(this).parent().parent().attr("id");uploader.skipFile(a),uploader.removeFile(a,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,a){var t=e.size*a,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),t]]:i>=e.speed.length?e.speed.push([time(),t]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),t]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,a){var t=urlEncode(e.file.fullPath);(void 0==t||"undefined"==t)&&(t=""),a.fullPath=t}).on("fileQueued",function(a){if(!core.upload_check())return uploader.skipFile(a),uploader.removeFile(a),void 0;var t,n=$(e),t=a.fullPath;a.finished=!1,(void 0==t||"undefined"==t)&&(t=a.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+a.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+t+'">'+core.pathThis(t)+"</span>"+'<span class="size">'+core.file_size(a.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,a){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var t=o(e,a),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*a)+"%("+t+")"),l.css("width",100*a+"%")}).on("uploadAccept",function(e,a){e.file.serverData=a;try{r.push(core.pathThis(a.info))}catch(t){}}).on("uploadSuccess",function(e){var a=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(a),n++;var t=e.serverData;if(t.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(t.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(t.data).attr("title",t.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,a){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+a+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var a=e.dataTransfer.getData("text/plain");a&&"http"==a.substring(0,4)?ui.pathOperate.appAddURL(a):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")
+},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,a){_menuBody(e,a)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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,a){var t=a.$trigger.attr("id"),i=art.dialog.list[t];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,a){t!=e&&a.close()});break;case"quit":i.close()}}})},_bindTask=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,a){var t=a.$trigger.attr("id");switch(art.dialog.list[t],e){case"showAll":$.each(art.dialog.list,function(e,a){a.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,a){a.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,a){a.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,a){var t=a.$trigger.attr("id"),i=art.dialog.list[t];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,a,t){e&&(rightMenu.hidden(),$(e).contextMenu({x:a,y:t}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),a=$(".context-menu-active");if(0!=e.length&&0!=a.length){if(e.find(".disable").addClass("disabled"),a.hasClass("menufile")){var t=fileLight.type(Global.fileListSelect);"zip"==t?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,t)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==t?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,t)||inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.bindary,t)||inArray(core.filetype.doc,t)?e.find(".open_text").hide():e.find(".open_text").show()}if(a.hasClass("dialog_menu")){var i=a.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(a.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var a=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",t="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(a).removeClass(t),$("ul.menufolder").find(a).removeClass(t),$("ul.fileContiner_menu").find(a).removeClass(t),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(a).addClass(t),$("ul.menufolder").find(a).addClass(t),$("ul.fileContiner_menu").find(a).addClass(t),$(".tools-left button").addClass("disabled"))},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/desktop/fileSelect",[],function(){var e=!1,a=!1,t=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(Config.FileBoxClass).live("mouseenter",function(){a&&($(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)||$(this).hasClass("menuRecycleButton"))&&$(this).addClass("selectDragTemp"),e||a||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?t=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var a=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,a);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>a?c(a,i):a>n?c(n,a):a>i&&n>a&&c(i,a)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&t&&(t=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).unbind("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.pathInfo():ui.path.open()}),$(Config.FileBoxTittleClass).unbind("dblclick").live("dblclick",function(e){return ui.path.rname(),stopPP(e),!1})},s=function(){var t,i,n,s=100,o=50,r=30,l=80-Global.topbar_height,c=0,p=!1,u=0,h=0;$(Config.FileBoxClass).unbind("mousedown").live("mousedown",function(a){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=a.which||e?!0:(t=$(this),f(a),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(a),!1)});var f=function(e){rightMenu.hidden(),a=!0,c=$.now(),u=e.pageY,h=e.pageX,i=$(document).height(),n=$(document).width()},m=function(e){if(!a)return!0;$.now()-c>s&&!p&&_();var t=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=i-50?i-50:e.clientY;t=0>=t?0:t,r=0>=r?0:r,t-=o,r-=l,$(".draggable-dragging").css("left",t),$(".draggable-dragging").css("top",r),Global.isIE&&$("."+Config.TypeFolderClass+",div.menuRecycleButton").each(function(){var a=e.pageX,t=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();a>i.left&&i.left+n>a&&t>i.top&&i.top+s>t?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},v=function(e){if(!a)return!1;a=!1,p=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()});var t=G.this_path,i=0==$(".selectDragTemp").length;i||(t+=d.name($(".selectDragTemp"))),Global.ctrlKey?(Math.abs(e.pageX-h)>r||Math.abs(e.pageY-u)>r)&&ui.path.copyDrag(t,i):i||($(".selectDragTemp").hasClass("menuRecycleButton")?ui.path.remove():ui.path.cuteDrag(t))},_=function(){p=!0,$("body").css("cursor","move"),t.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+t.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var t=null,i=null,n=null;$(Config.BodyContent).unbind("mousedown").live("mousedown",function(e){return ui.isEdit()?!0:a||1!=e.which?!0:(s(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){o(e)}),$(document).one("mouseup",function(e){r(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()}),stopPP(e),!1)});var s=function(a){$(a.target).parent().hasClass(Config.FileBoxClassName)||$(a.target).parent().parent().hasClass(Config.FileBoxClassName)||$(a.target).hasClass("fix")||(rightMenu.hidden(),a.ctrlKey||a.shiftKey||d.clear(),0==$(a.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),t=a.pageX,i=a.pageY-Global.topbar_height,e=!0))},o=function(a){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=a.pageX,o=a.pageY-Global.topbar_height;n.css({left:Math.min(s,t),top:Math.min(o,i),width:Math.abs(s-t),height:Math.abs(o-i)});for(var r=n.offset().left,l=n.offset().top-Global.topbar_height,c=n.width(),p=n.height(),u=Global.fileListNum,h=0;u>h;h++){var f=Global.fileListAll[h],m=$(Global.fileListAll[h]),v=f.offsetWidth+f.offsetLeft,_=f.offsetHeight+f.offsetTop;if(v>r&&_>l&&r+c>f.offsetLeft&&l+p>f.offsetTop){if(!m.hasClass("selectDragTemp")){if(m.hasClass("selectToggleClass"))continue;if(m.hasClass(Config.SelectClassName)){m.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(m);continue}m.addClass("selectDragTemp")}}else m.removeClass("selectDragTemp"),m.hasClass("selectToggleClass")&&m.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},r=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,t=null,i=null,void 0):!1}},r=function(e){var a=0,t=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(t.attr(Config.FileOrderAttr));switch(e){case"up":a=0>=s?s:s-1;break;case"left":a=n>s?0:s-n;break;case"down":a=s>=i-1?s:s+1;break;case"right":a=s+n>=i-1?i-1:s+n;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(t.first().attr(Config.FileOrderAttr)),r=parseInt(t.last().attr(Config.FileOrderAttr));switch(e){case"up":a=a=0>=o?o:o-1;break;case"left":break;case"down":a=r>=i?r:r+1;break;case"right":a=r+n>=i?r:r+n;break;default:}}};return n(),Global.fileListAll.eq(a)},l=function(e){var a;switch(e){case"home":a=Global.fileListAll.first();break;case"end":a=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":a=r(e);break;case"all":a=Global.fileListAll;break;default:}d.clear(),a.addClass(Config.SelectClassName),d.select()},c=function(e,a){d.clear();for(var t=e;a>=t;t++)$(Global.fileListAll[t]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e)},setInView:function(){},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){e.removeClass("menufile menufolder menuDefault").addClass("menuMore")},resumeMenu:function(e){var a={fileBox:"menufile",folderBox:"menufolder",systemBox:"menuDefault"};
+for(var t in a)e.hasClass(t)&&e.removeClass("menuMore").addClass(a[t]);$(".menuRecycleButton").removeClass("menuDefault")},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var a=Global.fileListSelect;return a.each(function(){e.push(d.name($(this)))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0}}};return{init:i,fileLight:d,selectPos:l}}),define("app/src/desktop/ui",[],function(){var e=new Picasa;PicasaOpen=!1;var a=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,e.initData()},t=function(e,a){var a="down"==a?-1:1;return function(t,i){return t=t[e],i=i[e],i>t?-1*a:t>i?1*a:void 0}},i=function(e,a){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=a&&(G.sort_order=a,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+a).addClass("selected")),r(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+G.sort_field+","+G.sort_order})},n=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(a){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var t=!1;if(Global.ctrlKey||a.keyCode==e||a.ctrlKey)switch(t=!0,Global.ctrlKey=!0,a.keyCode){case 8:ui.path.remove(),t=!0;break;case 65:fileSelect.selectPos("all");break;case 67:ui.path.copy();break;case 88:ui.path.cute();break;case 83:break;case 86:ui.path.past();break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:t=!1}else if(a.shiftKey)Global.shiftKey=!0;else switch(a.keyCode){case 8:t=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),t=!0;break;case 38:fileSelect.selectPos("up");break;case 39:fileSelect.selectPos("right"),t=!0;break;case 40:fileSelect.selectPos("down");break;case 13:ui.path.open(),t=!1;break;case 46:ui.path.remove(),t=!0;break;case 113:ui.path.rname(),t=!0;break;default:t=!1}return t&&(stopPP(a),a.keyCode=0,a.returnValue=!1),!0}).keyup(function(a){a.shiftKey&&(Global.shiftKey=!1),a.keyCode!=e&&a.ctrlKey||(Global.ctrlKey=!1)})},s=function(){var e=10,a=10,t=85,i=100,n=10,s=$(document).height()-50,o=Math.floor((s-e)/(i+n)),r=0,l=0,c=0,d=0;$(".fileContiner .file").css("position","absolute"),$(".fileContiner .file").each(function(s){r=s%o,l=Math.floor(s/o),c=a+(t+n)*l,d=e+(i+n)*r,$(this).css({left:c,top:d})})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var a="<div class='file folderBox menufolder' "+_hover_title(e)+">";return a+="<div class='folder ico' filetype='folder'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"},this._getFileBox=function(e){var a="";if("oexe"==e.ext&&void 0!=e.icon){var t=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(t=G.static_path+"images/app/"+e.icon);var i=urlEncode(json_encode(e)),n=e.name.replace(".oexe","");a="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">","app_link"==e.type?(a+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(n)+" ico'":"<div class='folder ico'",a+=' filetype="oexe"></div><div class="app_link"></div>'):a+="<div class='ico' filetype='oexe' style='background-image:url("+t+")'></div>",a+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+n+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);a+="<div class='file fileBox menufile'"+_hover_title(e)+">",a+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;;'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"}else a+="<div class='file fileBox menufile'"+_hover_title(e)+">",a+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",a+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>";return a};var o=function(e){var i="",n=G.json_data.folderlist,o=G.json_data.filelist;n="size"==G.sort_field||"ext"==G.sort_field?n.sort(t("name",G.sort_order)):n.sort(t(G.sort_field,G.sort_order)),o=o.sort(t(G.sort_field,G.sort_order)),G.json_data.folderlist=n,G.json_data.filelist=o;for(var r="",l="",c=0;o.length>c;c++)r+=this._getFileBox(o[c]);for(var c=0;n.length>c;c++)l+=this._getFolderBox(n[c]);i+="up"==G.sort_order?l+r:r+l;var d="";$(".systemBox").each(function(){d+=$(this).get(0).outerHTML}),i=d+i,i+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(i).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(i),a(),s()},r=function(e,a,t){if(void 0==e&&(e=!0),void 0==a&&(a=!1),e)$.ajax({url:"index.php?explorer/pathList&path="+G.this_path,dataType:"json",error:core.ajaxError,success:function(e){return e.code?(G.json_data=e.data,c(),o(a),"function"==typeof t&&t(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}}),$.ajax({url:"index.php?explorer/pathList&type=desktop&path=*recycle*/",dataType:"json",error:core.ajaxError,success:function(e){if(!e.code)return!1;var a=G.static_path+"images/app/recycle_full.png";if(0==e.data.folderlist.length&&0==e.data.filelist.length)var a=G.static_path+"images/app/recycle.png";$(".menuRecycleButton .ico").css("background-image",'url("'+a+'")')}});else{var i=fileLight.getAllName();o(a),ui.path.setSelectByFilename(i)}},l=function(e){r(!0,!1,e)},c=function(){for(var e=0;G.json_data.filelist.length>e;e++)G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)};return{f5:r,f5_callback:l,picasa:e,setListSort:i,sort_list:s,init:function(){$(".hidden").removeClass("hidden"),s(),l(),n(),$(window).bind("resize",function(){ui.setStyle(),0!=PicasaOpen&&e.setFrameResize(),s()}),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),FrameCall.top("OpenopenEditor","Editor.save","")});var a,t=0,i="",o=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(e){var n=String.fromCharCode(e.charCode);return 0==t?(t=time(),i=n,a=setTimeout(function(){ui.path.setSelectByChar(i),t=0},o),void 0):n==i.substr(-1)?(ui.path.setSelectByChar(i),t=0,void 0):(o>time()-t&&(t=time(),i+=n,clearTimeout(a),a=setTimeout(function(){ui.path.setSelectByChar(i),t=0},o)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["ctrl+u","command+u"],function(e){stopPP(e),core.upload()}),Mousetrap.bind(["ctrl+e","command+e"],function(e){stopPP(e),ui.path.openEditor()}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),Mousetrap.bind(["alt+n","alt+n"],function(e){stopPP(e),ui.path.newFile()}),Mousetrap.bind(["alt+m","alt+m"],function(e){stopPP(e),ui.path.newFolder()}),PicasaOpen=!1,e.init(".picasaImage"),e.initData()},setTheme:function(e){core.setSkin(e,"app_desktop.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},setWall:function(e){$(".wallbackground").attr("src",e).one("load",function(){$(".desktop").css("background-image","url("+e+")")})},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},setStyle:function(){Global.fileRowNum=function(){var e=$(Config.FileBoxSelector).width(),a=$sizeInt($(Config.FileBoxClass).css("width"))+$sizeInt($(Config.FileBoxClass).css("border-left-width"))+$sizeInt($(Config.FileBoxClass).css("border-right-width"))+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/a)}()}}}),define("app/src/explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var a=e("../../common/pathOperate"),t=e("../../common/pathOpen"),n=void 0;ui.pathOpen=t;var s=function(e,a,t){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=a&&""!=a&&core.tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var i="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),i&&$(".dialog_file_upload").css("visibility","hidden")}ui.f5_callback(function(){"function"==typeof t&&t()})}},o=function(e,a){var t,i,n=0,s=G.json_data.folderlist,o=G.json_data.filelist;if("desktop"==Config.pageApp&&(n=$(".menuDefault").length),"folder"==a){for(t=0;s.length>t&&!(s[t].name>=e);t++);return"up"==G.sort_order?t+n:o.length+t+n}if("file"==a){for(i=0;o.length>i&&!(o[i].name>=e);i++);return"down"==G.sort_order?i+n:s.length+i+n}return-1},r=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(a){var t=fileLight.name($(this));-1!=$.inArray(t,e)&&$(Global.fileListAll).eq(a).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==n||G.this_path!=n.path||e!=n.key){var a=[];$(".fileContiner .file").each(function(){var t=fileLight.name($(this));t&&e==t.substring(0,e.length).toLowerCase()&&a.push(t)}),n={key:e,path:G.this_path,index:0,list:a}}0!=n.list.length&&(r(n.list[n.index++]),n.index==n.list.length&&(n.index=0))}},c=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(a){var t=fileLight.name($(this));-1!=t.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(a).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},d=function(e,a,t){var n=e.length;for(i=0;n>i;i++)if(e[i][a]==t)return e[i]},p=function(e){var a="",t=0;return null!=G.json_data.filelist&&(a=d(G.json_data.filelist,"name",e),null!=a&&(t=1)),null!=G.json_data.folderlist&&(a=d(G.json_data.folderlist,"name",e),null!=a&&(t=1)),t},u=function(e,a){var t,i=0;if(void 0==a){if(!p(e))return e;for(t=e+"(0)";p(t);)i++,t=e+"("+i+")";return t}if(!p(e+"."+a))return e+"."+a;for(t=e+"(0)."+a;p(t);)i++,t=e+"("+i+")."+a;return t},h=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyBack",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},f=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyNext",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},m=function(e){fileLight.clear(),void 0==e&&(e="txt");var t="newfile",t=u(t,e),i=o(t,"file");i=0==i?-1:i-1;var n='<div class="file select menufile"  id="makefile">			<div class="'+e+' ico"></div>				<div class="titleBox">					<span class="title">					<div class="textarea">						<textarea class="newfile fix">'+t+'</textarea>					</span>				</div>			</div>			<div style="clear:both;"></div>		</div>';-1==i?$(Config.FileBoxSelector).html(n+$(Config.FileBoxSelector).html()):$(n).insertAfter(Config.FileBoxSelector+" .file:eq("+i+")"),"desktop"==Config.pageApp&&ui.sort_list();var s=$(".newfile"),l=s.get(0),c=t.length-e.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c);s.focus(),s.unbind("keydown").keydown(function(e){return(13==e.keyCode||27==e.keyCode)&&(stopPP(e),e.preventDefault(),filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):a.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})),!0}),s.unbind("blur").blur(function(){filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFile(e)):a.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})})},v=function(){fileLight.clear();var e=LNG.newfolder,e=u(e),t=o(e,"folder");t=0==t?-1:t-1;var i='<div class="file select menufolder" id="makefile">';i+='<div class="folder ico" filetype="folder"></div>',i+='<div  class="titleBox"><span class="title">',i+='<div class="textarea"><textarea class="newfile fix">'+e+'</textarea></span></div></div><div style="clear:both;"></div></div>',-1==t?$(Config.FileBoxSelector).html(i+$(Config.FileBoxSelector).html()):$(i).insertAfter(Config.FileBoxSelector+" .file:eq("+t+")"),"desktop"==Config.pageApp&&ui.sort_list(),$(".newfile").select(),$(".newfile").focus(),$(".newfile").unbind("keydown").keydown(function(e){if(13==e.keyCode||27==e.keyCode){stopPP(e),e.preventDefault();var t=$(".newfile").attr("value");p(t)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):a.newFolder(G.this_path+t,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(t)})})}}),$(".newfile").unbind("blur").blur(function(){filename=$(".newfile").attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFolder()):a.newFolder(G.this_path+filename,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(filename)})})})},_=function(){var e="",t="",i=Global.fileListSelect,n=fileLight.name(i),s=fileLight.type(i);if(1==i.length){if(i.hasClass("menuSharePath"))return ui.path.share_edit(),void 0;s="folder"==s?"folder":s,$(i).find(".title").html("<div class='textarea'><textarea class='fix' id='pathRenameTextarea'>"+$(i).find(".title").text()+"</textarea><div>");var o=$("#pathRenameTextarea"),l=o.get(0);if("folder"==s)o.select();else{var c=n.length-s.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c)}o.unbind("focus").focus(),o.keydown(function(l){if(13==l.keyCode){l.preventDefault(),stopPP(l),e=o.attr("value"),"oexe"==s&&(e+=".oexe");var c=e;e!=n?(t=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),a.rname(t,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(c)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}27==l.keyCode&&("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}),o.unbind("blur").blur(function(){e=$("#pathRenameTextarea").attr("value"),"oexe"==s&&(e+=".oexe");var o=e;e!=n?(t=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),a.rname(t,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(o)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))})}},g=function(){ui.f5(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)},y=function(e){if(e){var a=[];return 0==Global.fileListSelect.length?a:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),t="folder"==fileLight.type($(this))?"folder":"file";"*share*/"==G.this_path&&(e=$(this).attr("data-path"),t="share"),a.push({path:e,type:t})}),a)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var t=Global.fileListSelect,i=G.this_path+fileLight.name(t),n=fileLight.type(t);return"*share*/"==G.this_path&&(i=t.attr("data-path"),n="share"),{path:i,type:n}};return{appEdit:function(e){if(e)a.appEdit(0,0,"user_add");else{var t=Global.fileListSelect.attr("data-app"),i=json_decode(urlDecode(t));i.path=G.this_path+fileLight.name(Global.fileListSelect),a.appEdit(i)}},appList:function(){a.appList(y().path)},appInstall:function(){a.appInstall(y().path)},openEditor:function(){t.openEditor(y().path)},openIE:function(){t.openIE(y().path)},open:function(e){if(0!=y().path.length){if("*recycle*/"==G.this_path)return ui.path.info(),void 0;if("*share*/"==G.this_path)return ui.path.share_open_window(),void 0;if(void 0!=e)return t.open(e),void 0;var a=y(),i=Global.fileListSelect;if(inArray(core.filetype.image,a.type)){if(!core.authCheck("explorer:fileDownload",LNG.no_permission_download))return;return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0}if("oexe"==a.type){var n=i.attr("data-app");a.path=json_decode(urlDecode(n))}t.open(a.path,a.type)}},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var a=fileLight.type($(this));if(inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)){var t=core.path2url(G.this_path+fileLight.name($(this)));e.push(t)}}),t.play(e,"music")}},pathOperate:a,share:function(){a.share(y())},setBackground:function(){a.setBackground(y().path)},createLink:function(){a.createLink(y().path,y().type,function(e){ui.f5_callback(function(){r(e.info)})})},createProject:function(){a.createProject(y().path,function(e){ui.f5_callback(function(){r(e.info)})})},download:function(){var e=y(!0);1==e.length&&"file"==e[0].type?t.download(y().path):a.zipDownload(e)},share_edit:function(){var e=y().path,t=G.json_data.share_list[e];a.share_box(t)},share_open_window:function(){var e=y().path,a=G.json_data.share_list[e],t=a.type;"folder"==a.type&&(t=1==a.code_read?"code_read":"folder");var i="./index.php?share/"+t+"&user="+G.user_name+"&sid="+a.sid;window.open(i)},share_open_path:function(){var e=y().path,a=G.json_data.share_list[e],t=core.pathFather(a.path),i=core.pathThis(a.path);ui.path.list(t,"",function(){r(i)})},recycle_clear:function(){$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.2,content:LNG.recycle_clear_info,ok:function(){$.ajax({url:"index.php?explorer/pathDeleteRecycle",beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),ui.f5(),FrameCall.father("ui.f5","1,1"),"function"==typeof callback&&callback(e)}})},cancel:!0})},explorer:function(){core.explorer(y().path)},explorerNew:function(){window.open("index.php?/explorer&path="+y().path)},openProject:function(){core.explorerCode(y().path)},search:function(){core.search("",y().path)},fav:function(){a.fav(y().path)},remove:function(){a.remove(y(!0),g),fileLight.clear()},copy:function(){a.copy(y(!0))},cute:function(){a.cute(y(!0),ui.f5)},zip:function(){a.zip(y(!0),function(e){ui.f5_callback(function(){r(e.info)})})},unZip:function(){a.unZip(y().path,ui.f5)},cuteDrag:function(e){a.cuteDrag(y(!0),e,g)},copyDrag:function(e,t){a.copyDrag(y(!0),e,function(e){fileLight.clear(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){t&&e.data&&r(e.data)})})},info:function(){if("share"==y().type){var e=y().path,t=G.json_data.share_list[e],i=t.path;a.info([{path:i,type:t.type}])}else a.info(y(!0))},past:function(){fileLight.clear(),a.past(G.this_path,function(e){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(e)})})},back:h,next:f,list:s,newFile:m,newFolder:v,rname:_,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:a.clipboard}}),define("app/common/pathOperate",[],function(e){var a={};a.file_info=e("../tpl/fileinfo/file_info.html"),a.path_info=e("../tpl/fileinfo/path_info.html"),a.path_info_more=e("../tpl/fileinfo/path_info_more.html");var t=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var a=function(e,a){for(var t=a.length,i=0;t>i;i++)if(e.indexOf(a[i])>0)return!0;return!1};return a(e,t)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var a="list=[",t=0;e.length>t;t++)a+='{"type":"'+e[t].type+'","path":"'+urlEncode2(e[t].path)+'"}',e.length-1>t&&(a+=",");return a+"]"},s=function(e,a){if(e){var t=core.pathThis(e);return i(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0)}},o=function(e,a){if(e){var t=core.pathThis(e);return i(t)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0)}},r=function(e,a,t){return e&&a&&e!=a?i(core.pathThis(a))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(a),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0):void 0},l=function(e,a){if(!(1>e.length)){var t=e[0].path,i=LNG.remove_title,s=t+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(t){if(core.tips.close(t),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof a&&a(t)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var a=e.path,t="folder"==e.type?"folder":"file";1>a.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(a),dataType:"json",success:function(e){e.code?p(e.data):p(void 0,function(){$(".content_info input[name=type]").val(t),$(".content_info input[name=path]").val(a),$(".content_info input[name=name]").val(core.pathThis(a)),"file"==t&&$(".label_code_read").addClass("hidden")})}})},p=function(a,t){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(a),void 0!=t&&t()})},u=function(a){var t=e("../tpl/share.html"),i=template.compile(t),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{a=e,$(".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=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 t=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(t),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:a.sid}]),"*share*/"==G.this_path&&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 a=urlEncode($(this).val());"checkbox"==$(this).attr("type")&&(a=$(this).attr("checked")?"1":""),e+="&"+$(this).attr("name")+"="+a}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),t=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var a=e.val().length;if(Global.isIE){var i=t.createTextRange();i.moveEnd("character",-t.value.length),i.moveEnd("character",a),i.moveStart("character",0),i.select()}else t.setSelectionRange(0,a)})};o(a),r()},h=function(e){if(!(1>e.length)){var a=core.path2url(e);FrameCall.father("ui.setWall",'"'+a+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(a),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,a,t){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==a?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},m=function(e,a){if(!(1>e.length)){var t=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+t+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,a){if(e){var t="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:t,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var t="index.php?explorer/pathInfo";G.share_page!==void 0&&(t="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:t,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(t){if(!t.code)return core.tips.close(t),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(a[i]),o=UUID();t.data.LNG=LNG,t.data.atime=date(LNG.time_type_info,t.data.atime),t.data.ctime=date(LNG.time_type_info,t.data.ctime),t.data.mtime=date(LNG.time_type_info,t.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(t.data),width:"350px",cancel:!0}),y(o,e)}})},y=function(e,a){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),t=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(a),beforeSend:function(){t.text(LNG.loading)},error:function(){t.text(LNG.button_save)},success:function(e){t.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){t.text(LNG.button_save)})}})})},b=function(e){if(core.authCheck("explorer:fileDownload")&&!(1>e.length)){var a="index.php?explorer/zipDownload";G.share_page!==void 0&&(a="index.php?share/zipDownload&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var a="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(a="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var t='<iframe src="'+a+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:t});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,a){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof a&&a(e)}})},k=function(e,a){if(e){var t="index.php?explorer/unzip&path="+urlEncode2(e);
+$.ajax({url:t,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})}},N=function(e,a,t){a&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(a+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},w=function(e,a,t){a&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(a+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var a="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+a)}},j=function(e){var a={};return a.type=e.find("input[type=radio]:checked").val(),a.content=e.find("textarea").val(),a.group=e.find("[name=group]").val(),e.find("input[type=text]").each(function(){var e=$(this).attr("name");a[e]=$(this).val()}),e.find("input[type=checkbox]").each(function(){var e=$(this).attr("name");a[e]="checked"==$(this).attr("checked")?1:0}),a},T=function(e){e.find(".type input").change(function(){var a=$(this).attr("apptype");e.find("[data-type]").addClass("hidden"),e.find("[data-type="+a+"]").removeClass("hidden")})},S=function(a,t,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(a=a),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:a})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(a.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+a.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof t?t():ui.f5()}})}}]}),n=$("."+l),G.is_root||$(".appbox .appline .right a.open").remove(),a.group&&n.find("option").eq(a.group).attr("selected",1),n.find(".aui_content").css("overflow","inherit"),i){case"user_edit":n.find(".name").addClass("hidden"),n.find(".desc").addClass("hidden"),n.find(".group").addClass("hidden"),n.find("option[value="+a.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="+a.group+"]").attr("selected",!0);break;default:}T(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(a){var t=a.data;core.tips.close(a);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:t,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+t);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:S,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:b,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:N,copyDrag:w,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var a=function(e,a){if(void 0!=e){if(void 0==a&&(a=core.pathExt(e)),a=a.toLowerCase(),"folder"==a)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=a){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==a){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==a){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==a||"htm"==a){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,a)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)){var n=core.path2url(e);return l(n,a),void 0}return inArray(core.filetype.doc,a)?(r(e),void 0):inArray(core.filetype.text,a)||inArray(core.filetype.code,a)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(a+LNG.edit_can_not,!1):t(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var a=json_decode(e);a.name=core.pathThis(p),core.openApp(a)})}else core.openApp(e)}},t=function(e,a){var t='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+a+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:t,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(a="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var t='<iframe src="'+a+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:t});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var a=core.path2url(e);window.open(a)}},s=function(e,a,t,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:t,ico:a,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,t)||inArray(core.filetype.music,t)||inArray(core.filetype.image,t)||inArray(core.filetype.movie,t)||inArray(core.filetype.doc,t))return a(e,t),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var a=document.domain;if(""==G.office_server){if(0==a.search("localhost")||0==a.search("192.168.")||0==a.search("127.0.0"))return t(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}if(G.share_page!==void 0){var i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e),n=G.office_server+urlEncode(i),s=core.pathThis(e);art.dialog.open(n,{ico:core.ico("doc"),title:s,width:"80%",height:"70%",resize:!0})}else $.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(a){if(0==a.code)return core.tips.tips(a),void 0;var t=G.app_host+"index.php?user/public_link&fid="+a.data,i=G.office_server+urlEncode(t),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(a,t){a&&("string"==typeof a&&(a=[a]),CMPlayer=e("./CMPlayer"),CMPlayer.play(a,t))};return{open:a,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},a=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},t=function(a){var t,i,s,o;"music_player"==a?(o=core.ico("mp3"),t=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),t=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+t.path+".zip",a),l={id:a+"_dialog",simple:!0,ico:o,title:i,width:t.width+10,height:t.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(a);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var a,t="";for(a=e.length-1;a>=0;a--){var i,n;-1==e[a].search("fileProxy")?(i=urlEncode(e[a]),n=core.pathThis(e[a])):(i=e[a],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),t+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return t},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,a){var t=n(a),s=i(e);try{t.config("play_mode","normal");var o=t.list().length;t.list_xml(s,!0),t.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var t=n(a("movie"));t&&(t.addEventListener("control_load","new_play"),t.addEventListener("control_play","new_play"))}};return{changeTheme:function(a,t){var i,s,o;"music"==a?(G.musictheme=t,i="music_player"):"movie"==a&&(G.movietheme=t,i="movie_player"),o=n(i),o&&(s=e[t],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=a(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{t(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var a;a=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var t=function(e){var a='<object id="the_wmp_player" ',t=navigator.userAgent;return-1!=t.indexOf("MSIE")?a+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=t.indexOf("Firefox")||-1!=t.indexOf("Chrome")||-1!=t.indexOf("Opera")||-1!=t.indexOf("Safari"))&&(a+='type="application/x-ms-wmp" '),a+='width="100%" height="100%">',a+='<param name="URL" value="'+e+'">',a+='<param name="autoStart" value="true">',a+='<param name="autoSize" value="true">',a+='<param name="invokeURLs" value="false">',a+='<param name="playCount" value="100">',a+='<param name="Volume" value="100">',a+='<param name="defaultFrame" value="datawindow">',a+="</object>"};try{var i=a.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=t(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};
\ No newline at end of file
diff --git a/static/js/app/src/edit/main.js b/static/js/app/src/edit/main.js
index 661a1b1..9bf7368 100755
--- a/static/js/app/src/edit/main.js
+++ b/static/js/app/src/edit/main.js
@@ -1,2 +1,2 @@
-var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","./function_list","./taskTap","./toolbar","./edit","./mode","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),FunctionList=e("./function_list"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),Editor=e("./edit"),core=e("../../common/core"),rightMenu=Tap.rightMenu,preview=Toolbar.preview,auto_function_list=!1,Global={topbar_height:40,isIE:!-[1]},$(document).ready(function(){Toolbar.init(),FunctionList.init(),Editor.init(),Tap.init(),""!=G.frist_file&&Editor.add(G.frist_file),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/src/edit/function_list",[],function(){var e={php:[{reg:/\s*function\s+(\w*)\s*\(.*\)*/g,reg_name:/.*function\s+(.*\))/,reg_index:1,type:"function"},{reg:/\s*class\s+(\w*)\s*.*\{/g,reg_name:/\s*class\s+(\w*)\s*.*\{/,reg_index:1,type:"class"}],javascript:[{reg:/\s*([\w\.]+)\s*=\s*function\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*=\s*function\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_var"},{reg:/\s*function\s+([\w\s]+)\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*function\s+([\w\s]+)\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_define"},{reg:/\s*([\w\.]+)\s*:\s*function\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*:\s*function\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_value"}],python:[{reg:/\s*class\s+(\w+)\s*\(/g,reg_name:/\s*class\s+(\w+)\s*\(/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*\(.*\)/g,reg_name:/\s*def\s+(\w+)\s*\(.*\)/,reg_index:1,type:"function"}],ruby:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*/g,reg_name:/\s*def\s+(\w+)\s*/,reg_index:1,type:"function"}],java:[{reg:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/g,reg_name:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/,reg_index:3,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],objectivec:[{reg:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/g,reg_name:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/,reg_index:1,type:"function"},{reg:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/g,reg_name:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/,reg_index:1,type:"function"},{reg:/@implementation\s+(\w*)/g,reg_name:/@implementation\s+(\w*)/,reg_index:1,type:"class"},{reg:/#pragma\s+(mark\s+)?(.*)/g,reg_name:/#pragma\s+(mark\s+)?(.*)/,reg_index:2,type:"mark"},{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/(\w+\s*)+\s\*?(\w+)\s*\(/,reg_index:2,type:"function function_value"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"}],c_cpp:[{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/(\w+\s*)+\s\*?(\w+)\s*\(/,reg_index:2,type:"function"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"},{reg:/\s*class\s+(\w+)\s*:/g,reg_name:/\s*class\s+(\w+)\s*:/,reg_index:1,type:"class"}]},t=function(e,t){var a=e.match(t.reg);if(a){for(var i=[],n=a.length,s=0,o=e,r=0;n>r;r++){var l={};l.the_match=a[r];var c=l.the_match.match(t.reg_name);if(!(2>c.length)&&c[t.reg_index]){l.name=c[t.reg_index];var d=o.indexOf(l.the_match),p=l.the_match.indexOf(l.name);if(l.pos_start=s+d+p,l.pos_end=l.pos_start+l.name.length,"object"==typeof t.reg_name_all){l.name="";for(var u=t.reg_name_all,h=0;u.length>h;h++)l.name+=c[u[h]]}s=s+d+l.the_match.length,o=e.substr(s),l.type=t.type,i.push(l)}}return i}},a=function(a,i){if(void 0!==e[i]){for(var n=e[i],s=[],o=0;n.length>o;o++){var r=t(a,n[o]);r&&Array.prototype.push.apply(s,r)}s.sort(function(e,t){var a="pos_start";return e[a]<t[a]?-1:e[a]>=t[a]?1:void 0});for(var l=a.split("\n"),c=l.length,d=0,p=s[d],u=0,h=0;c>h&&p;h++){for(;p&&p.pos_start>=u&&p.pos_start<=u+l[h].length;)s[d].range={start:{row:h,column:p.pos_start-u},end:{row:h,column:p.pos_end-u}},d++,p=s[d];u=u+l[h].length+1}return s}},i=function(e){return e=e.replace(/[\r\n {]+/gi," "),e=e.replace(/"/gi,"'"),e=e.replace(/\</gi,"&lt;"),e=e.replace(/\>/gi,"&gt;")},n=function(){var e='<div class="cell_null">No outline for the active view</div>',t=Editor.current();if(!t||t.kod===void 0)return $(".function_list_box").html(e),void 0;var n=function(e){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t.replace(/(\{$)/,"")},s=t.kod.mode,o=a(t.getValue(),s);if(o===void 0||0==o.length)return $(".function_list_box").html(e),void 0;var r=t.getCursorPosition().row;e="";for(var l=0;o.length>l;l++){var c=o[l],d=c.range;if(d){o.length-1>l&&r>=o[l].range.start.row&&o[l+1].range&&o[l+1].range.start.row>r&&(c.type+=" row_select"),l==o.length-1&&r>=o[l].range.start.row&&(c.type+=" row_select");var p=d.start.row+","+d.start.column+","+d.end.row+","+d.end.column,u=n(n(c.the_match)).substr(0,150);e+='<div class="list_row '+i(c.type)+' " title="'+i(u)+'" data-range="'+p+'">'+'<span class="icon"></span>'+'<span class="cell">'+i(c.name)+"</span></div>"}}$(".function_list_box").html(e)},s=function(){$(".function_list_box .list_row").die("mouseenter").live("mouseenter",function(){$(this).addClass("row_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("row_hover")}).die("click").live("click",function(){$(".function_list_box .list_row").removeClass("row_select"),$(this).addClass("row_select");var e=$(this).attr("data-range"),t=e.split(","),a={start:{row:t[0],column:t[1]},end:{row:t[2],column:t[3]}};Editor.current()&&(Editor.current().gotoLine(t[0]),Editor.current().selection.setSelectionRange(a,!0))})};return{init:s,refresh:n,mode_list:function(){return objectKeys(e)}}}),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){Editor.remove($(this).attr("uuid")),stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},a=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{close:{name:LNG.close,icon:"remove",accesskey:"d"},close_right:{name:LNG.close_right,icon:"remove-sign",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",accesskey:"o"},sep1:"--------",create:{name:LNG.newfile,icon:"plus",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",accesskey:"p"}},callback:function(e,t){var a=t.$trigger,i=a.attr("uuid");switch(e){case"close":Editor.remove();break;case"close_right":var n=$(".edit_tab .tabs .tab").index(a);$(".edit_tab .tabs .tab:gt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=i&&Editor.remove(e)});break;case"create":Editor.add();break;case"preview":Toolbar.doAction("preview");break;default:}}})},i=function(){var e,t,a,i,n=!1,s=!1,o=0,r=0,l=0,c=0,d=0,p=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),n=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){m(e),this.releaseCapture&&this.releaseCapture()}))});var u=function(i){s=!0,o=i.pageX,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),a=e.clone().addClass("draggable-dragging").prependTo("body"),c=parseInt(t.css("margin-right")),d=$tab_parent.width(),p=$tab_parent.get(0).getBoundingClientRect().left,p+=$(window).scrollLeft(),r=e.get(0).getBoundingClientRect().left,l=parseInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),u=i.clientX-o+r;$("body").prepend("<div class='dragMaskView'></div>"),a.css({width:l+"px",top:n,left:u}),e.css("opacity",0)},h=function(i){if(n){0==s&&u(i);var h=i.clientX-o+r;p>h||h>p+d-l||(a.css("left",h),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(h>t&&t+l/2+c>h){if(e.attr("uuid")==$(this).attr("uuid"))return;f($(this).attr("uuid"),"left")}if(h>t-l/2+c&&t>h){if(e.attr("uuid")==$(this).attr("uuid"))return;f($(this).attr("uuid"),"right")}}))}},f=function(a,n){if(!e.is(":animated")||i!=a){i=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var s=e.width(),o=$(".edit_tab .tab_"+a),r=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(o).css("width","0px"):(e.before(o).css("width","0px"),o.before(r)),e.animate({width:s+"px"},animate_time),r.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},m=function(){n=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(r=e.get(0).getBoundingClientRect().left,a.animate({left:r+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()}))}},n=function(e,t,a){var i=1.5*animate_time,n=122,s=n,o=$(".edit_tab .tab"),r=$(".edit_tab .tabs").width()-4,l=parseInt(o.css("margin-right"))+parseInt(o.css("border-right")),c=parseInt($(".edit_tab .add").outerWidth())+2*l,d=o.length,p=Math.floor((r-c)/(n+l));switch(d>p&&(s=Math.floor((r-c)/d)-l),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:s}).animate({"margin-top":"0px"},i),o.animate({width:s+"px"},i);break;case"remove":void 0!=a&&Editor.select(a),t.animate({width:"0","margin-top":"+=30"},i,function(){t.remove()}),o.animate({width:s+"px"},i);break;case"resize":o.css("width",s+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:n,init:function(){$("body").live("resize",function(){n("resize")}),e(),i(),a()}}}),define("app/src/edit/toolbar",[],function(){var e=function(){$(window).bind("resize",function(){n.resize()}),$(".toolMenu").bind("click mouseup",stopPP),$(".toolMenu").on("mousedown",function(){$(".toolMenu").removeClass("select"),$(this).addClass("select");var e=$(this).offset().left-4;$(this).contextMenu({x:e,y:25})}),$(".toolMenu").on("hover",function(){if(!$(".toolMenu").hasClass("context-menu-active"))return!0;$(".toolMenu").removeClass("select"),$(this).addClass("select");var e=$(this).offset().left-4;$(this).contextMenu({x:e,y:25})}),$.contextMenu({selector:".editMenuFile",trigger:"none",callback:t,items:{save:{name:LNG.button_save+"<b>Ctrl+S</b>",icon:"save",accesskey:"s"},saveall:{name:LNG.button_save_all,icon:"paste",accesskey:"a"},sep1:"---------",newfile:{name:LNG.newfile,icon:"file-alt",accesskey:"j"},sep2:"---------",close:{name:LNG.close,icon:"remove",accesskey:"q"}}}),$.contextMenu({selector:".editMenuEdit",trigger:"none",callback:t,items:{undo:{name:LNG.undo+"<b>Ctrl+Z</b>",icon:"undo"},redo:{name:LNG.redo+"<b>Ctrl+Y</b>",icon:"repeat"},sep1:"---------",cute:{name:LNG.cute+"<b>Ctrl+X</b>",icon:"cut",className:"menu_edit_cute disabled"},copy:{name:LNG.copy+"<b>Ctrl+C</b>",icon:"copy",className:"menu_edit_copy"},paste:{name:LNG.past+"<b>Ctrl+V</b>",icon:"paste",className:"menu_edit_paste"},"delete":{name:LNG.remove+"<b>Delete</b>",icon:"trash"},selectAll:{name:LNG.selectAll+"<b>Ctrl+A</b>",icon:"eye-open"},sep2:"---------",startAutocomplete:{name:LNG.complete_current,icon:"code"},search:{name:LNG.search+"<b>Ctrl+F</b>",icon:"search"},searchReplace:{name:LNG.replace+"<b>Ctrl+F+F</b>",icon:"exchange"},gotoline:{name:LNG.gotoline+"<b>Ctrl+L</b>",icon:"pushpin"}}});for(var e=[12,13,14,15,16,18,20,24,28,32],a=G.code_theme_all.split(","),i=Editor.mode.modeAll(),s={},o={},r={},l=0;e.length>l;l++){var c=e[l];s["set_code_font-"+c]={name:c+"px",className:"set_code_font-"+c}}for(var l=0;a.length>l;l++){var d=a[l];o["set_code_theme-"+d]={name:d,className:"set_code_theme-"+d}}for(var l=0;i.length>l;l++){var p=i[l];r["set_code_mode-"+p]={name:p,className:"set_code_mode-"+p}}$.contextMenu({selector:".editMenuView",trigger:"none",callback:t,items:{code_font:{className:"code_font_list",name:LNG.font_size,icon:"font",items:s},code_theme:{className:"code_theme_list",name:LNG.code_theme,icon:"magic",items:o},code_mode:{className:"code_mode_list",name:LNG.code_mode,icon:"leaf",items:r},sep1:"---------",function_list:{name:LNG.function_list+"<b>Ctrl+R</b>",className:"function_list"},auto_complete:{name:LNG.auto_complete,className:"auto_complete"},sep2:"---------",wordbreak:{name:LNG.wordwrap,className:"wordbreak"},display_char:{name:LNG.char_all_display,className:"display_char"},sep3:"---------",fullscreen:{name:LNG.full_screen,icon:"fullscreen"}}}),$.contextMenu({selector:".editMenuTools",trigger:"none",callback:t,items:{preview:{name:LNG.preview+"<b>Ctrl+Shift+S</b>",icon:"edit"},open_ie:{name:LNG.open_ie,icon:"globe",accesskey:"b"}}}),$.contextMenu({selector:".editMenuHelp",trigger:"none",callback:t,items:{setting:{name:LNG.setting,icon:"cog"},about:{name:LNG.about,icon:"info-sign"},sep1:"---------",learnMore:{name:LNG.learnMore,icon:"question"}}}),$(".tools a[action]").bind("click",function(){var e=$(this).attr("action");t(e),Editor.current()&&Editor.current().focus()}),$("body").click(function(){Editor.current()&&Editor.current().focus(),$(".toolMenu").removeClass("select");try{window.parent.rightMenu.hidden()}catch(e){}}),$("ul.code_font_list .context-menu-item").mouseenter(function(){Editor.current().setFontSize($(this).text()),$(this).unbind("click").click(function(){var e=$(this).text();Editor.config("fontsize",e),$("ul.code_font_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().setFontSize(G.code_config.font_size)}),$("ul.code_theme_list .context-menu-item").mouseenter(function(){Editor.current().setTheme("ace/theme/"+$(this).find("span").html()),$(this).unbind("click").click(function(){var e=$(this).find("span").html();Editor.config("theme",e),$("ul.code_theme_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().setTheme("ace/theme/"+G.code_config.theme)}),$("ul.code_mode_list .context-menu-item").mouseenter(function(){Editor.current().getSession().setMode("ace/mode/"+$(this).find("span").html()),$(this).unbind("click").click(function(){var e=$(this).find("span").html();Editor.current().kod.mode=e,$("ul.code_mode_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().getSession().setMode("ace/mode/"+Editor.current().kod.mode)}),$(".tools a[action]").tooltip({placement:"bottom"})},t=function(e){switch(e){case"newfile":Editor.add();break;case"fullscreen":$(".icon-resize-full").toggleClass("icon-resize-small"),FrameCall.father("core.editorFull","''");break;default:}if(Editor.current())switch(e){case"save":Editor.save();break;case"saveall":Editor.saveall();break;case"undo":Editor.current().undo();break;case"redo":Editor.current().redo();break;case"copy":break;case"paste":break;case"cute":break;case"delete":Editor.current().execCommand("del");break;case"selectAll":Editor.current().execCommand("selectall");break;case"startAutocomplete":Editor.current().execCommand("startAutocomplete");break;case"search":Editor.current().execCommand("find");break;case"searchReplace":Editor.current().execCommand("replace");break;case"gotoline":Editor.current().commands.exec("gotoline",Editor.current());break;case"wordbreak":Editor.config("wrap");break;case"display_char":Editor.config("display_char");break;case"setting":Editor.config("setting");break;case"auto_complete":Editor.config("auto_complete");break;case"function_list":if(auto_function_list&&"none"==$(".frame_right .function_list").css("display"))return n.open("function_list"),void 0;auto_function_list?(auto_function_list=0,n.close()):(auto_function_list=1,n.open("function_list")),Editor.config("function_list",auto_function_list);break;case"open_ie":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),window.open(t);break;case"preview":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),n.open("preview",t);break;case"close":Editor.remove();break;case"about":core.setting("about");break;case"learnMore":window.open("http://kalcaddle.com/editor.html");break;case"shortcut":break;default:}},a=function(e){$(".context-menu-root .context-menu-item").removeClass("selected"),1==e.display_char&&$(".context-menu-root .display_char").addClass("selected"),1==e.function_list&&$(".context-menu-root .function_list").addClass("selected"),1==e.auto_complete&&$(".context-menu-root .auto_complete").addClass("selected"),1==e.wrap&&$(".context-menu-root .wordbreak").addClass("selected"),$(".set_code_theme-"+e.theme).addClass("selected"),$(".set_code_font-"+e.fontsize.substr(0,2)).addClass("selected"),Editor.current()&&Editor.current().kod&&Editor.current().kod.mode&&$(".set_code_mode-"+Editor.current().kod.mode).addClass("selected")},i=function(){$(".frame_right input").keyEnter(n.refresh);var e=!1,t=0,a=0;$drag=$(".frame_right .resize"),$box_left=$(".frame_left"),$box=$drag.parent(),$drag.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(i(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){s(e)}),$(document).one("mouseup",function(e){o(e),this.releaseCapture&&this.releaseCapture()}),void 0)});var i=function(i){e=!0,t=i.pageX,a=$box.width(),$drag.addClass("resize_active"),$("body").css("cursor","col-resize"),$box.append('<div class="preview_frame mask_view"></div>')},s=function(i){if(!e)return!0;var n=i.pageX-t,s=a-n,o=$(window).width();s>=o-50&&(s=o-50),100>=s&&(s=100),$box_left.css("width",o-s).find(".edit_body").css("width",o-s),$box.width(s),$box.find(".function_list").css("width",s),$box.find(".preview").css("width",s),Tap.resetWidth("resize"),Editor.config("resize")},o=function(){return e?(e=!1,$drag.removeClass("resize_active"),$("body").css("cursor","default"),$box.find(".mask_view").remove(),void 0):!1}},n=function(){var e=$(".frame_right"),t=$(".frame_left"),a=e.find("input"),i=function(t,i){var s=0;if("function_list"==t){if(!auto_function_list)return;s=200,FunctionList.refresh(),e.find("iframe").attr("src",""),e.find(".preview").css("display","none")}else if("preview"==t&&(s=400,a.val(i),e.find(".open_ie").attr("href",i),e.find("iframe").attr("src",i),e.find(".function_list").css("display","none"),"block"==e.find(".preview").css("display")))return;e.find("."+t).css("display","block").css("width",s),e.css("display","block").css("width","0").stop(!0,!0).animate({width:s},200,function(){var e=$(window).width()-s;$(".frame_left").css("width",e).find(".edit_body").css("width",e),n.resize()}),"function_list"==t&&FunctionList.refresh()};return{open:i,openUrl:function(){window.open($(".frame_right input").attr("value"))},resize:function(){if("block"==e.css("display")){var a=e.width(),i=$(window).width();a>=i-50&&(a=i-50),100>=a&&(a=100),e.width(a),t.css("width",i-a).find(".edit_body").css("width",i-a)}Tap.resetWidth("resize"),Editor.config("resize")},close:function(){e.stop(!0,!0).animate({width:0},200,function(){e.css("display","none"),e.find(".preview").css("display","none"),e.find(".function_list").css("display","none"),e.find("iframe").attr("src",""),a.val("")}),$(".frame_left").css("width","100%").find(".edit_body").css("width","100%"),Tap.resetWidth("resize"),Editor.config("resize")},refresh:function(){var t=a.attr("value");e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t)}}}();return{preview:n,doAction:t,toolbarSelected:a,init:function(){e(),i(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,Editor.save()}),Mousetrap.bind(["ctrl+r","command+r"],function(e){e.preventDefault(),e.returnvalue=!1,Toolbar.doAction("function_list")})}}}),define("app/src/edit/edit",["./mode"],function(e){var t={theme:G.code_config.theme,fontsize:G.code_config.font_size,auto_complete:parseInt(G.code_config.auto_complete),wrap:parseInt(G.code_config.auto_wrap),display:parseInt(G.code_config.display_char),function_list:parseInt(G.code_config.function_list)},a={},i=void 0,n=e("./mode");ace_tools=ace.require("ace/ext/language_tools");var s=function(e,t){if(void 0==t||void 0==e||1>a.length)return"";for(var i in a)if(a[i].kod[e]==t)return a[i].kod.uuid;return""},o=function(){auto_function_list=1==t.function_list?!0:!1,Toolbar.toolbarSelected(t)},r=function(e){var t,i="id_"+UUID();if(void 0==e)return t={uuid:i,name:"newfile.txt",charset:"utf-8",filename:"",mode:n.get("txt")},l(t),c(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this"),void 0;t={charset:"utf-8",uuid:i,name:core.pathThis(urlDecode(urlDecode(e))),filename:e,mode:n.get(core.pathExt(urlDecode(e)))},l(t,!0);var s=art.dialog({title:!1,content:LNG.getting,icon:"warning"}),o="./index.php?editor/fileGet&filename="+e;G.share_page!==void 0&&(o="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+e),$.ajax({dataType:"json",url:o,error:function(e,a,i){s.close(),_(t.uuid),core.ajaxError(e,a,i)},success:function(e){if(s.close(),!e.code)return Tips.tips(e),_(t.uuid),void 0;var n=e.data;a[i]=void 0,$("pre#"+i).text(n.content),c(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this");var o=a[i];o.kod.charset=n.charset,o.navigateTo(0),o.moveCursorTo(0,0)}})},l=function(e,t){var a='<div class="edit_tab_menu tab tab_'+e.uuid+'" uuid="'+e.uuid+'" title="'+urlDecode(urlDecode(e.filename))+'">'+'   <div class="name">'+e.name+"</div>"+'   <a href="javascript:void(0);" class="close icon-remove-sign"></a>'+'   <div style="clear:both;"></div>'+"</div>";$(a).insertBefore(".edit_tab .add");var i='<pre id="'+e.uuid+'" class="edit_content"></pre>';if($(".edit_body .tabs").append(i),d(e.uuid),t){var n=animate_time;animate_time=1,Tap.resetWidth("add"),animate_time=n}else Tap.resetWidth("add")},c=function(e){var i=ace.edit(e.uuid);i.setTheme("ace/theme/"+t.theme),void 0!=e.mode&&i.getSession().setMode("ace/mode/"+e.mode),i.getSession().setTabSize(4),i.getSession().setUseSoftTabs(!0),i.getSession().setUseWrapMode(t.wrap),i.$blockScrolling=1/0,i.setShowPrintMargin(!1),i.setDragDelay(100),i.setShowInvisibles(t.display),i.setFontSize(t.fontsize),i.setAnimatedScroll(!0),i.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:t.auto_complete}),i.on("change",function(){h(i,!0),auto_function_list&&"block"==$(".frame_right .function_list").css("display")&&FunctionList.refresh()}),i.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){f(e.kod.uuid)}}),i.commands.addCommand({name:"editFunction",bindKey:{win:"Ctrl-R",mac:"Command-R",sender:"editor|cli"},exec:function(){Toolbar.doAction("function_list")}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){Toolbar.doAction("preview")}}),e.mode||(e.mode=""),i.kod={mode:e.mode,uuid:e.uuid,name:e.name,charset:"ansii",filename:e.filename},i.hasChanged=!1,a[e.uuid]=i,d(e.uuid,!1)},d=function(e,t){if($(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,void 0!=a[e]&&a[e].focus(),t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.3},100).animate({opacity:.8},100).animate({opacity:.5},40).animate({opacity:1},40,function(){a[e].focus()}),auto_function_list){if(!Editor.current())return;"none"==$(".frame_right .preview").css("display")&&(-1==$.inArray(a[e].kod.mode,FunctionList.mode_list())?preview.close():"none"==$(".frame_right .function_list").css("display")&&preview.open("function_list")),FunctionList.refresh()}},p=function(e,t){void 0!=e&&""!=e&&(d(e,t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+e).addClass("this"))},u=function(e,i,n){var s=a;void 0!=n&&(s={},s[n]=a[n]);var o=void 0;for(var r in s){var l=s[r];switch(e){case"resize":l.resize();break;case"theme":t[e]=i,l.setTheme("ace/theme/"+i),G.code_config.theme=i,o={k:"theme",v:i};break;case"fontsize":t[e]=i,l.setFontSize(i),G.code_config.font_size=i,o={k:"font_size",v:i};break;case"wrap":t[e]=!l.getSession().getUseWrapMode(),l.getSession().setUseWrapMode(t[e]),G.code_config.auto_wrap=t[e];var c=t[e]?1:0;o={k:"auto_wrap",v:c};break;case"display_char":t[e]=!l.getShowInvisibles(),l.setShowInvisibles(t[e]),G.code_config.display_char=t[e];var c=t[e]?1:0;o={k:"display_char",v:c};break;case"setting":l.commands.exec("showSettingsMenu",l);break;case"function_list":t[e]=i,G.code_config.function_list=i,o={k:"function_list",v:i};break;case"auto_complete":t[e]=!l.$enableBasicAutocompletion,l.setOptions({enableLiveAutocompletion:t[e]}),l.$enableBasicAutocompletion=t[e],G.code_config.auto_complete=t[e];var c=t[e]?1:0;o={k:"auto_complete",v:c};break;default:}Toolbar.toolbarSelected(t)}o&&$.ajax({url:"./index.php?editor/setConfig&k="+o.k+"&v="+o.v,dataType:"json",success:function(){}})},h=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},f=function(e,t){if(void 0!=i){void 0==e&&(e=i),void 0==t&&(t=!1);var n=a[e];if(n.hasChanged){if(void 0==n||""==n)return tips(LNG.data_error,"warning"),void 0;y().focus();var s=urlEncode2(n.getValue()),o=n.kod.filename,r="./index.php?editor/fileSave";G.share_page!==void 0&&(r="./index.php?share/fileSave&user="+G.user+"&sid="+G.sid+"&filename="+o),$.ajax({type:"POST",dataType:"json",url:r,data:"path="+o+"&charset="+n.kod.charset+"&filestr="+s,beforeSend:function(){Tips.loading(LNG.sending)},error:core.ajaxError,success:function(a){Tips.close(a),a.code&&(h(n,!1),t&&_(e))}})}}},m=function(){for(var e in a)f(e)},v=function(e){if(void 0==e&&(e=i),void 0!=a[e]){var t=a[e];t.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:t.kod.name+"<br/>"+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){f(e,!0)}},{name:LNG.button_not_save,callback:function(){_(e)}}]}):_(e)}},_=function(e){delete a[e];var t="",i=$(".edit_tab .tab"),n=$(".edit_tab .tab_"+e),s=$(".edit_body pre#"+e);n.hasClass("this")?($(i[0]).attr("uuid")==e?t=$(i[1]).attr("uuid"):i.each(function(){var a=$(this).attr("uuid");return a==e?!1:(t=a,void 0)}),""!=t&&$(".edit_body pre#"+t).addClass("this"),s.remove(),Tap.resetWidth("remove",n,t)):(s.remove(),Tap.resetWidth("remove",n)),0==$(".edit_body .tabs pre").length&&preview.close()},g=function(){for(var e in a)if(a[e].hasChanged)return!0;return!1},b=function(e){core.setSkin(e,"app_code_edit.css")},y=function(){return i&&a[i]?a[i]:!1};return{init:o,current:y,hasFileSave:g,config:u,setTheme:b,select:p,remove:v,save:f,saveall:m,mode:n,add:function(e){var t=s("filename",e);""!=t?p(t,!0):r(e)}}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp","pch"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs","asp"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml","htc","lasso"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm","cgi"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash","bashrc","bash_profile"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","log"],textile:["textile"],smarty:["smarty","tpl"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs","vb"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","vsdisco","xaml","mml","xul","xbl","xib","storyboard","plist","csproj"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a,modeAll:function(){return objectKeys(i)}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);
-return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>");
\ No newline at end of file
+var animate_time=160;define("app/src/edit/main",["lib/jquery-lib","lib/util","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","./function_list","./taskTap","./toolbar","./edit","./mode","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),FunctionList=e("./function_list"),Tap=e("./taskTap"),Toolbar=e("./toolbar"),Editor=e("./edit"),core=e("../../common/core"),rightMenu=Tap.rightMenu,preview=Toolbar.preview,auto_function_list=!1,Global={topbar_height:40,isIE:!-[1]},$(document).ready(function(){Editor.init(),Toolbar.init(),FunctionList.init(),Tap.init(),""!=G.frist_file&&Editor.add(G.frist_file),window.onbeforeunload=function(){return Editor.hasFileSave()?LNG.if_save_file:void 0}})}),define("app/src/edit/function_list",[],function(){var e={php:[{reg:/\s*function\s+(\w*)\s*\(.*\)*/g,reg_name:/.*function\s+(.*\))/,reg_index:1,type:"function"},{reg:/\s*class\s+(\w*)\s*.*\{/g,reg_name:/\s*class\s+(\w*)\s*.*\{/,reg_index:1,type:"class"}],javascript:[{reg:/\s*([\w\.]+)\s*=\s*function\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*=\s*function\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_var"},{reg:/\s*function\s+([\w\s]+)\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*function\s+([\w\s]+)\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_define"},{reg:/\s*([\w\.]+)\s*:\s*function\s*\([\w\s]*\)\s*\{/g,reg_name:/\s*([\w\.]+)\s*:\s*function\s*(\([\w\s]*\))/,reg_index:1,reg_name_all:[1,2],type:"function function_value"}],python:[{reg:/\s*class\s+(\w+)\s*\(/g,reg_name:/\s*class\s+(\w+)\s*\(/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*\(.*\)/g,reg_name:/\s*def\s+(\w+)\s*\(.*\)/,reg_index:1,type:"function"}],ruby:[{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"},{reg:/\s*def\s+(\w+)\s*/g,reg_name:/\s*def\s+(\w+)\s*/,reg_index:1,type:"function"}],java:[{reg:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/g,reg_name:/\s*(final)?\s*(public|private|protected)\s*.*\s+(\w+)\s*\(.*\).*\{/,reg_index:3,type:"function"},{reg:/\s*class\s+(\w+)\s*/g,reg_name:/\s*class\s+(\w+)\s*/,reg_index:1,type:"class"}],objectivec:[{reg:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/g,reg_name:/[\+-]\s*\(.*\)\s*(\w+)\s*\:\s*\(.*/,reg_index:1,type:"function"},{reg:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/g,reg_name:/[\+-]\s*\([^:\{\}]*\)\s*(\w*)\s*\{/,reg_index:1,type:"function"},{reg:/@implementation\s+(\w*)/g,reg_name:/@implementation\s+(\w*)/,reg_index:1,type:"class"},{reg:/#pragma\s+(mark\s+)?(.*)/g,reg_name:/#pragma\s+(mark\s+)?(.*)/,reg_index:2,type:"mark"},{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/(\w+\s*)+\s\*?(\w+)\s*\(/,reg_index:2,type:"function function_value"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"}],c_cpp:[{reg:/([\w*]+\s+)+\*?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/(\w+\s*)+\s\*?(\w+)\s*\(/,reg_index:2,type:"function"},{reg:/\s*(\w+)::~?(\w+)\s*\([\w,\s\*\[\]\<\>&]*\)\s*\{/g,reg_name:/\s*(\w+)::~?(\w+)\s*\(/,reg_index:2,type:"function function_define"},{reg:/\s*class\s+(\w+)\s*:/g,reg_name:/\s*class\s+(\w+)\s*:/,reg_index:1,type:"class"}]},t=function(e,t){var a=e.match(t.reg);if(a){for(var i=[],n=a.length,s=0,o=e,r=0;n>r;r++){var l={};l.the_match=a[r];var c=l.the_match.match(t.reg_name);if(!(2>c.length)&&c[t.reg_index]){l.name=c[t.reg_index];var d=o.indexOf(l.the_match),p=l.the_match.indexOf(l.name);if(l.pos_start=s+d+p,l.pos_end=l.pos_start+l.name.length,"object"==typeof t.reg_name_all){l.name="";for(var u=t.reg_name_all,h=0;u.length>h;h++)l.name+=c[u[h]]}s=s+d+l.the_match.length,o=e.substr(s),l.type=t.type,i.push(l)}}return i}},a=function(a,i){if(void 0!==e[i]){for(var n=e[i],s=[],o=0;n.length>o;o++){var r=t(a,n[o]);r&&Array.prototype.push.apply(s,r)}s.sort(function(e,t){var a="pos_start";return e[a]<t[a]?-1:e[a]>=t[a]?1:void 0});for(var l=a.split("\n"),c=l.length,d=0,p=s[d],u=0,h=0;c>h&&p;h++){for(;p&&p.pos_start>=u&&p.pos_start<=u+l[h].length;)s[d].range={start:{row:h,column:p.pos_start-u},end:{row:h,column:p.pos_end-u}},d++,p=s[d];u=u+l[h].length+1}return s}},i=function(e){return e=e.replace(/[\r\n {]+/gi," "),e=e.replace(/"/gi,"'"),e=e.replace(/\</gi,"&lt;"),e=e.replace(/\>/gi,"&gt;")},n=function(){var e='<div class="cell_null">No outline for the active view</div>',t=Editor.current();if(!t||t.kod===void 0)return $(".function_list_box").html(e),void 0;var n=function(e){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t.replace(/(\{$)/,"")},s=t.kod.mode,o=a(t.getValue(),s);if(o===void 0||0==o.length)return $(".function_list_box").html(e),void 0;var r=t.getCursorPosition().row;e="";for(var l=0;o.length>l;l++){var c=o[l],d=c.range;if(d){o.length-1>l&&r>=o[l].range.start.row&&o[l+1].range&&o[l+1].range.start.row>r&&(c.type+=" row_select"),l==o.length-1&&r>=o[l].range.start.row&&(c.type+=" row_select");var p=d.start.row+","+d.start.column+","+d.end.row+","+d.end.column,u=n(n(c.the_match)).substr(0,150);e+='<div class="list_row '+i(c.type)+' " title="'+i(u)+'" data-range="'+p+'">'+'<span class="icon"></span>'+'<span class="cell">'+i(c.name)+"</span></div>"}}$(".function_list_box").html(e)},s=function(){$(".function_list_box .list_row").die("mouseenter").live("mouseenter",function(){$(this).addClass("row_hover")}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("row_hover")}).die("click").live("click",function(){$(".function_list_box .list_row").removeClass("row_select"),$(this).addClass("row_select");var e=$(this).attr("data-range"),t=e.split(","),a={start:{row:t[0],column:t[1]},end:{row:t[2],column:t[3]}};Editor.current()&&(Editor.current().gotoLine(t[0]),Editor.current().selection.setSelectionRange(a,!0))})};return{init:s,refresh:n,mode_list:function(){return objectKeys(e)}}}),define("app/src/edit/taskTap",[],function(){var e=function(){$(".edit_tab .tab").live("mouseenter",function(){$(this).hasClass("this")||$(this).addClass("hover"),$(this).unbind("mousedown").mousedown(function(e){$(this).hasClass("this")||$.nodeName(e.target,"A")||($(this).removeClass("hover").addClass("this"),Editor.select($(this).attr("uuid")))})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(e){Editor.remove($(this).attr("uuid")),stopPP(e)}),$(".edit_tab").die("dblclick").live("dblclick",function(e){Editor.add(),stopPP(e)}),$(".edit_tab .tab .close").live("click",function(){var e=$(this).parent().attr("uuid");Editor.remove(e)})},t=function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")},a=function(){$("body").click(t).contextmenu(t),$.contextMenu({zIndex:9999,selector:".edit_tab_menu",items:{close:{name:LNG.close,icon:"remove",accesskey:"d"},close_right:{name:LNG.close_right,icon:"remove-sign",accesskey:"r"},close_others:{name:LNG.close_others,icon:"remove-circle",accesskey:"o"},sep1:"--------",create:{name:LNG.newfile,icon:"plus",accesskey:"n"},preview:{name:LNG.preview,icon:"globe",accesskey:"p"}},callback:function(e,t){var a=t.$trigger,i=a.attr("uuid");switch(e){case"close":Editor.remove();break;case"close_right":var n=$(".edit_tab .tabs .tab").index(a);$(".edit_tab .tabs .tab:gt("+n+")").each(function(){Editor.remove($(this).attr("uuid"))});break;case"close_others":$(".edit_tab .tabs .tab").each(function(){var e=$(this).attr("uuid");e!=i&&Editor.remove(e)});break;case"create":Editor.add();break;case"preview":Toolbar.doAction("preview");break;default:}}})},i=function(){var e,t,a,i,n=!1,s=!1,o=0,r=0,l=0,c=0,d=0,p=0;$(".edit_tab .tab").die("mousedown").live("mousedown",function(t){$.nodeName(t.target,"A")||(e=$.nodeName(t.target,"SPAN")?$(t.target).parent():$(this),n=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){m(e),this.releaseCapture&&this.releaseCapture()}))});var u=function(i){s=!0,o=i.pageX,$tab_parent=$(".edit_tab"),t=$(".edit_tab .tab"),$(".draggable-dragging").remove(),a=e.clone().addClass("draggable-dragging").prependTo("body"),c=$sizeInt(t.css("margin-right")),d=$tab_parent.width(),p=$tab_parent.get(0).getBoundingClientRect().left,p+=$(window).scrollLeft(),r=e.get(0).getBoundingClientRect().left,l=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),u=i.clientX-o+r;$("body").prepend("<div class='dragMaskView'></div>"),a.css({width:l+"px",top:n,left:u}),e.css("opacity",0)},h=function(i){if(n){0==s&&u(i);var h=i.clientX-o+r;p>h||h>p+d-l||(a.css("left",h),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(h>t&&t+l/2+c>h){if(e.attr("uuid")==$(this).attr("uuid"))return;f($(this).attr("uuid"),"left")}if(h>t-l/2+c&&t>h){if(e.attr("uuid")==$(this).attr("uuid"))return;f($(this).attr("uuid"),"right")}}))}},f=function(a,n){if(!e.is(":animated")||i!=a){i=a,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".edit_tab .tab");var s=e.width(),o=$(".edit_tab .tab_"+a),r=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==n?e.after(o).css("width","0px"):(e.before(o).css("width","0px"),o.before(r)),e.animate({width:s+"px"},animate_time),r.animate({width:"0px"},animate_time,function(){$(this).remove(),t=$(".edit_tab .tab")})}},m=function(){n=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=a&&(r=e.get(0).getBoundingClientRect().left,a.animate({left:r+"px"},animate_time,function(){e.css("opacity",1),$(this).remove()}))}},n=function(e,t,a){var i=1.5*animate_time,n=122,s=n,o=$(".edit_tab .tab"),r=$sizeInt($(".edit_tab .tabs").width())-4,l=$sizeInt(o.css("margin-right"))+$sizeInt(o.css("border-right")),c=$sizeInt($(".edit_tab .add").css("width"))+2*l,d=o.length,p=Math.floor((r-c)/(n+l));switch(d>p&&(s=Math.floor((r-c)/d)-l),e){case"add":$(".edit_tab .tabs .this").css({"margin-top":"30px",width:s}).animate({"margin-top":"0px"},i),o.animate({width:s+"px"},i);break;case"remove":void 0!=a&&Editor.select(a),t.animate({width:"0","margin-top":"+=30"},i,function(){t.remove()}),o.animate({width:s+"px"},i);break;case"resize":o.css("width",s+"px");break;default:}};return{rightMenu:{hidden:t},resetWidth:n,init:function(){$("body").live("resize",function(){n("resize")}),e(),i(),a()}}}),define("app/src/edit/toolbar",[],function(){var e=function(){$(window).bind("resize",function(){n.resize()}),$(".toolMenu").bind("click mouseup",stopPP),$(".toolMenu").on("mousedown",function(){$(".toolMenu").removeClass("select"),$(this).addClass("select");var e=$(this).offset().left-4;$(this).contextMenu({x:e,y:25})}),$(".toolMenu").on("hover",function(){if(!$(".toolMenu").hasClass("context-menu-active"))return!0;$(".toolMenu").removeClass("select"),$(this).addClass("select");var e=$(this).offset().left-4;$(this).contextMenu({x:e,y:25})}),$.contextMenu({selector:".editMenuFile",trigger:"none",callback:t,items:{save:{name:LNG.button_save+"<b>Ctrl+S</b>",icon:"save",accesskey:"s"},saveall:{name:LNG.button_save_all,icon:"paste",accesskey:"a"},sep1:"---------",newfile:{name:LNG.newfile,icon:"file-alt",accesskey:"j"},sep2:"---------",close:{name:LNG.close,icon:"remove",accesskey:"q"}}}),$.contextMenu({selector:".editMenuEdit",trigger:"none",callback:t,items:{undo:{name:LNG.undo+"<b>Ctrl+Z</b>",icon:"undo"},redo:{name:LNG.redo+"<b>Ctrl+Y</b>",icon:"repeat"},sep1:"---------",startAutocomplete:{name:LNG.complete_current,icon:"code"},search:{name:LNG.search+"<b>Ctrl+F</b>",icon:"search"},searchReplace:{name:LNG.replace+"<b>Ctrl+F+F</b>",icon:"exchange"},gotoline:{name:LNG.gotoline+"<b>Ctrl+L</b>",icon:"pushpin"},sep2:"---------",selectAll:{name:LNG.selectAll+"<b>Ctrl+A</b>",icon:"eye-open"}}});for(var e=[12,13,14,15,16,18,20,24,28,32],a=G.code_theme_all.split(","),i=Editor.mode.modeAll(),s={},o={},r={},l=0;e.length>l;l++){var c=e[l];s["set_code_font-"+c]={name:c+"px",className:"set_code_font-"+c}}for(var l=0;a.length>l;l++){var d=a[l];o["set_code_theme-"+d]={name:d,className:"set_code_theme-"+d}}for(var l=0;i.length>l;l++){var p=i[l];r["set_code_mode-"+p]={name:p,className:"set_code_mode-"+p}}$.contextMenu({selector:".editMenuView",trigger:"none",callback:t,items:{code_font:{className:"code_font_list",name:LNG.font_size,icon:"font",items:s},code_theme:{className:"code_theme_list",name:LNG.code_theme,icon:"magic",items:o},code_mode:{className:"code_mode_list",name:LNG.code_mode,icon:"leaf",items:r},sep1:"---------",function_list:{name:LNG.function_list+"<b>Ctrl+R</b>",className:"function_list"},auto_complete:{name:LNG.auto_complete,className:"auto_complete"},sep2:"---------",wordbreak:{name:LNG.wordwrap,className:"wordbreak"},display_char:{name:LNG.char_all_display,className:"display_char"},sep3:"---------",fullscreen:{name:LNG.full_screen,icon:"fullscreen"}}}),$.contextMenu({selector:".editMenuTools",trigger:"none",callback:t,items:{preview:{name:LNG.preview+"<b>Ctrl+Shift+S</b>",icon:"edit"},open_ie:{name:LNG.open_ie,icon:"globe",accesskey:"b"}}}),$.contextMenu({selector:".editMenuHelp",trigger:"none",callback:t,items:{setting:{name:LNG.setting,icon:"cog"},about:{name:LNG.about,icon:"info-sign"},sep1:"---------",learnMore:{name:LNG.learnMore,icon:"question"}}}),$(".tools a[action]").bind("click",function(){var e=$(this).attr("action");t(e),Editor.current()&&Editor.current().focus()}),$("body").click(function(){Editor.current()&&Editor.current().focus(),$(".toolMenu").removeClass("select");try{window.parent.rightMenu.hidden()}catch(e){}}),$("ul.code_font_list .context-menu-item").mouseenter(function(){Editor.current().setFontSize($(this).text()),$(this).unbind("click").click(function(){var e=$(this).text();Editor.config("fontsize",e),$("ul.code_font_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().setFontSize(G.code_config.font_size)}),$("ul.code_theme_list .context-menu-item").mouseenter(function(){Editor.current().setTheme("ace/theme/"+$(this).find("span").html()),$(this).unbind("click").click(function(){var e=$(this).find("span").html();Editor.config("theme",e),$("ul.code_theme_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().setTheme("ace/theme/"+G.code_config.theme)}),$("ul.code_mode_list .context-menu-item").mouseenter(function(){Editor.current().getSession().setMode("ace/mode/"+$(this).find("span").html()),$(this).unbind("click").click(function(){var e=$(this).find("span").html();Editor.current().kod.mode=e,$("ul.code_mode_list .context-menu-item").removeClass("selected"),$(this).addClass("selected"),Editor.current()&&Editor.current().focus()})}).mouseleave(function(){Editor.current().getSession().setMode("ace/mode/"+Editor.current().kod.mode)}),$(".tools a[action]").tooltip({placement:"bottom"})},t=function(e){switch(e){case"newfile":Editor.add();break;case"fullscreen":$(".icon-resize-full").toggleClass("icon-resize-small"),FrameCall.father("core.editorFull","''");break;default:}if(Editor.current())switch(e){case"save":Editor.save();break;case"saveall":Editor.saveall();break;case"undo":Editor.current().undo();break;case"redo":Editor.current().redo();break;case"copy":break;case"paste":break;case"cute":break;case"delete":Editor.current().execCommand("del");break;case"selectAll":Editor.current().execCommand("selectall");break;case"startAutocomplete":Editor.current().execCommand("startAutocomplete");break;case"search":Editor.current().execCommand("find");break;case"searchReplace":Editor.current().execCommand("replace");break;case"gotoline":Editor.current().commands.exec("gotoline",Editor.current());break;case"wordbreak":Editor.config("wrap");break;case"display_char":Editor.config("display_char");break;case"setting":Editor.config("setting");break;case"auto_complete":Editor.config("auto_complete");break;case"function_list":if(auto_function_list&&"none"==$(".frame_right .function_list").css("display"))return n.open("function_list"),void 0;auto_function_list?(auto_function_list=0,n.close()):(auto_function_list=1,n.open("function_list")),Editor.config("function_list",auto_function_list);break;case"open_ie":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),window.open(t);break;case"preview":var t=urlDecode(urlDecode(Editor.current().kod.filename));t=core.path2url(t),n.open("preview",t);break;case"close":Editor.remove();break;case"about":core.setting("about");break;case"learnMore":window.open("http://kalcaddle.com/editor.html");break;case"shortcut":break;default:}},a=function(e){$(".context-menu-root .context-menu-item").removeClass("selected"),1==e.display_char&&$(".context-menu-root .display_char").addClass("selected"),1==e.function_list&&$(".context-menu-root .function_list").addClass("selected"),1==e.auto_complete&&$(".context-menu-root .auto_complete").addClass("selected"),1==e.wrap&&$(".context-menu-root .wordbreak").addClass("selected"),$(".set_code_theme-"+e.theme).addClass("selected"),$(".set_code_font-"+e.fontsize.substr(0,2)).addClass("selected"),Editor.current()&&Editor.current().kod&&Editor.current().kod.mode&&$(".set_code_mode-"+Editor.current().kod.mode).addClass("selected")},i=function(){$(".frame_right input").keyEnter(n.refresh);var e=!1,t=0,a=0;$drag=$(".frame_right .resize"),$box_left=$(".frame_left"),$box=$drag.parent(),$drag.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(i(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){s(e)}),$(document).one("mouseup",function(e){o(e),this.releaseCapture&&this.releaseCapture()}),void 0)});var i=function(i){e=!0,t=i.pageX,a=$box.width(),$drag.addClass("resize_active"),$("body").css("cursor","col-resize"),$box.append('<div class="preview_frame mask_view"></div>')},s=function(i){if(!e)return!0;var n=i.pageX-t,s=a-n,o=$(window).width();s>=o-50&&(s=o-50),100>=s&&(s=100),$box_left.css("width",o-s).find(".edit_body").css("width",o-s),$box.width(s),$box.find(".function_list").css("width",s),$box.find(".preview").css("width",s),Tap.resetWidth("resize"),Editor.config("resize")},o=function(){return e?(e=!1,$drag.removeClass("resize_active"),$("body").css("cursor","default"),$box.find(".mask_view").remove(),void 0):!1}},n=function(){var e=$(".frame_right"),t=$(".frame_left"),a=e.find("input"),i=function(t,i){var s=0;if("function_list"==t){if(!auto_function_list)return;s=200,FunctionList.refresh(),e.find("iframe").attr("src",""),e.find(".preview").css("display","none")}else if("preview"==t&&(s=400,a.val(i),e.find(".open_ie").attr("href",i),e.find("iframe").attr("src",i),e.find(".function_list").css("display","none"),"block"==e.find(".preview").css("display")))return;e.find("."+t).css("display","block").css("width",s),e.css("display","block").css("width","0").stop(!0,!0).animate({width:s},200,function(){var e=$(window).width()-s;$(".frame_left").css("width",e).find(".edit_body").css("width",e),n.resize()}),"function_list"==t&&FunctionList.refresh()};return{open:i,openUrl:function(){window.open($(".frame_right input").attr("value"))},resize:function(){if("block"==e.css("display")){var a=e.width(),i=$(window).width();a>=i-50&&(a=i-50),100>=a&&(a=100),e.width(a),t.css("width",i-a).find(".edit_body").css("width",i-a)}Tap.resetWidth("resize"),Editor.config("resize")},close:function(){e.stop(!0,!0).animate({width:0},200,function(){e.css("display","none"),e.find(".preview").css("display","none"),e.find(".function_list").css("display","none"),e.find("iframe").attr("src",""),a.val("")}),$(".frame_left").css("width","100%").find(".edit_body").css("width","100%"),Tap.resetWidth("resize"),Editor.config("resize")},refresh:function(){var t=a.attr("value");e.find(".open_ie").attr("href",t),e.find("iframe").attr("src",t)}}}();return{preview:n,doAction:t,toolbarSelected:a,init:function(){e(),i(),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,Editor.save()}),Mousetrap.bind(["ctrl+r","command+r"],function(e){e.preventDefault(),e.returnvalue=!1,Toolbar.doAction("function_list")})}}}),define("app/src/edit/edit",["./mode"],function(e){var t={theme:G.code_config.theme,fontsize:G.code_config.font_size,auto_complete:parseInt(G.code_config.auto_complete),wrap:parseInt(G.code_config.auto_wrap),display:parseInt(G.code_config.display_char),function_list:parseInt(G.code_config.function_list)},a={},i=void 0,n=e("./mode");ace_tools=ace.require("ace/ext/language_tools");var s=function(e,t){if(void 0==t||void 0==e||1>a.length)return"";for(var i in a)if(a[i].kod[e]==t)return a[i].kod.uuid;return""},o=function(){auto_function_list=1==t.function_list?!0:!1,Toolbar.toolbarSelected(t)},r=function(e){var t,i="id_"+UUID();if(void 0==e)return t={uuid:i,name:"newfile.txt",charset:"utf-8",filename:"",mode:n.get("txt")},l(t),c(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this"),void 0;t={charset:"utf-8",uuid:i,name:core.pathThis(urlDecode(urlDecode(e))),filename:e,mode:n.get(core.pathExt(urlDecode(e)))},l(t,!0);var s=art.dialog({title:!1,content:LNG.getting,icon:"warning"}),o="./index.php?editor/fileGet&filename="+e;G.share_page!==void 0&&(o="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+e),$.ajax({dataType:"json",url:o,error:function(e,a,i){s.close(),_(t.uuid),core.ajaxError(e,a,i)},success:function(e){if(s.close(),!e.code)return Tips.tips(e),_(t.uuid),void 0;var n=e.data;a[i]=void 0,$("pre#"+i).text(n.content),c(t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+i).addClass("this");var o=a[i];o.kod.charset=n.charset,o.navigateTo(0),o.moveCursorTo(0,0)}})},l=function(e,t){var a='<div class="edit_tab_menu tab tab_'+e.uuid+'" uuid="'+e.uuid+'" title="'+urlDecode(urlDecode(e.filename))+'">'+'   <div class="name">'+e.name+"</div>"+'   <a href="javascript:void(0);" class="close icon-remove-sign"></a>'+'   <div style="clear:both;"></div>'+"</div>";$(a).insertBefore(".edit_tab .add");var i='<pre id="'+e.uuid+'" class="edit_content"></pre>';if($(".edit_body .tabs").append(i),d(e.uuid),t){var n=animate_time;animate_time=1,Tap.resetWidth("add"),animate_time=n}else Tap.resetWidth("add")},c=function(e){var i=ace.edit(e.uuid);i.setTheme("ace/theme/"+t.theme),void 0!=e.mode&&i.getSession().setMode("ace/mode/"+e.mode),i.getSession().setTabSize(4),i.getSession().setUseSoftTabs(!0),i.getSession().setUseWrapMode(t.wrap),i.$blockScrolling=1/0,i.setShowPrintMargin(!1),i.setDragDelay(100),i.setShowInvisibles(t.display),i.setFontSize(t.fontsize),i.setAnimatedScroll(!0),i.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:t.auto_complete}),i.on("change",function(){h(i,!0),auto_function_list&&"block"==$(".frame_right .function_list").css("display")&&FunctionList.refresh()}),i.commands.addCommand({name:"editSave",bindKey:{win:"Ctrl-S",mac:"Command-S",sender:"editor|cli"},exec:function(e){f(e.kod.uuid)}}),i.commands.addCommand({name:"editFunction",bindKey:{win:"Ctrl-R",mac:"Command-R",sender:"editor|cli"},exec:function(){Toolbar.doAction("function_list")}}),i.commands.addCommand({name:"preview",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S"},exec:function(){Toolbar.doAction("preview")}}),e.mode||(e.mode=""),i.kod={mode:e.mode,uuid:e.uuid,name:e.name,charset:"ansii",filename:e.filename},i.hasChanged=!1,a[e.uuid]=i,d(e.uuid,!1)},d=function(e,t){if($(".edit_tab .this").removeClass("this"),$(".edit_tab .tab_"+e).addClass("this"),i=e,void 0!=a[e]&&a[e].focus(),t&&$(".edit_tab .this").stop(!0,!0).animate({opacity:.3},100).animate({opacity:.8},100).animate({opacity:.5},40).animate({opacity:1},40,function(){a[e].focus()}),auto_function_list){if(!Editor.current())return;"none"==$(".frame_right .preview").css("display")&&(-1==$.inArray(a[e].kod.mode,FunctionList.mode_list())?preview.close():"none"==$(".frame_right .function_list").css("display")&&preview.open("function_list")),FunctionList.refresh()}if(Editor.current())try{var n=window.parent.art.dialog.list.openEditor,s='<img draggable="false" src="'+G.static_path+'images/file_16/edit.png"/>'+urlDecode(urlDecode(Editor.current().kod.filename));n&&n.title(s)}catch(o){}},p=function(e,t){void 0!=e&&""!=e&&(d(e,t),$(".edit_body .this").removeClass("this"),$(".edit_body pre#"+e).addClass("this"))},u=function(e,i,n){var s=a;void 0!=n&&(s={},s[n]=a[n]);var o=void 0;for(var r in s){var l=s[r];switch(e){case"resize":l.resize();break;case"theme":t[e]=i,l.setTheme("ace/theme/"+i),G.code_config.theme=i,o={k:"theme",v:i};break;case"fontsize":t[e]=i,l.setFontSize(i),G.code_config.font_size=i,o={k:"font_size",v:i};break;case"wrap":t[e]=!l.getSession().getUseWrapMode(),l.getSession().setUseWrapMode(t[e]),G.code_config.auto_wrap=t[e];var c=t[e]?1:0;o={k:"auto_wrap",v:c};break;case"display_char":t[e]=!l.getShowInvisibles(),l.setShowInvisibles(t[e]),G.code_config.display_char=t[e];var c=t[e]?1:0;o={k:"display_char",v:c};break;case"setting":l.commands.exec("showSettingsMenu",l);break;case"function_list":t[e]=i,G.code_config.function_list=i,o={k:"function_list",v:i};break;case"auto_complete":t[e]=!l.$enableBasicAutocompletion,l.setOptions({enableLiveAutocompletion:t[e]}),l.$enableBasicAutocompletion=t[e],G.code_config.auto_complete=t[e];var c=t[e]?1:0;o={k:"auto_complete",v:c};break;default:}Toolbar.toolbarSelected(t)}o&&$.ajax({url:"./index.php?editor/setConfig&k="+o.k+"&v="+o.v,dataType:"json",success:function(){}})},h=function(e,t){t!=e.hasChanged&&(e.hasChanged=t,$(".edit_tab .tabs .tab_"+e.kod.uuid).toggleClass("edit_changed"))},f=function(e,t){if(void 0!=i){void 0==e&&(e=i),void 0==t&&(t=!1);var n=a[e];if(n.hasChanged){if(void 0==n||""==n)return tips(LNG.data_error,"warning"),void 0;y().focus();var s=urlEncode2(n.getValue()),o=n.kod.filename,r="./index.php?editor/fileSave";G.share_page!==void 0&&(r="./index.php?share/fileSave&user="+G.user+"&sid="+G.sid+"&filename="+o),$.ajax({type:"POST",dataType:"json",url:r,data:"path="+o+"&charset="+n.kod.charset+"&filestr="+s,beforeSend:function(){Tips.loading(LNG.sending)},error:core.ajaxError,success:function(a){Tips.close(a),a.code&&(h(n,!1),t&&_(e))}})}}},m=function(){for(var e in a)f(e)},v=function(e){if(void 0==e&&(e=i),void 0!=a[e]){var t=a[e];t.hasChanged?$.dialog({title:LNG.warning,resize:!1,background:"#fff",opacity:.4,lock:!0,icon:"question",content:t.kod.name+"<br/>"+LNG.if_save_file,padding:40,button:[{name:LNG.button_save,focus:!0,callback:function(){f(e,!0)}},{name:LNG.button_not_save,callback:function(){_(e)}}]}):_(e)}},_=function(e){delete a[e];var t="",i=$(".edit_tab .tab"),n=$(".edit_tab .tab_"+e),s=$(".edit_body pre#"+e);n.hasClass("this")?($(i[0]).attr("uuid")==e?t=$(i[1]).attr("uuid"):i.each(function(){var a=$(this).attr("uuid");return a==e?!1:(t=a,void 0)}),""!=t&&$(".edit_body pre#"+t).addClass("this"),s.remove(),Tap.resetWidth("remove",n,t)):(s.remove(),Tap.resetWidth("remove",n)),0==$(".edit_body .tabs pre").length&&preview.close()},g=function(){for(var e in a)if(a[e].hasChanged)return!0;return!1},b=function(e){core.setSkin(e,"app_code_edit.css")},y=function(){return i&&a[i]?a[i]:!1};return{init:o,current:y,hasFileSave:g,config:u,setTheme:b,select:p,remove:v,save:f,saveall:m,mode:n,add:function(e){var t=s("filename",e);""!=t?p(t,!0):r(e)}}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp","pch"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs","asp"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml","htc","lasso"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm","cgi"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash","bashrc","bash_profile"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","log"],textile:["textile"],smarty:["smarty","tpl"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs","vb"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","vsdisco","xaml","mml","xul","xbl","xib","storyboard","plist","csproj"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a,modeAll:function(){return objectKeys(i)}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);
+return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>");
\ No newline at end of file
diff --git a/static/js/app/src/editor/main.js b/static/js/app/src/editor/main.js
index da78961..2aafc6d 100755
--- a/static/js/app/src/editor/main.js
+++ b/static/js/app/src/editor/main.js
@@ -1,4 +1,4 @@
-define("app/src/editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"./index.php?explorer/treeList&app=editor"},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree,$(document).ready(function(){G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),core.update(),rightMenu.initEditor(),$(".init_loading").fadeOut(450).addClass("pop_fadeout")})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))
-})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){_menuBody(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},_bindTask=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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(e.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=fileLight.type(Global.fileListSelect);"zip"==a?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,a)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==a?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)||inArray(core.filetype.doc,a)?e.find(".open_text").hide():e.find(".open_text").show()}if(t.hasClass("dialog_menu")){var i=t.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var t=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",a="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(t).removeClass(a),$("ul.menufolder").find(t).removeClass(a),$("ul.fileContiner_menu").find(t).removeClass(a),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(t).addClass(a),$("ul.menufolder").find(t).addClass(a),$("ul.fileContiner_menu").find(t).addClass(a),$(".tools-left button").addClass("disabled"))},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/editor/ui",[],function(){var e=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-resize"),o=$(".frame-right");s.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(i){e=!0,t=i.pageX,a=$(".frame-left").width(),s.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=a+l;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),n.css("width",c),s.css("left",c-5),o.css("left",c+1)},c=function(){return e?(e=!1,s.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,FrameCall.top("OpenopenEditor","Editor.save","")})},setTheme:function(e){core.setSkin(e,"app_editor.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")}}}),define("app/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;
-window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},T=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")})},S=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}T(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:S,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}$.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"./index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}
-}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};
\ No newline at end of file
+define("app/src/editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){Config={TreeId:"folderList",AnimateTime:200,pageApp:"editor",treeAjaxURL:"./index.php?explorer/treeList&app=editor"},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree,$(document).ready(function(){G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),core.update(),rightMenu.initEditor(),$(".init_loading").fadeOut(450).addClass("pop_fadeout")})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=$sizeInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")
+},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){_menuBody(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},_bindTask=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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(e.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=fileLight.type(Global.fileListSelect);"zip"==a?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,a)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==a?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)||inArray(core.filetype.doc,a)?e.find(".open_text").hide():e.find(".open_text").show()}if(t.hasClass("dialog_menu")){var i=t.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var t=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",a="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(t).removeClass(a),$("ul.menufolder").find(t).removeClass(a),$("ul.fileContiner_menu").find(t).removeClass(a),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(t).addClass(a),$("ul.menufolder").find(t).addClass(a),$("ul.fileContiner_menu").find(t).addClass(a),$(".tools-left button").addClass("disabled"))},isDisplay:function(){var e=!1;return $(".context-menu-list").each(function(){"none"!=$(this).css("display")&&(e=!0)}),e},hidden:function(){$(".context-menu-list").filter(":visible").trigger("contextmenu:hide")}}}),define("app/src/editor/ui",[],function(){var e=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-resize"),o=$(".frame-right");s.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(i){e=!0,t=i.pageX,a=$(".frame-left").width(),s.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=a+l;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),n.css("width",c),s.css("left",c-5),o.css("left",c+1)},c=function(){return e?(e=!1,s.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,FrameCall.top("OpenopenEditor","Editor.save","")})},setTheme:function(e){core.setSkin(e,"app_editor.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")}}}),define("app/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)
+})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},T=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")})},S=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}T(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:S,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);
+if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}if(G.share_page!==void 0){var i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e),n=G.office_server+urlEncode(i),s=core.pathThis(e);art.dialog.open(n,{ico:core.ico("doc"),title:s,width:"80%",height:"70%",resize:!0})}else $.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};
\ No newline at end of file
diff --git a/static/js/app/src/explorer/main.js b/static/js/app/src/explorer/main.js
index 95eec10..c71b055 100755
--- a/static/js/app/src/explorer/main.js
+++ b/static/js/app/src/explorer/main.js
@@ -1,5 +1,5 @@
-define("app/src/explorer/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","./ui","./fileSelect","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","./path"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?explorer/treeList&app=explorer",AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),ui=e("./ui"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui.tree=e("../../common/tree"),ui.path=e("./path"),fileSelect=e("./fileSelect"),fileLight=fileSelect.fileLight,$(document).ready(function(){Global.topbar_height="none"==$(".topbar").css("display")?0:$(".topbar").height(),e.async("lib/webuploader/webuploader-min",function(){core.upload_init()}),ui.init(),ui.tree.init(),TaskTap.init(),core.update(),fileSelect.init(),rightMenu.initExplorer(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".path_tips").tooltip({placement:"bottom",html:!0})})}),define("app/src/explorer/ui",["./fileSelect"],function(require,exports){var fileSelect=require("./fileSelect"),fileLight=fileSelect.fileLight,MyPicasa=new Picasa;PicasaOpen=!1;var _ajaxLive=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,MyPicasa.initData(),$(".fileContiner .picture img").lazyload({container:$(".bodymain")})},_initListType=function(e){$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),"list"==e?($(Config.FileBoxSelector).removeClass("fileList_icon").addClass("fileList_list"),$("#list_type_list").html('<div id="main_title"><div class="filename" field="name">'+LNG.name+"<span></span></div>"+'<div class="filetype" field="ext">'+LNG.type+"<span></span></div>"+'<div class="filesize" field="size">'+LNG.size+"<span></span></div>"+'<div class="filetime" field="mtime">'+LNG.modify_time+"<span></span></div>"+'<div style="clear:both"></div>'+"</div>"),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:19,padding:4})):($(Config.FileBoxSelector).removeClass("fileList_list").addClass("fileList_icon"),$("#list_type_list").html(""),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:32,padding:4})),$(".menu_seticon").removeClass("selected"),$(".set_set"+G.list_type).addClass("selected")},_setListType=function(e,t){G.list_type=e,void 0==t?$.ajax({url:"index.php?setting/set&k=list_type&v="+e,dataType:"json",success:function(){_initListType(e),_f5(!1,!1)}}):(_initListType(e),_f5(!1,!0))},_sortBy=function(e,t){var t="down"==t?-1:1;return function(a,i){return a=a[e],i=i[e],i>a?-1*t:a>i?1*t:void 0}},_setListSort=function(e,t){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=t&&(G.sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")),_f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+G.sort_field+","+G.sort_order})},_jsonSortTitle=function(){var up='<i class="font-icon icon-chevron-up"></i>',down='<i class="font-icon icon-chevron-down"></i>';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.sort_field+"]").addClass("this").attr("id",G.sort_order).find("span").html(eval(G.sort_order))},_bindEventSort=function(){$("#main_title div").die("click").live("click",function(){"up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),_setListSort($(this).attr("field"),$(this).attr("id"))})},_bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");_toolsAction(e)})},_bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(){ui.setTheme(e)}}),$(".dropdown-menu li").removeClass("this"),$(this).addClass("this")})},_bindFrameSizeEvent=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-left .bottom_box"),o=$(".frame-resize"),r=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(l(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){return d(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var l=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active")},c=function(l){if(!e)return!0;var c=l.pageX-t,d=a+c;i>d&&(d=i),d>$(document).width()-200&&(d=$(document).width()-200),n.css("width",d),s.css("width",d),o.css("left",d-5),r.css("left",d+1),ui.setStyle()},d=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),void 0):!1}},_bindHotKey=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var a=!1;if(Global.ctrlKey||t.keyCode==e||t.ctrlKey)switch(a=!0,Global.ctrlKey=!0,t.keyCode){case 8:ui.path.remove(),a=!0;break;case 65:fileSelect.selectPos("all");break;case 8:ui.path.next(),a=!0;break;case 67:ui.path.copy();break;case 88:ui.path.cute();break;case 83:break;case 86:ui.path.past();break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:a=!1}else if(t.shiftKey)Global.shiftKey=!0;else switch(t.keyCode){case 8:ui.path.back(),a=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),a=!0;break;case 38:fileSelect.selectPos("up"),a=!0;break;case 39:fileSelect.selectPos("right"),a=!0;break;case 40:fileSelect.selectPos("down"),a=!0;break;case 13:ui.path.open(),a=!1;break;case 46:ui.path.remove(),a=!0;break;case 113:ui.path.rname(),a=!0;break;default:a=!1}return a&&(stopPP(t),t.keyCode=0,t.returnValue=!1),!0}).keyup(function(t){t.shiftKey||(Global.shiftKey=!1),t.keyCode!=e&&t.ctrlKey||(Global.ctrlKey=!1)})},_menuActionBind=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-path="'+e.path+'" data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.create_time+":"+e.ctime+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var t="",a=e.name;return"number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),t+="<div class='file folderBox menufolder' data-name='"+e.name+"'"+_hover_title(e)+">",t+="<div class='folder ico' filetype='folder'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"},this._getFileBox=function(e){var t="",a=e.name;if("number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),"oexe"==e.ext&&void 0!=e.icon){var i=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(i=G.static_path+"images/app/"+e.icon);var n=urlEncode(json_encode(e));a=a.replace(".oexe",""),t="<div class='file fileBox menufile' data-app="+n+" data-name='"+e.name+"'"+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(e.name.replace(".oexe",""))+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='ico' filetype='oexe' style='background-image:url("+i+")'></div>",t+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"}else t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>";return t},this._getFolderBoxList=function(e){var t=e.name;"number"==typeof e.exists&&0==e.exists&&(t='<b style="color:red;">'+t+"</b>");var a="<div class='file folderBox menufolder' "+_hover_title(e)+">";return a+="	<div class='folder ico' filetype='folder'></div>",a+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+t+"</span></div>",a+="	<div class='filetype'>"+LNG.folder+"</div>",a+="	<div class='filesize'></div>",a+="	<div class='filetime'>"+e.mtime+"</div>",a+="	<div style='clear:both'></div>",a+="</div>"},this._getFileBoxList=function(e){var t="",a=e.name;if("number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),"oexe"==e.ext){var i=urlEncode(json_encode(e));t="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">",a=a.replace(".oexe",""),"app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(e.name.replace(".oexe",""))+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='oexe ico' filetype='oexe'></div>"}else if(inArray(core.filetype.image,e.ext)){var n=core.path2url(G.this_path+e.name),s="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);t+="<div picasa='"+n+"' thumb='"+s+"' class='picasaImage file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>"}else t+="<div class='file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>";return t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div>",t+="	<div class='filetype'>"+e.ext+"  "+LNG.file+"</div>",t+="	<div class='filesize'>"+e.size_friendly+"</div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"};var pathTypeChange=function(){var e="menuBodyMain menuRecycleBody menuShareBody",t="folderBox menufolder fileBox menufile",a=$(".html5_drag_upload_box");"*recycle*/"==G.this_path?(a.removeClass(e).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden"),$(".fileContiner .file").removeClass(t).addClass("menuRecyclePath")):"*share*/"==G.this_path?(a.removeClass(e).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),$(".fileContiner .file").removeClass(t).addClass("menuSharePath")):(a.removeClass(e).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden"))},_mainSetData=function(e){G.json_data&&G.json_data.filelist&&G.json_data.folderlist||_mainSetDataShare();var t="",a=G.json_data.folderlist,i=G.json_data.filelist;a="size"==G.sort_field||"ext"==G.sort_field?a.sort(_sortBy("name",G.sort_order)):a.sort(_sortBy(G.sort_field,G.sort_order)),i=i.sort(_sortBy(G.sort_field,G.sort_order)),G.json_data.folderlist=a,G.json_data.filelist=i;var n="_getFileBox",s="_getFolderBox",o="",r="";"list"==G.list_type&&(n="_getFileBoxList",s="_getFolderBoxList");for(var l=0;i.length>l;l++)o+=this[n](i[l]);for(var l=0;a.length>l;l++)r+=this[s](a[l]);t="up"==G.sort_order?r+o:o+r,""==t&&(t='<div style="text-align:center;color:#aaa;">'+LNG.path_null+"</div>"),t+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list"==G.list_type&&$(Config.FileBoxSelector+" .file:nth-child(2n)").addClass("file2"),_ajaxLive()},_f5=function(e,t,a){if(void 0==e&&(e=!0),void 0==t&&(t=!1),_jsonSortTitle(),e)$.ajax({url:"index.php?explorer/pathList&path="+urlEncode(G.this_path),dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(G.json_data=e.data,_f5_time_user(),Global.historyStatus=G.json_data.history_status,_mainSetData(t),pathTypeChange(),ui.header.updateHistoryStatus(),ui.header.addressSet(),rightMenu.menuCurrentPath(G.json_data.path_type),"function"==typeof a&&a(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)},error:function(e,t,a){$(".tools-left .msg").fadeOut(100),$(Config.FileBoxSelector).html(""),core.ajaxError(e,t,a)}});else{var i=fileLight.getAllName();_mainSetData(t),pathTypeChange(),ui.path.setSelectByFilename(i)}},_f5_callback=function(e){_f5(!0,!1,e)},_f5_time_user=function(){if(G.json_data&&G.json_data.filelist&&G.json_data.folderlist){for(var e=0;G.json_data.filelist.length>e;e++)if(G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),"*share*/"==G.this_path){var t=parseInt(G.json_data.filelist[e].num_view);t=isNaN(t)?0:t;var a=parseInt(G.json_data.filelist[e].num_download);a=isNaN(a)?0:a;var i=date("Y/m/d ",G.json_data.filelist[e].mtime)+"  ";i+=LNG.share_view_num+t+"  "+LNG.share_download_num+a,G.json_data.filelist[e].mtime=i}else G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)if(G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),"*share*/"==G.this_path){var t=parseInt(G.json_data.folderlist[e].num_view);t=isNaN(t)?0:t;var a=parseInt(G.json_data.folderlist[e].num_download);a=isNaN(a)?0:a;var i=date("Y/m/d ",G.json_data.folderlist[e].mtime)+"  ";i+=LNG.share_view_num+t+"  "+LNG.share_download_num+a,G.json_data.folderlist[e].mtime=i}else G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)}},_toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycle_clear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"set_icon":$("#set_icon").hasClass("active")||_setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||_setListType("list");break;default:}};return{f5:_f5,f5_callback:_f5_callback,picasa:MyPicasa,setListSort:_setListSort,setListType:_setListType,setTheme:function(e){core.setSkin(e,"app_explorer.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},init:function(){_f5_callback(function(){_setListType(G.list_type,!0)}),_bindEventSort(),_bindEventTheme(),_bindEventTools(),_bindHotKey(),_bindFrameSizeEvent(),_menuActionBind(),ui.header.bindEvent(),$(window).bind("resize",function(){ui.setStyle(),ui.header.set_width(),0!=PicasaOpen&&MyPicasa.setFrameResize()}),$("html").bind("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),FrameCall.top("OpenopenEditor","Editor.save","")});var e,t=0,a="",i=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var s=String.fromCharCode(n.charCode);return 0==t?(t=time(),a=s,e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i),void 0):s==a.substr(-1)?(ui.path.setSelectByChar(a),t=0,void 0):(i>time()-t&&(t=time(),a+=s,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["ctrl+u","command+u"],function(e){stopPP(e),core.upload()}),Mousetrap.bind(["ctrl+e","command+e"],function(e){stopPP(e),ui.path.openEditor()}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),Mousetrap.bind(["alt+n","alt+n"],function(e){stopPP(e),ui.path.newFile()}),Mousetrap.bind(["alt+m","alt+m"],function(e){stopPP(e),ui.path.newFolder()}),PicasaOpen=!1,MyPicasa.init(".picasaImage"),MyPicasa.initData()},setStyle:function(){Global.fileRowNum="list"==G.list_type?1:function(){var e=$(Config.FileBoxSelector).width(),t=parseInt($(Config.FileBoxClass).css("width"))+parseInt($(Config.FileBoxClass).css("border-left-width"))+parseInt($(Config.FileBoxClass).css("border-right-width"))+parseInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)}()},header:{bindEvent:function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("title");$("input.path").val(t),ui.header.gotoPath(),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0}),$("#yarnball_input input").die("blur").live("blur",function(){ui.header.gotoPath()}),$("#yarnball_input input").keyEnter(function(){ui.header.gotoPath()}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_back":$("#history_back").hasClass("active")||ui.path.back("");break;case"history_next":$("#history_next").hasClass("active")||ui.path.next("");break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list(G.myhome);break;case"fav":ui.path.pathOperate.fav(G.this_path);break;case"up":ui.header.gotoFather();break;case"setting":core.setting();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},addressSet:function(){var e=G.this_path;$("input.path").val(e),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var t=function(e){var t='<li class="yarnlet first"><a title="@1@" style="z-index:{$2};"><span class="left-yarn"></span>{$3}</a></li>\n',a='<li class="yarnlet "><a title="@1@" style="z-index:{$2};">{$3}</a></li>\n';e=e.replace(/\/+/g,"/");var i=e.split("/");""==i[i.length-1]&&i.pop();var n=i[0]+"/",s=t.replace(/@1@/g,n),o=i[0];""!=i[0]&&("*share*"==o?o=LNG.my_share:"*public*"==o?o=LNG.public_path:"*recycle*"==o&&(o=LNG.recycle)),s=s.replace("{$2}",i.length),s=s.replace("{$3}",o);for(var r=s,l=1,c=i.length-1;i.length>l;l++,c--)n+=i[l]+"/",s=a.replace(/@1@/g,n),s=s.replace("{$2}",c),s=s.replace("{$3}",i[l]),r+=s;return'<ul class="yarnball">'+r+"</ul>"};$("#yarnball").html(t(e)),ui.header.set_width()},set_width:function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var a=e-t;0>=a?$(".yarnball").css("width",t+"px").css("left",a+"px"):$(".yarnball").css({left:"3px",width:e+"px"})},gotoPath:function(){var e=$("input.path").val();e=e.replace(/\\/g,"/"),$("input.path").val(e),"/"!=e.substr(e.length-1,1)&&(e+="/"),ui.path.list(e),ui.header.addressSet()},updateHistoryStatus:function(){0==Global.historyStatus.back?$("#history_back").addClass("active"):$("#history_back").removeClass("active"),0==Global.historyStatus.next?$("#history_next").addClass("active"):$("#history_next").removeClass("active")},gotoFather:function(){var e=$("input.path").val();if("/"==e)return core.tips.tips("已经到根目录了!","warning"),void 0;var t=e.length-1,a="",i=e.split("/").length-1;if(1==i)a=e;else{"/"==e.substr(t,1)&&(t-=1);for(var n=t;n>0&&"/"!=e.substr(t,1);n--)t--;a=e.substr(0,t+1)}$("input.path").val(a),ui.header.gotoPath()}}}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,t=!1,a=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(Config.FileBoxClass).live("mouseenter",function(){t&&$(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)&&$(this).addClass("selectDragTemp"),e||t||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?a=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var t=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,t);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>t?c(t,i):t>n?c(n,t):t>i&&n>t&&c(i,t)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&a&&(a=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).die("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.info():ui.path.open()}),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){return ui.path.rname(),stopPP(e),!1})},s=function(){var a,i,n,s=100,o=50,r=30,l=80-Global.topbar_height,c=0,p=!1,u=0,h=0;$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=t.which||e?!0:(a=$(this),f(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){v(e),this.releaseCapture&&this.releaseCapture()}),stopPP(t),!1)});var f=function(e){rightMenu.hidden(),t=!0,c=$.now(),u=e.pageY,h=e.pageX,i=$(document).height(),n=$(document).width()},m=function(e){if(!t)return!0;$.now()-c>s&&!p&&_();var a=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=i-50?i-50:e.clientY;a=0>=a?0:a,r=0>=r?0:r,a-=o,r-=l,$(".draggable-dragging").css("left",a),$(".draggable-dragging").css("top",r),Global.isIE&&$("."+Config.TypeFolderClass).each(function(){var t=e.pageX,a=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();t>i.left&&i.left+n>t&&a>i.top&&i.top+s>a?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},v=function(e){if(!t)return!1;t=!1,p=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()});var a=G.this_path,i=0==$(".selectDragTemp").length;Global.ctrlKey?(i||(a+=d.name($(".selectDragTemp"))),(Math.abs(e.pageX-h)>r||Math.abs(e.pageY-u)>r)&&ui.path.copyDrag(a,i)):i||(a+=d.name($(".selectDragTemp")),ui.path.cuteDrag(a))},_=function(){p=!0,$("body").css("cursor","move"),a.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+a.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var a=null,i=null,n=null,s=85+Global.topbar_height,o=0,r=0;$(Config.BodyContent).die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass("bodymain")&&20>$(document).width()-e.pageX)){if(ui.isEdit())return!0;if(1!=e.which||t)return!0;l(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){p(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()})}});var l=function(t){o=$(Config.BodyContent).scrollTop(),r=s-o,$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.shiftKey||d.clear(),0==$(t.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),a=t.pageX-Global.frameLeftWidth,i=t.pageY+$(Config.BodyContent).scrollTop()-s,e=!0))},c=function(t){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=$(Config.BodyContent).scrollTop()-o,l=t.pageX-Global.frameLeftWidth,c=t.pageY-r+s;n.css({left:Math.min(l,a),top:Math.min(c,i),width:Math.abs(l-a),height:Math.abs(c-i)});for(var p=n.offset().left-Global.frameLeftWidth,u=n.offset().top-r+s,h=n.width(),f=n.height()+Math.abs(s),m=Global.fileListNum,v=0;m>v;v++){var _=Global.fileListAll[v],g=$(Global.fileListAll[v]),b=_.offsetWidth+_.offsetLeft,y=_.offsetHeight+_.offsetTop;if(b>p&&y>u&&p+h>_.offsetLeft&&u+f>_.offsetTop){if(!g.hasClass("selectDragTemp")){if(g.hasClass("selectToggleClass"))continue;if(g.hasClass(Config.SelectClassName)){g.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(g);continue}g.addClass("selectDragTemp")}}else g.removeClass("selectDragTemp"),g.hasClass("selectToggleClass")&&g.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},p=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,a=null,i=null,void 0):!1}},r=function(e){var t=0,a=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){if(1==Global.fileListSelectNum){var n=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=n?n:n-1;break;case"down":case"right":t=n>=i-1?n:n+1;break;default:}}else if(Global.fileListSelectNum>1){var s=parseInt(a.first().attr(Config.FileOrderAttr)),o=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=s?s:s-1;break;case"down":case"right":t=o>=i?o:o+1;break;default:}}},s=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":t=n>s?0:s-n;break;case"left":t=0>=s?s:s-1;break;case"down":t=s+n>=i-1?i-1:s+n;break;case"right":t=s>=i-1?s:s+1;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(a.first().attr(Config.FileOrderAttr)),r=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":t=n>=o?o:o-n;break;case"left":t=0>=o?o:o-1;break;case"down":t=r+n>=i?r:r+n;break;case"right":t=r>=i?r:r+1;break;default:}}};return"list"==G.list_type?n():s(),Global.fileListAll.eq(t)},l=function(e){var t;switch(e){case"home":t=Global.fileListAll.first();break;case"end":t=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":t=r(e);break;case"all":t=Global.fileListAll;break;default:}d.clear(),t.addClass(Config.SelectClassName),d.select(),d.setInView()},c=function(e,t){d.clear();for(var a=e;t>=a;a++)$(Global.fileListAll[a]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0,d.menuAction("clear")},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e),d.menuAction("menufile")},setInView:function(){var e=Global.fileListSelect;if(e&&e.length>=1){var t=$(".bodymain"),a=$(e[e.length-1]);t.scrollTop(a.offset().top-t.offset().top-t.height()/2+t.scrollTop())}},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){if("*recycle*/"!=G.this_path){if("*share*/"==G.this_path)return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;e.removeClass("menufile menufolder").addClass("menuMore"),d.menuAction()}},resumeMenu:function(e){if("*share*/"==G.this_path)return e.removeClass("menuSharePathMore").addClass("menuSharePath"),void 0;var t={fileBox:"menufile",folderBox:"menufolder"};for(var a in t)e.hasClass(a)&&e.removeClass("menuMore").addClass(t[a]);d.menuAction()},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var t=Global.fileListSelect;return t.each(function(t){e[t]=d.name($(this))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0,d.menuAction()}},menuAction:function(){0==Global.fileListSelectNum?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):Global.fileListSelectNum>1?($(".drop-menu-action li").removeClass("disabled"),$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink").removeClass("disabled"))}};return{init:i,selectPos:l,fileLight:d}}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));
-var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)
-},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){_menuBody(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},_bindTask=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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(e.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=fileLight.type(Global.fileListSelect);"zip"==a?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,a)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==a?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)||inArray(core.filetype.doc,a)?e.find(".open_text").hide():e.find(".open_text").show()}if(t.hasClass("dialog_menu")){var i=t.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var t=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",a="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(t).removeClass(a),$("ul.menufolder").find(t).removeClass(a),$("ul.fileContiner_menu").find(t).removeClass(a),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(t).addClass(a),$("ul.menufolder").find(t).addClass(a),$("ul.fileContiner_menu").find(t).addClass(a),$(".tools-left button").addClass("disabled"))},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/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()
-})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},S=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")})},T=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}S(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:T,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}$.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"./index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"
-};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};define("app/src/explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var t=e("../../common/pathOperate"),a=e("../../common/pathOpen"),n=void 0;ui.pathOpen=a;var s=function(e,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=t&&""!=t&&core.tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var i="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),i&&$(".dialog_file_upload").css("visibility","hidden")}ui.f5_callback(function(){"function"==typeof a&&a()})}},o=function(e,t){var a,i,n=0,s=G.json_data.folderlist,o=G.json_data.filelist;if("desktop"==Config.pageApp&&(n=$(".menuDefault").length),"folder"==t){for(a=0;s.length>a&&!(s[a].name>=e);a++);return"up"==G.sort_order?a+n:o.length+a+n}if("file"==t){for(i=0;o.length>i&&!(o[i].name>=e);i++);return"down"==G.sort_order?i+n:s.length+i+n}return-1},r=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=$.inArray(a,e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==n||G.this_path!=n.path||e!=n.key){var t=[];$(".fileContiner .file").each(function(){var a=fileLight.name($(this));a&&e==a.substring(0,e.length).toLowerCase()&&t.push(a)}),n={key:e,path:G.this_path,index:0,list:t}}0!=n.list.length&&(r(n.list[n.index++]),n.index==n.list.length&&(n.index=0))}},c=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=a.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},d=function(e,t,a){var n=e.length;for(i=0;n>i;i++)if(e[i][t]==a)return e[i]},p=function(e){var t="",a=0;return null!=G.json_data.filelist&&(t=d(G.json_data.filelist,"name",e),null!=t&&(a=1)),null!=G.json_data.folderlist&&(t=d(G.json_data.folderlist,"name",e),null!=t&&(a=1)),a},u=function(e,t){var a,i=0;if(void 0==t){if(!p(e))return e;for(a=e+"(0)";p(a);)i++,a=e+"("+i+")";return a}if(!p(e+"."+t))return e+"."+t;for(a=e+"(0)."+t;p(a);)i++,a=e+"("+i+")."+t;return a},h=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyBack",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},f=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyNext",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},m=function(e){fileLight.clear(),void 0==e&&(e="txt");var a="newfile",a=u(a,e),i=o(a,"file");i=0==i?-1:i-1;var n='<div class="file select menufile"  id="makefile">			<div class="'+e+' ico"></div>				<div class="titleBox">					<span class="title">					<div class="textarea">						<textarea class="newfile fix">'+a+'</textarea>					</span>				</div>			</div>			<div style="clear:both;"></div>		</div>';-1==i?$(Config.FileBoxSelector).html(n+$(Config.FileBoxSelector).html()):$(n).insertAfter(Config.FileBoxSelector+" .file:eq("+i+")"),"desktop"==Config.pageApp&&ui.sort_list();var s=$(".newfile"),l=s.get(0),c=a.length-e.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c);s.focus(),s.unbind("keydown").keydown(function(e){return(13==e.keyCode||27==e.keyCode)&&(stopPP(e),e.preventDefault(),filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):t.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})),!0}),s.unbind("blur").blur(function(){filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFile(e)):t.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})})},v=function(){fileLight.clear();var e=LNG.newfolder,e=u(e),a=o(e,"folder");a=0==a?-1:a-1;var i='<div class="file select menufolder" id="makefile">';i+='<div class="folder ico" filetype="folder"></div>',i+='<div  class="titleBox"><span class="title">',i+='<div class="textarea"><textarea class="newfile fix">'+e+'</textarea></span></div></div><div style="clear:both;"></div></div>',-1==a?$(Config.FileBoxSelector).html(i+$(Config.FileBoxSelector).html()):$(i).insertAfter(Config.FileBoxSelector+" .file:eq("+a+")"),"desktop"==Config.pageApp&&ui.sort_list(),$(".newfile").select(),$(".newfile").focus(),$(".newfile").unbind("keydown").keydown(function(e){if(13==e.keyCode||27==e.keyCode){stopPP(e),e.preventDefault();var a=$(".newfile").attr("value");p(a)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):t.newFolder(G.this_path+a,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(a)})})}}),$(".newfile").unbind("blur").blur(function(){filename=$(".newfile").attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFolder()):t.newFolder(G.this_path+filename,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(filename)})})})},_=function(){var e="",a="",i=Global.fileListSelect,n=fileLight.name(i),s=fileLight.type(i);if(1==i.length){if(i.hasClass("menuSharePath"))return ui.path.share_edit(),void 0;s="folder"==s?"folder":s,$(i).find(".title").html("<div class='textarea'><textarea class='fix' id='pathRenameTextarea'>"+$(i).find(".title").text()+"</textarea><div>");var o=$("#pathRenameTextarea"),l=o.get(0);if("folder"==s)o.select();else{var c=n.length-s.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c)}o.unbind("focus").focus(),o.keydown(function(l){if(13==l.keyCode){l.preventDefault(),stopPP(l),e=o.attr("value"),"oexe"==s&&(e+=".oexe");var c=e;e!=n?(a=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(c)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}27==l.keyCode&&("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}),o.unbind("blur").blur(function(){e=$("#pathRenameTextarea").attr("value"),"oexe"==s&&(e+=".oexe");var o=e;e!=n?(a=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(o)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))})}},g=function(){ui.f5(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)},b=function(e){if(e){var t=[];return 0==Global.fileListSelect.length?t:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),a="folder"==fileLight.type($(this))?"folder":"file";"*share*/"==G.this_path&&(e=$(this).attr("data-path"),a="share"),t.push({path:e,type:a})}),t)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var a=Global.fileListSelect,i=G.this_path+fileLight.name(a),n=fileLight.type(a);return"*share*/"==G.this_path&&(i=a.attr("data-path"),n="share"),{path:i,type:n}};return{appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var a=Global.fileListSelect.attr("data-app"),i=json_decode(urlDecode(a));i.path=G.this_path+fileLight.name(Global.fileListSelect),t.appEdit(i)}},appList:function(){t.appList(b().path)},appInstall:function(){t.appInstall(b().path)},openEditor:function(){a.openEditor(b().path)},openIE:function(){a.openIE(b().path)},open:function(e){if(0!=b().path.length){if("*recycle*/"==G.this_path)return ui.path.info(),void 0;if("*share*/"==G.this_path)return ui.path.share_open_window(),void 0;if(void 0!=e)return a.open(e),void 0;var t=b(),i=Global.fileListSelect;if(inArray(core.filetype.image,t.type)){if(!core.authCheck("explorer:fileDownload",LNG.no_permission_download))return;return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0}if("oexe"==t.type){var n=i.attr("data-app");t.path=json_decode(urlDecode(n))}a.open(t.path,t.type)}},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var t=fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(G.this_path+fileLight.name($(this)));e.push(a)}}),a.play(e,"music")}},pathOperate:t,share:function(){t.share(b())},setBackground:function(){t.setBackground(b().path)},createLink:function(){t.createLink(b().path,b().type,function(e){ui.f5_callback(function(){r(e.info)})})},createProject:function(){t.createProject(b().path,function(e){ui.f5_callback(function(){r(e.info)})})},download:function(){var e=b(!0);1==e.length&&"file"==e[0].type?a.download(b().path):t.zipDownload(e)},share_edit:function(){var e=b().path,a=G.json_data.share_list[e];t.share_box(a)},share_open_window:function(){var e=b().path,t=G.json_data.share_list[e],a=t.type;"folder"==t.type&&(a=1==t.code_read?"code_read":"folder");var i="./index.php?share/"+a+"&user="+G.user_name+"&sid="+t.sid;window.open(i)},share_open_path:function(){var e=b().path,t=G.json_data.share_list[e],a=core.pathFather(t.path),i=core.pathThis(t.path);ui.path.list(a,"",function(){r(i)})},recycle_clear:function(){$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.2,content:LNG.recycle_clear_info,ok:function(){$.ajax({url:"index.php?explorer/pathDeleteRecycle",beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),ui.f5(),FrameCall.father("ui.f5","1,1"),"function"==typeof callback&&callback(e)}})},cancel:!0})},explorer:function(){core.explorer(b().path)},explorerNew:function(){window.open("index.php?/explorer&path="+b().path)},openProject:function(){core.explorerCode(b().path)},search:function(){core.search("",b().path)},fav:function(){t.fav(b().path)},remove:function(){t.remove(b(!0),g),fileLight.clear()},copy:function(){t.copy(b(!0))},cute:function(){t.cute(b(!0),ui.f5)},zip:function(){t.zip(b(!0),function(e){ui.f5_callback(function(){r(e.info)})})},unZip:function(){t.unZip(b().path,ui.f5)},cuteDrag:function(e){t.cuteDrag(b(!0),e,g)},copyDrag:function(e,a){t.copyDrag(b(!0),e,function(e){fileLight.clear(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){a&&e.data&&r(e.data)})})},info:function(){if("share"==b().type){var e=b().path,a=G.json_data.share_list[e],i=a.path;t.info([{path:i,type:a.type}])}else t.info(b(!0))},past:function(){fileLight.clear(),t.past(G.this_path,function(e){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(e)})})},back:h,next:f,list:s,newFile:m,newFolder:v,rname:_,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:t.clipboard}});
\ No newline at end of file
+define("app/src/explorer/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","./ui","./fileSelect","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/rightMenu","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","./path"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?explorer/treeList&app=explorer",AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),ui=e("./ui"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../common/rightMenu"),ui.tree=e("../../common/tree"),ui.path=e("./path"),fileSelect=e("./fileSelect"),fileLight=fileSelect.fileLight,$(document).ready(function(){Global.topbar_height="none"==$(".topbar").css("display")?0:$(".topbar").height(),e.async("lib/webuploader/webuploader-min",function(){core.upload_init()}),ui.init(),ui.tree.init(),TaskTap.init(),core.update(),fileSelect.init(),rightMenu.initExplorer(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".path_tips").tooltip({placement:"bottom",html:!0})})}),define("app/src/explorer/ui",["./fileSelect"],function(require,exports){var fileSelect=require("./fileSelect"),fileLight=fileSelect.fileLight,MyPicasa=new Picasa;PicasaOpen=!1;var _ajaxLive=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,MyPicasa.initData(),$(".fileContiner .picture img").lazyload({container:$(".bodymain")})},_initListType=function(e){$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),"list"==e?($(Config.FileBoxSelector).removeClass("fileList_icon").addClass("fileList_list"),$("#list_type_list").html('<div id="main_title"><div class="filename" field="name">'+LNG.name+"<span></span></div>"+'<div class="filetype" field="ext">'+LNG.type+"<span></span></div>"+'<div class="filesize" field="size">'+LNG.size+"<span></span></div>"+'<div class="filetime" field="mtime">'+LNG.modify_time+"<span></span></div>"+'<div style="clear:both"></div>'+"</div>"),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:19,padding:4})):($(Config.FileBoxSelector).removeClass("fileList_list").addClass("fileList_icon"),$("#list_type_list").html(""),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:32,padding:4})),$(".menu_seticon").removeClass("selected"),$(".set_set"+G.list_type).addClass("selected")},_setListType=function(e,t){G.list_type=e,void 0==t?$.ajax({url:"index.php?setting/set&k=list_type&v="+e,dataType:"json",success:function(){_initListType(e),_f5(!1,!1)}}):(_initListType(e),_f5(!1,!0))},_sortBy=function(e,t){var t="down"==t?-1:1;return function(a,i){return a=a[e],i=i[e],i>a?-1*t:a>i?1*t:void 0}},_setListSort=function(e,t){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=t&&(G.sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")),_f5(!1,!0),$.ajax({url:"index.php?setting/set&k=list_sort_field,list_sort_order&v="+G.sort_field+","+G.sort_order})},_jsonSortTitle=function(){var up='<i class="font-icon icon-chevron-up"></i>',down='<i class="font-icon icon-chevron-down"></i>';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.sort_field+"]").addClass("this").attr("id",G.sort_order).find("span").html(eval(G.sort_order))},_bindEventSort=function(){$("#main_title div").die("click").live("click",function(){"up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),_setListSort($(this).attr("field"),$(this).attr("id"))})},_bindEventTools=function(){$(".tools a,.tools button").bind("click",function(){var e=$(this).attr("id");_toolsAction(e)})},_bindEventTheme=function(){$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");$.ajax({url:"index.php?setting/set&k=theme&v="+e,dataType:"json",success:function(t){ui.setTheme(e),t.code||(core.authCheck("setting:set")?core.tips.tips(LNG.config_save_error_file,!1):core.tips.tips(LNG.config_save_error_auth,!1))}}),$(".dropdown-menu li").removeClass("this"),$(this).addClass("this")})},_bindFrameSizeEvent=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-left .bottom_box"),o=$(".frame-resize"),r=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(l(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){return d(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var l=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active")},c=function(l){if(!e)return!0;var c=l.pageX-t,d=a+c;i>d&&(d=i),d>$(document).width()-200&&(d=$(document).width()-200),n.css("width",d),s.css("width",d),o.css("left",d-5),r.css("left",d+1),ui.setStyle()},d=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),void 0):!1}},_bindHotKey=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var a=!1;if(Global.ctrlKey||t.keyCode==e||t.ctrlKey)switch(a=!0,Global.ctrlKey=!0,t.keyCode){case 8:ui.path.remove(),a=!0;break;case 65:fileSelect.selectPos("all");break;case 8:ui.path.next(),a=!0;break;case 67:ui.path.copy();break;case 88:ui.path.cute();break;case 83:break;case 86:ui.path.past();break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:a=!1}else if(t.shiftKey)Global.shiftKey=!0;else switch(t.keyCode){case 8:ui.path.back(),a=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),a=!0;break;case 38:fileSelect.selectPos("up"),a=!0;break;case 39:fileSelect.selectPos("right"),a=!0;break;case 40:fileSelect.selectPos("down"),a=!0;break;case 13:ui.path.open(),a=!1;break;case 46:ui.path.remove(),a=!0;break;case 113:ui.path.rname(),a=!0;break;default:a=!1}return a&&(stopPP(t),t.keyCode=0,t.returnValue=!1),!0}).keyup(function(t){t.shiftKey||(Global.shiftKey=!1),t.keyCode!=e&&t.ctrlKey||(Global.ctrlKey=!1)})},_menuActionBind=function(){$(".drop-menu-action li").bind("click",function(){if(!$(this).hasClass("disabled")){var e=$(this).attr("id");switch(e){case"open":ui.path.open();break;case"copy":ui.path.copy();break;case"rname":ui.path.rname();break;case"cute":ui.path.cute();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"past":ui.path.past();break;case"remove":ui.path.remove();break;case"zip":ui.path.zip();break;case"share":ui.path.share();break;case"createLink":ui.path.createLink();break;case"download":ui.path.download();break;case"info":ui.path.info();break;default:}}})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-path="'+e.path+'" data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.create_time+":"+e.ctime+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var t="",a=e.name;return"number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),t+="<div class='file folderBox menufolder' data-name='"+e.name+"'"+_hover_title(e)+">",t+="<div class='folder ico' filetype='folder'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"},this._getFileBox=function(e){var t="",a=e.name;if("number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),"oexe"==e.ext&&void 0!=e.icon){var i=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(i=G.static_path+"images/app/"+e.icon);var n=urlEncode(json_encode(e));a=a.replace(".oexe",""),t="<div class='file fileBox menufile' data-app="+n+" data-name='"+e.name+"'"+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(e.name.replace(".oexe",""))+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='ico' filetype='oexe' style='background-image:url("+i+")'></div>",t+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>"}else t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div></div>";return t},this._getFolderBoxList=function(e){var t=e.name;"number"==typeof e.exists&&0==e.exists&&(t='<b style="color:red;">'+t+"</b>");var a="<div class='file folderBox menufolder' "+_hover_title(e)+">";return a+="	<div class='folder ico' filetype='folder'></div>",a+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+t+"</span></div>",a+="	<div class='filetype'>"+LNG.folder+"</div>",a+="	<div class='filesize'></div>",a+="	<div class='filetime'>"+e.mtime+"</div>",a+="	<div style='clear:both'></div>",a+="</div>"},this._getFileBoxList=function(e){var t="",a=e.name;if("number"==typeof e.exists&&0==e.exists&&(a='<b style="color:red;">'+a+"</b>"),"oexe"==e.ext){var i=urlEncode(json_encode(e));t="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">",a=a.replace(".oexe",""),"app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(e.name.replace(".oexe",""))+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='oexe ico' filetype='oexe'></div>"}else if(inArray(core.filetype.image,e.ext)){var n=core.path2url(G.this_path+e.name),s="index.php?explorer/image&path="+urlEncode(G.this_path+e.name);t+="<div picasa='"+n+"' thumb='"+s+"' class='picasaImage file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>"}else t+="<div class='file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>";return t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div>",t+="	<div class='filetype'>"+e.ext+"  "+LNG.file+"</div>",t+="	<div class='filesize'>"+e.size_friendly+"</div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"};var pathTypeChange=function(){var e="menuBodyMain menuRecycleBody menuShareBody",t="folderBox menufolder fileBox menufile",a=$(".html5_drag_upload_box");"*recycle*/"==G.this_path?(a.removeClass(e).addClass("menuRecycleBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_recycle_tool").removeClass("hidden"),$(".fileContiner .file").removeClass(t).addClass("menuRecyclePath")):"*share*/"==G.this_path?(a.removeClass(e).addClass("menuShareBody"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_share_tool").removeClass("hidden"),$(".fileContiner .file").removeClass(t).addClass("menuSharePath")):(a.removeClass(e).addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden"))},_mainSetData=function(e){G.json_data&&G.json_data.filelist&&G.json_data.folderlist||_mainSetDataShare();var t="",a=G.json_data.folderlist,i=G.json_data.filelist;a="size"==G.sort_field||"ext"==G.sort_field?a.sort(_sortBy("name",G.sort_order)):a.sort(_sortBy(G.sort_field,G.sort_order)),i=i.sort(_sortBy(G.sort_field,G.sort_order)),G.json_data.folderlist=a,G.json_data.filelist=i;var n="_getFileBox",s="_getFolderBox",o="",r="";"list"==G.list_type&&(n="_getFileBoxList",s="_getFolderBoxList");for(var l=0;i.length>l;l++)o+=this[n](i[l]);for(var l=0;a.length>l;l++)r+=this[s](a[l]);t="up"==G.sort_order?r+o:o+r,""==t&&(t='<div style="text-align:center;color:#aaa;">'+LNG.path_null+"</div>"),t+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list"==G.list_type&&$(Config.FileBoxSelector+" .file:nth-child(2n)").addClass("file2"),_ajaxLive()},_f5=function(e,t,a){if(void 0==e&&(e=!0),void 0==t&&(t=!1),_jsonSortTitle(),e)$.ajax({url:"index.php?explorer/pathList&path="+urlEncode(G.this_path),dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(G.json_data=e.data,_f5_time_user(),Global.historyStatus=G.json_data.history_status,_mainSetData(t),pathTypeChange(),ui.header.updateHistoryStatus(),ui.header.addressSet(),rightMenu.menuCurrentPath(G.json_data.path_type),"function"==typeof a&&a(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)},error:function(e,t,a){$(".tools-left .msg").fadeOut(100),$(Config.FileBoxSelector).html(""),core.ajaxError(e,t,a)}});else{var i=fileLight.getAllName();_mainSetData(t),pathTypeChange(),ui.path.setSelectByFilename(i)}},_f5_callback=function(e){_f5(!0,!1,e)},_f5_time_user=function(){if(G.json_data&&G.json_data.filelist&&G.json_data.folderlist){for(var e=0;G.json_data.filelist.length>e;e++)if(G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),"*share*/"==G.this_path){var t=parseInt(G.json_data.filelist[e].num_view);t=isNaN(t)?0:t;var a=parseInt(G.json_data.filelist[e].num_download);a=isNaN(a)?0:a;var i=date("Y/m/d ",G.json_data.filelist[e].mtime)+"  ";i+=LNG.share_view_num+t+"  "+LNG.share_download_num+a,G.json_data.filelist[e].mtime=i}else G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)if(G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),"*share*/"==G.this_path){var t=parseInt(G.json_data.folderlist[e].num_view);t=isNaN(t)?0:t;var a=parseInt(G.json_data.folderlist[e].num_download);a=isNaN(a)?0:a;var i=date("Y/m/d ",G.json_data.folderlist[e].mtime)+"  ";i+=LNG.share_view_num+t+"  "+LNG.share_download_num+a,G.json_data.folderlist[e].mtime=i}else G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)}},_toolsAction=function(e){switch(e){case"recycle_clear":ui.path.recycle_clear();break;case"newfile":ui.path.newFile();break;case"refresh":ui.f5();break;case"newfolder":ui.path.newFolder();break;case"upload":core.upload();break;case"set_icon":$("#set_icon").hasClass("active")||_setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||_setListType("list");break;default:}};return{f5:_f5,f5_callback:_f5_callback,picasa:MyPicasa,setListSort:_setListSort,setListType:_setListType,setTheme:function(e){core.setSkin(e,"app_explorer.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},init:function(){_f5_callback(function(){_setListType(G.list_type,!0)}),_bindEventSort(),_bindEventTheme(),_bindEventTools(),_bindHotKey(),_bindFrameSizeEvent(),_menuActionBind(),ui.header.bindEvent(),$(window).bind("resize",function(){ui.setStyle(),ui.header.set_width(),0!=PicasaOpen&&MyPicasa.setFrameResize()}),$("html").bind("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),FrameCall.top("OpenopenEditor","Editor.save","")});var e,t=0,a="",i=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var s=String.fromCharCode(n.charCode);return 0==t?(t=time(),a=s,e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i),void 0):s==a.substr(-1)?(ui.path.setSelectByChar(a),t=0,void 0):(i>time()-t&&(t=time(),a+=s,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["ctrl+u","command+u"],function(e){stopPP(e),core.upload()}),Mousetrap.bind(["ctrl+e","command+e"],function(e){stopPP(e),ui.path.openEditor()}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),Mousetrap.bind(["alt+n","alt+n"],function(e){stopPP(e),ui.path.newFile()}),Mousetrap.bind(["alt+m","alt+m"],function(e){stopPP(e),ui.path.newFolder()}),PicasaOpen=!1,MyPicasa.init(".picasaImage"),MyPicasa.initData()},setStyle:function(){Global.fileRowNum="list"==G.list_type?1:function(){var e=$(Config.FileBoxSelector).width(),t=$sizeInt($(Config.FileBoxClass).css("width"))+$sizeInt($(Config.FileBoxClass).css("border-left-width"))+$sizeInt($(Config.FileBoxClass).css("border-right-width"))+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)}()},header:{bindEvent:function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("title");$("input.path").val(t),ui.header.gotoPath(),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0}),$("#yarnball_input input").die("blur").live("blur",function(){ui.header.gotoPath()}),$("#yarnball_input input").keyEnter(function(){ui.header.gotoPath()}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_back":$("#history_back").hasClass("active")||ui.path.back("");break;case"history_next":$("#history_next").hasClass("active")||ui.path.next("");break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list(G.myhome);break;case"fav":ui.path.pathOperate.fav(G.this_path);break;case"up":ui.header.gotoFather();break;case"setting":core.setting();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},addressSet:function(){var e=G.this_path;$("input.path").val(e),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var t=function(e){var t='<li class="yarnlet first"><a title="@1@" style="z-index:{$2};"><span class="left-yarn"></span>{$3}</a></li>\n',a='<li class="yarnlet "><a title="@1@" style="z-index:{$2};">{$3}</a></li>\n';e=e.replace(/\/+/g,"/");var i=e.split("/");""==i[i.length-1]&&i.pop();var n=i[0]+"/",s=t.replace(/@1@/g,n),o=i[0];""!=i[0]&&("*share*"==o?o=LNG.my_share:"*public*"==o?o=LNG.public_path:"*recycle*"==o&&(o=LNG.recycle)),s=s.replace("{$2}",i.length),s=s.replace("{$3}",o);for(var r=s,l=1,c=i.length-1;i.length>l;l++,c--)n+=i[l]+"/",s=a.replace(/@1@/g,n),s=s.replace("{$2}",c),s=s.replace("{$3}",i[l]),r+=s;return'<ul class="yarnball">'+r+"</ul>"};$("#yarnball").html(t(e)),ui.header.set_width()},set_width:function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var a=e-t;0>=a?$(".yarnball").css("width",t+"px").css("left",a+"px"):$(".yarnball").css({left:"3px",width:e+"px"})},gotoPath:function(){var e=$("input.path").val();e=e.replace(/\\/g,"/"),$("input.path").val(e),"/"!=e.substr(e.length-1,1)&&(e+="/"),ui.path.list(e),ui.header.addressSet()},updateHistoryStatus:function(){0==Global.historyStatus.back?$("#history_back").addClass("active"):$("#history_back").removeClass("active"),0==Global.historyStatus.next?$("#history_next").addClass("active"):$("#history_next").removeClass("active")},gotoFather:function(){var e=$("input.path").val();if("/"==e)return core.tips.tips("已经到根目录了!","warning"),void 0;var t=e.length-1,a="",i=e.split("/").length-1;if(1==i)a=e;else{"/"==e.substr(t,1)&&(t-=1);for(var n=t;n>0&&"/"!=e.substr(t,1);n--)t--;a=e.substr(0,t+1)}$("input.path").val(a),ui.header.gotoPath()}}}}),define("app/src/explorer/fileSelect",[],function(){var e=!1,t=!1,a=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(Config.FileBoxClass).live("mouseenter",function(){t&&$(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)&&$(this).addClass("selectDragTemp"),e||t||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?a=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var t=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,t);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>t?c(t,i):t>n?c(n,t):t>i&&n>t&&c(i,t)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&a&&(a=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).die("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.info():ui.path.open()}),$(Config.FileBoxTittleClass).die("dblclick").live("dblclick",function(e){return ui.path.rname(),stopPP(e),!1})},s=function(){var a,i,n,s=100,o=50,r=30,l=80-Global.topbar_height,c=0,p=!1,u=0,h=0;$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=t.which||e?!0:(a=$(this),f(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){m(e)}),$(document).one("mouseup",function(e){v(e),this.releaseCapture&&this.releaseCapture()}),stopPP(t),!1)});var f=function(e){rightMenu.hidden(),t=!0,c=$.now(),u=e.pageY,h=e.pageX,i=$(document).height(),n=$(document).width()},m=function(e){if(!t)return!0;$.now()-c>s&&!p&&_();var a=e.clientX>=n-50?n-50:e.clientX,r=e.clientY>=i-50?i-50:e.clientY;a=0>=a?0:a,r=0>=r?0:r,a-=o,r-=l,$(".draggable-dragging").css("left",a),$(".draggable-dragging").css("top",r),Global.isIE&&$("."+Config.TypeFolderClass).each(function(){var t=e.pageX,a=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();t>i.left&&i.left+n>t&&a>i.top&&i.top+s>a?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},v=function(e){if(!t)return!1;t=!1,p=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()});var a=G.this_path,i=0==$(".selectDragTemp").length;Global.ctrlKey?(i||(a+=d.name($(".selectDragTemp"))),(Math.abs(e.pageX-h)>r||Math.abs(e.pageY-u)>r)&&ui.path.copyDrag(a,i)):i||(a+=d.name($(".selectDragTemp")),ui.path.cuteDrag(a))},_=function(){p=!0,$("body").css("cursor","move"),a.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+a.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var a=null,i=null,n=null,s=85+Global.topbar_height,o=0,r=0;$(Config.BodyContent).die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass("bodymain")&&20>$(document).width()-e.pageX)){if(ui.isEdit())return!0;if(1!=e.which||t)return!0;l(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){p(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()})}});var l=function(t){o=$(Config.BodyContent).scrollTop(),r=s-o,$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.shiftKey||d.clear(),0==$(t.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),a=t.pageX-Global.frameLeftWidth,i=t.pageY+$(Config.BodyContent).scrollTop()-s,e=!0))},c=function(t){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=$(Config.BodyContent).scrollTop()-o,l=t.pageX-Global.frameLeftWidth,c=t.pageY-r+s;n.css({left:Math.min(l,a),top:Math.min(c,i),width:Math.abs(l-a),height:Math.abs(c-i)});for(var p=n.offset().left-Global.frameLeftWidth,u=n.offset().top-r+s,h=n.width(),f=n.height()+Math.abs(s),m=Global.fileListNum,v=0;m>v;v++){var _=Global.fileListAll[v],g=$(Global.fileListAll[v]),b=_.offsetWidth+_.offsetLeft,y=_.offsetHeight+_.offsetTop;if(b>p&&y>u&&p+h>_.offsetLeft&&u+f>_.offsetTop){if(!g.hasClass("selectDragTemp")){if(g.hasClass("selectToggleClass"))continue;if(g.hasClass(Config.SelectClassName)){g.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(g);continue}g.addClass("selectDragTemp")}}else g.removeClass("selectDragTemp"),g.hasClass("selectToggleClass")&&g.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},p=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,a=null,i=null,void 0):!1}},r=function(e){var t=0,a=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){if(1==Global.fileListSelectNum){var n=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=n?n:n-1;break;case"down":case"right":t=n>=i-1?n:n+1;break;default:}}else if(Global.fileListSelectNum>1){var s=parseInt(a.first().attr(Config.FileOrderAttr)),o=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=s?s:s-1;break;case"down":case"right":t=o>=i?o:o+1;break;default:}}},s=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":t=n>s?0:s-n;break;case"left":t=0>=s?s:s-1;break;case"down":t=s+n>=i-1?i-1:s+n;break;case"right":t=s>=i-1?s:s+1;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(a.first().attr(Config.FileOrderAttr)),r=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":t=n>=o?o:o-n;break;case"left":t=0>=o?o:o-1;break;case"down":t=r+n>=i?r:r+n;break;case"right":t=r>=i?r:r+1;break;default:}}};return"list"==G.list_type?n():s(),Global.fileListAll.eq(t)},l=function(e){var t;switch(e){case"home":t=Global.fileListAll.first();break;case"end":t=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":t=r(e);break;case"all":t=Global.fileListAll;break;default:}d.clear(),t.addClass(Config.SelectClassName),d.select(),d.setInView()},c=function(e,t){d.clear();for(var a=e;t>=a;a++)$(Global.fileListAll[a]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0,d.menuAction("clear")},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e),d.menuAction("menufile")},setInView:function(){var e=Global.fileListSelect;if(e&&e.length>=1){var t=$(".bodymain"),a=$(e[e.length-1]);t.scrollTop(a.offset().top-t.offset().top-t.height()/2+t.scrollTop())}},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){if("*recycle*/"!=G.this_path){if("*share*/"==G.this_path)return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;e.removeClass("menufile menufolder").addClass("menuMore"),d.menuAction()}},resumeMenu:function(e){if("*share*/"==G.this_path)return e.removeClass("menuSharePathMore").addClass("menuSharePath"),void 0;var t={fileBox:"menufile",folderBox:"menufolder"};for(var a in t)e.hasClass(a)&&e.removeClass("menuMore").addClass(t[a]);d.menuAction()},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var t=Global.fileListSelect;return t.each(function(t){e[t]=d.name($(this))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0,d.menuAction()}},menuAction:function(){0==Global.fileListSelectNum?($(".drop-menu-action li").addClass("disabled"),$(".drop-menu-action #past").removeClass("disabled"),$(".drop-menu-action #info").removeClass("disabled")):Global.fileListSelectNum>1?($(".drop-menu-action li").removeClass("disabled"),$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink").addClass("disabled")):($(".drop-menu-action li").removeClass("disabled"),$(".drop-menu-action").find("#open,#rname,#past,#share,#createLink").removeClass("disabled"))}};return{init:i,selectPos:l,fileLight:d}}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=$sizeInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=$sizeInt(t.css("width"));
+var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/rightMenu",[],function(require,exports){var fileMenuSelector=".menufile",folderMenuSelector=".menufolder",selectMoreSelector=".menuMore",selectTreeSelectorRoot=".menuTreeRoot",selectTreeSelectorFolder=".menuTreeFolder",selectTreeSelectorFile=".menuTreeFile",common_menu={newfileOther:{name:LNG.newfile,icon:"expand-alt",accesskey:"w",className:"newfolder",items:{newfile:{name:"txt "+LNG.file,icon:"file-alt",className:"newfile"},newfile_html:{name:"html "+LNG.file,icon:"file-alt",className:"newfile"},newfile_php:{name:"php "+LNG.file,icon:"file-alt",className:"newfile"},newfile_js:{name:"js "+LNG.file,icon:"file-alt",className:"newfile"},newfile_css:{name:"css "+LNG.file,icon:"file-alt",className:"newfile"},app_create:{name:LNG.app_create,icon:"puzzle-piece",className:"line_top newfile"}}},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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},_init_explorer=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_explorer(),_bindFolder(),_bindFile(),_bindSelectMore(),_bindTreeFav(),_bindTreeRoot(),_bindTreeFolder(),_bindDialog(),_bindTask(),_bindTaskBar(),_bindRecycle(),_bindShare(),_auth_change_menu(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_desktop=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindBody_desktop(),_bindSystem(),_bindFolder(),_bindFile(),_bindTask(),_bindDialog(),_bindSelectMore(),_bindTaskBar(),_bindRecycle(),_auth_change_menu(),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("fadein")},_init_editor=function(){$('<div id="rightMenu" class="hidden"></div>').appendTo("body"),$(".context-menu-list").die("click").live("click",function(e){return stopPP(e),!1}),_bindTreeFav(),_bindTreeRoot(),_bindTask(),_bindDialog(),_bindTreeFolderEditor(),_bindEditorFile(),_bindTaskBar(),_auth_change_menu(),$(".context-menu-root").addClass("fadein")},_auth_change_menu=function(){if(window.require=require,eval("‍‌‌‍‌‍‍‌‍‌‌‍‍‌‌‍‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‌‍‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‍‍‍‌‍‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‌‌‍‌‌‍‍‍‌‍‌‌‌‌‌‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‍‍‍‌‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‌‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‌‍‌‍‌‌‍‍‌‍‍‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‍‍‍‌‍‍‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‌‌‍‌‍‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‍‍‌‌‌‍‍‍‍‍‍‌‌‌‍‌‍‍‍‌‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‍‌‌‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‌‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‌‍‍‍‌‌‍‍‌‍‍‍‌‌‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‍‌‍‌‌‌‌‍‌‌‌‍‌‍‌‍‌‌‌‍‍‍‍‍‌‌‍‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‌‍‌‌‍‍‍‍‌‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‍‍‍‌‍‌‌‌‍‍‌‌‍‌‍‌‍‍‌‌‌‍‍‌‌‍‍‌‌‌‌‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‍‌‍‍‍‍‌‌‌‌‍‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‌‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‌‍‍‌‍‍‌‍‌‍‍‍‌‍‍‍‍‌‍‌‍‍‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‌‌‌‍‍‍‌‍‌‌‌‍‌‍‌‍‌‌‍‌‍‍‌‍‌‌‌‍‍‌‍‍‌‌‍‍‌‍‌‍‍‌‍‌‌‌‍‍‌‌‍‍‍‍‌‍‌‌‌‍‍‌‌‍‌‌‌‌‍‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‍‌‍‌‍‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‍‍‍‌‌‍‍‌‌‍‍‌‌‌‍‌‍‌‍‌‌‍‌‌‌‍‍‌‌‍‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‌‍‍‌‍‌‌‍‌‌‌‌‍‌‌‍‌‌‌‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‍‌‍‍‍‌‌‌‍‍‌‍‍‌‌‌‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‍‍‍‍‌‍‍‌‍‌‌‌‍‍‌‌‌‍‌‍‍‍‌‌‍‌‌‌‌‍‌‌‍‍‌‍‍‍‌‌‍‌‌‌‌‍‍‌‍‌‍‍‍‍‍‌‍‍‍‌‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‌‌‍‍‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‌‍‌‌‍‌‍‌‌‌‌‌‍‌‌‌‍‍‌‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‌‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍‍‍‌‍‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‍‍‍‌‌‍‌‌‍‍‍‍‌‍‌‌‌‍‌‍‍‍‌‌‍‍‍‌‌‍‌‌‍‌‍‍‍‍‍‌‍‌‍‍‍‍‌‌‍‍‍‍‌‍‍‌‍‌‍‍‌‍‌‌‌‌‍‌‌‍‌‌‌‌‌‍‌‍‌‌‌‌‌‍‌‍‍‌‍‌‍‍‌‍‍‌‌‌‍‌‌‍‌‌‌‌‌‍‌".replace(/.{8}/g,function(e){return String.fromCharCode(parseInt(e.replace(/\u200c/g,1).replace(/\u200d/g,0),2))})),1!=G.is_root){$(".context-menu-list .open_ie").addClass("hidden");var classHidden="hidden";AUTH["explorer:fileDownload"]||($(".context-menu-list .down,.context-menu-list .download").addClass(classHidden),$(".context-menu-list .share").addClass(classHidden),$(".context-menu-list .open_text").addClass(classHidden)),AUTH["explorer:zip"]||$(".context-menu-list .zip").addClass(classHidden),AUTH["explorer:search"]||$(".context-menu-list .search").addClass(classHidden),AUTH["explorer:mkdir"]||$(".context-menu-list .newfolder").addClass(classHidden)}},_bindRecycle=function(){$('<i class="menuRecycleBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleBody",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"},refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecyclePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecyclePath",callback:function(e){_menuPath(e)
+},items:{cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.recycle_remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuRecycleButton"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuRecycleButton",callback:function(e){_menuBody(e)},items:{recycle_clear:{name:LNG.recycle_clear,icon:"trash",accesskey:"c"}}})},_bindShare=function(){$('<i class="menuShareBody"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuShareBody",callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy}}),$('<i class="menuSharePath"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePath",callback:function(e){_menuPath(e)},items:{share_open_path:{name:LNG.share_open_path,icon:"folder-open-alt",accesskey:"p"},share_open_window:{name:LNG.share_open_page,icon:"globe",accesskey:"b"},sep1:"--------",share_edit:{name:LNG.share_edit,icon:"edit",accesskey:"e"},remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"},sep2:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}}),$('<i class="menuSharePathMore"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuSharePathMore",callback:function(e){_menuPath(e)},items:{remove:{name:LNG.share_remove+"<b>Del</b>",icon:"trash",accesskey:"d"}}})},_bindBody_explorer=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){_menuBody(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep1:"--------",listIcon:common_menu.listIcon,sortBy:common_menu.sortBy,sep3:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSystem=function(){$.contextMenu({selector:".menuDefault",zIndex:9999,items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"}},callback:function(e){switch(e){case"open":ui.path.open();break;default:}}})},_bindBody_desktop=function(){$.contextMenu({selector:Config.BodyContent,zIndex:9999,callback:function(e){_menuBody(e)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sortBy:common_menu.sortBy,sep1:"--------",upload:{name:LNG.upload+"<b>Ctrl+U</b>",className:"upload",icon:"upload",accesskey:"u"},past:{name:LNG.past+"<b>Ctrl+V</b>",className:"past",icon:"paste",accesskey:"p"},copy_see:{name:LNG.clipboard,className:"copy_see",icon:"eye-open",accesskey:"v"},sep2:"--------",newfolder:{name:LNG.newfolder+"<b>Alt+M</b>",className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,app_install:{name:LNG.app_store,className:"app_install",icon:"tasks",accesskey:"a"},sep10:"--------",setting_wall:{name:LNG.setting_wall,className:"setting_wall",icon:"picture",accesskey:"b"},setting:{name:LNG.setting,className:"setting",icon:"cogs",accesskey:"t"}}})},_bindFolder=function(){$('<i class="'+folderMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:folderMenuSelector,className:folderMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"folder-open-alt",accesskey:"o"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},sep2:"--------",zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},search:{name:LNG.search_in_path+"<b>Ctrl+F</b>",className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe",accesskey:"b"},fav:{name:LNG.add_to_fav,className:"fav ",icon:"star",accesskey:"f"},clone:{name:LNG.clone,className:"clone",icon:"external-link"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},createProject:{name:LNG.createProject,className:"createProject",icon:"plus"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep5:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindFile=function(){$('<i class="'+fileMenuSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:fileMenuSelector,className:fileMenuSelector.substr(1),callback:function(e){_menuPath(e)},items:{open:{name:LNG.open+"<b>Enter</b>",className:"open",icon:"external-link",accesskey:"o"},app_edit:{name:LNG.app_edit,className:"app_edit",icon:"code",accesskey:"a"},open_text:{name:LNG.edit+"<b>Ctrl+E</b>",className:"open_text",icon:"edit",accesskey:"e"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep1:"--------",copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},rname:{name:LNG.rename+"<b>F2</b>",className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},unzip:{name:LNG.unzip,className:"unzip",icon:"folder-open-alt",accesskey:"u"},setBackground:{name:LNG.set_background,className:"setBackground",icon:"download",accesskey:"x"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},createLink:{name:LNG.createLink,className:"createLink",icon:"share-alt",accesskey:"l"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info+"<b>Alt+I</b>",className:"info",icon:"info",accesskey:"i"}}})},_bindSelectMore=function(){$('<i class="'+selectMoreSelector.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectMoreSelector,className:selectMoreSelector.substr(1),callback:function(e){_menuPath(e)},items:{copy:{name:LNG.copy+"<b>Ctrl+C</b>",className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute+"<b>Ctrl+X</b>",className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove+"<b>Del</b>",className:"remove",icon:"trash",accesskey:"d"},sep1:"--------",clone:{name:LNG.clone+"<b>Ctrl+C</b>",className:"clone",icon:"external-link",accesskey:"n"},playmedia:{name:LNG.add_to_play,className:"playmedia",icon:"music",accesskey:"p"},zip:{name:LNG.zip,className:"zip",icon:"folder-close",accesskey:"z"},down:{name:LNG.download,className:"down",icon:"download",accesskey:"x"},sep2:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_menuBody=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"back":ui.path.back();break;case"next":ui.path.next();break;case"seticon":ui.setListType("icon");break;case"setlist":ui.setListType("list");break;case"set_sort_name":ui.setListSort("name",0);break;case"set_sort_ext":ui.setListSort("ext",0);break;case"set_sort_size":ui.setListSort("size",0);break;case"set_sort_mtime":ui.setListSort("mtime",0);break;case"set_sort_up":ui.setListSort(0,"up");break;case"set_sort_down":ui.setListSort(0,"down");break;case"upload":core.upload();break;case"recycle_clear":ui.path.recycle_clear();break;case"past":ui.path.past();break;case"copy_see":ui.path.clipboard();break;case"newfolder":ui.path.newFolder();break;case"newfile":ui.path.newFile("txt");break;case"newfile_html":ui.path.newFile("html");break;case"newfile_php":ui.path.newFile("php");break;case"newfile_js":ui.path.newFile("js");break;case"newfile_css":ui.path.newFile("css");break;case"newfile_oexe":ui.path.newFile("oexe");break;case"info":ui.path.info();break;case"open":ui.path.open();break;case"open_new":ui.path.open_new();break;case"app_install":ui.path.appList();break;case"app_create":ui.path.appEdit(!0);break;case"setting":core.setting();break;case"setting_wall":core.setting("wall");break;default:}},_menuPath=function(e){switch(e){case"open":ui.path.open();break;case"down":ui.path.download();break;case"share":ui.path.share();break;case"open_ie":ui.path.openIE();break;case"open_text":ui.path.openEditor();break;case"app_edit":ui.path.appEdit();break;case"playmedia":ui.path.play();break;case"share_edit":ui.path.share_edit();break;case"share_open_window":ui.path.share_open_window();break;case"share_open_path":ui.path.share_open_path();break;case"fav":ui.path.fav();break;case"search":ui.path.search();break;case"copy":ui.path.copy();break;case"clone":ui.path.copyDrag(G.this_path,!0);break;case"cute":ui.path.cute();break;case"remove":ui.path.remove();break;case"rname":ui.path.rname();break;case"zip":ui.path.zip();break;case"unzip":ui.path.unZip();break;case"setBackground":ui.path.setBackground();break;case"createLink":ui.path.createLink();break;case"createProject":ui.path.createProject();break;case"openProject":ui.path.openProject();break;case"explorer":ui.path.explorer();break;case"explorerNew":ui.path.explorerNew();break;case"info":ui.path.info();break;default:}},_bindTreeFav=function(){$('<i class="menuTreeFavRoot"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFavRoot",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"r"},refresh_all:{name:LNG.refresh_tree,className:"refresh_all",icon:"refresh",accesskey:"e"}}}),$('<i class="menuTreeFav"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:".menuTreeFav",callback:function(e){_menuTree(e)},items:{fav_page:{name:LNG.manage_fav,className:"fav_page",icon:"star",accesskey:"f"},fav_remove:{name:LNG.fav_remove,className:"fav_remove",icon:"trash",accesskey:"r"},sep1:"--------",refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeRoot=function(){$('<i class="'+selectTreeSelectorRoot.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorRoot,callback:function(e){_menuTree(e)},items:{explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfile:{name:LNG.newfile,className:"newfile",icon:"file-alt",accesskey:"j"},sep2:"--------",fav:{name:LNG.add_to_fav,className:"fav",icon:"star",accesskey:"f"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"}}})},_bindTreeFolder=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},explorer:{name:LNG.manage_folder,className:"explorer line_top",icon:"laptop",accesskey:"v"},openProject:{name:LNG.openProject,className:"openProject",icon:"edit"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTreeFolderEditor=function(){$('<i class="'+selectTreeSelectorFolder.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFolder,callback:function(e){_menuTree(e)},items:{refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},explorer:{name:LNG.manage_folder,className:"explorer",icon:"laptop",accesskey:"v"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},past:{name:LNG.past,className:"past",icon:"paste",accesskey:"p"},rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",newfolder:{name:LNG.newfolder,className:"newfolder",icon:"folder-close-alt",accesskey:"n"},newfileOther:common_menu.newfileOther,search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},others:{name:LNG.more,icon:"ellipsis-horizontal",accesskey:"m",items:{fav:{name:LNG.add_to_fav,className:"fav",icon:"star"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"}}},sep3:"--------",info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindEditorFile=function(){$('<i class="'+selectTreeSelectorFile.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:selectTreeSelectorFile,callback:function(e){_menuTree(e)},items:{open:{name:LNG.open,className:"open",icon:"external-link",accesskey:"o"},edit:{name:LNG.edit,className:"edit",icon:"edit",accesskey:"e"},download:{name:LNG.download,className:"download",icon:"download",accesskey:"x"},share:{name:LNG.share,className:"share",icon:"share-sign",accesskey:"e"},sep1:"--------",rname:{name:LNG.rename,className:"rname",icon:"pencil",accesskey:"r"},copy:{name:LNG.copy,className:"copy",icon:"copy",accesskey:"c"},cute:{name:LNG.cute,className:"cute",icon:"cut",accesskey:"k"},remove:{name:LNG.remove,className:"remove",icon:"trash",accesskey:"d"},sep2:"--------",clone:{name:LNG.clone,className:"clone",icon:"external-link",accesskey:"l"},open_ie:{name:LNG.open_ie,className:"open_ie",icon:"globe"},info:{name:LNG.info,className:"info",icon:"info",accesskey:"i"}}})},_bindTaskBar=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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},_bindTask=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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},_bindDialog=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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();break;default:}}})},_menuTree=function(e){switch(e){case"edit":ui.tree.openEditor();break;case"open":ui.tree.open();break;case"refresh":ui.tree.refresh();break;case"copy":ui.tree.copy();break;case"cute":ui.tree.cute();break;case"past":ui.tree.past();break;case"clone":ui.tree.clone();break;case"rname":ui.tree.rname();break;case"remove":ui.tree.remove();break;case"info":ui.tree.info();break;case"download":ui.tree.download();break;case"open_ie":ui.tree.openIE();break;case"search":ui.tree.search();break;case"share":ui.tree.share();break;case"search":ui.tree.search();break;case"newfolder":ui.tree.create("folder");break;case"newfile":ui.tree.create("file");break;case"explorer":ui.tree.explorer();break;case"openProject":ui.tree.openProject();break;case"fav_page":core.setting("fav");break;case"fav":ui.tree.fav();break;case"fav_remove":ui.tree.fav_remove();break;case"refresh_all":ui.tree.init();break;case"quit":break;default:}};return{initDesktop:_init_desktop,initExplorer:_init_explorer,initEditor:_init_editor,show:function(e,t,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},menuShow:function(){var e=$(".context-menu-list").filter(":visible"),t=$(".context-menu-active");if(0!=e.length&&0!=t.length){if(e.find(".disable").addClass("disabled"),t.hasClass("menufile")){var a=fileLight.type(Global.fileListSelect);"zip"==a?e.find(".unzip").show():e.find(".unzip").hide(),inArray(core.filetype.image,a)?e.find(".setBackground").show():e.find(".setBackground").hide(),"oexe"==a?e.find(".app_edit").show():e.find(".app_edit").hide(),inArray(core.filetype.image,a)||inArray(core.filetype.music,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.bindary,a)||inArray(core.filetype.doc,a)?e.find(".open_text").hide():e.find(".open_text").show()}if(t.hasClass("dialog_menu")){var i=t.attr("id"),n=art.dialog.list[i];n.has_frame()?(e.find(".open_window").show(),e.find(".refresh").show()):(e.find(".open_window").hide(),e.find(".refresh").hide())}if(t.hasClass("menuMore")){var s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?e.find(".playmedia").hide():e.find(".playmedia").show()}}},menuCurrentPath:function(e){var t=".createLink,.createProject,.cute,.remove,.rname,.zip,.unzip,.newfile,.newfolder,.newfileOther,.app_create,.app_install,.past,.upload,.clone",a="disable";"writeable"==e?($(".path_tips").hide(),$("ul.menufile").find(t).removeClass(a),$("ul.menufolder").find(t).removeClass(a),$("ul.fileContiner_menu").find(t).removeClass(a),$(".tools-left button").removeClass("disabled")):($(".path_tips").show(),$("ul.menufile").find(t).addClass(a),$("ul.menufolder").find(t).addClass(a),$("ul.fileContiner_menu").find(t).addClass(a),$(".tools-left button").addClass("disabled"))},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/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)
+}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},S=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")})},T=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}S(n)},z=function(){core.appStore()},E=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:T,appList:z,appAddURL:E,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}if(G.share_page!==void 0){var i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e),n=G.office_server+urlEncode(i),s=core.pathThis(e);art.dialog.open(n,{ico:core.ico("doc"),title:s,width:"80%",height:"70%",resize:!0})}else $.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);
+else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};define("app/src/explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var t=e("../../common/pathOperate"),a=e("../../common/pathOpen"),n=void 0;ui.pathOpen=a;var s=function(e,t,a){if(void 0!=e){if("explorer"!=Config.pageApp)return core.explorer(e),void 0;if(e==G.this_path)return void 0!=t&&""!=t&&core.tips.tips(LNG.path_is_current,"info"),void 0;if(G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),$(".dialog_file_upload").length>0){var i="hidden"==$(".dialog_file_upload").css("visibility");core.upload(),i&&$(".dialog_file_upload").css("visibility","hidden")}ui.f5_callback(function(){"function"==typeof a&&a()})}},o=function(e,t){var a,i,n=0,s=G.json_data.folderlist,o=G.json_data.filelist;if("desktop"==Config.pageApp&&(n=$(".menuDefault").length),"folder"==t){for(a=0;s.length>a&&!(s[a].name>=e);a++);return"up"==G.sort_order?a+n:o.length+a+n}if("file"==t){for(i=0;o.length>i&&!(o[i].name>=e);i++);return"down"==G.sort_order?i+n:s.length+i+n}return-1},r=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=$.inArray(a,e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},l=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==n||G.this_path!=n.path||e!=n.key){var t=[];$(".fileContiner .file").each(function(){var a=fileLight.name($(this));a&&e==a.substring(0,e.length).toLowerCase()&&t.push(a)}),n={key:e,path:G.this_path,index:0,list:t}}0!=n.list.length&&(r(n.list[n.index++]),n.index==n.list.length&&(n.index=0))}},c=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=a.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},d=function(e,t,a){var n=e.length;for(i=0;n>i;i++)if(e[i][t]==a)return e[i]},p=function(e){var t="",a=0;return null!=G.json_data.filelist&&(t=d(G.json_data.filelist,"name",e),null!=t&&(a=1)),null!=G.json_data.folderlist&&(t=d(G.json_data.folderlist,"name",e),null!=t&&(a=1)),a},u=function(e,t){var a,i=0;if(void 0==t){if(!p(e))return e;for(a=e+"(0)";p(a);)i++,a=e+"("+i+")";return a}if(!p(e+"."+t))return e+"."+t;for(a=e+"(0)."+t;p(a);)i++,a=e+"("+i+")."+t;return a},h=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyBack",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},f=function(){$.ajax({dataType:"json",url:"index.php?explorer/historyNext",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},error:core.ajaxError,success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(e=e.data,G.this_path=e.thispath,G.json_data=e.list,Global.historyStatus=e.history_status,ui.f5(!1,!0),ui.header.updateHistoryStatus(),ui.header.addressSet(),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)}})},m=function(e){fileLight.clear(),void 0==e&&(e="txt");var a="newfile",a=u(a,e),i=o(a,"file");i=0==i?-1:i-1;var n='<div class="file select menufile"  id="makefile">			<div class="'+e+' ico"></div>				<div class="titleBox">					<span class="title">					<div class="textarea">						<textarea class="newfile fix">'+a+'</textarea>					</span>				</div>			</div>			<div style="clear:both;"></div>		</div>';-1==i?$(Config.FileBoxSelector).html(n+$(Config.FileBoxSelector).html()):$(n).insertAfter(Config.FileBoxSelector+" .file:eq("+i+")"),"desktop"==Config.pageApp&&ui.sort_list();var s=$(".newfile"),l=s.get(0),c=a.length-e.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c);s.focus(),s.unbind("keydown").keydown(function(e){return(13==e.keyCode||27==e.keyCode)&&(stopPP(e),e.preventDefault(),filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):t.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})),!0}),s.unbind("blur").blur(function(){filename=s.attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFile(e)):t.newFile(G.this_path+filename,function(){ui.f5_callback(function(){r(filename)})})})},v=function(){fileLight.clear();var e=LNG.newfolder,e=u(e),a=o(e,"folder");a=0==a?-1:a-1;var i='<div class="file select menufolder" id="makefile">';i+='<div class="folder ico" filetype="folder"></div>',i+='<div  class="titleBox"><span class="title">',i+='<div class="textarea"><textarea class="newfile fix">'+e+'</textarea></span></div></div><div style="clear:both;"></div></div>',-1==a?$(Config.FileBoxSelector).html(i+$(Config.FileBoxSelector).html()):$(i).insertAfter(Config.FileBoxSelector+" .file:eq("+a+")"),"desktop"==Config.pageApp&&ui.sort_list(),$(".newfile").select(),$(".newfile").focus(),$(".newfile").unbind("keydown").keydown(function(e){if(13==e.keyCode||27==e.keyCode){stopPP(e),e.preventDefault();var a=$(".newfile").attr("value");p(a)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning")):t.newFolder(G.this_path+a,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(a)})})}}),$(".newfile").unbind("blur").blur(function(){filename=$(".newfile").attr("value"),p(filename)?($("#makefile").remove(),core.tips.tips(LNG.path_exists,"warning"),_newFolder()):t.newFolder(G.this_path+filename,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(filename)})})})},_=function(){var e="",a="",i=Global.fileListSelect,n=fileLight.name(i),s=fileLight.type(i);if(1==i.length){if(i.hasClass("menuSharePath"))return ui.path.share_edit(),void 0;s="folder"==s?"folder":s,$(i).find(".title").html("<div class='textarea'><textarea class='fix' id='pathRenameTextarea'>"+$(i).find(".title").text()+"</textarea><div>");var o=$("#pathRenameTextarea"),l=o.get(0);if("folder"==s)o.select();else{var c=n.length-s.length-1;if(Global.isIE){var d=l.createTextRange();d.moveEnd("character",-l.value.length),d.moveEnd("character",c),d.moveStart("character",0),d.select()}else l.setSelectionRange(0,c)}o.unbind("focus").focus(),o.keydown(function(l){if(13==l.keyCode){l.preventDefault(),stopPP(l),e=o.attr("value"),"oexe"==s&&(e+=".oexe");var c=e;e!=n?(a=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(c)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}27==l.keyCode&&("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))}),o.unbind("blur").blur(function(){e=$("#pathRenameTextarea").attr("value"),"oexe"==s&&(e+=".oexe");var o=e;e!=n?(a=urlEncode(G.this_path+n),e=urlEncode(G.this_path+e),t.rname(a,e,function(){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(o)})})):("oexe"==s&&(n=n.replace(".oexe","")),$(i).find(".title").html(n))})}},g=function(){ui.f5(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path)},b=function(e){if(e){var t=[];return 0==Global.fileListSelect.length?t:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),a="folder"==fileLight.type($(this))?"folder":"file";"*share*/"==G.this_path&&(e=$(this).attr("data-path"),a="share"),t.push({path:e,type:a})}),t)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var a=Global.fileListSelect,i=G.this_path+fileLight.name(a),n=fileLight.type(a);return"*share*/"==G.this_path&&(i=a.attr("data-path"),n="share"),{path:i,type:n}};return{appEdit:function(e){if(e)t.appEdit(0,0,"user_add");else{var a=Global.fileListSelect.attr("data-app"),i=json_decode(urlDecode(a));i.path=G.this_path+fileLight.name(Global.fileListSelect),t.appEdit(i)}},appList:function(){t.appList(b().path)},appInstall:function(){t.appInstall(b().path)},openEditor:function(){a.openEditor(b().path)},openIE:function(){a.openIE(b().path)},open:function(e){if(0!=b().path.length){if("*recycle*/"==G.this_path)return ui.path.info(),void 0;if("*share*/"==G.this_path)return ui.path.share_open_window(),void 0;if(void 0!=e)return a.open(e),void 0;var t=b(),i=Global.fileListSelect;if(inArray(core.filetype.image,t.type)){if(!core.authCheck("explorer:fileDownload",LNG.no_permission_download))return;return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0}if("oexe"==t.type){var n=i.attr("data-app");t.path=json_decode(urlDecode(n))}a.open(t.path,t.type)}},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var t=fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(G.this_path+fileLight.name($(this)));e.push(a)}}),a.play(e,"music")}},pathOperate:t,share:function(){t.share(b())},setBackground:function(){t.setBackground(b().path)},createLink:function(){t.createLink(b().path,b().type,function(e){ui.f5_callback(function(){r(e.info)})})},createProject:function(){t.createProject(b().path,function(e){ui.f5_callback(function(){r(e.info)})})},download:function(){var e=b(!0);1==e.length&&"file"==e[0].type?a.download(b().path):t.zipDownload(e)},share_edit:function(){var e=b().path,a=G.json_data.share_list[e];t.share_box(a)},share_open_window:function(){var e=b().path,t=G.json_data.share_list[e],a=t.type;"folder"==t.type&&(a=1==t.code_read?"code_read":"folder");var i="./index.php?share/"+a+"&user="+G.user_name+"&sid="+t.sid;window.open(i)},share_open_path:function(){var e=b().path,t=G.json_data.share_list[e],a=core.pathFather(t.path),i=core.pathThis(t.path);ui.path.list(a,"",function(){r(i)})},recycle_clear:function(){$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:LNG.remove_title,padding:40,lock:!0,background:"#000",opacity:.2,content:LNG.recycle_clear_info,ok:function(){$.ajax({url:"index.php?explorer/pathDeleteRecycle",beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),ui.f5(),FrameCall.father("ui.f5","1,1"),"function"==typeof callback&&callback(e)}})},cancel:!0})},explorer:function(){core.explorer(b().path)},explorerNew:function(){window.open("index.php?/explorer&path="+b().path)},openProject:function(){core.explorerCode(b().path)},search:function(){core.search("",b().path)},fav:function(){t.fav(b().path)},remove:function(){t.remove(b(!0),g),fileLight.clear()},copy:function(){t.copy(b(!0))},cute:function(){t.cute(b(!0),ui.f5)},zip:function(){t.zip(b(!0),function(e){ui.f5_callback(function(){r(e.info)})})},unZip:function(){t.unZip(b().path,ui.f5)},cuteDrag:function(e){t.cuteDrag(b(!0),e,g)},copyDrag:function(e,a){t.copyDrag(b(!0),e,function(e){fileLight.clear(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){a&&e.data&&r(e.data)})})},info:function(){if("share"==b().type){var e=b().path,a=G.json_data.share_list[e],i=a.path;t.info([{path:i,type:a.type}])}else t.info(b(!0))},past:function(){fileLight.clear(),t.past(G.this_path,function(e){"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path),ui.f5_callback(function(){r(e)})})},back:h,next:f,list:s,newFile:m,newFolder:v,rname:_,setSearchByStr:c,setSelectByChar:l,setSelectByFilename:r,clipboard:t.clipboard}});
\ No newline at end of file
diff --git a/static/js/app/src/setting/main.js b/static/js/app/src/setting/main.js
index ebf56d4..34f6b74 100755
--- a/static/js/app/src/setting/main.js
+++ b/static/js/app/src/setting/main.js
@@ -1,2 +1,2 @@
-define("app/src/setting/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","./setting","./fav","./group","./member","./system"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),Setting=e("./setting"),Fav=e("./fav"),Group=e("./group"),Member=e("./member"),System=e("./system"),Setting.init(),Fav.bindEvent(),Member.bindEvent(),Group.bindEvent(),System.bindEvent()}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/src/setting/setting",[],function(){var e,t=function(e){core.setSkin(e,"app_setting.css"),FrameCall.father("ui.setTheme",'"'+e+'"')},a=function(e){core.setSkin(e,"app_setting.css")},i=function(t){(""==t||void 0==t)&&(t="user"),e=t,"fav&"==t.substring(0,4)&&(t="fav"),$(".selected").removeClass("selected"),$("ul.setting li#"+t).addClass("selected"),window.location.href="#"+t,$.ajax({url:"./index.php?setting/slider&slider="+t,beforeSend:function(){$(".main").html("<img src='./static/images/loading.gif'/>")},success:function(a){$(".main").css("display","none"),$(".main").html(a),$(".main").fadeIn("fast"),"fav"==t&&Fav.init(e),"member"==t&&Group.init(),e=t}})},n=function(){G.is_root?$("ul.setting #system").show():$("ul.setting #system").hide(),G.is_root||1==AUTH["member:get"]?$("ul.setting #member").show():$("ul.setting #member").hide(),e=location.hash.split("#",2)[1],i(e),$("ul.setting li").hover(function(){$(this).addClass("hover")},function(){$(this).toggleClass("hover")}).click(function(){e=$(this).attr("id"),i(e)}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e=$(this),a=e.parent();switch(type=a.attr("data-type"),value=e.attr("data-value"),a.find(".this").removeClass("this"),e.addClass("this"),type){case"wall":var i=G.static_path+"images/wall_page/"+value+".jpg";FrameCall.father("ui.setWall",'"'+i+'"');break;case"theme":t(value);break;case"musictheme":FrameCall.father("CMPlayer.changeTheme",'"music","'+value+'"');break;case"movietheme":FrameCall.father("CMPlayer.changeTheme",'"movie","'+value+'"');break;default:}var n="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:n,type:"json",success:function(e){tips(e)}})})},s=function(){var e=$(".selected").attr("id");switch(e){case"user":var t=$("#password_now").val(),a=$("#password_new").val();if(""==a||""==t){tips(LNG.password_not_null,"error");break}$.ajax({url:"index.php?user/changePassword&password_now="+t+"&password_new="+a,dataType:"json",success:function(e){tips(e),e.code&&(window.top.location.href="./index.php?user/logout")}});break;case"wall":var i=$("#wall_url").val();if(""==i){tips(LNG.picture_can_not_null,"error");break}FrameCall.father("ui.setWall",'"'+i+'"'),$(".box").find(".this").removeClass("this");var n="index.php?setting/set&k=wall&v="+urlEncode(i);$.ajax({url:n,type:"json",success:function(e){tips(e)}});default:}};return{init:n,setGoto:i,tools:s,setThemeSelf:a,setTheme:t}}),define("app/src/setting/fav",[],function(){var e="index.php?fav/",t=function(t){var a;$.ajax({url:e+"get",dataType:"json",async:!1,success:function(e){return e.code?(a=e.data,void 0):(tips(e),void 0)},error:function(){return!1}});var i="<tr class='title'><td class='name'>"+LNG.name+"<span>("+LNG.can_not_repeat+")</span></td>"+"<td class='path'>"+LNG.address+"<span>("+LNG.absolute_path+")</span></td>"+"<td class='action'>"+LNG.action+"</td>"+"</tr>";for(var n in a)i+="<tr class='favlist' name='"+a[n].name+"' path='"+a[n].path+"'>"+"   <td class='name'><input type='text' id='sname' value='"+a[n].name+"' /></td>"+"   <td class='path'><input type='text' id='spath' value='"+a[n].path+"' /></td>"+"   <td class='action'>"+"       <a href='javascript:void(0)' onclick='' class='button edit'>"+LNG.button_save_edit+"</a>"+"       <a href='javascript:void(0)' onclick='' class='button del'>"+LNG.button_del+"</a>"+"   </td>"+"</tr>";if($("table#list").html(i),"fav&"==t.substring(0,4)){var s=t.split("&")[1].split("=")[1],o=t.split("&")[2].split("=")[1],r="<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='"+urlDecode(s)+"' /></td>"+"   <td class='path'><input type='text' id='spath' value='"+urlDecode(o)+"' /></td>"+"   <td class='action'>"+"       <a href='javascript:void(0)' class='button addsave'>"+LNG.button_save+"</a>"+"       <a href='javascript:void(0)' class='button addexit'>"+LNG.button_cancel+"</a>"+"   </td>"+"</tr>";$(r).insertAfter("table#list tr:last")}},a=function(){var e="<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='' /></td>   <td class='path'><input type='text' id='spath' value='' /></td>   <td class='action'>       <a href='javascript:void(0)' class='button addsave'>"+LNG.button_save+"</a>"+"       <a href='javascript:void(0)' class='button addexit'>"+LNG.button_cancel+"</a>"+"   </td>"+"</tr>";$(e).insertAfter("table#list tr:last")},i=function(){var e=$(this).parent().parent();$(e).detach()},n=function(){var t=$(this).parent().parent(),a=$(t).find("#sname").val(),i=$(t).find("#spath").val();return""==a||""==i?(tips(LNG.not_null,"error"),!1):($.ajax({url:e+"add&name="+a+"&path="+i,dataType:"json",success:function(e){if(tips(e),e.code){$(t).attr("name",a),$(t).attr("path",i);var n="<a href='javascript:void(0)' class='button edit'>"+LNG.button_save_edit+"</a>&nbsp;"+"<a href='javascript:void(0)' class='button del'>"+LNG.button_del+"</a>";$(t).find("td.action").html(n),FrameCall.father("ui.tree.init",'""')}}}),void 0)},s=function(){var t=$(this).parent().parent(),a=$(t).attr("name"),i=$(t).find("#sname").val(),n=$(t).find("#spath").val();return""==i||""==n?(tips(LNG.not_null,"error"),!1):($.ajax({dataType:"json",url:e+"edit&name="+a+"&name_to="+i+"&path_to="+n,success:function(e){tips(e),e.code&&($(t).attr("name",i),FrameCall.father("ui.tree.init",'""'))}}),void 0)},o=function(){var t=$(this).parent().parent(),a=$(t).attr("name");$.ajax({url:e+"del&name="+a,dataType:"json",async:!1,success:function(e){tips(e),e.code&&($(t).detach(),FrameCall.father("ui.tree.init",'""'))}})},r=function(){$(".fav a.add").live("click",a),$(".fav a.addexit").live("click",i),$(".fav a.addsave").live("click",n),$(".fav a.edit").live("click",s),$(".fav a.del").live("click",o)};return{init:t,bindEvent:r}}),define("app/src/setting/group",[],function(){var e="index.php?group/",t={},a=function(){$.ajax({url:e+"get",dataType:"json",async:!1,success:function(e){if(!e.code)return tips(e),void 0;var a=e.data;t={};for(var n in a)t[a[n].role]=a[n];i(),Member.init()},error:function(){return!1}}),$(".group_editor .path_ext_tips").tooltip({placement:"bottom",html:!0}),$(".group_editor .warning").tooltip({placement:"bottom",html:!0,title:function(){return $(".group_tips").html()}})},i=function(){var e="<tr class='title'><td width='20%'>"+LNG.group+"</td>"+"<td width=''>"+LNG.name+"</td>"+"<td width='35%'>"+LNG.action+"</td>"+"</tr>";for(var a in t){var i="<a href='javascript:void(0)' class='button edit'>"+LNG.button_edit+"</a>"+"<a href='javascript:void(0)' class='button del'> "+LNG.button_del+"</a>";"root"==t[a].role&&(i=LNG.default_group_can_not_do),e+="<tr role='"+t[a].role+"'>"+"   <td>"+t[a].role+"</td>"+"   <td>"+t[a].name+"</td><td>"+i+"</td>"}$(".group table#list").html(e)},n=function(){l($(".nav .group_status")),$(".group_editor #role").val("").focus(),$(".group_editor #name").val(""),$(".group_editor #ext_not_allow").val($(".group_editor #ext_not_allow").attr("default")),$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .edit_save").addClass("hidden"),$(".group_editor .edit_exit").addClass("hidden"),$(".group_editor .add_save").removeClass("hidden"),$(".nav .group_status").html(LNG.setting_group_add)},s=function(e){var a;a=t[e],$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .edit_save").removeClass("hidden"),$(".group_editor .edit_exit").removeClass("hidden"),$(".group_editor .add_save").addClass("hidden"),$(".nav .group_status").html(LNG.setting_group_edit),l($(".nav .group_status")),$(".group_editor #role").val(a.role).attr("data-before",a.role),$(".group_editor #name").val(a.name),$(".group_editor #ext_not_allow").val(a.ext_not_allow),$(".group_editor .tag").each(function(){var e=$(this),t=e.attr("data-role");
-t=t.split(";"),t=t[0],a[t]&&(e.addClass("this"),e.find("input").attr("checked",!0))})},o=function(){var t=$(".group_editor #role").val(),i=$(".group_editor #name").val(),s=$(".group_editor #ext_not_allow").val(),o={},r="",l="add";if(void 0==s&&(s=""),""==t||""==i)return tips(LNG.not_null,"error"),!1;if(escape(t).indexOf("%u")>=0)return tips("名称不能为中文!","warning"),!1;if($(".group_editor .tag.this").each(function(){for(var e=$(this).attr("data-role").split(";"),t=0;e.length>t;t++)o[e[t]]=1}),$(".group_editor .add_save").hasClass("hidden")){l="edit";var c=$(".group_editor #role").attr("data-before");r="edit&role_old="+c+"&role="+t+"&name="+i+"&ext_not_allow="+s}else r="add&role="+t+"&name="+i+"&ext_not_allow="+s;$.ajax({url:e+r,data:o,type:"POST",dataType:"json",success:function(e){tips(e),e.code&&(a(),"add"==l&&n())}})},r=function(){var t=$(this).parent().parent(),i=$(t).attr("role");$.dialog({fixed:!0,icon:"question",drag:!0,title:LNG.warning,content:LNG.if_remove+i+"?<br/>"+LNG.group_remove_tips,ok:function(){$.ajax({url:e+"del&role="+i,async:!1,dataType:"json",success:function(e){tips(e),e.code&&($(t).detach(),a(),l($(".nav a:eq(1)")))}})},cancel:!0})},l=function(e){$(".nav .this").removeClass("this"),e.addClass("this");var t=e.attr("data-page");$(".section").addClass("hidden"),$("."+t).removeClass("hidden")},c=function(){$(".group a.add").live("click",n),$(".group a.del").live("click",r),$(".group a.edit").live("click",function(){var e=$(this).parent().parent();s(e.attr("role"))}),$(".group_editor a.add_save").live("click",o),$(".group_editor a.edit_save").live("click",o),$(".group_editor a.edit_exit").live("click",n),$(".group_editor a.revert").live("click",function(){$(".group_editor .tag").each(function(){$(this).hasClass("this")?($(this).removeClass("this"),$(this).find("input").removeAttr("checked")):($(this).addClass("this"),$(this).find("input").attr("checked",!0))}),$(".group_editor .combox:eq(0) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(0) .tag").removeClass("this"),$(".group_editor .combox:eq(0) .tag").find("input").removeAttr("checked")),$(".group_editor .combox:eq(1) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(1) .tag").removeClass("this"),$(".group_editor .combox:eq(1) .tag").find("input").removeAttr("checked"))}),$(".nav a").live("click",function(){l($(this))}),$(".group_editor .tag").live("click",function(){var e=$(this);if(select=!1,e.toggleClass("this"),e.hasClass("this")?(select=!0,e.find("input").attr("checked",!0)):(select=!1,e.find("input").removeAttr("checked")),e.parent().hasClass("combox")){var t=e.index();1==t&&0==select&&(e.parent().find(".tag").removeClass("this"),e.parent().find("input").removeAttr("checked")),1!=t&&1==select&&(e.parent().find(".tag:eq(0)").addClass("this"),e.parent().find("input:eq(0)").attr("checked",!0))}})},d=function(){return t};return{getData:d,edit:s,init:a,bindEvent:c}}),define("app/src/setting/member",[],function(){var e,t="index.php?member/",a="",i={},n=function(){i=Group.getData(),$.ajax({url:t+"get",dataType:"json",async:!1,success:function(t){return t.code?(e=t.data,s(),void 0):(tips(t),void 0)},error:function(){return!1}})},s=function(){var t="<tr class='title'><td width=''>"+LNG.username+"</td>"+"<td width='25%'>"+LNG.group_name+"</td>"+"<td width='35%'>"+LNG.action+"</td>"+"</tr>",n=objectKeys(i);a="";for(var s=n.length-1;s>=0;s--){var r=i[n[s]];a+="<option value='"+r.role+"'>"+r.name+"</option>"}for(var s in e)t+=o(e[s].name,e[s].role);$(".member table#list").html(t)},o=function(e,t){void 0==e&&(e=""),void 0==t&&(t="");var a;i[t]?a=i[t].name:(a=LNG.group_not_exists,t="");var n="<a href='javascript:void(0)' class='button folder'>"+LNG.address+"</a>  "+"<a href='javascript:void(0)' class='button edit'>"+LNG.button_edit+"</a>  "+"<a href='javascript:void(0)' class='button del'>"+LNG.button_del+"</a>";"admin"==e&&(n=LNG.default_group_can_not_do);var s="<tr name='"+urlDecode(e)+"' role='"+t+"'>"+"   <td>"+e+"</td>"+"   <td><a href='javascript:void(0)' class='edit_role'>"+a+"</a></td>"+"   <td>"+n+"</td>"+"</tr>";return s},r=function(e,t,i){void 0==t&&(t=""),void 0==i&&(i="");var n="";n="add"==e?{b1:"add_save'>"+LNG.member_add,b2:"add_exit'>"+LNG.button_cancel}:{b1:"edit_save'>"+LNG.button_save_edit,b2:"edit_exit'>"+LNG.button_cancel};var s="<tr name='"+t+"' role='"+i+"'>"+"   <td class='member'>"+LNG.username+":<input type='text' id='name' value='"+t+"'/>"+"       <span>"+LNG.password+":</span><input type='text' id='password'/></td>"+"   <td><select id='role' value='"+i+"'>"+a+"</select></td>"+"   <td>"+"       <a href='javascript:void(0)' class='button "+n.b1+"</a>"+"       <a href='javascript:void(0)' class='button "+n.b2+"</a>"+"   </td>"+"</tr>";return s},l=function(){var e=r("add");$(e).insertAfter(".member table#list tr:last")},c=function(){var e=$(this).parent().parent();$(e).detach()},d=function(){var e=$(this).parent().parent(),a=urlEncode($(e).find("#name").val()),i=urlEncode($(e).find("#password").val()),n=$(e).find("#role").val();return""==a||""==i||""==n?(tips(LNG.not_null,"warning"),!1):($.ajax({url:t+"add&name="+a+"&password="+i+"&role="+n,dataType:"json",success:function(t){if(tips(t),t.code){var i=o(a,n);$(i).insertAfter(e),$(e).detach()}}}),void 0)},p=function(){var e=$(this).parent().parent(),t=r("edit",$(e).attr("name"),$(e).attr("role"));$(".info").html(LNG.password_null_not_update).fadeIn(100),$(t).insertAfter(e);var a=$(e).attr("role");$(e).next().find("option[value="+a+"]").attr("selected","true"),$(e).detach()},u=function(){var e=$(this).parent().parent(),t=o($(e).attr("name"),$(e).attr("role"));$(t).insertAfter(e),$(e).detach(),$(".info").fadeOut(100)},h=function(){var e=$(this).parent().parent(),a=urlEncode($(e).attr("name")),i=urlEncode($(e).find("#name").val()),n=$(e).find("#role").val(),s=urlEncode($(e).find("#password").val());if(""==i||""==n)return tips(LNG.not_null,"error"),!1;var r="";""!=s&&(r="&password_to="+s),$.ajax({url:t+"edit&name="+a+"&name_to="+i+"&role_to="+n+r,dataType:"json",success:function(t){if(tips(t),t.code){var a=o(i,n);$(a).insertAfter(e),$(e).detach(),$(".info").fadeOut(100)}}})},f=function(){var e=$(this).parent().parent(),a=$(e).attr("name");$.dialog({fixed:!0,icon:"question",drag:!0,title:LNG.warning,content:LNG.if_remove+a+"<br/>"+LNG.member_remove_tips,ok:function(){$.ajax({url:t+"del&name="+a,dataType:"json",async:!1,success:function(t){tips(t),t.code&&$(e).detach()}})},cancel:!0})},m=function(){$(".member a.add").live("click",l),$(".member a.add_exit").live("click",c),$(".member a.add_save").live("click",d),$(".member a.edit").live("click",p),$(".member a.edit_save").live("click",h),$(".member a.edit_exit").live("click",u),$(".member a.del").live("click",f),$(".member a.folder").live("click",function(){var e=$(this).parent().parent().attr("name");core.explorer(G.basic_path+"data/User/"+e+"/home/")}),$(".member a.edit_role").live("click",function(){var e=$(this).parent().parent().attr("role");return""==e?(tips(LNG.group_already_remove,!1),void 0):(Group.edit(e),void 0)})};return{init:n,bindEvent:m}}),define("app/src/setting/system",[],function(){var e=function(){$("input[name='first_in']").live("click",function(){$("input[name='first_in']").removeAttr("checked"),$(this).attr("checked","checked")}),$(".system_save").live("click",function(){var e={};$(".system_setting .box_line input").each(function(){var t=$(this);if("checkbox"==t.attr("type")){var a=void 0==t.attr("checked")?"0":"1";e[t.attr("name")]=a}else"radius"!=t.attr("type")&&(e[t.attr("name")]=t.val())}),e.first_in=$("input[name='first_in'][checked]").val(),a(e)}),t(),$(".path_ext_tips").die("click").live("click",function(){art.dialog.open("./index.php?setting/php_info",{title:"php_info",width:"70%",height:"65%",resize:!0})})},t=function(){$('.setting_menu .menu_list input[name="target"]').live("click",function(){"_blank"==$(this).val()?($(this).val("_self"),$(this).removeAttr("checked")):($(this).val("_blank"),$(this).attr("checked","checked"))}),$(".system_menu_add").live("click",function(){var e=$(".menu_default").clone().removeClass("menu_default hidden").addClass("menu_list");e.insertAfter(".setting_menu .menu_list:last")}),$(".setting_menu .menu_list .move_up").live("click",function(){var e=$(this).parent().parent();e.prev().hasClass("menu_list")&&e.insertBefore(e.prev())}),$(".setting_menu .menu_list .move_down").live("click",function(){var e=$(this).parent().parent();e.next().hasClass("menu_list")&&e.insertAfter(e.next())}),$(".setting_menu .menu_list .move_hidden").live("click",function(){var e=$(this).parent().parent();e.hasClass("menu_hidden")?(e.removeClass("menu_hidden"),$(this).text(LNG.menu_hidden)):(e.addClass("menu_hidden"),$(this).text(LNG.menu_show))}),$(".setting_menu .menu_list .move_del").live("click",function(){var e=$(this).parent().parent();e.remove()}),$(".system_menu_save").live("click",function(){var e=[];$(".setting_menu .menu_list").each(function(){var t=$(this),a={};t.hasClass("menu_default")||(t.find("input").each(function(){a[$(this).attr("name")]=urlEncode($(this).attr("value"))}),""!=a.name&&(a.use="1",a.type="",t.hasClass("menu_hidden")&&(a.use="0"),t.hasClass("menu_system")&&(a.type="system"),e.push(a)))}),a({menu:e})})},a=function(e){$.ajax({url:"index.php?setting/system_setting",type:"POST",data:"data="+urlEncode(json_encode(e)),dataType:"json",success:function(e){tips(e)}})};return{bindEvent:e}});
\ No newline at end of file
+define("app/src/setting/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","./setting","./fav","./group","./member","./system"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),Setting=e("./setting"),Fav=e("./fav"),Group=e("./group"),Member=e("./member"),System=e("./system"),Setting.init(),Fav.bindEvent(),Member.bindEvent(),Group.bindEvent(),System.bindEvent()}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/src/setting/setting",[],function(){var e,t=function(e){core.setSkin(e,"app_setting.css"),FrameCall.father("ui.setTheme",'"'+e+'"')},a=function(e){core.setSkin(e,"app_setting.css")},i=function(t){(""==t||void 0==t)&&(t="user"),e=t,"fav&"==t.substring(0,4)&&(t="fav"),$(".selected").removeClass("selected"),$("ul.setting li#"+t).addClass("selected"),window.location.href="#"+t,$.ajax({url:"./index.php?setting/slider&slider="+t,beforeSend:function(){$(".main").html("<img src='./static/images/loading.gif'/>")},success:function(a){$(".main").css("display","none"),$(".main").html(a),$(".main").fadeIn("fast"),"fav"==t&&Fav.init(e),"member"==t&&Group.init(),e=t}})},n=function(){G.is_root?$("ul.setting #system").show():$("ul.setting #system").hide(),G.is_root||1==AUTH["member:get"]?$("ul.setting #member").show():$("ul.setting #member").hide(),e=location.hash.split("#",2)[1],i(e),$("ul.setting li").hover(function(){$(this).addClass("hover")},function(){$(this).toggleClass("hover")}).click(function(){e=$(this).attr("id"),i(e)}),$(".box .list").live("hover",function(){$(this).addClass("listhover")},function(){$(this).toggleClass("listhover")}).live("click",function(){var e=$(this),a=e.parent();switch(type=a.attr("data-type"),value=e.attr("data-value"),a.find(".this").removeClass("this"),e.addClass("this"),type){case"wall":var i=G.static_path+"images/wall_page/"+value+".jpg";FrameCall.father("ui.setWall",'"'+i+'"');break;case"theme":t(value);break;case"musictheme":FrameCall.father("CMPlayer.changeTheme",'"music","'+value+'"');break;case"movietheme":FrameCall.father("CMPlayer.changeTheme",'"movie","'+value+'"');break;default:}var n="index.php?setting/set&k="+type+"&v="+value;$.ajax({url:n,type:"json",success:function(e){e.code?tips(e):core.authCheck("setting:set")?tips(LNG.config_save_error_file,!1):tips(LNG.config_save_error_auth,!1)}})})},s=function(){var e=$(".selected").attr("id");switch(e){case"user":var t=$("#password_now").val(),a=$("#password_new").val();if(""==a||""==t){tips(LNG.password_not_null,"error");break}$.ajax({url:"index.php?user/changePassword&password_now="+t+"&password_new="+a,dataType:"json",success:function(e){tips(e),e.code&&(window.top.location.href="./index.php?user/logout")}});break;case"wall":var i=$("#wall_url").val();if(""==i){tips(LNG.picture_can_not_null,"error");break}FrameCall.father("ui.setWall",'"'+i+'"'),$(".box").find(".this").removeClass("this");var n="index.php?setting/set&k=wall&v="+urlEncode(i);$.ajax({url:n,type:"json",success:function(e){tips(e)}});default:}};return{init:n,setGoto:i,tools:s,setThemeSelf:a,setTheme:t}}),define("app/src/setting/fav",[],function(){var e="index.php?fav/",t=function(t){var a;$.ajax({url:e+"get",dataType:"json",async:!1,success:function(e){return e.code?(a=e.data,void 0):(tips(e),void 0)},error:function(){return!1}});var i="<tr class='title'><td class='name'>"+LNG.name+"<span>("+LNG.can_not_repeat+")</span></td>"+"<td class='path'>"+LNG.address+"<span>("+LNG.absolute_path+")</span></td>"+"<td class='action'>"+LNG.action+"</td>"+"</tr>";for(var n in a)i+="<tr class='favlist' name='"+a[n].name+"' path='"+a[n].path+"'>"+"   <td class='name'><input type='text' id='sname' value='"+a[n].name+"' /></td>"+"   <td class='path'><input type='text' id='spath' value='"+a[n].path+"' /></td>"+"   <td class='action'>"+"       <a href='javascript:void(0)' onclick='' class='button edit'>"+LNG.button_save_edit+"</a>"+"       <a href='javascript:void(0)' onclick='' class='button del'>"+LNG.button_del+"</a>"+"   </td>"+"</tr>";if($("table#list").html(i),"fav&"==t.substring(0,4)){var s=t.split("&")[1].split("=")[1],o=t.split("&")[2].split("=")[1],r="<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='"+urlDecode(s)+"' /></td>"+"   <td class='path'><input type='text' id='spath' value='"+urlDecode(o)+"' /></td>"+"   <td class='action'>"+"       <a href='javascript:void(0)' class='button addsave'>"+LNG.button_save+"</a>"+"       <a href='javascript:void(0)' class='button addexit'>"+LNG.button_cancel+"</a>"+"   </td>"+"</tr>";$(r).insertAfter("table#list tr:last")}},a=function(){var e="<tr class='favlist' name='' path=''>   <td class='name'><input type='text' id='sname' value='' /></td>   <td class='path'><input type='text' id='spath' value='' /></td>   <td class='action'>       <a href='javascript:void(0)' class='button addsave'>"+LNG.button_save+"</a>"+"       <a href='javascript:void(0)' class='button addexit'>"+LNG.button_cancel+"</a>"+"   </td>"+"</tr>";$(e).insertAfter("table#list tr:last")},i=function(){var e=$(this).parent().parent();$(e).detach()},n=function(){var t=$(this).parent().parent(),a=$(t).find("#sname").val(),i=$(t).find("#spath").val();return""==a||""==i?(tips(LNG.not_null,"error"),!1):($.ajax({url:e+"add&name="+a+"&path="+i,dataType:"json",success:function(e){if(tips(e),e.code){$(t).attr("name",a),$(t).attr("path",i);var n="<a href='javascript:void(0)' class='button edit'>"+LNG.button_save_edit+"</a>&nbsp;"+"<a href='javascript:void(0)' class='button del'>"+LNG.button_del+"</a>";$(t).find("td.action").html(n),FrameCall.father("ui.tree.init",'""')}}}),void 0)},s=function(){var t=$(this).parent().parent(),a=$(t).attr("name"),i=$(t).find("#sname").val(),n=$(t).find("#spath").val();return""==i||""==n?(tips(LNG.not_null,"error"),!1):($.ajax({dataType:"json",url:e+"edit&name="+a+"&name_to="+i+"&path_to="+n,success:function(e){tips(e),e.code&&($(t).attr("name",i),FrameCall.father("ui.tree.init",'""'))}}),void 0)},o=function(){var t=$(this).parent().parent(),a=$(t).attr("name");$.ajax({url:e+"del&name="+a,dataType:"json",async:!1,success:function(e){tips(e),e.code&&($(t).detach(),FrameCall.father("ui.tree.init",'""'))}})},r=function(){$(".fav a.add").live("click",a),$(".fav a.addexit").live("click",i),$(".fav a.addsave").live("click",n),$(".fav a.edit").live("click",s),$(".fav a.del").live("click",o)};return{init:t,bindEvent:r}}),define("app/src/setting/group",[],function(){var e="index.php?group/",t={},a=function(){$.ajax({url:e+"get",dataType:"json",async:!1,success:function(e){if(!e.code)return tips(e),void 0;var a=e.data;t={};for(var n in a)t[a[n].role]=a[n];i(),Member.init()},error:function(){return!1}}),$(".group_editor .path_ext_tips").tooltip({placement:"bottom",html:!0}),$(".group_editor .warning").tooltip({placement:"bottom",html:!0,title:function(){return $(".group_tips").html()}})},i=function(){var e="<tr class='title'><td width='20%'>"+LNG.group+"</td>"+"<td width=''>"+LNG.name+"</td>"+"<td width='35%'>"+LNG.action+"</td>"+"</tr>";for(var a in t){var i="<a href='javascript:void(0)' class='button edit'>"+LNG.button_edit+"</a>"+"<a href='javascript:void(0)' class='button del'> "+LNG.button_del+"</a>";"root"==t[a].role&&(i=LNG.default_group_can_not_do),e+="<tr role='"+t[a].role+"'>"+"   <td>"+t[a].role+"</td>"+"   <td>"+t[a].name+"</td><td>"+i+"</td>"}$(".group table#list").html(e)},n=function(){l($(".nav .group_status")),$(".group_editor #role").val("").focus(),$(".group_editor #name").val(""),$(".group_editor #ext_not_allow").val($(".group_editor #ext_not_allow").attr("default")),$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .edit_save").addClass("hidden"),$(".group_editor .edit_exit").addClass("hidden"),$(".group_editor .add_save").removeClass("hidden"),$(".nav .group_status").html(LNG.setting_group_add)
+},s=function(e){var a;a=t[e],$(".group_editor .tag").removeClass("this"),$(".group_editor input").removeAttr("checked"),$(".group_editor .edit_save").removeClass("hidden"),$(".group_editor .edit_exit").removeClass("hidden"),$(".group_editor .add_save").addClass("hidden"),$(".nav .group_status").html(LNG.setting_group_edit),l($(".nav .group_status")),$(".group_editor #role").val(a.role).attr("data-before",a.role),$(".group_editor #name").val(a.name),$(".group_editor #ext_not_allow").val(a.ext_not_allow),$(".group_editor .tag").each(function(){var e=$(this),t=e.attr("data-role");t=t.split(";"),t=t[0],a[t]&&(e.addClass("this"),e.find("input").attr("checked",!0))})},o=function(){var t=$(".group_editor #role").val(),i=$(".group_editor #name").val(),s=$(".group_editor #ext_not_allow").val(),o={},r="",l="add";if(void 0==s&&(s=""),""==t||""==i)return tips(LNG.not_null,"error"),!1;if(escape(t).indexOf("%u")>=0)return tips("名称不能为中文!","warning"),!1;if($(".group_editor .tag.this").each(function(){for(var e=$(this).attr("data-role").split(";"),t=0;e.length>t;t++)o[e[t]]=1}),$(".group_editor .add_save").hasClass("hidden")){l="edit";var c=$(".group_editor #role").attr("data-before");r="edit&role_old="+c+"&role="+t+"&name="+i+"&ext_not_allow="+s}else r="add&role="+t+"&name="+i+"&ext_not_allow="+s;$.ajax({url:e+r,data:o,type:"POST",dataType:"json",success:function(e){tips(e),e.code&&(a(),"add"==l&&n())}})},r=function(){var t=$(this).parent().parent(),i=$(t).attr("role");$.dialog({fixed:!0,icon:"question",drag:!0,title:LNG.warning,content:LNG.if_remove+i+"?<br/>"+LNG.group_remove_tips,ok:function(){$.ajax({url:e+"del&role="+i,async:!1,dataType:"json",success:function(e){tips(e),e.code&&($(t).detach(),a(),l($(".nav a:eq(1)")))}})},cancel:!0})},l=function(e){$(".nav .this").removeClass("this"),e.addClass("this");var t=e.attr("data-page");$(".section").addClass("hidden"),$("."+t).removeClass("hidden")},c=function(){$(".group a.add").live("click",n),$(".group a.del").live("click",r),$(".group a.edit").live("click",function(){var e=$(this).parent().parent();s(e.attr("role"))}),$(".group_editor a.add_save").live("click",o),$(".group_editor a.edit_save").live("click",o),$(".group_editor a.edit_exit").live("click",n),$(".group_editor a.revert").live("click",function(){$(".group_editor .tag").each(function(){$(this).hasClass("this")?($(this).removeClass("this"),$(this).find("input").removeAttr("checked")):($(this).addClass("this"),$(this).find("input").attr("checked",!0))}),$(".group_editor .combox:eq(0) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(0) .tag").removeClass("this"),$(".group_editor .combox:eq(0) .tag").find("input").removeAttr("checked")),$(".group_editor .combox:eq(1) .tag:eq(0)").hasClass("this")||($(".group_editor .combox:eq(1) .tag").removeClass("this"),$(".group_editor .combox:eq(1) .tag").find("input").removeAttr("checked"))}),$(".nav a").live("click",function(){l($(this))}),$(".group_editor .tag").live("click",function(){var e=$(this);if(select=!1,e.toggleClass("this"),e.hasClass("this")?(select=!0,e.find("input").attr("checked",!0)):(select=!1,e.find("input").removeAttr("checked")),e.parent().hasClass("combox")){var t=e.index();1==t&&0==select&&(e.parent().find(".tag").removeClass("this"),e.parent().find("input").removeAttr("checked")),1!=t&&1==select&&(e.parent().find(".tag:eq(0)").addClass("this"),e.parent().find("input:eq(0)").attr("checked",!0))}})},d=function(){return t};return{getData:d,edit:s,init:a,bindEvent:c}}),define("app/src/setting/member",[],function(){var e,t="index.php?member/",a="",i={},n=function(){i=Group.getData(),$.ajax({url:t+"get",dataType:"json",async:!1,success:function(t){return t.code?(e=t.data,s(),void 0):(tips(t),void 0)},error:function(){return!1}})},s=function(){var t="<tr class='title'><td width=''>"+LNG.username+"</td>"+"<td width='25%'>"+LNG.group_name+"</td>"+"<td width='35%'>"+LNG.action+"</td>"+"</tr>",n=objectKeys(i);a="";for(var s=n.length-1;s>=0;s--){var r=i[n[s]];a+="<option value='"+r.role+"'>"+r.name+"</option>"}for(var s in e)t+=o(e[s].name,e[s].role);$(".member table#list").html(t)},o=function(e,t){void 0==e&&(e=""),void 0==t&&(t="");var a;i[t]?a=i[t].name:(a=LNG.group_not_exists,t="");var n="<a href='javascript:void(0)' class='button folder'>"+LNG.address+"</a>  "+"<a href='javascript:void(0)' class='button edit'>"+LNG.button_edit+"</a>  "+"<a href='javascript:void(0)' class='button del'>"+LNG.button_del+"</a>";"admin"==e&&(n=LNG.default_group_can_not_do);var s="<tr name='"+urlDecode(e)+"' role='"+t+"'>"+"   <td>"+e+"</td>"+"   <td><a href='javascript:void(0)' class='edit_role'>"+a+"</a></td>"+"   <td>"+n+"</td>"+"</tr>";return s},r=function(e,t,i){void 0==t&&(t=""),void 0==i&&(i="");var n="";n="add"==e?{b1:"add_save'>"+LNG.member_add,b2:"add_exit'>"+LNG.button_cancel}:{b1:"edit_save'>"+LNG.button_save_edit,b2:"edit_exit'>"+LNG.button_cancel};var s="<tr name='"+t+"' role='"+i+"'>"+"   <td class='member'>"+LNG.username+":<input type='text' id='name' value='"+t+"'/>"+"       <span>"+LNG.password+":</span><input type='text' id='password'/></td>"+"   <td><select id='role' value='"+i+"'>"+a+"</select></td>"+"   <td>"+"       <a href='javascript:void(0)' class='button "+n.b1+"</a>"+"       <a href='javascript:void(0)' class='button "+n.b2+"</a>"+"   </td>"+"</tr>";return s},l=function(){var e=r("add");$(e).insertAfter(".member table#list tr:last")},c=function(){var e=$(this).parent().parent();$(e).detach()},d=function(){var e=$(this).parent().parent(),a=urlEncode($(e).find("#name").val()),i=urlEncode($(e).find("#password").val()),n=$(e).find("#role").val();return""==a||""==i||""==n?(tips(LNG.not_null,"warning"),!1):($.ajax({url:t+"add&name="+a+"&password="+i+"&role="+n,dataType:"json",success:function(t){if(tips(t),t.code){var i=o(a,n);$(i).insertAfter(e),$(e).detach()}}}),void 0)},p=function(){var e=$(this).parent().parent(),t=r("edit",$(e).attr("name"),$(e).attr("role"));$(".info").html(LNG.password_null_not_update).fadeIn(100),$(t).insertAfter(e);var a=$(e).attr("role");$(e).next().find("option[value="+a+"]").attr("selected","true"),$(e).detach()},u=function(){var e=$(this).parent().parent(),t=o($(e).attr("name"),$(e).attr("role"));$(t).insertAfter(e),$(e).detach(),$(".info").fadeOut(100)},h=function(){var e=$(this).parent().parent(),a=urlEncode($(e).attr("name")),i=urlEncode($(e).find("#name").val()),n=$(e).find("#role").val(),s=urlEncode($(e).find("#password").val());if(""==i||""==n)return tips(LNG.not_null,"error"),!1;var r="";""!=s&&(r="&password_to="+s),$.ajax({url:t+"edit&name="+a+"&name_to="+i+"&role_to="+n+r,dataType:"json",success:function(t){if(tips(t),t.code){var a=o(i,n);$(a).insertAfter(e),$(e).detach(),$(".info").fadeOut(100)}}})},f=function(){var e=$(this).parent().parent(),a=$(e).attr("name");$.dialog({fixed:!0,icon:"question",drag:!0,title:LNG.warning,content:LNG.if_remove+a+"<br/>"+LNG.member_remove_tips,ok:function(){$.ajax({url:t+"del&name="+a,dataType:"json",async:!1,success:function(t){tips(t),t.code&&$(e).detach()}})},cancel:!0})},m=function(){$(".member a.add").live("click",l),$(".member a.add_exit").live("click",c),$(".member a.add_save").live("click",d),$(".member a.edit").live("click",p),$(".member a.edit_save").live("click",h),$(".member a.edit_exit").live("click",u),$(".member a.del").live("click",f),$(".member a.folder").live("click",function(){var e=$(this).parent().parent().attr("name");core.explorer(G.basic_path+"data/User/"+e+"/home/")}),$(".member a.edit_role").live("click",function(){var e=$(this).parent().parent().attr("role");return""==e?(tips(LNG.group_already_remove,!1),void 0):(Group.edit(e),void 0)})};return{init:n,bindEvent:m}}),define("app/src/setting/system",[],function(){var e=function(){$("input[name='first_in']").live("click",function(){$("input[name='first_in']").removeAttr("checked"),$(this).attr("checked","checked")}),$(".system_save").live("click",function(){var e={};$(".system_setting .box_line input").each(function(){var t=$(this);if("checkbox"==t.attr("type")){var a=void 0==t.attr("checked")?"0":"1";e[t.attr("name")]=a}else"radius"!=t.attr("type")&&(e[t.attr("name")]=urlEncode(t.val()))}),e.first_in=$("input[name='first_in'][checked]").val(),a(e)}),t(),$(".path_ext_tips").die("click").live("click",function(){art.dialog.open("./index.php?setting/php_info",{title:"php_info",width:"70%",height:"65%",resize:!0})})},t=function(){$('.setting_menu .menu_list input[name="target"]').live("click",function(){"_blank"==$(this).val()?($(this).val("_self"),$(this).removeAttr("checked")):($(this).val("_blank"),$(this).attr("checked","checked"))}),$(".system_menu_add").live("click",function(){var e=$(".menu_default").clone().removeClass("menu_default hidden").addClass("menu_list");e.insertAfter(".setting_menu .menu_list:last")}),$(".setting_menu .menu_list .move_up").live("click",function(){var e=$(this).parent().parent();e.prev().hasClass("menu_list")&&e.insertBefore(e.prev())}),$(".setting_menu .menu_list .move_down").live("click",function(){var e=$(this).parent().parent();e.next().hasClass("menu_list")&&e.insertAfter(e.next())}),$(".setting_menu .menu_list .move_hidden").live("click",function(){var e=$(this).parent().parent();e.hasClass("menu_hidden")?(e.removeClass("menu_hidden"),$(this).text(LNG.menu_hidden)):(e.addClass("menu_hidden"),$(this).text(LNG.menu_show))}),$(".setting_menu .menu_list .move_del").live("click",function(){var e=$(this).parent().parent();e.remove()}),$(".system_menu_save").live("click",function(){var e=[];$(".setting_menu .menu_list").each(function(){var t=$(this),a={};t.hasClass("menu_default")||(t.find("input").each(function(){a[$(this).attr("name")]=urlEncode($(this).attr("value"))}),""!=a.name&&(a.use="1",a.type="",t.hasClass("menu_hidden")&&(a.use="0"),t.hasClass("menu_system")&&(a.type="system"),e.push(a)))}),a({menu:e})})},a=function(e){$.ajax({url:"index.php?setting/system_setting",type:"POST",data:"data="+urlEncode(json_encode(e)),dataType:"json",success:function(e){tips(e)}})};return{bindEvent:e}});
\ No newline at end of file
diff --git a/static/js/app/src/share_editor/main.js b/static/js/app/src/share_editor/main.js
index 31fb95b..a922645 100755
--- a/static/js/app/src/share_editor/main.js
+++ b/static/js/app/src/share_editor/main.js
@@ -1,3 +1,3 @@
-define("app/src/share_editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../share_common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","../../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},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree;var t=e("../../share_common/topbar");$(document).ready(function(){t.init(),G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),core.update("check_status"),rightMenu.initEditor(),$(".init_loading").fadeOut(450).addClass("pop_fadeout")})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuTreeRoot",n=".menuTreeFolder",s=".menuTreeFile",o={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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},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(),v(),x(),y(),b(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("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(),_(),g(),b(),$(".context-menu-root").addClass("fadein")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){h(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:o.listIcon,sortBy:o.sortBy,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){f(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){f(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"}}})
+define("app/src/share_editor/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../share_common/rightMenu","./ui","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","../../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},Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),rightMenu=e("../../share_common/rightMenu"),ui=e("./ui"),tree=e("../../common/tree"),ui.tree=tree;var t=e("../../share_common/topbar");$(document).ready(function(){t.init(),G.project.length>1&&(Config.treeAjaxURL+="&project="+urlEncode(G.project)),ui.init(),TaskTap.init(),core.update("check_status"),rightMenu.initEditor(),$(".init_loading").fadeOut(450).addClass("pop_fadeout")})}),define("app/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=$sizeInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuTreeRoot",n=".menuTreeFolder",s=".menuTreeFile",o={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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},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(),v(),x(),y(),b(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("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(),_(),g(),b(),$(".context-menu-root").addClass("fadein")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){h(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:o.listIcon,sortBy:o.sortBy,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){f(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){f(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="'+a.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){f(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"}}})},h=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"open":ui.path.open();break;case"open_new":ui.path.open_new();break;default:}},f=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="'+i.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,callback:function(e){k(e)},items:{search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})},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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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"}}})},_=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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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="'+s.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();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.show_file();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,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},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 a=t.attr("id"),i=art.dialog.list[a];i.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=fileLight.type(Global.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 s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?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,a=0,i=0,n=$(".frame-left"),s=$(".frame-resize"),o=$(".frame-right");s.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(i){e=!0,t=i.pageX,a=$(".frame-left").width(),s.addClass("active"),$(".resizeMask").css("display","block")},l=function(r){if(!e)return!0;var l=r.pageX-t,c=a+l;i>c&&(c=i),c>$(document).width()-200&&(c=$(document).width()-200),n.css("width",c),s.css("left",c-5),o.css("left",c+1)},c=function(){return e?(e=!1,s.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),$(".resizeMask").css("display","none"),void 0):!1}},t=function(){$(".tools-left a").click(function(){var e=$(this).attr("class");switch(e){case"home":tree.init();break;case"view":tree.explorer();break;case"folder":tree.create("folder");break;case"file":tree.create("file");break;case"refresh":tree.init();break;default:}})};return{init:function(){e(),t(),tree.init(),$("html").die("click").live("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault(),e.returnvalue=!1,FrameCall.top("OpenopenEditor","Editor.save","")})},setTheme:function(e){core.setSkin(e,"app_editor.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")}}}),define("app/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},S=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")})},T=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}S(n)},E=function(){core.appStore()},z=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()
-}})}})};return{appEdit:T,appList:E,appAddURL:z,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}$.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"./index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}});
\ No newline at end of file
+}})}})};return{appEdit:T,appList:E,appAddURL:z,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}if(G.share_page!==void 0){var i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e),n=G.office_server+urlEncode(i),s=core.pathThis(e);art.dialog.open(n,{ico:core.ico("doc"),title:s,width:"80%",height:"70%",resize:!0})}else $.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}});
\ No newline at end of file
diff --git a/static/js/app/src/share_explorer/main.js b/static/js/app/src/share_explorer/main.js
index 2392afa..4e56061 100755
--- a/static/js/app/src/share_explorer/main.js
+++ b/static/js/app/src/share_explorer/main.js
@@ -1,4 +1,4 @@
-define("app/src/share_explorer/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","./ui","./fileSelect","../../share_common/rightMenu","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","./path","../../share_common/topbar"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?share/treeList&app=folder&user="+G.user+"&sid="+G.sid,AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),ui=e("./ui"),rightMenu=e("../../share_common/rightMenu"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),ui.tree=e("../../common/tree"),ui.path=e("./path"),fileSelect=e("./fileSelect"),fileLight=fileSelect.fileLight;var t=e("../../share_common/topbar");$(document).ready(function(){t.init(),Global.topbar_height="none"==$(".topbar").css("display")?0:$(".topbar").height(),ui.init(),ui.tree.init(),TaskTap.init(),core.update("check_status"),fileSelect.init(),rightMenu.initExplorer(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".path_tips").tooltip({placement:"bottom",html:!0})})}),define("app/src/share_explorer/ui",["./fileSelect"],function(require,exports){var fileSelect=require("./fileSelect"),fileLight=fileSelect.fileLight,MyPicasa=new Picasa;PicasaOpen=!1;var _ajaxLive=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,MyPicasa.initData(),$(".fileContiner .picture img").lazyload({container:$(".bodymain")})},_initListType=function(e){$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),"list"==e?($(Config.FileBoxSelector).removeClass("fileList_icon").addClass("fileList_list"),$("#list_type_list").html('<div id="main_title"><div class="filename" field="name">'+LNG.name+"<span></span></div>"+'<div class="filetype" field="ext">'+LNG.type+"<span></span></div>"+'<div class="filesize" field="size">'+LNG.size+"<span></span></div>"+'<div class="filetime" field="mtime">'+LNG.modify_time+"<span></span></div>"+'<div style="clear:both"></div>'+"</div>"),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:19,padding:4})):($(Config.FileBoxSelector).removeClass("fileList_list").addClass("fileList_icon"),$("#list_type_list").html(""),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:32,padding:4})),$(".menu_seticon").removeClass("selected"),$(".set_set"+G.list_type).addClass("selected")},_setListType=function(e,t){G.list_type=e,_initListType(e),Cookie.set("list_type",e),void 0==t?_f5(!1,!1):_f5(!1,!0)},_sortBy=function(e,t){var t="down"==t?-1:1;return function(a,i){return a=a[e],i=i[e],i>a?-1*t:a>i?1*t:void 0}},_setListSort=function(e,t){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=t&&(G.sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")),_f5(!1,!0),Cookie.set("sort_field",G.sort_field),Cookie.set("sort_order",G.sort_order)},_jsonSortTitle=function(){var up='<i class="font-icon icon-chevron-up"></i>',down='<i class="font-icon icon-chevron-down"></i>';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.sort_field+"]").addClass("this").attr("id",G.sort_order).find("span").html(eval(G.sort_order))},_bindEventSort=function(){$("#main_title div").die("click").live("click",function(){"up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),_setListSort($(this).attr("field"),$(this).attr("id"))})},_bindEventTools=function(){$(".tools a,.tools button,.tools_list button").bind("click",function(){var e=$(this).attr("id");_toolsAction(e)})},_bindEventTheme=function(){$('.dropdown-menu-theme li[theme="'+G.theme+'"]').addClass("this"),$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");Cookie.set("theme",e),$(".dropdown-menu li").removeClass("this"),$(this).addClass("this"),core.setSkin(e,"app_explorer.css")})},_bindFrameSizeEvent=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-left .bottom_box"),o=$(".frame-resize"),r=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(l(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){return d(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var l=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active")},c=function(l){if(!e)return!0;var c=l.pageX-t,d=a+c;i>d&&(d=i),d>$(document).width()-200&&(d=$(document).width()-200),n.css("width",d),s.css("width",d),o.css("left",d-5),r.css("left",d+1),ui.setStyle()},d=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),void 0):!1}},_bindHotKey=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var a=!1;if(Global.ctrlKey||t.keyCode==e||t.ctrlKey)switch(a=!0,Global.ctrlKey=!0,t.keyCode){case 65:fileSelect.selectPos("all");break;case 83:break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:a=!1}else if(t.shiftKey)Global.shiftKey=!0;else switch(t.keyCode){case 8:ui.path.back(),a=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),a=!0;break;case 38:fileSelect.selectPos("up"),a=!0;break;case 39:fileSelect.selectPos("right"),a=!0;break;case 40:fileSelect.selectPos("down"),a=!0;break;case 13:ui.path.open(),a=!1;break;default:a=!1}return a&&(stopPP(t),t.keyCode=0,t.returnValue=!1),!0}).keyup(function(t){t.shiftKey||(Global.shiftKey=!1),t.keyCode!=e&&t.ctrlKey||(Global.ctrlKey=!1)})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-path="'+e.path+'" data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.create_time+":"+e.ctime+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var t="";return t+="<div class='file folderBox menufolder' data-name='"+e.name+"'"+_hover_title(e)+">",t+="<div class='folder ico' filetype='folder'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"},this._getFileBox=function(e){var t="";if("oexe"==e.ext&&void 0!=e.icon){var a=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(a=G.static_path+"images/app/"+e.icon);var i=urlEncode(json_encode(e)),n=e.name.replace(".oexe","");t="<div class='file fileBox menufile' data-app="+i+" data-name='"+e.name+"'"+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(n)+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='ico' filetype='oexe' style='background-image:url("+a+")'></div>",t+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+n+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?share/image&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path+e.name);t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"}else t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>";return t},this._getFolderBoxList=function(e){var t="<div class='file folderBox menufolder' "+_hover_title(e)+">";return t+="	<div class='folder ico' filetype='folder'></div>",t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div>",t+="	<div class='filetype'>"+LNG.folder+"</div>",t+="	<div class='filesize'></div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"},this._getFileBoxList=function(e){var t="",a=e.name;if("oexe"==e.ext){var i=urlEncode(json_encode(e));a=e.name.replace(".oexe",""),t="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(a)+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='oexe ico' filetype='oexe'></div>"}else if(inArray(core.filetype.image,e.ext)){var n=core.path2url(G.this_path+e.name),s="index.php?share/image&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path+e.name);t+="<div picasa='"+n+"' thumb='"+s+"' class='picasaImage file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>"}else t+="<div class='file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>";return t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div>",t+="	<div class='filetype'>"+e.ext+"  "+LNG.file+"</div>",t+="	<div class='filesize'>"+e.size_friendly+"</div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"};var pathTypeChange=function(){var e=$(".html5_drag_upload_box");e.removeClass("menuBodyMain").addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")},_mainSetData=function(e){G.json_data&&G.json_data.filelist&&G.json_data.folderlist||_mainSetDataShare();var t="",a=G.json_data.folderlist,i=G.json_data.filelist;a="size"==G.sort_field||"ext"==G.sort_field?a.sort(_sortBy("name",G.sort_order)):a.sort(_sortBy(G.sort_field,G.sort_order)),i=i.sort(_sortBy(G.sort_field,G.sort_order)),G.json_data.folderlist=a,G.json_data.filelist=i;var n="_getFileBox",s="_getFolderBox",o="",r="";"list"==G.list_type&&(n="_getFileBoxList",s="_getFolderBoxList");for(var l=0;i.length>l;l++)o+=this[n](i[l]);for(var l=0;a.length>l;l++)r+=this[s](a[l]);t="up"==G.sort_order?r+o:o+r,""==t&&(t='<div style="text-align:center;color:#aaa;">'+LNG.path_null+"</div>"),t+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list"==G.list_type&&$(Config.FileBoxSelector+" .file:nth-child(2n)").addClass("file2"),_ajaxLive()},_f5=function(e,t,a){if(void 0==e&&(e=!0),void 0==t&&(t=!1),_jsonSortTitle(),e)$.ajax({url:"index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path),dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(G.json_data=e.data,_f5_time_user(),Global.historyStatus=G.json_data.history_status,_mainSetData(t),pathTypeChange(),ui.header.addressSet(),"function"==typeof a&&a(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)},error:function(e,t,a){$(".tools-left .msg").fadeOut(100),$(Config.FileBoxSelector).html(""),core.ajaxError(e,t,a)}});else{var i=fileLight.getAllName();_mainSetData(t),pathTypeChange(),ui.path.setSelectByFilename(i)}},_f5_callback=function(e){_f5(!0,!1,e)},_f5_time_user=function(){if(G.json_data&&G.json_data.filelist&&G.json_data.folderlist){for(var e=0;G.json_data.filelist.length>e;e++)G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)}},_toolsAction=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"selectAll":fileSelect.selectPos("all");break;case"down":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||_setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||_setListType("list");break;default:}};return{f5:_f5,f5_callback:_f5_callback,picasa:MyPicasa,setListSort:_setListSort,setListType:_setListType,setTheme:function(e){core.setSkin(e,"app_explorer.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},init:function(){Cookie.get("theme")&&(G.theme=Cookie.get("theme")),Cookie.get("list_type")&&(G.list_type=Cookie.get("list_type")),Cookie.get("sort_field")&&(G.sort_field=Cookie.get("sort_field")),Cookie.get("sort_order")&&(G.sort_order=Cookie.get("sort_order")),Cookie.set("theme",G.theme),Cookie.set("list_type",G.list_type),Cookie.set("sort_field",G.sort_field),Cookie.set("sort_order",G.sort_order),_f5_callback(function(){_setListType(G.list_type,!0),ui.path.history.add()}),_bindEventSort(),_bindEventTheme(),_bindEventTools(),_bindHotKey(),_bindFrameSizeEvent(),ui.header.bindEvent(),$(window).bind("resize",function(){ui.setStyle(),ui.header.set_width(),0!=PicasaOpen&&MyPicasa.setFrameResize()}),$("html").bind("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault()});var e,t=0,a="",i=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var s=String.fromCharCode(n.charCode);return 0==t?(t=time(),a=s,e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i),void 0):s==a.substr(-1)?(ui.path.setSelectByChar(a),t=0,void 0):(i>time()-t&&(t=time(),a+=s,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),PicasaOpen=!1,MyPicasa.init(".picasaImage"),MyPicasa.initData()},setStyle:function(){Global.fileRowNum="list"==G.list_type?1:function(){var e=$(Config.FileBoxSelector).width(),t=parseInt($(Config.FileBoxClass).css("width"))+parseInt($(Config.FileBoxClass).css("border-left-width"))+parseInt($(Config.FileBoxClass).css("border-right-width"))+parseInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)}()},header:{bindEvent:function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("title");$("input.path").val(t),ui.header.gotoPath(),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0}),$("#yarnball_input input").die("blur").live("blur",function(){ui.header.gotoPath()}),$("#yarnball_input input").keyEnter(function(){ui.header.gotoPath()}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_next":ui.path.history.next();break;case"history_back":ui.path.history.back();break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list("/");break;case"up":ui.header.gotoFather();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},addressSet:function(){var e=G.this_path;$("input.path").val(e),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var t=function(e){var t='<li class="yarnlet first"><a title="@1@" style="z-index:{$2};"><span class="left-yarn"></span>{$3}</a></li>\n',a='<li class="yarnlet "><a title="@1@" style="z-index:{$2};">{$3}</a></li>\n';e=e.replace(/\/+/g,"/");var i=e.split("/");""==i[i.length-1]&&i.pop(),void 0==i[0]&&(i[0]="");var n=i[0]+"/",s=t.replace(/@1@/g,n),o=i[0];s=s.replace("{$2}",i.length),s=s.replace("{$3}",o);for(var r=s,l=1,c=i.length-1;i.length>l;l++,c--)n+=i[l]+"/",s=a.replace(/@1@/g,n),s=s.replace("{$2}",c),s=s.replace("{$3}",i[l]),r+=s;return'<ul class="yarnball">'+r+"</ul>"};$("#yarnball").html(t(e)),ui.header.set_width()},set_width:function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+parseInt($(this).css("margin-left"))+5});var a=e-t;0>=a?$(".yarnball").css("width",t+"px").css("left",a+"px"):$(".yarnball").css({left:"3px",width:e+"px"})},gotoPath:function(){var e=$("input.path").val();e=e.replace(/\\/g,"/"),$("input.path").val(e),"/"!=e.substr(e.length-1,1)&&(e+="/"),ui.path.list(e),ui.header.addressSet()},gotoFather:function(){var e=$("input.path").val(),t=e.length-1,a="",i=e.split("/").length-1;if(1==i)a=e;else{"/"==e.substr(t,1)&&(t-=1);for(var n=t;n>0&&"/"!=e.substr(t,1);n--)t--;a=e.substr(0,t+1)}$("input.path").val(a),ui.header.gotoPath()}}}}),define("app/src/share_explorer/fileSelect",[],function(){var e=!1,t=!1,a=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(".fileContiner .download .btn").die("click").live("click",function(e){return ui.path.download(),stopPP(e),!1}),$(Config.FileBoxClass).live("mouseenter",function(){t&&$(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)&&$(this).addClass("selectDragTemp"),e||t||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?a=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var t=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,t);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>t?c(t,i):t>n?c(n,t):t>i&&n>t&&c(i,t)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&a&&(a=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).die("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.info():ui.path.open()})},s=function(){var a,i,n,s=100,o=50,r=80-Global.topbar_height,l=0,c=!1,d=0,p=0;$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=t.which||e?!0:(a=$(this),u(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){f(e),this.releaseCapture&&this.releaseCapture()}),stopPP(t),!1)});var u=function(e){rightMenu.hidden(),t=!0,l=$.now(),d=e.pageY,p=e.pageX,i=$(document).height(),n=$(document).width()},h=function(e){if(!t)return!0;$.now()-l>s&&!c&&m();var a=e.clientX>=n-50?n-50:e.clientX,d=e.clientY>=i-50?i-50:e.clientY;a=0>=a?0:a,d=0>=d?0:d,a-=o,d-=r,$(".draggable-dragging").css("left",a),$(".draggable-dragging").css("top",d),Global.isIE&&$("."+Config.TypeFolderClass).each(function(){var t=e.pageX,a=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();t>i.left&&i.left+n>t&&a>i.top&&i.top+s>a?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},f=function(){return t?(t=!1,c=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()}),void 0):!1},m=function(){c=!0,$("body").css("cursor","move"),a.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+a.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var a=null,i=null,n=null,s=85+Global.topbar_height,o=0,r=0;$(Config.BodyContent).die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass("bodymain")&&20>$(document).width()-e.pageX)){if(ui.isEdit())return!0;if(1!=e.which||t)return!0;l(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){p(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()})}});var l=function(t){o=$(Config.BodyContent).scrollTop(),r=s-o,$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.shiftKey||d.clear(),0==$(t.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),a=t.pageX-Global.frameLeftWidth,i=t.pageY+$(Config.BodyContent).scrollTop()-s,e=!0))},c=function(t){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=$(Config.BodyContent).scrollTop()-o,l=t.pageX-Global.frameLeftWidth,c=t.pageY-r+s;n.css({left:Math.min(l,a),top:Math.min(c,i),width:Math.abs(l-a),height:Math.abs(c-i)});for(var p=n.offset().left-Global.frameLeftWidth,u=n.offset().top-r+s,h=n.width(),f=n.height()+Math.abs(s),m=Global.fileListNum,v=0;m>v;v++){var _=Global.fileListAll[v],g=$(Global.fileListAll[v]),b=_.offsetWidth+_.offsetLeft,y=_.offsetHeight+_.offsetTop;if(b>p&&y>u&&p+h>_.offsetLeft&&u+f>_.offsetTop){if(!g.hasClass("selectDragTemp")){if(g.hasClass("selectToggleClass"))continue;if(g.hasClass(Config.SelectClassName)){g.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(g);continue}g.addClass("selectDragTemp")}}else g.removeClass("selectDragTemp"),g.hasClass("selectToggleClass")&&g.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},p=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,a=null,i=null,void 0):!1}},r=function(e){var t=0,a=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){if(1==Global.fileListSelectNum){var n=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=n?n:n-1;break;case"down":case"right":t=n>=i-1?n:n+1;break;default:}}else if(Global.fileListSelectNum>1){var s=parseInt(a.first().attr(Config.FileOrderAttr)),o=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=s?s:s-1;break;case"down":case"right":t=o>=i?o:o+1;break;default:}}},s=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":t=n>s?0:s-n;break;case"left":t=0>=s?s:s-1;break;case"down":t=s+n>=i-1?i-1:s+n;break;case"right":t=s>=i-1?s:s+1;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(a.first().attr(Config.FileOrderAttr)),r=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":t=n>=o?o:o-n;break;case"left":t=0>=o?o:o-1;break;case"down":t=r+n>=i?r:r+n;break;case"right":t=r>=i?r:r+1;break;default:}}};return"list"==G.list_type?n():s(),Global.fileListAll.eq(t)},l=function(e){var t;switch(e){case"home":t=Global.fileListAll.first();break;case"end":t=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":t=r(e);break;case"all":t=Global.fileListAll;break;default:}d.clear(),t.addClass(Config.SelectClassName),d.select(),d.setInView()},c=function(e,t){d.clear();for(var a=e;t>=a;a++)$(Global.fileListAll[a]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0,d.menuAction("clear")},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e),d.menuAction("menufile")},setInView:function(){var e=Global.fileListSelect;if(e&&e.length>=1){var t=$(".bodymain"),a=$(e[e.length-1]);t.scrollTop(a.offset().top-t.offset().top-t.height()/2+t.scrollTop())}},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){if("*recycle*/"!=G.this_path){if("*share*/"==G.this_path)return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;e.removeClass("menufile menufolder").addClass("menuMore"),d.menuAction()}},resumeMenu:function(e){if("*share*/"==G.this_path)return e.removeClass("menuSharePathMore").addClass("menuSharePath"),void 0;var t={fileBox:"menufile",folderBox:"menufolder"};for(var a in t)e.hasClass(a)&&e.removeClass("menuMore").addClass(t[a]);d.menuAction()},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var t=Global.fileListSelect;return t.each(function(t){e[t]=d.name($(this))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0,d.menuAction()}},menuAction:function(){0==Global.fileListSelectNum?$(".kod_path_tool #down").addClass("disabled"):Global.fileListSelectNum>=1&&$(".kod_path_tool #down").removeClass("disabled")}};return{init:i,selectPos:l,fileLight:d}}),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuTreeRoot",n=".menuTreeFolder",s=".menuTreeFile",o={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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},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(),v(),x(),y(),b(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("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(),_(),g(),b(),$(".context-menu-root").addClass("fadein")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){h(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:o.listIcon,sortBy:o.sortBy,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){f(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){f(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="'+a.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){f(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"}}})},h=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"open":ui.path.open();break;case"open_new":ui.path.open_new();break;default:}},f=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="'+i.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,callback:function(e){k(e)},items:{search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})
-},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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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"}}})},_=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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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="'+s.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();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.show_file();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,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},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 a=t.attr("id"),i=art.dialog.list[a];i.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=fileLight.type(Global.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 s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?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/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=parseInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=parseInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-parseInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;
+define("app/src/share_explorer/main",["lib/jquery-lib","lib/util","lib/ztree/js/ztree","lib/contextMenu/jquery-contextMenu","lib/artDialog/jquery-artDialog","lib/picasa/picasa","./ui","./fileSelect","../../share_common/rightMenu","../../common/taskTap","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../common/tree","../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer","./path","../../share_common/topbar"],function(e){Config={BodyContent:".bodymain",FileBoxSelector:".fileContiner",FileBoxClass:".fileContiner .file",FileBoxClassName:"file",FileBoxTittleClass:".fileContiner .title",SelectClass:".fileContiner .select",SelectClassName:"select",TypeFolderClass:"folderBox",TypeFileClass:"fileBox",HoverClassName:"hover",FileOrderAttr:"number",TreeId:"folderList",pageApp:"explorer",treeAjaxURL:"index.php?share/treeList&app=folder&user="+G.user+"&sid="+G.sid,AnimateTime:200},Global={fileListAll:"",fileListNum:0,fileRowNum:0,frameLeftWidth:200,treeSpaceWide:10,topbar_height:40,ctrlKey:!1,shiftKey:!1,fileListSelect:"",fileListSelectNum:"",isIE:!-[1],isDragSelect:!1,historyStatus:{back:1,next:0}},e("lib/jquery-lib"),e("lib/util"),e("lib/ztree/js/ztree"),e("lib/contextMenu/jquery-contextMenu"),e("lib/artDialog/jquery-artDialog"),e("lib/picasa/picasa"),ui=e("./ui"),rightMenu=e("../../share_common/rightMenu"),TaskTap=e("../../common/taskTap"),core=e("../../common/core"),ui.tree=e("../../common/tree"),ui.path=e("./path"),fileSelect=e("./fileSelect"),fileLight=fileSelect.fileLight;var t=e("../../share_common/topbar");$(document).ready(function(){t.init(),Global.topbar_height="none"==$(".topbar").css("display")?0:$(".topbar").height(),ui.init(),ui.tree.init(),TaskTap.init(),core.update("check_status"),fileSelect.init(),rightMenu.initExplorer(),$(".init_loading").fadeOut(450).addClass("pop_fadeout"),$(".path_tips").tooltip({placement:"bottom",html:!0})})}),define("app/src/share_explorer/ui",["./fileSelect"],function(require,exports){var fileSelect=require("./fileSelect"),fileLight=fileSelect.fileLight,MyPicasa=new Picasa;PicasaOpen=!1;var _ajaxLive=function(){fileLight.init(),ui.setStyle(),PicasaOpen=!1,MyPicasa.initData(),$(".fileContiner .picture img").lazyload({container:$(".bodymain")})},_initListType=function(e){$(".tools-right button").removeClass("active"),$("#set_"+e).addClass("active"),"list"==e?($(Config.FileBoxSelector).removeClass("fileList_icon").addClass("fileList_list"),$("#list_type_list").html('<div id="main_title"><div class="filename" field="name">'+LNG.name+"<span></span></div>"+'<div class="filetype" field="ext">'+LNG.type+"<span></span></div>"+'<div class="filesize" field="size">'+LNG.size+"<span></span></div>"+'<div class="filetime" field="mtime">'+LNG.modify_time+"<span></span></div>"+'<div style="clear:both"></div>'+"</div>"),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:19,padding:4})):($(Config.FileBoxSelector).removeClass("fileList_list").addClass("fileList_icon"),$("#list_type_list").html(""),$(Config.FileBoxSelector+" textarea").autoTextarea({minHeight:32,padding:4})),$(".menu_seticon").removeClass("selected"),$(".set_set"+G.list_type).addClass("selected")},_setListType=function(e,t){G.list_type=e,_initListType(e),Cookie.set("list_type",e),void 0==t?_f5(!1,!1):_f5(!1,!0)},_sortBy=function(e,t){var t="down"==t?-1:1;return function(a,i){return a=a[e],i=i[e],i>a?-1*t:a>i?1*t:void 0}},_setListSort=function(e,t){0!=e&&(G.sort_field=e,$(".menu_set_sort").removeClass("selected"),$(".set_sort_"+e).addClass("selected")),0!=t&&(G.sort_order=t,$(".menu_set_desc").removeClass("selected"),$(".set_sort_"+t).addClass("selected")),_f5(!1,!0),Cookie.set("sort_field",G.sort_field),Cookie.set("sort_order",G.sort_order)},_jsonSortTitle=function(){var up='<i class="font-icon icon-chevron-up"></i>',down='<i class="font-icon icon-chevron-down"></i>';$("#main_title .this").toggleClass("this").attr("id","").find("span").html(""),$("#main_title div[field="+G.sort_field+"]").addClass("this").attr("id",G.sort_order).find("span").html(eval(G.sort_order))},_bindEventSort=function(){$("#main_title div").die("click").live("click",function(){"up"==$(this).attr("id")?$(this).attr("id","down"):$(this).attr("id","up"),_setListSort($(this).attr("field"),$(this).attr("id"))})},_bindEventTools=function(){$(".tools a,.tools button,.tools_list button").bind("click",function(){var e=$(this).attr("id");_toolsAction(e)})},_bindEventTheme=function(){$('.dropdown-menu-theme li[theme="'+G.theme+'"]').addClass("this"),$(".dropdown-menu-theme li").click(function(){var e=$(this).attr("theme");Cookie.set("theme",e),$(".dropdown-menu li").removeClass("this"),$(this).addClass("this"),core.setSkin(e,"app_explorer.css")})},_bindFrameSizeEvent=function(){var e=!1,t=0,a=0,i=0,n=$(".frame-left"),s=$(".frame-left .bottom_box"),o=$(".frame-resize"),r=$(".frame-right");o.die("mousedown").live("mousedown",function(e){return 1!=e.which?!0:(l(e),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){return d(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),void 0)});var l=function(i){e=!0,t=i.pageX,a=$(".frame-left").width(),o.addClass("active")},c=function(l){if(!e)return!0;var c=l.pageX-t,d=a+c;i>d&&(d=i),d>$(document).width()-200&&(d=$(document).width()-200),n.css("width",d),s.css("width",d),o.css("left",d-5),r.css("left",d+1),ui.setStyle()},d=function(){return e?(e=!1,o.removeClass("active"),Global.frameLeftWidth=$(".frame-left").width(),void 0):!1}},_bindHotKey=function(){var e=91;Global.ctrlKey=!1,$(document).keydown(function(t){if("none"!=$("#PicasaView").css("display"))return!0;if(ui.isEdit())return!0;if(rightMenu.isDisplay())return!0;var a=!1;if(Global.ctrlKey||t.keyCode==e||t.ctrlKey)switch(a=!0,Global.ctrlKey=!0,t.keyCode){case 65:fileSelect.selectPos("all");break;case 83:break;case 70:core.search($(".header-right input").val(),G.this_path);break;default:a=!1}else if(t.shiftKey)Global.shiftKey=!0;else switch(t.keyCode){case 8:ui.path.back(),a=!0;break;case 35:fileSelect.selectPos("end");break;case 36:fileSelect.selectPos("home");break;case 37:fileSelect.selectPos("left"),a=!0;break;case 38:fileSelect.selectPos("up"),a=!0;break;case 39:fileSelect.selectPos("right"),a=!0;break;case 40:fileSelect.selectPos("down"),a=!0;break;case 13:ui.path.open(),a=!1;break;default:a=!1}return a&&(stopPP(t),t.keyCode=0,t.returnValue=!1),!0}).keyup(function(t){t.shiftKey||(Global.shiftKey=!1),t.keyCode!=e&&t.ctrlKey||(Global.ctrlKey=!1)})};this._hover_title=function(e){return void 0==e.size_friendly&&(e.size_friendly="0B"),' data-path="'+e.path+'" data-name="'+e.name+'" title="'+LNG.name+":"+e.name+"&#10;"+LNG.size+":"+e.size_friendly+"&#10;"+LNG.permission+":"+e.mode+"&#10;"+LNG.create_time+":"+e.ctime+"&#10;"+LNG.modify_time+":"+e.mtime+'" '},this._getFolderBox=function(e){var t="";return t+="<div class='file folderBox menufolder' data-name='"+e.name+"'"+_hover_title(e)+">",t+="<div class='folder ico' filetype='folder'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"},this._getFileBox=function(e){var t="";if("oexe"==e.ext&&void 0!=e.icon){var a=e.icon;-1==e.icon.search(G.static_path)&&"http"!=e.icon.substring(0,4)&&(a=G.static_path+"images/app/"+e.icon);var i=urlEncode(json_encode(e)),n=e.name.replace(".oexe","");t="<div class='file fileBox menufile' data-app="+i+" data-name='"+e.name+"'"+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(n)+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='ico' filetype='oexe' style='background-image:url("+a+")'></div>",t+="<div id='' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+n+"</span></div></div>"}else if(inArray(core.filetype.image,e.ext)){var s=core.path2url(G.this_path+e.name),o="index.php?share/image&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path+e.name);t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div picasa='"+s+"' thumb='"+o+"' title='"+e.name+"' class='picasaImage picture ico' filetype='"+e.ext+"' style='margin:3px 0 0 8px;background:#fff url(\""+o+"\") no-repeat center center;'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>"}else t+="<div class='file fileBox menufile' "+_hover_title(e)+">",t+="<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>",t+="<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div></div>";return t},this._getFolderBoxList=function(e){var t="<div class='file folderBox menufolder' "+_hover_title(e)+">";return t+="	<div class='folder ico' filetype='folder'></div>",t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+e.name+"</span></div>",t+="	<div class='filetype'>"+LNG.folder+"</div>",t+="	<div class='filesize'></div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"},this._getFileBoxList=function(e){var t="",a=e.name;if("oexe"==e.ext){var i=urlEncode(json_encode(e));a=e.name.replace(".oexe",""),t="<div class='file fileBox menufile' data-app="+i+_hover_title(e)+">","app_link"==e.type?(t+=0==e.content.search("ui.path.open")?"<div class='"+core.pathExt(a)+" ico'":"<div class='folder ico'",t+=' filetype="oexe"></div><div class="app_link"></div>'):t+="<div class='oexe ico' filetype='oexe'></div>"}else if(inArray(core.filetype.image,e.ext)){var n=core.path2url(G.this_path+e.name),s="index.php?share/image&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path+e.name);t+="<div picasa='"+n+"' thumb='"+s+"' class='picasaImage file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>"}else t+="<div class='file fileBox menufile'"+_hover_title(e)+">",t+="	<div class='"+e.ext+" ico' filetype='"+e.ext+"'></div>";return t+="	<div id='"+e.name+"' class='titleBox'><span class='title' title='"+LNG.double_click_rename+"'>"+a+"</span></div>",t+="	<div class='filetype'>"+e.ext+"  "+LNG.file+"</div>",t+="	<div class='filesize'>"+e.size_friendly+"</div>",t+="	<div class='filetime'>"+e.mtime+"</div>",t+="	<div style='clear:both'></div>",t+="</div>"};var pathTypeChange=function(){var e=$(".html5_drag_upload_box");e.removeClass("menuBodyMain").addClass("menuBodyMain"),$(".tools-left>.btn-group").addClass("hidden").parent().find(".kod_path_tool").removeClass("hidden")},_mainSetData=function(e){G.json_data&&G.json_data.filelist&&G.json_data.folderlist||_mainSetDataShare();var t="",a=G.json_data.folderlist,i=G.json_data.filelist;a="size"==G.sort_field||"ext"==G.sort_field?a.sort(_sortBy("name",G.sort_order)):a.sort(_sortBy(G.sort_field,G.sort_order)),i=i.sort(_sortBy(G.sort_field,G.sort_order)),G.json_data.folderlist=a,G.json_data.filelist=i;var n="_getFileBox",s="_getFolderBox",o="",r="";"list"==G.list_type&&(n="_getFileBoxList",s="_getFolderBoxList");for(var l=0;i.length>l;l++)o+=this[n](i[l]);for(var l=0;a.length>l;l++)r+=this[s](a[l]);t="up"==G.sort_order?r+o:o+r,""==t&&(t='<div style="text-align:center;color:#aaa;">'+LNG.path_null+"</div>"),t+="<div style='clear:both'></div>",e?$(Config.FileBoxSelector).hide().html(t).fadeIn(Config.AnimateTime):$(Config.FileBoxSelector).html(t),"list"==G.list_type&&$(Config.FileBoxSelector+" .file:nth-child(2n)").addClass("file2"),_ajaxLive()},_f5=function(e,t,a){if(void 0==e&&(e=!0),void 0==t&&(t=!1),_jsonSortTitle(),e)$.ajax({url:"index.php?share/pathList&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(G.this_path),dataType:"json",beforeSend:function(){$(".tools-left .msg").stop(!0,!0).fadeIn(100)},success:function(e){return $(".tools-left .msg").fadeOut(100),e.code?(G.json_data=e.data,_f5_time_user(),Global.historyStatus=G.json_data.history_status,_mainSetData(t),pathTypeChange(),ui.header.addressSet(),"function"==typeof a&&a(e),void 0):(core.tips.tips(e),$(Config.FileBoxSelector).html(""),!1)},error:function(e,t,a){$(".tools-left .msg").fadeOut(100),$(Config.FileBoxSelector).html(""),core.ajaxError(e,t,a)}});else{var i=fileLight.getAllName();_mainSetData(t),pathTypeChange(),ui.path.setSelectByFilename(i)}},_f5_callback=function(e){_f5(!0,!1,e)},_f5_time_user=function(){if(G.json_data&&G.json_data.filelist&&G.json_data.folderlist){for(var e=0;G.json_data.filelist.length>e;e++)G.json_data.filelist[e].atime=date(LNG.time_type,G.json_data.filelist[e].atime),G.json_data.filelist[e].ctime=date(LNG.time_type,G.json_data.filelist[e].ctime),G.json_data.filelist[e].mtime=date(LNG.time_type,G.json_data.filelist[e].mtime);for(var e=0;G.json_data.folderlist.length>e;e++)G.json_data.folderlist[e].atime=date(LNG.time_type,G.json_data.folderlist[e].atime),G.json_data.folderlist[e].ctime=date(LNG.time_type,G.json_data.folderlist[e].ctime),G.json_data.folderlist[e].mtime=date(LNG.time_type,G.json_data.folderlist[e].mtime)}},_toolsAction=function(e){switch(e){case"refresh":ui.f5(!0,!0);break;case"selectAll":fileSelect.selectPos("all");break;case"down":ui.path.download();break;case"set_icon":$("#set_icon").hasClass("active")||_setListType("icon");break;case"set_list":$("#set_list").hasClass("active")||_setListType("list");break;default:}};return{f5:_f5,f5_callback:_f5_callback,picasa:MyPicasa,setListSort:_setListSort,setListType:_setListType,setTheme:function(e){core.setSkin(e,"app_explorer.css"),FrameCall.top("OpenopenEditor","Editor.setTheme",'"'+e+'"'),FrameCall.top("Opensetting_mode","Setting.setThemeSelf",'"'+e+'"'),FrameCall.father("ui.setTheme",'"'+e+'"')},isEdit:function(){var e=$(document.activeElement).get(0);if(e)return e=e.tagName,"INPUT"==e||"TEXTAREA"==e?!0:!1},init:function(){Cookie.get("theme")&&(G.theme=Cookie.get("theme")),Cookie.get("list_type")&&(G.list_type=Cookie.get("list_type")),Cookie.get("sort_field")&&(G.sort_field=Cookie.get("sort_field")),Cookie.get("sort_order")&&(G.sort_order=Cookie.get("sort_order")),Cookie.set("theme",G.theme),Cookie.set("list_type",G.list_type),Cookie.set("sort_field",G.sort_field),Cookie.set("sort_order",G.sort_order),_f5_callback(function(){_setListType(G.list_type,!0),ui.path.history.add()}),_bindEventSort(),_bindEventTheme(),_bindEventTools(),_bindHotKey(),_bindFrameSizeEvent(),ui.header.bindEvent(),$(window).bind("resize",function(){ui.setStyle(),ui.header.set_width(),0!=PicasaOpen&&MyPicasa.setFrameResize()}),$("html").bind("click",function(){rightMenu.hidden(),Global.isIE&&Global.isDragSelect}),Mousetrap.bind(["ctrl+s","command+s"],function(e){e.preventDefault()});var e,t=0,a="",i=200;Mousetrap.bind(["1","2","3","4","5","6","7","8","9","0","`","~","!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","{","]","}","|","/","?",".",">",",","<","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],function(n){var s=String.fromCharCode(n.charCode);return 0==t?(t=time(),a=s,e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i),void 0):s==a.substr(-1)?(ui.path.setSelectByChar(a),t=0,void 0):(i>time()-t&&(t=time(),a+=s,clearTimeout(e),e=setTimeout(function(){ui.path.setSelectByChar(a),t=0},i)),void 0)}),Mousetrap.bind(["f5"],function(e){stopPP(e),ui.f5(!0,!0)}),Mousetrap.bind(["alt+i","alt+i"],function(e){stopPP(e),ui.path.info()}),PicasaOpen=!1,MyPicasa.init(".picasaImage"),MyPicasa.initData()},setStyle:function(){Global.fileRowNum="list"==G.list_type?1:function(){var e=$(Config.FileBoxSelector).width(),t=$sizeInt($(Config.FileBoxClass).css("width"))+$sizeInt($(Config.FileBoxClass).css("border-left-width"))+$sizeInt($(Config.FileBoxClass).css("border-right-width"))+$sizeInt($(Config.FileBoxClass).css("margin-right"));return parseInt(e/t)}()},header:{bindEvent:function(){$("#yarnball li a").die("click").live("click",function(e){var t=$(this).attr("title");$("input.path").val(t),ui.header.gotoPath(),stopPP(e)}),$("#yarnball").die("click").live("click",function(){return $("#yarnball").css("display","none"),$("#yarnball_input").css("display","block"),$("#yarnball_input input").focus(),!0}),$("#yarnball_input input").die("blur").live("blur",function(){ui.header.gotoPath()}),$("#yarnball_input input").keyEnter(function(){ui.header.gotoPath()}),$(".header-right input").keyEnter(function(){core.search($(".header-right input").val(),G.this_path)}),$(".header-right input").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$(".header-content a,.header-content button").click(function(){var e=$(this).attr("id");switch(e){case"history_next":ui.path.history.next();break;case"history_back":ui.path.history.back();break;case"refresh":ui.f5(!0,!0),ui.tree.init();break;case"home":ui.path.list("/");break;case"up":ui.header.gotoFather();break;case"search":core.search($(".header-right input").val(),G.this_path);break;default:}return!0})},addressSet:function(){var e=G.this_path;$("input.path").val(e),$("#yarnball_input").css("display","none"),$("#yarnball").css("display","block");var t=function(e){var t='<li class="yarnlet first"><a title="@1@" style="z-index:{$2};"><span class="left-yarn"></span>{$3}</a></li>\n',a='<li class="yarnlet "><a title="@1@" style="z-index:{$2};">{$3}</a></li>\n';e=e.replace(/\/+/g,"/");var i=e.split("/");""==i[i.length-1]&&i.pop(),void 0==i[0]&&(i[0]="");var n=i[0]+"/",s=t.replace(/@1@/g,n),o=i[0];s=s.replace("{$2}",i.length),s=s.replace("{$3}",o);for(var r=s,l=1,c=i.length-1;i.length>l;l++,c--)n+=i[l]+"/",s=a.replace(/@1@/g,n),s=s.replace("{$2}",c),s=s.replace("{$3}",i[l]),r+=s;return'<ul class="yarnball">'+r+"</ul>"};$("#yarnball").html(t(e)),ui.header.set_width()},set_width:function(){$(".yarnball").stop(!0,!0);var e=$("#yarnball").innerWidth(),t=0;$("#yarnball li a").each(function(){t+=$(this).outerWidth()+$sizeInt($(this).css("margin-left"))+5});var a=e-t;0>=a?$(".yarnball").css("width",t+"px").css("left",a+"px"):$(".yarnball").css({left:"3px",width:e+"px"})},gotoPath:function(){var e=$("input.path").val();e=e.replace(/\\/g,"/"),$("input.path").val(e),"/"!=e.substr(e.length-1,1)&&(e+="/"),ui.path.list(e),ui.header.addressSet()},gotoFather:function(){var e=$("input.path").val(),t=e.length-1,a="",i=e.split("/").length-1;if(1==i)a=e;else{"/"==e.substr(t,1)&&(t-=1);for(var n=t;n>0&&"/"!=e.substr(t,1);n--)t--;a=e.substr(0,t+1)}$("input.path").val(a),ui.header.gotoPath()}}}}),define("app/src/share_explorer/fileSelect",[],function(){var e=!1,t=!1,a=!1,i=function(){s(),n(),o()},n=function(){$(Config.FileBoxClass).die("touchstart").live("touchstart",function(){$(this).hasClass("select")?ui.path.open():(d.clear(),$(this).removeClass("select"),$(this).addClass("select"),d.select())}),$(".fileContiner .download .btn").die("click").live("click",function(e){return ui.path.download(),stopPP(e),!1}),$(Config.FileBoxClass).live("mouseenter",function(){t&&$(this).hasClass(Config.TypeFolderClass)&&!$(this).hasClass(Config.SelectClassName)&&$(this).addClass("selectDragTemp"),e||t||$(this).addClass(Config.HoverClassName),$(this).unbind("mousedown").mousedown(function(e){if(rightMenu.hidden(),e.ctrlKey||e.shiftKey||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),3!=e.which||$(this).hasClass(Config.SelectClassName)||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&($(this).hasClass(Config.SelectClassName)?a=!0:(d.setMenu($(this)),$(this).addClass(Config.SelectClassName)),d.select()),e.shiftKey){var t=parseInt($(this).attr(Config.FileOrderAttr));if(0==Global.fileListSelectNum)c(0,t);else{var i=parseInt(Global.fileListSelect.first().attr(Config.FileOrderAttr)),n=parseInt(Global.fileListSelect.last().attr(Config.FileOrderAttr));i>t?c(t,i):t>n?c(n,t):t>i&&n>t&&c(i,t)}}})}).die("mouseleave").live("mouseleave",function(){$(this).removeClass(Config.HoverClassName),$(this).removeClass("selectDragTemp")}).die("click").live("click",function(e){stopPP(e),e.ctrlKey||e.shiftKey||(d.clear(),$(this).addClass(Config.SelectClassName),d.select()),e.ctrlKey&&a&&(a=!1,d.resumeMenu($(this)),$(this).removeClass(Config.SelectClassName),d.select())}),$(Config.FileBoxClass).die("dblclick").live("dblclick",function(e){stopPP(e),e.altKey?ui.path.info():ui.path.open()})},s=function(){var a,i,n,s=100,o=50,r=80-Global.topbar_height,l=0,c=!1,d=0,p=0;$(Config.FileBoxClass).die("mousedown").live("mousedown",function(t){return Global.shiftKey?void 0:ui.isEdit()?!0:1!=t.which||e?!0:(a=$(this),u(t),this.setCapture&&this.setCapture(),$(document).mousemove(function(e){h(e)}),$(document).one("mouseup",function(e){f(e),this.releaseCapture&&this.releaseCapture()}),stopPP(t),!1)});var u=function(e){rightMenu.hidden(),t=!0,l=$.now(),d=e.pageY,p=e.pageX,i=$(document).height(),n=$(document).width()},h=function(e){if(!t)return!0;$.now()-l>s&&!c&&m();var a=e.clientX>=n-50?n-50:e.clientX,d=e.clientY>=i-50?i-50:e.clientY;a=0>=a?0:a,d=0>=d?0:d,a-=o,d-=r,$(".draggable-dragging").css("left",a),$(".draggable-dragging").css("top",d),Global.isIE&&$("."+Config.TypeFolderClass).each(function(){var t=e.pageX,a=e.pageY,i=$(this).offset(),n=$(this).width(),s=$(this).height();t>i.left&&i.left+n>t&&a>i.top&&i.top+s>a?$(this).addClass("selectDragTemp"):$(this).removeClass("selectDragTemp")})},f=function(){return t?(t=!1,c=!1,$("body").css("cursor","auto"),$(".draggable-dragging").fadeOut(200,function(){$(this).remove()}),void 0):!1},m=function(){c=!0,$("body").css("cursor","move"),a.find(".ico").attr("filetype"),$('<div class="file draggable-dragging"><div class="drag_number">'+Global.fileListSelectNum+"</div>"+'<div class="ico" style="background:'+a.find(".ico").css("background")+'"></div>'+"</div>").appendTo("body")}},o=function(){var a=null,i=null,n=null,s=85+Global.topbar_height,o=0,r=0;$(Config.BodyContent).die("mousedown").live("mousedown",function(e){if(!($(e.target).hasClass("bodymain")&&20>$(document).width()-e.pageX)){if(ui.isEdit())return!0;if(1!=e.which||t)return!0;l(e),this.setCapture&&this.setCapture(),$(document).unbind("mousemove").mousemove(function(e){c(e)}),$(document).one("mouseup",function(e){p(e),Global.isDragSelect=!0,this.releaseCapture&&this.releaseCapture()})}});var l=function(t){o=$(Config.BodyContent).scrollTop(),r=s-o,$(t.target).parent().hasClass(Config.FileBoxClassName)||$(t.target).parent().parent().hasClass(Config.FileBoxClassName)||$(t.target).hasClass("fix")||(rightMenu.hidden(),t.ctrlKey||t.shiftKey||d.clear(),0==$(t.target).hasClass("ico")&&(0==$("#selContainer").length&&($('<div id="selContainer"></div>').appendTo(Config.FileBoxSelector),n=$("#selContainer")),a=t.pageX-Global.frameLeftWidth,i=t.pageY+$(Config.BodyContent).scrollTop()-s,e=!0))},c=function(t){if(!e)return!0;"none"==n.css("display")&&n.css("display","");var s=$(Config.BodyContent).scrollTop()-o,l=t.pageX-Global.frameLeftWidth,c=t.pageY-r+s;n.css({left:Math.min(l,a),top:Math.min(c,i),width:Math.abs(l-a),height:Math.abs(c-i)});for(var p=n.offset().left-Global.frameLeftWidth,u=n.offset().top-r+s,h=n.width(),f=n.height()+Math.abs(s),m=Global.fileListNum,v=0;m>v;v++){var _=Global.fileListAll[v],g=$(Global.fileListAll[v]),b=_.offsetWidth+_.offsetLeft,y=_.offsetHeight+_.offsetTop;if(b>p&&y>u&&p+h>_.offsetLeft&&u+f>_.offsetTop){if(!g.hasClass("selectDragTemp")){if(g.hasClass("selectToggleClass"))continue;if(g.hasClass(Config.SelectClassName)){g.removeClass(Config.SelectClassName).addClass("selectToggleClass"),d.resumeMenu(g);continue}g.addClass("selectDragTemp")}}else g.removeClass("selectDragTemp"),g.hasClass("selectToggleClass")&&g.addClass(Config.SelectClassName).removeClass("selectToggleClass")}},p=function(){return e?(n.css("display","none"),$(".selectDragTemp").addClass(Config.SelectClassName).removeClass("selectDragTemp"),$(".selectToggleClass").removeClass("selectToggleClass"),d.select(),e=!1,a=null,i=null,void 0):!1}},r=function(e){var t=0,a=Global.fileListSelect;Global.fileListSelectNum;var i=Global.fileListNum,n=function(){if(1==Global.fileListSelectNum){var n=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=n?n:n-1;break;case"down":case"right":t=n>=i-1?n:n+1;break;default:}}else if(Global.fileListSelectNum>1){var s=parseInt(a.first().attr(Config.FileOrderAttr)),o=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":case"left":t=0>=s?s:s-1;break;case"down":case"right":t=o>=i?o:o+1;break;default:}}},s=function(){var n=Global.fileRowNum;if(1==Global.fileListSelectNum){var s=parseInt(a.attr(Config.FileOrderAttr));switch(e){case"up":t=n>s?0:s-n;break;case"left":t=0>=s?s:s-1;break;case"down":t=s+n>=i-1?i-1:s+n;break;case"right":t=s>=i-1?s:s+1;break;default:}}else if(Global.fileListSelectNum>1){var o=parseInt(a.first().attr(Config.FileOrderAttr)),r=parseInt(a.last().attr(Config.FileOrderAttr));switch(e){case"up":t=n>=o?o:o-n;break;case"left":t=0>=o?o:o-1;break;case"down":t=r+n>=i?r:r+n;break;case"right":t=r>=i?r:r+1;break;default:}}};return"list"==G.list_type?n():s(),Global.fileListAll.eq(t)},l=function(e){var t;switch(e){case"home":t=Global.fileListAll.first();break;case"end":t=Global.fileListAll.last();break;case"left":case"up":case"right":case"down":t=r(e);break;case"all":t=Global.fileListAll;break;default:}d.clear(),t.addClass(Config.SelectClassName),d.select(),d.setInView()},c=function(e,t){d.clear();for(var a=e;t>=a;a++)$(Global.fileListAll[a]).addClass(Config.SelectClassName);d.select()},d={init:function(){var e=$(Config.FileBoxClass);e.each(function(e){$(this).attr(Config.FileOrderAttr,e)}),Global.fileListSelect="",Global.fileListAll=e,Global.fileListNum=e.length,Global.fileListSelectNum=0,d.menuAction("clear")},select:function(){var e=$(Config.SelectClass);Global.fileListSelect=e,Global.fileListSelectNum=e.length,e.length>1&&d.setMenu(e),d.menuAction("menufile")},setInView:function(){var e=Global.fileListSelect;if(e&&e.length>=1){var t=$(".bodymain"),a=$(e[e.length-1]);t.scrollTop(a.offset().top-t.offset().top-t.height()/2+t.scrollTop())}},name:function(e){return e.attr("data-name")},type:function(e){return e.find(".ico").attr("filetype")},setMenu:function(e){if("*recycle*/"!=G.this_path){if("*share*/"==G.this_path)return e.removeClass("menuSharePath").addClass("menuSharePathMore"),void 0;e.removeClass("menufile menufolder").addClass("menuMore"),d.menuAction()}},resumeMenu:function(e){if("*share*/"==G.this_path)return e.removeClass("menuSharePathMore").addClass("menuSharePath"),void 0;var t={fileBox:"menufile",folderBox:"menufolder"};for(var a in t)e.hasClass(a)&&e.removeClass("menuMore").addClass(t[a]);d.menuAction()},getAllName:function(){var e=[];if(0!=Global.fileListSelectNum){var t=Global.fileListSelect;return t.each(function(t){e[t]=d.name($(this))}),e}},clear:function(){if(0!=Global.fileListSelectNum){var e=Global.fileListSelect;e.removeClass(Config.SelectClassName),e.each(function(){d.resumeMenu($(this))}),Global.fileListSelect="",Global.fileListSelectNum=0,d.menuAction()}},menuAction:function(){0==Global.fileListSelectNum?$(".kod_path_tool #down").addClass("disabled"):Global.fileListSelectNum>=1&&$(".kod_path_tool #down").removeClass("disabled")}};return{init:i,selectPos:l,fileLight:d}}),define("app/share_common/rightMenu",[],function(){var e=".menufile",t=".menufolder",a=".menuMore",i=".menuTreeRoot",n=".menuTreeFolder",s=".menuTreeFile",o={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"},set_sort_up:{name:LNG.sort_up,className:"menu_set_desc set_sort_up line_top"},set_sort_down:{name:LNG.sort_down,className:"menu_set_desc set_sort_down"}}}},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(),v(),x(),y(),b(),$(".set_set"+G.list_type).addClass("selected"),$(".set_sort_"+G.sort_field).addClass("selected"),$(".set_sort_"+G.sort_order).addClass("selected"),$(".context-menu-root").addClass("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(),_(),g(),b(),$(".context-menu-root").addClass("fadein")},c=function(){$.contextMenu({selector:".menuBodyMain",className:"fileContiner_menu",zIndex:9999,callback:function(e,t){h(e,t)},items:{refresh:{name:LNG.refresh+"<b>F5</b>",className:"refresh",icon:"refresh",accesskey:"e"},sep1:"--------",listIcon:o.listIcon,sortBy:o.sortBy,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){f(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){f(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="'+a.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:a,className:a.substr(1),callback:function(e){f(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"}}})},h=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"open":ui.path.open();break;case"open_new":ui.path.open_new();break;default:}},f=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="'+i.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:i,callback:function(e){k(e)},items:{search:{name:LNG.search_in_path,className:"search",icon:"search",accesskey:"s"},sep2:"--------",quit:{name:LNG.close_menu,className:"quit",icon:"remove",accesskey:"q"}}})
+},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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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"}}})},_=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"},refresh:{name:LNG.refresh_tree,className:"refresh",icon:"refresh",accesskey:"e"},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="'+s.substr(1)+'"></i>').appendTo("#rightMenu"),$.contextMenu({zIndex:9999,selector:s,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 a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quitOthers":$.each(art.dialog.list,function(e,t){a!=e&&t.close()});break;case"quit":i.close()}}})},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 a=t.$trigger.attr("id");switch(art.dialog.list[a],e){case"showAll":$.each(art.dialog.list,function(e,t){t.display(!0)});break;case"hideAll":$.each(art.dialog.list,function(e,t){t.display(!1)});break;case"closeAll":$.each(art.dialog.list,function(e,t){t.close()});break;default:}}})},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"}},callback:function(e,t){var a=t.$trigger.attr("id"),i=art.dialog.list[a];switch(e){case"quit_dialog":i.close();break;case"hide_dialog":i.display(!1);break;case"refresh":i.refresh();break;case"open_window":i.open_window();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.show_file();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,a){e&&(rightMenu.hidden(),$(e).contextMenu({x:t,y:a}))},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 a=t.attr("id"),i=art.dialog.list[a];i.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=fileLight.type(Global.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 s=0;Global.fileListSelect.each(function(){var e=core.pathExt(fileLight.name($(this)));(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e))&&(s+=1)}),0==s?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/common/taskTap",[],function(){var e={},t="",a=160,i=function(){$(".task_tab .tab").die("mouseenter").live("mouseenter",function(e){$(this).hasClass("this")||$(this).addClass("hover"),stopPP(e)}).die("click").live("click",function(e){var t=$(this).attr("id"),a=art.dialog.list[t],i=$("."+t);"hidden"==i.css("visibility")?a.display(!0):i.hasClass("aui_state_focus")?a.display(!1):a.zIndex(),stopPP(e)}).die("mouseleave").live("mouseleave",function(){$(this).removeClass("hover")}).die("dblclick").live("dblclick",function(){})},n=function(){var e,t,i,n,s=!1,o=!1,r=0,l=0,c=0,d=0,p=0,u=0;$(".task_tab .tab").die("mousedown").live("mousedown",function(t){return e=$(this),o=!0,this.setCapture&&this.setCapture(),$(document).mousemove(function(e){f(e)}),$(document).one("mouseup",function(e){return v(e),this.releaseCapture&&this.releaseCapture(),stopPP(e),!1}),stopPP(t),!1});var h=function(a){s=!0,r=a.pageX,$tab_parent=$(".task_tab"),t=$(".task_tab .tab"),$(".tasktab-dragging").remove(),i=e.clone().addClass("tasktab-dragging").prependTo("body"),d=$sizeInt(t.css("margin-right")),p=$tab_parent.width(),u=$tab_parent.get(0).getBoundingClientRect().left,u+=$(window).scrollLeft(),l=e.get(0).getBoundingClientRect().left,c=$sizeInt(t.css("width"));var n=e.get(0).getBoundingClientRect().top-$sizeInt(e.css("margin-top")),o=a.clientX-r+l;$("body").prepend("<div class='dragMaskView'></div>"),i.css({width:c+"px",top:n,left:o}),e.css("opacity",0)},f=function(a){if(o){window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),0==s&&h(a);var n=a.clientX-r+l;u>n||n>u+p-c||(i.css("left",n),t.each(function(){var t=$(this).get(0).getBoundingClientRect().left;if(n>t&&t+c/2+d>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"left")}if(n>t-c/2+d&&t>n){if(e.attr("id")==$(this).attr("id"))return;m($(this).attr("id"),"right")}}))}},m=function(i,s){if(!e.is(":animated")||n!=i){n=i,e.stop(!0,!0),$(".insertTemp").remove(),t=$(".task_tab .tab");var o=e.width(),r=$(".task_tab #"+i),l=e.clone(!0).insertAfter(e).css({"margin-right":"0px",border:"none"}).addClass("insertTemp");"left"==s?e.after(r).css("width","0px"):(e.before(r).css("width","0px"),r.before(l)),e.animate({width:o+"px"},a),l.animate({width:"0px"},a,function(){$(this).remove(),t=$(".task_tab .tab")})}},v=function(){o=!1,s=!1,startTime=0,$(".dragMaskView").remove(),void 0!=i&&(l=e.get(0).getBoundingClientRect().left,i.animate({left:l+"px"},a,function(){e.css("opacity",1),$(this).remove()}))}},s=function(e){var t=110,i=t,n=t+12,s=$(".task_tab .tab"),o=$(".task_tab .tabs").width()-10,r=s.length,l=Math.floor(o/n);switch(r>l&&(i=Math.floor(o/r)-12),e){case"add":$(".task_tab .tabs .this").css("width","0").animate({width:i+"px"},a);case"close":s.animate({width:i+"px"},a);break;case"resize":s.css("width",i+"px");break;default:}},o=function(t,a){$(".task_tab").removeClass("hidden");var i=a.replace(/<[^>]+>/g,""),n='<div class="tab taskBarMenu" id="'+t+'" title="'+i+'">'+a+"</div>";$(n).insertBefore(".task_tab .last"),s("add"),e[t]={id:t,name:name}},r=function(e){$(".task_tab .this").removeClass("this"),$(".task_tab #"+e).addClass("this"),t=e},l=function(t){delete e[t],$(".task_tab #"+t).animate({width:0},a,function(){$(".task_tab #"+t).remove(),s("close"),0==$(".tabs .tab").length&&"desktop"!=Config.pageApp&&$(".task_tab").addClass("hidden")})};return{add:o,focus:r,close:l,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")}),i(),n()}}}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),define("app/common/tree",["./pathOperate","./pathOpen","./CMPlayer"],function(e){var t,a=e("./pathOperate"),i=e("./pathOpen"),n=!1;
 ui.pathOpen=i,ui.pathOperate=a;var s,o=function(){0!=$("#windowMaskView").length&&"block"==$("#windowMaskView").css("display")&&inArray(core.filetype.image,d().type)&&i.open(d().path,d().type)},r=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=e.data;$.fn.zTree.init($("#folderList"),c,t),s=$.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){l(e,"up")}).bind("down",function(e){l(e,"down")}).bind("left",function(e){l(e,"left")}).bind("right",function(e){l(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")}))},l=function(e,t){stopPP(e);var a=s.getSelectedNodes()[0];if(a){switch(t){case"up":var i=a.getPreNode();if(i){if(i.open&&i.children.length>0)for(;i.open&&i.children&&i.children.length>=1;)i=i.children[i.children.length-1]}else i=a.getParentNode();s.selectNode(i);break;case"down":if(a.open&&a.children.length>=1)i=a.children[0];else{var n=a,i=n.getNextNode()||n.getParentNode().getNextNode();try{for(;!i;)n=n.getParentNode(),i=n.getNextNode()||n.getParentNode().getNextNode()}catch(e){}}s.selectNode(i);break;case"left":a.isParent?a.open?s.expandNode(a,!1):s.selectNode(a.getParentNode()):s.selectNode(a.getParentNode());break;case"right":a.open?s.selectNode(a.children[0]):s.expandNode(a,!0);break;default:}o()}},c={async:{enable:!0,dataType:"json",url:Config.treeAjaxURL,autoParam:["ajax_name=name","ajax_path=path","this_path"],dataFilter:function(e,t,a){return a.code?a.data:null}},edit:{enable:!0,showRemoveBtn:!1,showRenameBtn:!1,drag:{isCopy:!1,isMove:!1}},view:{showLine:!1,selectedMulti:!1,dblClickExpand:!1,addDiyDom:function(e,t){var a=Global.treeSpaceWide,i=$("#"+t.tId+"_switch"),n=$("#"+t.tId+"_ico");if(i.remove(),n.before(i),"file"==t.type&&n.removeClass("button ico_docu").addClass("file "+t.ext),"oexe"==t.ext&&n.removeClass("button ico_docu").addClass("file oexe").removeAttr("style"),t.level>=1){var s="<span class='space' style='display: inline-block;width:"+a*t.level+"px'></span>";i.before(s)}var o="";void 0!=t.menuType?o=t.menuType:(("file"==t.type||"oexe"==t.ext)&&(o="menuTreeFile"),"folder"==t.type&&(o="menuTreeFolder"));var r=LNG.name+":"+t.name+"\n"+LNG.size+":"+t.size_friendly+"\n"+LNG.modify_time+":"+t.mtime;"file"!=t.type&&(r=t.name),i.parent().addClass(o).attr("title",r)}},callback:{onClick:function(e,t,a){return s.selectNode(a),s.expandNode(a),"folder"!=a.type||"editor"!=Config.pageApp?0==a.level?("explorer"==Config.pageApp&&void 0!=a.this_path&&ui.path.list(a.this_path+"/"),!1):("editor"==Config.pageApp?ui.tree.openEditor():"explorer"==Config.pageApp&&ui.tree.open(),void 0):void 0},beforeRightClick:function(e,t){s.selectNode(t)},beforeAsync:function(e,t){t.ajax_name=urlEncode(t.name),t.ajax_path=urlEncode(t.path)},onAsyncSuccess:function(e,a,i,n){return 0==n.data.length?(s.removeChildNodes(i),void 0):("function"==typeof t&&(t(),t=void 0),void 0)},onRename:function(e,i,n){var o=n.getParentNode();if(s.getNodesByParam("name",n.name,o).length>1)return core.tips.tips(LNG.name_isexists,!1),s.removeNode(n),void 0;if(n.create){var r=n.path+"/"+n.name;"folder"==n.type?a.newFolder(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})}):a.newFile(r,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}else{var l=n.path+n.beforeName,c=n.path+n.name;a.rname(l,c,function(e){e.code&&(p(o),t=function(){var e=s.getNodesByParam("name",n.name,o)[0];s.selectNode(e),u()})})}},beforeDrag:function(e,t){for(var a=0,i=t.length;i>a;a++)if(t[a].drag===!1)return!1;return!0},beforeDrop:function(e,t,a){return a?a.drop!==!1:!0},onDrop:function(e,t,i,n){var s="",o="",r=i[0];(r.father||r.this_path)&&(s=r.father+urlEncode(r.name),o=n.father+urlEncode(n.name),a.cuteDrag([{path:s,type:r.type}],o,function(){p(r)}))}}},d=function(e){if(s){var t=s.getSelectedNodes()[0],a="",i="";return t?(t.father?a=t.father+t.name:t.this_path?a=t.this_path:""!=t.path?a=t.path+t.name:""==t.path&&(a="/"+t.name),i=t.ext,("_null_"==i||void 0==i)&&(i="folder"),"file"==i&&(i=t.ext),e?[{path:a,type:i,node:t}]:{path:a,type:i,node:t}):{path:"",type:""}}},p=function(e){if(void 0==e&&(e=s.getSelectedNodes()[0]),!e.isParent){if(e=e.getParentNode(),!e)return ui.tree.init(),void 0;if(e&&"menuTreeFavRoot"==e.menuType)return}return"lib"==e.iconSkin?(ui.tree.init(),void 0):(s.reAsyncChildNodes(e,"refresh"),void 0)},u=function(){"explorer"==Config.pageApp&&ui.f5()};return{pathOpen:i,init:r,refresh:p,openEditor:function(){i.openEditor(d().path)},openIE:function(){i.openIE(d().path)},share:function(){a.share(d())},download:function(){"folder"==d().type?a.zipDownload(d(!0)):i.download(d().path)},open:function(){if(!($(".dialog_path_remove").length>=1)){var e=d();"oexe"==e.type&&(e.path=e.node),i.open(e.path,e.type)}},fav:function(){a.fav(d().path)},search:function(){core.search("",d().path)},appEdit:function(){var e=d(),t=e.node;t.path=e.path,a.appEdit(t,function(){p(e.node.getParentNode())})},info:function(){a.info(d(!0))},copy:function(){a.copy(d(!0))},cute:function(){a.cute(d(!0))},fav_remove:function(){$.dialog({id:"dialog_fav_remove",fixed:!0,icon:"question",title:LNG.fav_remove,width:250,padding:40,content:LNG.fav_remove+"?",ok:function(){$.ajax({url:"index.php?fav/del&name="+d().node.name,dataType:"json",async:!1,success:function(e){core.tips.tips(e),ui.tree.init()}})},cancel:!0})},past:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.past(e.path,function(){u(),p(e.node)})},clone:function(){var e=d();e.node.isParent||(e.node=e.node.getParentNode()),a.copyDrag(d(!0),core.pathFather(e.path),function(){u(),p(e.node)})},remove:function(){var e=d(!0),t=e[0].node.getParentNode();a.remove(e,function(){u(),p(t)})},checkIfChange:function(e){n||(n=!0,s&&(s.getNodesByFilter(function(t){var a;return t.this_path?a=t.this_path:""!=t.path&&(a=t.path+t.name),a==e||a+"/"==e||"/"+t.name+"/"==e?(p(t),!0):!1},!0),setTimeout(function(){n=!1},1e3)))},explorer:function(){var e=d().path;e||(e=G.this_path),core.explorer(d().path)},openProject:function(){var e=d().path;e||(e=G.this_path),core.explorerCode(e)},fileBox:function(e){e="save_file",e="save_folder",e="select_",$(".header-left").css("width",110).next().css("left",150),$(".frame-left").width("width",142),$.dialog.open("?/explorer&plague="+e,{resize:!0,fixed:!0,title:"另存为",width:750,height:420})},create:function(e){var t=s.getSelectedNodes();if(0>=t.length){var a=s.getNodeByParam("ext","__root__",null);s.selectNode(a)}var i=d(),n=i.node,o=n.getParentNode(),r="newfile",l=0,c=LNG.newfolder;if("folder"==e){for(;s.getNodesByParam("name",c+"("+l+")",o).length>0;)l++;newNode={name:c+"("+l+")",ext:"",type:"folder",create:!0,path:i.path}}else if("file"==e){for(;s.getNodesByParam("name",r+"("+l+").txt",o).length>0;)l++;newNode={name:r+"("+l+").txt",ext:"txt",type:"file",create:!0,path:i.path}}if(void 0!=n.children){var p=s.addNodes(n,newNode)[0];s.editName(p)}else{"folder"!=n.type&&(n=n.getParentNode());var p=s.addNodes(n,newNode)[0];s.editName(p)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+d().path;window.open(e)},rname:function(){var e=s.getSelectedNodes()[0];s.editName(e),e.beforeName=e.name}}}),define("app/common/pathOperate",[],function(e){var t={};t.file_info=e("../tpl/fileinfo/file_info.html"),t.path_info=e("../tpl/fileinfo/path_info.html"),t.path_info_more=e("../tpl/fileinfo/path_info_more.html");var a=["/","\\",":","*","?",'"',"<",">","|"],i=function(e){var t=function(e,t){for(var a=t.length,i=0;a>i;i++)if(e.indexOf(t[i])>0)return!0;return!1};return t(e,a)?(core.tips.tips(LNG.path_not_allow+':/  : * ? " < > |',!1),!1):!0},n=function(e){for(var t="list=[",a=0;e.length>a;a++)t+='{"type":"'+e[a].type+'","path":"'+urlEncode2(e[a].path)+'"}',e.length-1>a&&(t+=",");return t+"]"},s=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkfile&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},o=function(e,t){if(e){var a=core.pathThis(e);return i(a)?($.ajax({dataType:"json",url:"index.php?explorer/mkdir&path="+urlEncode2(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}}),void 0):("function"==typeof t&&t(),void 0)}},r=function(e,t,a){return e&&t&&e!=t?i(core.pathThis(t))?($.ajax({type:"POST",dataType:"json",url:"index.php?explorer/pathRname",data:"path="+urlEncode(e)+"&rname_to="+urlEncode(t),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}}),void 0):("function"==typeof a&&a(),void 0):void 0},l=function(e,t){if(!(1>e.length)){var a=e[0].path,i=LNG.remove_title,s=a+"<br/>"+LNG.remove_info,o="index.php?explorer/pathDelete";"*recycle*/"==G.this_path&&(s=LNG.recycle_remove+"?",o="index.php?explorer/pathDeleteRecycle",i=LNG.recycle_remove),"share"==e[0].type&&(s=LNG.share_remove_tips,o="index.php?userShare/del",i=LNG.share_remove),e.length>1&&(s+=' ... <span class="badge">'+e.length+"</span>"),$.dialog({id:"dialog_path_remove",fixed:!0,icon:"question",title:i,width:300,padding:40,lock:!0,background:"#000",opacity:.3,content:s,ok:function(){$.ajax({url:o,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(a){if(core.tips.close(a),FrameCall.father("ui.f5","1,1"),"share"==e[0].type){var i=art.dialog.list.share_dialog;void 0!=i&&i.close(),$(".jiathis_style").appendTo(".global_share")}"function"==typeof t&&t(a)}})},cancel:!0})}},c=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCopy",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},d=function(e){var t=e.path,a="folder"==e.type?"folder":"file";1>t.length||core.authCheck("userShare:set")&&$.ajax({url:"./index.php?userShare/checkByPath&path="+urlEncode(t),dataType:"json",success:function(e){e.code?p(e.data):p(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)),"file"==a&&$(".label_code_read").addClass("hidden")})}})},p=function(t,a){0!=$(".share_dialog").length&&$(".share_dialog").shake(2,5,100),seajs.use("lib/jquery.datetimepicker/jquery.datetimepicker.css"),e.async("lib/jquery.datetimepicker/jquery.datetimepicker",function(){u(t),void 0!=a&&a()})},u=function(t){var a=e("../tpl/share.html"),i=template.compile(a),n=i({LNG:LNG});$.dialog({id:"share_dialog",simple:!0,resize:!1,width:425,title:LNG.share,padding:"0",fixed:!0,content:n,cancel:function(){$(".jiathis_style").appendTo(".global_share")}});var s="zh_CN"==G.lang?"ch":"en";$("#share_time").datetimepicker({format:"Y/m/d",formatDate:"Y/m/d",timepicker:!1,lang:s}),$("#share_time").unbind("blur").bind("blur",function(e){stopPP(e)});var o=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=path]").val(""),$(".content_info input[name=time_to]").val(""),$(".content_info input[name=share_password]").val(""),$(".share_view_info").addClass("hidden");else{t=e,$(".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=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 a=LNG.share_view_num+e.num_view+"  "+LNG.share_download_num+e.num_download;$(".share_view_info").html(a),"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"),$(".share_has_url").removeClass("hidden"),"file"==e.type?$(".label_code_read").addClass("hidden"):$(".label_code_read").removeClass("hidden");var i=e.type;"folder"==e.type&&(i=1==e.code_read?"code_read":"folder");var n=G.app_host+"index.php?share/"+i+"&user="+G.user_name+"&sid="+e.sid;$(".content_info .share_url").val(n),(""!=e.time_to||""!=e.share_password||"1"==e.code_read||"1"==e.not_download)&&$(".share_setting_more").removeClass("hidden"),$(".share_remove_button").removeClass("hidden"),$(".share_create_button").text(LNG.share_save),jiathis_config={url:n,summary:e.name,title:"share to ##",shortUrl:!1,hideMore:!1},$(".jiathis_style").appendTo(".share_jiathis_box")}},r=function(){$(".share_action .share_remove_button").unbind("click").click(function(){ui.pathOperate.remove([{type:"share",path:t.sid}]),"*share*/"==G.this_path&&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}),$.ajax({url:"index.php?userShare/set",data:e,type:"POST",dataType:"json",beforeSend:function(){$(".share_create_button").addClass("disabled")},error:function(){core.tips.tips(LNG.error,!1)},success:function(e){$(".share_create_button").removeClass("disabled"),e.code?(o(e.data),$(".share_create_button").text(LNG.share_save),"*share*/"==G.this_path&&ui.f5(),core.tips.tips(LNG.success,!0)):core.tips.tips(e)}})}),$(".content_info .open_window").unbind("click").bind("click",function(){window.open($("input.share_url").val())});var e=$("input.share_url"),a=e.get(0);e.unbind("hover click").bind("hover click",function(){$(this).focus();var t=e.val().length;if(Global.isIE){var i=a.createTextRange();i.moveEnd("character",-a.value.length),i.moveEnd("character",t),i.moveStart("character",0),i.select()}else a.setSelectionRange(0,t)})};o(t),r()},h=function(e){if(!(1>e.length)){var t=core.path2url(e);FrameCall.father("ui.setWall",'"'+t+'"'),$.ajax({url:"index.php?setting/set&k=wall&v="+urlEncode(t),type:"json",success:function(e){core.tips.tips(e)}})}},f=function(e,t,a){if(!(1>e.length)){var i,n=core.pathThis(e),s=core.pathFather(e);i="folder"==t?"ui.path.list('"+urlEncode(e)+"');":"ui.path.open('"+urlEncode(e)+"');";var o=urlEncode2(s+n+".oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+o,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+i+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof a&&a(e)}})}},m=function(e,t){if(!(1>e.length)){var a=core.pathThis(e),i=core.pathFather(e);jsrun="core.explorerCode('"+urlEncode(e)+"');";var n=urlEncode2(i+a+"_project.oexe");$.ajax({url:"./index.php?explorer/mkfile&path="+n,type:"POST",dataType:"json",data:'content={"type":"app_link","content":"'+jsrun+'","icon":"app_s2.png"}',success:function(e){e.code&&"function"==typeof t&&t(e)}})}},v=function(e){1>e.length||$.ajax({url:"index.php?explorer/pathCute",type:"POST",dataType:"json",data:n(e),error:core.ajaxError,success:function(e){core.tips.tips(e)}})},_=function(e,t){if(e){var a="index.php?explorer/pathPast&path="+urlEncode2(e);$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e.info)}})}},g=function(e){1>e.length&&(e=[{path:G.this_path,type:"folder"}]);var a="index.php?explorer/pathInfo";G.share_page!==void 0&&(a="index.php?share/pathInfo&user="+G.user+"&sid="+G.sid),$.ajax({url:a,type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.getting)},error:core.ajaxError,success:function(a){if(!a.code)return core.tips.close(a),void 0;core.tips.close(LNG.get_success,!0);var i="path_info_more",n=LNG.info;1==e.length&&(i="folder"==e[0].type?"path_info":"file_info",n=core.pathThis(e[0].path),n.length>15&&(n=n.substr(0,15)+"...  "+LNG.info));var s=template.compile(t[i]),o=UUID();a.data.LNG=LNG,a.data.atime=date(LNG.time_type_info,a.data.atime),a.data.ctime=date(LNG.time_type_info,a.data.ctime),a.data.mtime=date(LNG.time_type_info,a.data.mtime),$.dialog({id:o,padding:5,ico:core.ico("info"),fixed:!0,title:n,content:s(a.data),width:"350px",cancel:!0}),b(o,e)}})},b=function(e,t){$("."+e).find(".edit_chmod").click(function(){var e=$(this).parent().find("input"),a=$(this);$.ajax({url:"index.php?explorer/pathChmod&mod="+e.val(),type:"POST",data:n(t),beforeSend:function(){a.text(LNG.loading)},error:function(){a.text(LNG.button_save)},success:function(e){a.text(e.data).animate({opacity:.6},400,0).delay(1e3).animate({opacity:1},200,0,function(){a.text(LNG.button_save)})}})})},y=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(){core.tips.loading(LNG.zip_download_ready)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e);var t="index.php?explorer/fileDownloadRemove&path="+urlEncode2(e.info);G.share_page!==void 0&&(t="index.php?share/fileDownloadRemove&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e.info));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1.5,content:a});i.DOM.wrap.find(".aui_loading").remove()}})}},x=function(e,t){1>e.length||$.ajax({url:"index.php?explorer/zip",type:"POST",dataType:"json",data:n(e),beforeSend:function(){core.tips.loading(LNG.ziping)},error:core.ajaxError,success:function(e){core.tips.close(e),core.tips.tips(e),"function"==typeof t&&t(e)}})},k=function(e,t){if(e){var a="index.php?explorer/unzip&path="+urlEncode2(e);$.ajax({url:a,beforeSend:function(){core.tips.loading(LNG.unziping)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof t&&t(e)}})}},w=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCuteDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},N=function(e,t,a){t&&$.ajax({url:"index.php?explorer/pathCopyDrag",type:"POST",dataType:"json",data:n(e)+"&path="+urlEncode2(t+"/"),beforeSend:function(){core.tips.loading(LNG.moving)},error:core.ajaxError,success:function(e){core.tips.close(e),"function"==typeof a&&a(e)}})},L=function(){$.ajax({url:"index.php?explorer/clipboard",dataType:"json",error:core.ajaxError,success:function(e){e.code&&$.dialog({title:LNG.clipboard,padding:0,height:200,width:400,content:e.data})}})},C=function(e){if(e){var t="&name="+urlEncode(core.pathThis(e))+"&path="+urlEncode(e);core.setting("fav"+t)}},j=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},S=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")})},T=function(t,a,i){var n,s,o,r=LNG.app_create,l=UUID(),c=e("../tpl/app.html"),d=G.basic_path+"static/images/app/",p=template.compile(c);switch(void 0==i&&(i="user_edit"),"root_edit"==i&&(t=t),"user_edit"==i||"root_edit"==i?(r=LNG.app_edit,o=p({LNG:LNG,iconPath:d,uuid:l,data:t})):o=p({LNG:LNG,iconPath:d,uuid:l,data:{}}),$.dialog({fixed:!0,width:450,id:l,padding:15,title:r,content:o,button:[{name:LNG.preview,callback:function(){var e=j(n);return core.openApp(e),!1}},{name:LNG.button_save,focus:!0,callback:function(){var e=j(n);switch(i){case"user_add":var o=urlEncode2(G.this_path+e.name);s="./index.php?app/user_app&action=add&path="+o;break;case"user_edit":s="./index.php?app/user_app&path="+urlEncode2(t.path);break;case"root_add":s="./index.php?app/add&name="+e.name;break;case"root_edit":s="./index.php?app/edit&name="+e.name+"&old_name="+t.name;break;default:}$.ajax({url:s,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(e)),beforeSend:function(){core.tips.loading()},error:core.ajaxError,success:function(e){if(core.tips.close(e),e.code)if("root_edit"==i||"root_add"==i){if(!e.code)return;FrameCall.top("Openapp_store","App.reload",'""')}else"function"==typeof a?a():ui.f5()}})}}]}),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"),i){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:}S(n)},E=function(){core.appStore()},z=function(e){e&&4>e.length&&"http"!=e.substring(0,4)||$.ajax({url:"./index.php?app/get_url_title&url="+e,dataType:"json",beforeSend:function(){core.tips.loading()},success:function(t){var a=t.data;core.tips.close(t);var i={content:"window.open('"+e+"');",desc:"",group:"others",type:"app",icon:"internet.png",name:a,resize:1,simple:0,height:"",width:""},n=urlEncode2(G.this_path+a);e="./index.php?app/user_app&action=add&path="+n,$.ajax({url:e,type:"POST",dataType:"json",data:"data="+urlEncode2(json_encode(i)),success:function(e){core.tips.close(e),e.code&&ui.f5()}})}})};return{appEdit:T,appList:E,appAddURL:z,share:d,share_box:p,setBackground:h,createLink:f,createProject:m,newFile:s,newFolder:o,rname:r,unZip:k,zipDownload:y,zip:x,copy:c,cute:v,info:g,remove:l,cuteDrag:w,copyDrag:N,past:_,clipboard:L,fav:C}}),define("app/tpl/fileinfo/file_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon file_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.file_type}}:</div>\n        <div class='content'>{{ext}} {{LNG.file}}</div>\n        <div style='clear:both'></div>\n    </div>\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}}</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='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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <input type='text' class='info_name' name='filename' value='{{name}}'/>\n        <div style='clear:both'></div>\n    </div>\n    <div class='line'></div>\n    <div class='p'>\n        <div class='title'>{{LNG.type}}:</div>\n        <div class='content'>{{LNG.folder}}</div>\n        <div style='clear:both'></div>\n    </div>\n    <div class='p'>\n        <div class='title'>{{LNG.address}}:</div>\n        <div class='content'>{{path}}</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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/tpl/fileinfo/path_info_more.html",[],"<div class='pathinfo'>\n    <div class='p'>\n        <div class='icon folder_icon'></div>\n        <div class='content' style='line-height:40px;margin-left:40px;'>\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    <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    <div class='p'>\n        <div class='title'>{{LNG.permission_edit}}:</div>\n        <div class='content'><input type='text' class='info_chmod' value='777'/>\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</div>"),define("app/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\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 id="share_name" type="text" placeholder="{{LNG.share_name}}" name="name"/>\n			\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>{{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>{{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" value="">{{LNG.share_code_read}}\n				</label>\n				<label>\n					<input type="checkbox" name="not_download" value="">{{LNG.share_not_download}}\n				</label>\n				<div style="clear:both"></div>\n			</div>\n		</div>\n\n		<div class="input_line share_has_url">\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	          </div>\n	          <div class="share_jiathis_box"></div>\n	        </div>\n	        <div style="clear:both"></div>\n		</div>\n	</div>\n	<div class="share_action">		\n		<button type="button" class="btn btn-primary share_create_button">{{LNG.share_create}}</button>\n		<a type="button" href="javascript:void(0);" class="share_remove_button">{{LNG.share_cancle}}</a>\n	</div>\n</div>'),define("app/tpl/app.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' value='{{data.icon}}'/>\n        {{LNG.app_icon_show}}<a href='javascript:core.explorer(\"{{iconPath}}\");' class='button open'><img src='./static/images/app/computer.png'/></a></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'><select name='group'>\n        <option value ='others'>{{LNG.app_group_others}}</option><option value ='game'>{{LNG.app_group_game}}</option>\n        <option value ='tools'>{{LNG.app_group_tools}}</option><option value ='reader'>{{LNG.app_group_reader}}</option>\n        <option value ='movie'>{{LNG.app_group_movie}}</option><option value ='music'>{{LNG.app_group_music}}</option>\n        </option><option value ='life'>{{LNG.app_group_life}}</option>\n        <select></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' 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' 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' 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' 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' 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            {{LNG.width}}:&nbsp;&nbsp;<input class='w30' type='text' name='width'  value='{{data.width}}'/>\n            {{LNG.height}}:&nbsp;&nbsp;<input class='w30' type='text' name='height' value='{{data.height}}'/>\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>"),define("app/common/pathOpen",["./CMPlayer"],function(e){var t=function(e,t){if(void 0!=e){if(void 0==t&&(t=core.pathExt(e)),t=t.toLowerCase(),"folder"==t)return"explorer"==Config.pageApp?ui.path.list(e+"/"):core.explorer(e),void 0;
-if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}$.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"./index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};define("app/src/share_explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var t=e("../../common/pathOperate"),a=e("../../common/pathOpen"),i=void 0;ui.pathOpen=a;var n=function(e,t,a){if(void 0!=e){if(e==G.this_path)return void 0!=t&&""!=t&&core.tips.tips(LNG.path_is_current,"info"),void 0;G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),ui.f5_callback(function(){"function"==typeof a&&a()}),s.add()}},s=function(){var e=["/"],t=0,a=function(){return G.this_path==e[e.length-1]?(s(),void 0):(t!=e.length-1&&(e=e.slice(0,t)),e.push(G.this_path),t=e.length-1,s(),void 0)},i=function(){e.length-1>=t+1&&(t+=1,G.this_path=e[t],ui.f5(!0,!0),s())},n=function(){t-1>=0&&(t-=1,G.this_path=e[t],ui.f5(!0,!0),s())},s=function(){t==e.length-1?$("#history_next").addClass("active"):$("#history_next").removeClass("active"),0==t?$("#history_back").addClass("active"):$("#history_back").removeClass("active")};return{add:a,back:n,next:i}}(),o=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=$.inArray(a,e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},r=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==i||G.this_path!=i.path||e!=i.key){var t=[];$(".fileContiner .file").each(function(){var a=fileLight.name($(this));a&&e==a.substring(0,e.length).toLowerCase()&&t.push(a)}),i={key:e,path:G.this_path,index:0,list:t}}0!=i.list.length&&(o(i.list[i.index++]),i.index==i.list.length&&(i.index=0))}},l=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=a.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},c=function(e){if(e){var t=[];return 0==Global.fileListSelect.length?t:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),a="folder"==fileLight.type($(this))?"folder":"file";t.push({path:e,type:a})}),t)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var a=Global.fileListSelect,i=G.this_path+fileLight.name(a),n=fileLight.type(a);return{path:i,type:n}};return{history:s,openEditor:function(){a.openEditor(c().path)},openIE:function(){a.openIE(c().path)},open:function(e){if(0!=c().path.length){if(void 0!=e)return a.open(e),void 0;var t=c(),i=Global.fileListSelect;if(inArray(core.filetype.image,t.type))return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0;if("oexe"==t.type){var n=i.attr("data-app");t.path=json_decode(urlDecode(n))}a.open(t.path,t.type)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+urlEncode(c().path);window.open(e)},openProject:function(){core.explorerCode(c().path)},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var t=fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(G.this_path+fileLight.name($(this)));e.push(a)}}),a.play(e,"music")}},pathOperate:t,download:function(){var e=c(!0);1==e.length&&"file"==e[0].type?a.download(c().path):t.zipDownload(e)},search:function(){core.search("",c().path)},info:function(){t.info(c(!0))},list:n,setSearchByStr:l,setSelectByChar:r,setSelectByFilename:o}}),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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}});
\ No newline at end of file
+if("oexe"!=t){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)){if("swf"==t){var n=core.path2url(e);return s(n,core.ico("swf"),core.pathThis(e)),void 0}if("pdf"==t){if(Config.isIE)return i(e),void 0;var c="pdf"+UUID(),n=core.path2url(e),d='<div id="'+c+'" style="height:100%;">			<a href="'+n+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a></div>";return $.dialog({resize:!0,fixed:!0,ico:core.ico("pdf"),title:core.pathThis(e),width:800,height:400,padding:0,content:d}),new PDFObject({url:n}).embed(c),void 0}if("html"==t||"htm"==t){var n=core.path2url(e);return s(n,core.ico("html"),core.pathThis(e)),void 0}if(inArray(core.filetype.image,t)){var n=urlDecode(e);return-1==e.indexOf("http:")&&(n=core.path2url(n)),MaskView.image(n),void 0}if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var n=core.path2url(e);return l(n,t),void 0}return inArray(core.filetype.doc,t)?(r(e),void 0):inArray(core.filetype.text,t)||inArray(core.filetype.code,t)?(o(e),void 0):("editor"==Config.pageApp?core.tips.tips(t+LNG.edit_can_not,!1):a(e,""),void 0)}}else if("string"==typeof e||e.content&&"ui.path.open"==e.content.substr(0,12)&&"app_link"==e.type){var p=e;"string"!=typeof e&&(p=e.content.split("'")[1]),core.file_get(p,function(e){var t=json_decode(e);t.name=core.pathThis(p),core.openApp(t)})}else core.openApp(e)}},a=function(e,t){var a='<div class="unknow_file" style="width:260px;word-break: break-all;"><span>'+LNG.unknow_file_tips+"<br/>"+t+'</span><br/><a class="btn btn-success btn-sm" href="javascript:ui.path.download(\''+e+"');\"> "+LNG.unknow_file_download+" </a></div>";$.dialog({fixed:!0,icon:"warning",title:LNG.unknow_file_title,padding:30,content:a,cancel:!0})},i=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var t="index.php?explorer/fileDownload&path="+urlEncode2(e);G.share_page!==void 0&&(t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e));var a='<iframe src="'+t+'" style="width:0px;height:0px;border:0;" frameborder=0></iframe>'+LNG.download_ready+"...",i=$.dialog({icon:"succeed",title:!1,time:1,content:a});i.DOM.wrap.find(".aui_loading").remove()}},n=function(e){if(core.authCheck("explorer:fileDownload")&&void 0!=e){var t=core.path2url(e);window.open(t)}},s=function(e,t,a,i){if(e){void 0==i&&(i="openWindow"+UUID());var n="<iframe frameborder='0' name='Open"+i+"' src='"+e+"' style='width:100%;height:100%;border:0;'></iframe>";art.dialog.through({id:i,title:a,ico:t,width:"78%",height:"70%",padding:0,content:n,resize:!0})}},o=function(e){if(core.authCheck("explorer:fileDownload",LNG.no_permission_download)&&e){var a=core.pathExt(e),i=core.pathThis(e);if(inArray(core.filetype.bindary,a)||inArray(core.filetype.music,a)||inArray(core.filetype.image,a)||inArray(core.filetype.movie,a)||inArray(core.filetype.doc,a))return t(e,a),void 0;if("editor"==Config.pageApp)return FrameCall.child("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"'),void 0;if(void 0==window.top.frames.OpenopenEditor){var n="./index.php?editor/edit&filename="+urlEncode(urlEncode2(e));G.share_page!==void 0&&(n="./index.php?share/edit&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode(urlEncode2(e)));var o=i+" ——"+LNG.edit;s(n,core.ico("edit"),o.substring(o.length-50),"openEditor")}else $.dialog.list.openEditor&&$.dialog.list.openEditor.display(!0),FrameCall.top("OpenopenEditor","Editor.add",'"'+urlEncode2(e)+'"')}},r=function(e){var t=document.domain;if(""==G.office_server){if(0==t.search("localhost")||0==t.search("192.168.")||0==t.search("127.0.0"))return a(e,LNG.unknow_file_office+', <a href="http://kalcaddle.com/help.html#office" target="_blank">'+LNG.more+">></a>"),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}if(G.share_page!==void 0){var i=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode2(e),n=G.office_server+urlEncode(i),s=core.pathThis(e);art.dialog.open(n,{ico:core.ico("doc"),title:s,width:"80%",height:"70%",resize:!0})}else $.get("./index.php?explorer/makeFileProxy&path="+urlEncode(e),function(t){if(0==t.code)return core.tips.tips(t),void 0;var a=G.app_host+"index.php?user/public_link&fid="+t.data,i=G.office_server+urlEncode(a),n=core.pathThis(e);art.dialog.open(i,{ico:core.ico("doc"),title:n,width:"80%",height:"70%",resize:!0})})},l=function(t,a){t&&("string"==typeof t&&(t=[t]),CMPlayer=e("./CMPlayer"),CMPlayer.play(t,a))};return{open:t,play:l,openEditor:o,openIE:n,download:i}}),define("app/common/CMPlayer",[],function(){var e={ting:{path:"music/ting",width:410,height:530},beveled:{path:"music/beveled",width:350,height:200},kuwo:{path:"music/kuwo",width:480,height:200},manila:{path:"music/manila",width:320,height:400},mp3player:{path:"music/mp3player",width:320,height:410},qqmusic:{path:"music/qqmusic",width:300,height:400},somusic:{path:"music/somusic",width:420,height:137},xdj:{path:"music/xdj",width:595,height:235},webplayer:{path:"movie/webplayer",width:600,height:400},qqplayer:{path:"movie/qqplayer",width:600,height:400},tvlive:{path:"movie/tvlive",width:600,height:400},youtube:{path:"movie/youtube",width:600,height:400},vplayer:{path:"movie/vplayer",width:600,height:400}},t=function(e){return"music"==e?"music_player":(void 0==e&&(e="mp3"),inArray(core.filetype.music,e)?"music_player":"movie_player")},a=function(t){var a,i,s,o;"music_player"==t?(o=core.ico("mp3"),a=e[G.musictheme],i="music player",s=!1):(o=core.ico("flv"),a=e[G.movietheme],i="movie player",s=!0);var r=core.createFlash(G.static_path+"js/lib/cmp4/cmp.swf","context_menu=2&auto_play=1&play_mode=1&skin=skins/"+a.path+".zip",t),l={id:t+"_dialog",simple:!0,ico:o,title:i,width:a.width+10,height:a.height,content:'<div class="wmp_player"></div><div class="flash_player">'+r+"</div>",resize:s,padding:0,fixed:!0,close:function(){var e=n(t);e&&e.sendEvent&&e.sendEvent("view_stop")}};window.top.CMP?art.dialog.through(l):$.dialog(l)},i=function(e){var t,a="";for(t=e.length-1;t>=0;t--){var i,n;-1==e[t].search("fileProxy")?(i=urlEncode(e[t]),n=core.pathThis(e[t])):(i=e[t],n=core.pathThis(urlDecode(i))),i=i.replace(/%2F/g,"/"),i=i.replace(/%3F/g,"?"),i=i.replace(/%26/g,"&"),i=i.replace(/%3A/g,":"),i=i.replace(/%3D/g,"="),a+='<list><m type="" src="'+i+'" label="'+n+'"/></list>'}return a},n=function(e){return window.top.CMP?window.top.CMP.get(e):CMP.get(e)},s=function(e,t){var a=n(t),s=i(e);try{a.config("play_mode","normal");var o=a.list().length;a.list_xml(s,!0),a.sendEvent("view_play",o+1)}catch(r){}},o=function(e){if("music_player"!=e){var a=n(t("movie"));a&&(a.addEventListener("control_load","new_play"),a.addEventListener("control_play","new_play"))}};return{changeTheme:function(t,a){var i,s,o;"music"==t?(G.musictheme=a,i="music_player"):"movie"==t&&(G.movietheme=a,i="movie_player"),o=n(i),o&&(s=e[a],window.top.art.dialog.list[i+"_dialog"].size(s.width,s.height),o.sendEvent("skin_load","skins/"+s.path+".zip"))},play:function(e,i){var r=t(i),l=n(r);if(l)s(e,r),o(r),window.top.art.dialog.list[r+"_dialog"].display(!0);else{a(r);var c=setInterval(function(){n(r)&&(s(e,r),o(r),new_play(r),clearInterval(c),c=!1)},1e3)}}}});var new_play=function(e){if("music_player"==e)return $(".music_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),$(".music_player_dialog .flash_player").css({width:"100%",height:"100%"}),void 0;var t;t=window.top.CMP?window.top.CMP.get("movie_player"):CMP.get("movie_player");var a=function(e){var t='<object id="the_wmp_player" ',a=navigator.userAgent;return-1!=a.indexOf("MSIE")?t+='classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ':(-1!=a.indexOf("Firefox")||-1!=a.indexOf("Chrome")||-1!=a.indexOf("Opera")||-1!=a.indexOf("Safari"))&&(t+='type="application/x-ms-wmp" '),t+='width="100%" height="100%">',t+='<param name="URL" value="'+e+'">',t+='<param name="autoStart" value="true">',t+='<param name="autoSize" value="true">',t+='<param name="invokeURLs" value="false">',t+='<param name="playCount" value="100">',t+='<param name="Volume" value="100">',t+='<param name="defaultFrame" value="datawindow">',t+="</object>"};try{var i=t.item("src").toLowerCase();if(i.indexOf("wmv")>1||i.indexOf("mpg")>1||i.indexOf("avi")>1||i.indexOf("wvx")>1||i.indexOf("3gp")>1){$("div[id^='DIV_CMP_']").remove();var n=a(i);$(".movie_player_dialog .wmp_player").html(""),$(".movie_player_dialog .flash_player").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .wmp_player").html(n).css({width:"100%",height:"100%"})},300)}else $(".movie_player_dialog .wmp_player").html("").css({width:"0px",height:"0px"}),setTimeout(function(){$(".movie_player_dialog .flash_player").css({width:"100%",height:"100%"})},200)}catch(s){}};define("app/src/share_explorer/path",["../../common/pathOperate","../../tpl/fileinfo/file_info.html","../../tpl/fileinfo/path_info.html","../../tpl/fileinfo/path_info_more.html","../../tpl/share.html","../../tpl/app.html","../../common/pathOpen","../../common/CMPlayer"],function(e){var t=e("../../common/pathOperate"),a=e("../../common/pathOpen"),i=void 0;ui.pathOpen=a;var n=function(e,t,a){if(void 0!=e){if(e==G.this_path)return void 0!=t&&""!=t&&core.tips.tips(LNG.path_is_current,"info"),void 0;G.this_path=e.replace(/\\/g,"/"),G.this_path=e.replace(/\/+/g,"/"),"/"!=G.this_path.substr(G.this_path.length-1)&&(G.this_path+="/"),ui.f5_callback(function(){"function"==typeof a&&a()}),s.add()}},s=function(){var e=["/"],t=0,a=function(){return G.this_path==e[e.length-1]?(s(),void 0):(t!=e.length-1&&(e=e.slice(0,t)),e.push(G.this_path),t=e.length-1,s(),void 0)},i=function(){e.length-1>=t+1&&(t+=1,G.this_path=e[t],ui.f5(!0,!0),s())},n=function(){t-1>=0&&(t-=1,G.this_path=e[t],ui.f5(!0,!0),s())},s=function(){t==e.length-1?$("#history_next").addClass("active"):$("#history_next").removeClass("active"),0==t?$("#history_back").addClass("active"):$("#history_back").removeClass("active")};return{add:a,back:n,next:i}}(),o=function(e){void 0!=e&&("string"==typeof e&&(e=[e]),fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=$.inArray(a,e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView())},r=function(e){if(""!=e){if(e=e.toLowerCase(),void 0==i||G.this_path!=i.path||e!=i.key){var t=[];$(".fileContiner .file").each(function(){var a=fileLight.name($(this));a&&e==a.substring(0,e.length).toLowerCase()&&t.push(a)}),i={key:e,path:G.this_path,index:0,list:t}}0!=i.list.length&&(o(i.list[i.index++]),i.index==i.list.length&&(i.index=0))}},l=function(e){return""==e?(fileLight.clear(),void 0):(fileLight.clear(),$(".fileContiner .file").each(function(t){var a=fileLight.name($(this));-1!=a.toLowerCase().indexOf(e)&&$(Global.fileListAll).eq(t).addClass(Config.SelectClassName)}),fileLight.select(),fileLight.setInView(),void 0)},c=function(e){if(e){var t=[];return 0==Global.fileListSelect.length?t:(Global.fileListSelect.each(function(){var e=G.this_path+fileLight.name($(this)),a="folder"==fileLight.type($(this))?"folder":"file";t.push({path:e,type:a})}),t)}if(1!=Global.fileListSelectNum)return{path:"",type:""};var a=Global.fileListSelect,i=G.this_path+fileLight.name(a),n=fileLight.type(a);return{path:i,type:n}};return{history:s,openEditor:function(){a.openEditor(c().path)},openIE:function(){a.openIE(c().path)},open:function(e){if(0!=c().path.length){if(void 0!=e)return a.open(e),void 0;var t=c(),i=Global.fileListSelect;if(inArray(core.filetype.image,t.type))return"icon"==G.list_type||"desktop"==Config.pageApp?ui.picasa.play($(i).find(".ico")):ui.picasa.play($(i)),void 0;if("oexe"==t.type){var n=i.attr("data-app");t.path=json_decode(urlDecode(n))}a.open(t.path,t.type)}},show_file:function(){var e="./index.php?share/file&sid="+G.sid+"&user="+G.user+"&path="+urlEncode(c().path);window.open(e)},openProject:function(){core.explorerCode(c().path)},play:function(){if(!(1>Global.fileListSelectNum)){var e=[];Global.fileListSelect.each(function(){var t=fileLight.type($(this));if(inArray(core.filetype.music,t)||inArray(core.filetype.movie,t)){var a=core.path2url(G.this_path+fileLight.name($(this)));e.push(a)}}),a.play(e,"music")}},pathOperate:t,download:function(){var e=c(!0);1==e.length&&"file"==e[0].type?a.download(c().path):t.zipDownload(e)},search:function(){core.search("",c().path)},info:function(){t.info(c(!0))},list:n,setSearchByStr:l,setSelectByChar:r,setSelectByFilename:o}}),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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}});
\ No newline at end of file
diff --git a/static/js/app/src/share_index/main.js b/static/js/app/src/share_index/main.js
index 781472b..a95e506 100755
--- a/static/js/app/src/share_index/main.js
+++ b/static/js/app/src/share_index/main.js
@@ -1 +1 @@
-define("app/src/share_index/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../share_common/topbar","./fileShow","../edit/mode"],function(e){Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),topbar=e("../../share_common/topbar"),fileShow=e("./fileShow"),$(document).ready(function(){if($(".init_loading").fadeOut(450).addClass("pop_fadeout"),"undefined"!=typeof G){fileShow.init(),core.update("check_status");var e=function(){var e=window.location.href+"&password="+$(".form-control").val();$.get(e,function(e){1==e.code?window.location.reload():core.tips.tips(e)})};$(".share_login").click(e),$(".form-control").keyEnter(e)}})}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}}),define("app/src/share_index/fileShow",["../edit/mode"],function(e){var t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,a=G.app_host+"index.php?share/fileProxy&user="+G.user+"&sid="+G.sid,i=function(){if(G.share_info!==void 0){var e=core.pathExt(G.share_info.path);"file"!=G.share_info.type&&(a+="&path="+G.path,t+="&path="+G.path),"1"==G.share_info.not_download&&(t="javascript:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),topbar.init(),r(e)}else $(".share_info").addClass("hidden")},n=function(){var e=core.pathExt(G.share_info.path),a=$(".bindary_box");a.removeClass("hidden"),a.find(".name").html(G.share_info.name),a.find(".ico").addClass(e),a.find(".btn_download").attr("href",t);var i=date("Y/m/d h:i",G.share_info.mtime);a.find(".share_time").html(i),a.find(".size span").html(G.share_info.size)},s=function(e){for(var t=[],a=0;e.length>a;a++)t[a]=e.charCodeAt(a).toString(16);return"&#"+String.fromCharCode(120)+t.join(";&#"+String.fromCharCode(120))+";"},o=function(){var t=e("../edit/mode");$.get(a,function(e){var a=core.pathExt(G.share_info.path),i=t.get(a),n='<pre class="code">'+s(e)+"</pre>";$(".content_box").addClass("show_code").append(n);var o=ace.require("ace/ext/static_highlight");ace.require("ace/lib/dom"),o($(".code").get(0),{mode:"ace/mode/"+i,wrapMode:!0,theme:"ace/theme/github",startLineNumber:1,showGutter:1,trim:!0})})},r=function(e){if(inArray(core.filetype.text,e)||inArray(core.filetype.code,e))return o(),void 0;if("swf"==e){var t=core.createFlash(a,"","");return $(".content_box").addClass("show_swf").append(t),void 0}if("pdf"==e){if(Global.isIE)return n(),void 0;var t='<a href="'+a+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a>";return $(".content_box").attr("id","show_pdf").append(t),new PDFObject({url:a}).embed("show_pdf"),void 0}if(inArray(core.filetype.image,e)){var t='<img src="'+a+'"/>';return $(".content_box").addClass("show_image").append(t),void 0}if(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e)){var i="skins/music/manila.zip",s="music_player";inArray(core.filetype.movie,e)&&(i="skins/movie/webplayer.zip",s="movie_player");var r=G.app_host+a+"#name_"+G.share_info.path,l=G.static_path+"js/lib/cmp4/cmp.swf",c="url=&lists=&context_menu=2&auto_play=1&play_mode=1&name=kodExplorer&src="+urlEncode(r)+"&skin="+urlEncode(i)+"&label="+G.share_info.path,t=core.createFlash(l,c,s);return $(".content_box").addClass(s).append(t),void 0}if(inArray(core.filetype.doc,e)){var d=document.domain;if(""==G.office_server){if(0==d.search("localhost")||0==d.search("192.168.")||0==d.search("127.0.0"))return n(),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}a=G.office_server+urlEncode(a);var t='<iframe src="'+a+'" frameborder="0" class="show_office"></iframe>';return $(".frame-main").addClass("office_page").append(t),$(".content_box").addClass("hidden"),void 0}n()};return{init:i}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp","pch"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs","asp"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml","htc","lasso"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm","cgi"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash","bashrc","bash_profile"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","log"],textile:["textile"],smarty:["smarty","tpl"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs","vb"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","vsdisco","xaml","mml","xul","xbl","xib","storyboard","plist","csproj"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a,modeAll:function(){return objectKeys(i)}}});
\ No newline at end of file
+define("app/src/share_index/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html","../../share_common/topbar","./fileShow","../edit/mode"],function(e){Global={topbar_height:40,frameLeftWidth:200,treeSpaceWide:15,isIE:!-[1]},e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),topbar=e("../../share_common/topbar"),fileShow=e("./fileShow"),$(document).ready(function(){if($(".init_loading").fadeOut(450).addClass("pop_fadeout"),"undefined"!=typeof G){fileShow.init(),core.update("check_status");var e=function(){var e=window.location.href+"&password="+$(".form-control").val();$.get(e,function(e){1==e.code?window.location.reload():core.tips.tips(e)})};$(".share_login").click(e),$(".form-control").keyEnter(e)}})}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>"),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,a=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:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),$(".share_info_user").removeClass("hidden"),$(".btn_download").attr("href",e);var a=date("Y/m/d h:i",G.share_info.mtime);$(".topbar .time").html(a),"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(){i()})},i=function(){};return{init:a}}),define("app/src/share_index/fileShow",["../edit/mode"],function(e){var t="index.php?share/fileDownload&user="+G.user+"&sid="+G.sid,a="index.php?share/fileProxy&user="+G.user+"&sid="+G.sid,i=function(){if(G.share_info!==void 0){var e=core.pathExt(G.share_info.path);"file"!=G.share_info.type&&(a+="&path="+G.path,t+="&path="+G.path),"1"==G.share_info.not_download&&(t="javascript:core.tips.tips('"+LNG.share_not_download_tips+"',false);"),topbar.init(),r(e)}else $(".share_info").addClass("hidden")},n=function(){var e=core.pathExt(G.share_info.path),a=$(".bindary_box");a.removeClass("hidden"),a.find(".name").html(G.share_info.name),a.find(".ico").addClass(e),a.find(".btn_download").attr("href",t);var i=date("Y/m/d h:i",G.share_info.mtime);a.find(".share_time").html(i),a.find(".size span").html(G.share_info.size)},s=function(e){for(var t=[],a=0;e.length>a;a++)t[a]=e.charCodeAt(a).toString(16);return"&#"+String.fromCharCode(120)+t.join(";&#"+String.fromCharCode(120))+";"},o=function(){var t=e("../edit/mode");$.get(a,function(e){var a=core.pathExt(G.share_info.path),i=t.get(a),n='<pre class="code">'+s(e)+"</pre>";$(".content_box").addClass("show_code").append(n);var o=ace.require("ace/ext/static_highlight");ace.require("ace/lib/dom"),o($(".code").get(0),{mode:"ace/mode/"+i,wrapMode:!0,theme:"ace/theme/github",startLineNumber:1,showGutter:1,trim:!0})})},r=function(e){if(inArray(core.filetype.text,e)||inArray(core.filetype.code,e))return o(),void 0;if("swf"==e){var t=core.createFlash(a,"","");return $(".content_box").addClass("show_swf").append(t),void 0}if("pdf"==e){if(Global.isIE)return n(),void 0;var t='<a href="'+a+'" target="_blank" style="display:block;margin:0 auto;margin-top:80px;font-size:16px;text-align:center;">'+LNG.error+"   "+LNG.download+" PDF</a>";return $(".content_box").attr("id","show_pdf").append(t),new PDFObject({url:a}).embed("show_pdf"),void 0}if(inArray(core.filetype.image,e)){var t='<img src="'+a+'"/>';return $(".content_box").addClass("show_image").append(t),void 0}if(inArray(core.filetype.music,e)||inArray(core.filetype.movie,e)){var i="skins/music/manila.zip",s="music_player";inArray(core.filetype.movie,e)&&(i="skins/movie/webplayer.zip",s="movie_player");var r=G.app_host+a+"#name_"+G.share_info.path,l=G.static_path+"js/lib/cmp4/cmp.swf",c="url=&lists=&context_menu=2&auto_play=1&play_mode=1&name=kodExplorer&src="+urlEncode(r)+"&skin="+urlEncode(i)+"&label="+G.share_info.path,t=core.createFlash(l,c,s);return $(".content_box").addClass(s).append(t),void 0}if(inArray(core.filetype.doc,e)){var d=document.domain;if(""==G.office_server){if(0==d.search("localhost")||0==d.search("192.168.")||0==d.search("127.0.0"))return n(),void 0;G.office_server="https://view.officeapps.live.com/op/view.aspx?src="}a=G.office_server+urlEncode(G.app_host+a);var t='<iframe src="'+a+'" frameborder="0" class="show_office"></iframe>';return $(".frame-main").addClass("office_page").append(t),$(".content_box").addClass("hidden"),void 0}n()};return{init:i}}),define("app/src/edit/mode",[],function(){function e(){for(var e in i)for(var t=0;i[e].length>t;t++)a[i[e][t]]=e}function t(e){return a[e]}var a={},i={abap:["abap"],actionscript:["as"],ada:["ada","adb"],apache_conf:["htaccess","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd"],asciidoc:["asciidoc"],assembly_x86:["asm"],autohotkey:["ahk"],batchfile:["bat","cmd"],c9search:["c9search_results"],c_cpp:["cpp","c","cc","cxx","h","hh","hpp","pch"],clojure:["clj"],cobol:["cbl","cob"],coffee:["coffee","cf","cson","cakefile"],coldfusion:["cfm"],csharp:["cs","asp"],css:["css"],curly:["curly"],d:["d","di"],dart:["dart"],diff:["diff","patch"],dot:["dot"],erlang:["erl","hrl"],ejs:["ejs"],forth:["frt","fs","ldr"],ftl:["ftl"],glsl:["glsl","frag","vert"],golang:["go"],groovy:["groovy"],haml:["haml"],handlebars:["hbs","handlebars","mustache"],haskell:["hs"],haxe:["hx"],html:["html","htm","xhtml","cshtml","htc","lasso"],html_ruby:["erb","rhtml"],ini:["ini","conf","cfg","prefs"],jack:["jack"],jade:["jade"],java:["java"],javascript:["js","jsm"],json:["json","oexe"],jsoniq:["jq"],jsp:["jsp"],jsx:["jsx"],julia:["jl"],latex:["tex","latex","ltx","bib"],less:["less"],liquid:["liquid"],lisp:["lisp"],livescript:["ls"],logiql:["logic","lql"],lsl:["lsl"],lua:["lua"],luapage:["lp"],lucene:["lucene"],makefile:["makefile","gnumakefile","makefile","ocamlmakefile","make"],matlab:["matlab"],markdown:["md","markdown"],mel:["mel"],mysql:["mysql"],mushcode:["mc","mush"],nix:["nix"],objectivec:["m","mm"],ocaml:["ml","mli"],pascal:["pas","p"],perl:["pl","pm","cgi"],pgsql:["pgsql"],php:["php","phtml"],powershell:["ps1"],prolog:["plg","prolog"],properties:["properties"],protobuf:["proto"],python:["py"],r:["r"],rdoc:["rd"],rhtml:["rhtml"],ruby:["rb","ru","gemspec","rake","guardfile","rakefile","gemfile"],rust:["rs"],sass:["sass"],scad:["scad"],scala:["scala"],scheme:["scm","rkt"],scss:["scss"],sh:["sh","bash","bashrc","bash_profile"],sjs:["sjs"],space:["space"],snippets:["snippets"],soy_template:["soy"],sql:["sql"],stylus:["styl","stylus"],svg:["svg"],tcl:["tcl"],tex:["tex"],text:["txt","log"],textile:["textile"],smarty:["smarty","tpl"],toml:["toml"],twig:["twig"],typescript:["ts","typescript","str"],vbscript:["vbs","vb"],velocity:["vm"],verilog:["v","vh","sv","svh"],xml:["xml","rdf","rss","wsdl","xslt","atom","mathml","vsdisco","xaml","mml","xul","xbl","xib","storyboard","plist","csproj"],xquery:["xq"],yaml:["yaml","yml"]};return e(),{get:t,modes:a,modeAll:function(){return objectKeys(i)}}});
\ No newline at end of file
diff --git a/static/js/app/src/user/main.js b/static/js/app/src/user/main.js
index bc29af1..db2b7b6 100755
--- a/static/js/app/src/user/main.js
+++ b/static/js/app/src/user/main.js
@@ -1 +1 @@
-define("app/src/user/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),$(document).ready(function(){core.update("check_status");var e=function(){var e=$("#username").val(),t=$("#password").val(),a=$("input[name=rember_password]").attr("checked")?1:0,i="./index.php?user/loginSubmit&name="+urlEncode(e)+"&check_code="+$("input.check_code").val()+"&password="+urlEncode(t)+"&rember_password="+a;window.location.href=i};$("#username").focus(),$("#submit").bind("click",e),$("#username,#password,input.check_code").keyEnter(e)})}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t&&$(t.target).is("textarea")||$(t.target).is("input")||0!=$(t.target).parents(".topbar").length||0!=$(t.target).parents(".edit_body").length||0!=$(t.target).parents(".aui_state_focus").length?!0:!1},pathThis:function(e){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{loading:function(e){Tips.loading(e,"info",Global.topbar_height)},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,Global.topbar_height):Tips.close(e,t,Global.topbar_height)},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,Global.topbar_height):Tips.tips(e,t,Global.topbar_height)}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>{{LNG.kod_name}} v{{G.version}}</div>\n		<div class=\'info\'>——{{LNG.kod_name_desc}}</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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>");
\ No newline at end of file
+define("app/src/user/main",["lib/jquery-lib","lib/util","lib/artDialog/jquery-artDialog","../../common/core","../../tpl/copyright.html","../../tpl/search.html","../../tpl/search_list.html","../../tpl/upload.html"],function(e){e("lib/jquery-lib"),e("lib/util"),e("lib/artDialog/jquery-artDialog"),core=e("../../common/core"),$(document).ready(function(){core.update("check_status");var e=function(){var e=$("#username").val(),t=$("#password").val(),a=$("input[name=rember_password]").attr("checked")?1:0,i="./index.php?user/loginSubmit&name="+urlEncode(e)+"&check_code="+$("input.check_code").val()+"&password="+urlEncode(t)+"&rember_password="+a;window.location.href=i};$("#username").focus(),$("#submit").bind("click",e),$("#username,#password,input.check_code").keyEnter(e)})}),define("app/common/core",[],function(require,exports){return{filetype:{image:["jpg","jpeg","png","bmp","gif","ico"],music:["mp3","wma","wav","mid","m4a","aac","midi"],movie:["avi","flv","f4v","wmv","3gp","mp4","wmv","asf","m4v","mov","mpg"],doc:["doc","docx","docm","xls","xlsx","xlsb","xlsm","ppt","pptx","pptm"],text:["oexe","inc","inf","csv","log","asc","tsv"],code:["abap","abc","as","ada","adb","htgroups","htpasswd","conf","htaccess","htgroups","htpasswd","asciidoc","asm","ahk","bat","cmd","c9search_results","cpp","c","cc","cxx","h","hh","hpp","cirru","cr","clj","cljs","CBL","COB","coffee","cf","cson","Cakefile","cfm","cs","css","curly","d","di","dart","diff","patch","Dockerfile","dot","dummy","dummy","e","ejs","ex","exs","elm","erl","hrl","frt","fs","ldr","ftl","gcode","feature",".gitignore","glsl","frag","vert","go","groovy","haml","hbs","handlebars","tpl","mustache","hs","hx","html","htm","xhtml","erb","rhtml","ini","cfg","prefs","io","jack","jade","java","js","jsm","json","jq","jsp","jsx","jl","tex","latex","ltx","bib","lean","hlean","less","liquid","lisp","ls","logic","lql","lsl","lua","lp","lucene","Makefile","GNUmakefile","makefile","OCamlMakefile","make","md","markdown","mask","matlab","mel","mc","mush","mysql","nix","m","mm","ml","mli","pas","p","pl","pm","pgsql","php","phtml","ps1","praat","praatscript","psc","proc","plg","prolog","properties","proto","py","r","Rd","Rhtml","rb","ru","gemspec","rake","Guardfile","Rakefile","Gemfile","rs","sass","scad","scala","scm","rkt","scss","sh","bash",".bashrc","sjs","smarty","tpl","snippets","soy","space","sql","styl","stylus","svg","tcl","tex","txt","textile","toml","twig","ts","typescript","str","vala","vbs","vb","vm","v","vh","sv","svh","vhd","vhdl","xml","rdf","rss","wsdl","xslt","atom","mathml","mml","xul","xbl","xaml","xq","yaml","yml","htm","xib","storyboard","plist","csproj"],bindary:["pdf","bin","zip","swf","gzip","rar","arj","tar","gz","cab","tbz","tbz2","lzh","uue","bz2","ace","exe","so","dll","chm","rtf","odp","odt","pages","class","psd","ttf","fla","7z","dmg","iso","dat","ipa"]},ico:function(e){var t=G.static_path+"images/file_16/",a=["folder","file","edit","search","up","setting","appStore","error","info","mp3","flv","pdf","doc","xls","ppt","html","swf"],i=$.inArray(e,a);return-1==i?t+"file.png":t+e+".png"},contextmenu:function(e){try{rightMenu.hidden()}catch(t){}var t=e||window.event;return t?t&&$(t.target).is("textarea")||$(t.target).is("input")||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){e=e.replace(/\\/g,"/");var t=e.split("/"),a=t[t.length-1];if(""==a&&(a=t[t.length-2]),0==a.search("fileProxy")){a=urlDecode(a.substr(a.search("&path=")));var t=a.split("/");a=t[t.length-1],""==a&&(a=t[t.length-2])}return a},pathFather:function(e){e=e.replace(/\\/g,"/");var t=e.lastIndexOf("/");return e.substr(0,t+1)},pathExt:function(e){e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/");var t=e.lastIndexOf(".");return e=e.substr(t+1),e.toLowerCase()},path2url:function(e){if("http"==e.substr(0,4))return e;if(e=e.replace(/\\/g,"/"),e=e.replace(/\/+/g,"/"),e=e.replace(/\/\.*\//g,"/"),G.is_root&&e.substring(0,G.web_root.length)==G.web_root)return G.web_host+e.replace(G.web_root,"");var t=G.app_host+"/index.php?explorer/fileProxy&path="+urlEncode(e);return G.share_page!==void 0&&(t=G.app_host+"/index.php?share/fileProxy&user="+G.user+"&sid="+G.sid+"&path="+urlEncode(e)),t},authCheck:function(e,t){return G.is_root?!0:AUTH.hasOwnProperty(e)?AUTH[e]?!0:(void 0==t&&(t=LNG.no_permission),core.tips.tips(t,!1),!1):!0},ajaxError:function(e){core.tips.close(LNG.system_error,!1);var t=e.responseText,a='<div class="ajaxError">'+t+"</div>",i=$.dialog.list.ajaxErrorDialog;return"<!--user login-->"==t.substr(0,17)?(FrameCall.goRefresh(),void 0):(i?i.content(a):$.dialog({id:"ajaxErrorDialog",padding:0,fixed:!0,resize:!0,ico:core.ico("error"),title:"ajax error",content:a}),void 0)},file_get:function(e,t){var a="./index.php?editor/fileGet&filename="+urlEncode2(e);G.share_page!==void 0&&(a="./index.php?share/fileGet&user="+G.user+"&sid="+G.sid+"&filename="+urlEncode2(e)),$.ajax({url:a,dataType:"json",beforeSend:function(){core.tips.loading(LNG.loading)},error:core.ajaxError,success:function(e){core.tips.close(LNG.success),"function"==typeof t&&t(e.data.content)}})},setting:function(e){void 0==e&&(e=G.is_root?"system":"user"),void 0==window.top.frames.Opensetting_mode?$.dialog.open("./index.php?setting#"+e,{id:"setting_mode",fixed:!0,ico:core.ico("setting"),resize:!0,title:LNG.setting,width:960,height:580}):($.dialog.list.setting_mode.display(!0),FrameCall.top("Opensetting_mode","Setting.setGoto",'"'+e+'"'))},copyright:function(){var e=require("../tpl/copyright.html"),t=template.compile(e),a=t({LNG:LNG,G:G});$.dialog({id:"copyright_dialog",bottom:0,right:0,simple:!0,resize:!1,title:LNG.about+" kod",width:425,padding:"0",fixed:!0,content:a})},appStore:function(){$.dialog.open("./index.php?app",{id:"app_store",fixed:!0,ico:core.ico("appStore"),resize:!0,title:LNG.app_store,width:900,height:550})},openIE:function(e){$.dialog.open(e,{fixed:!0,resize:!0,title:LNG.app_store,width:"80%",height:"70%"})},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/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)),$.dialog.open(app.content,{title:app.name,fixed:!0,ico:icon,resize:app.resize,simple:app.simple,title:app.name.replace(".oexe",""),width:app.width,height:app.height})}else{var exec=app.content;eval("{"+exec+"}")}},update:function(e){var t=base64_decode("aHR0cDovL3N0YXRpYy5rYWxjYWRkbGUuY29tL3VwZGF0ZS9tYWluLmpz")+"?a="+UUID();require.async(t,function(t){try{t.todo(e)}catch(a){}})},explorer:function(e,t){void 0==e&&(e=""),void 0==t&&(t=core.pathThis(e));var a="./index.php?/explorer&type=iframe&path="+e;G.share_page!==void 0&&(a="./index.php?share/folder&type=iframe&user="+G.user+"&sid="+G.sid+"&path="+e),$.dialog.open(a,{resize:!0,fixed:!0,ico:core.ico("folder"),title:t,width:880,height:550})},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),$.dialog.open(t,{resize:!0,fixed:!0,ico:core.ico("folder"),title:core.pathThis(e),width:"80%",height:"70%"})},setSkin_finished:function(){var e=$(".setSkin_finished").attr("src");e&&($("#link_css_list").attr("href",e),$(".setSkin_finished").remove())},setSkin:function(e,t){var a=G.static_path+"style/skin/"+e+t;$("body").append('<img src="'+a+'" onload="core.setSkin_finished();" onerror="core.setSkin_finished();" class="setSkin_finished">')},editorFull:function(){var e=$("iframe[name=OpenopenEditor]");e.toggleClass("frame_fullscreen")},language:function(e){Cookie.set("kod_user_language",e,8760),window.location.reload()},tips:{topHeight:function(){return"undefined"!=typeof Global&&Global.topbar_height?Global.topbar_height:0},loading:function(e){Tips.loading(e,"info",core.tips.topHeight())},close:function(e,t){"object"==typeof e?Tips.close(e.data,e.code,core.tips.topHeight()):Tips.close(e,t,core.tips.topHeight())},tips:function(e,t){"object"==typeof e?Tips.tips(e.data,e.code,core.tips.topHeight()):Tips.tips(e,t,core.tips.topHeight())}},fullScreen:function(){"true"==$("body").attr("fullScreen")&&core.exitfullScreen(),$("body").attr("fullScreen","true");var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},exitfullScreen:function(){$("body").attr("fullScreen","false"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},createFlash:function(e,t,a){var i='<object type="application/x-shockwave-flash" id="'+a+'" data="'+e+'" width="100%" height="100%">'+'<param name="movie" value="'+e+'"/>'+'<param name="allowfullscreen" value="true" />'+'<param name="allowscriptaccess" value="always" />'+'<param name="flashvars" value="'+t+'" />'+'<param name="wmode" value="transparent" />'+"</object>";return i},search:function(e,t){var a,i,n=require("../tpl/search.html"),s=require("../tpl/search_list.html"),o=function(){var s=template.compile(n);0==$(".dialog_do_search").length?(l(),i={search:e,path:t,is_content:void 0,is_case:void 0,ext:"",LNG:LNG},a=$.dialog({id:"dialog_do_search",padding:0,fixed:!0,ico:core.ico("search"),resize:!0,title:LNG.search,width:450,content:s(i)}),c(i),$("#search_ext").tooltip({placement:"bottom",html:!0}),$("#search_path").tooltip({placement:"bottom",html:!0,title:function(){return $("#search_path").val()}})):($("#search_value").val(e),$("#search_path").val(t),r(),$.dialog.list.dialog_do_search.display(!0))},r=function(){i={search:$("#search_value").val(),path:$("#search_path").val(),is_content:$("#search_is_content").attr("checked"),is_case:$("#search_is_case").attr("checked"),ext:$("#search_ext").val()},c(i)},l=function(){$("#search_value").die("keyup").live("keyup",function(){ui.path.setSearchByStr($(this).val())}),$("#search_value,#search_ext,#search_path").keyEnter(r),$(".search_header a.button").die("click").live("click",r),$(".search_result .list .name").die("click").live("click",function(){var e=$(this).find("a").html(),t=$(this).parent().find(".path a").html()+e;$(this).parent().hasClass("file")?ui.pathOpen.open(t):"explorer"==Config.pageApp?ui.path.list(t+"/","tips"):core.explorer(t+"/")}),$(".search_result .list .path a").die("click").live("click",function(){var e=$(this).html();"explorer"==Config.pageApp?ui.path.list(e,"tips"):core.explorer(e)})},c=function(e){var t=150;$("#search_value").focus(),$(".search_result .list").remove();var a=$(".search_result .message td");if(!e.search||!e.path)return a.hide().html(LNG.search_info).fadeIn(t),void 0;if(1>=e.search.length)return a.hide().html("too short!").fadeIn(t),void 0;var i="index.php?explorer/search";G.share_page!==void 0&&(i="index.php?share/search&user="+G.user+"&sid="+G.sid),$.ajax({url:i,dataType:"json",type:"POST",data:e,beforeSend:function(){a.hide().html(LNG.searching+'<img src="'+G.static_path+'images/loading.gif">').fadeIn(t)},error:core.ajaxError,success:function(e){if(!e.code)return a.hide().html(e.data).fadeIn(t),void 0;if(0==e.data.filelist.length&&0==e.data.folderlist.length)return a.hide().html(LNG.search_null).fadeIn(t),void 0;a.hide();var i=template.compile(s);e.data.LNG=LNG,$(i(e.data)).insertAfter(".search_result .message").fadeIn(t)}})};o()},server_dwonload:function(e){core.upload_check("explorer:serverDownload");var t=$(".download_box"),a=t.find("#download_list"),i=t.find("input").val();if(t.find("input").val(""),!i||"http"!=i.substr(0,4))return core.tips.tips("url false!",!1),void 0;var n=UUID(),s='<div id="'+n+'" class="item">'+'<div class="info"><span class="title" tytle="'+i+'">'+core.pathThis(i)+"</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?$(s).insertBefore(a.find(".item:eq(0)")):a.append(s);var o,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(){$.get("./index.php?explorer/serverDownload&type=remove&uuid="+n),$(this).parent().parent().slideUp(function(){$(this).remove(),ui.f5()})}),$.ajax({url:"./index.php?explorer/serverDownload&type=download&save_path="+e+"&url="+urlEncode2(i)+"&uuid="+n,dataType:"json",error:function(e,t,a){core.ajaxError(e,t,a),clearInterval(o),o=!1,clearTimeout(r),o=!1,u.parent().remove(),p.addClass("error").text(LNG.download_error)},success:function(e){clearInterval(o),o=!1,clearTimeout(r),o=!1,e.code?(ui.f5_callback(function(){ui.path.setSelectByFilename(e.info)}),p.text(LNG.download_success),$("#"+n+" .info .title").html(e.info)):p.addClass("error").text(LNG.error),u.parent().remove()}});var h=function(){$.ajax({url:"./index.php?explorer/serverDownload&type=percent&uuid="+n,dataType:"json",success:function(e){var t="",a=e.data;if(o){if(!e.code)return p.text(LNG.loading),void 0;if(a){if(a.size=parseFloat(a.size),a.time=parseFloat(a.time),l){var i=(a.size-l.size)/(a.time-l.time);if(c>.2*i){var n=c;c=i,i=n}else c=i;t=core.file_size(i)+"/s"}if(0==a.length)d.find(".progress-bar").css("width","100%").text(LNG.loading);else{var s=100*(a.size/a.length);d.find(".progress-bar").css("width",s+"%"),p.text(parseInt(s)+"%("+t+")")}d.find(".size").text(core.file_size(a.length)),l=a}}}})};r=setTimeout(function(){h(),o=setInterval(function(){h()},1e3)},100)},file_size:function(e){if(0==e)return"0B";e=parseFloat(e);var t={GB:1073741824,MB:1048576,KB:1024,"B ":0};for(var a in t)if(e>=t[a])return(e/t[a]).toFixed(1)+a;return"0B"},upload_check:function(e){return void 0==e&&(e="explorer:fileUpload"),!G.is_root&&AUTH.hasOwnProperty(e)&&1!=AUTH[e]?(core.tips.tips(LNG.no_permission,!1),void 0):"*recycle*/"==G.this_path||"*share*/"==G.this_path||"*share*/"==G.this_path||G.json_data&&"writeable"!=G.json_data.path_type?(core.tips.tips(LNG.no_permission_write,!1),!1):!0},upload:function(){G.upload_path=G.this_path;var e=urlDecode(G.upload_path);if(uploader.option("server","index.php?explorer/fileUpload&path="+urlEncode(G.upload_path)),30>=e.length?e:"..."+e.substr(e.length-30),0!=$(".dialog_file_upload").length)return $.dialog.list.dialog_file_upload.display(!0),void 0;var t=require("../tpl/upload.html"),a=template.compile(t),i=WebUploader.Base.formatSize(G.upload_max);$.dialog({padding:5,resize:!0,ico:core.ico("up"),id:"dialog_file_upload",fixed:!0,title:LNG.upload_muti,content:a({LNG:LNG,maxsize:i}),close:function(){$.each(uploader.getFiles(),function(e,t){uploader.skipFile(t),uploader.removeFile(t)})}}),$(".file_upload .tips").tooltip({placement:"bottom"}),$(".file_upload .top_nav a.menu").unbind("click").bind("click",function(){$(this).hasClass("tab_upload")?($(".file_upload .tab_upload").addClass("this"),$(".file_upload .tab_download").removeClass("this"),$(".file_upload .upload_box").removeClass("hidden"),$(".file_upload .download_box").addClass("hidden")):($(".file_upload .tab_upload").removeClass("this"),$(".file_upload .tab_download").addClass("this"),$(".file_upload .upload_box").addClass("hidden"),$(".file_upload .download_box").removeClass("hidden"))}),$(".file_upload .download_box button").unbind("click").bind("click",function(){core.server_dwonload(G.upload_path)}),uploader.addButton({id:"#picker"})},upload_init:function(){var e="#thelist",t=!0;$.browser.msie&&(t=!1);var a=10485760;a>=G.upload_max&&(a=.8*G.upload_max),uploader=WebUploader.create({swf:G.static_path+"js/lib/webuploader/Uploader.swf",dnd:"body",threads:2,compress:!1,resize:!1,prepareNextFile:!0,duplicate:!0,chunked:t,chunkRetry:3,chunkSize:a}),$("#uploader .success").die("click").live("click",function(){var e=$(this).find("span.title").attr("title");"explorer"==Config.pageApp?ui.path.list(core.pathFather(e),"tips",function(){ui.path.setSelectByFilename(core.pathThis(e))}):core.explorer(core.pathFather(e))}),$("#uploader .open").die("click").live("click",function(e){var t=$(this).find("span.title").attr("title");ui.pathOpen.open(t),stopPP(e)}),$(".upload_box_clear").die("click").live("click",function(){$("#thelist .success,#thelist .error").each(function(){$(this).slideUp(300,function(){$(this).remove()})})}),$(".upload_box_setting").die("click").live("click",function(){$(".upload_box_config").toggleClass("hidden")}),$("#uploader .remove").die("click").live("click",function(e){var t=$(this).parent().parent().attr("id");uploader.skipFile(t),uploader.removeFile(t,!0),$(this).parent().parent().slideUp(function(){$(this).remove()}),stopPP(e)});var i=0,n=0,s="0B/s",o=function(e,t){var a=e.size*t,i=3;e.speed===void 0?e.speed=[[time()-500,0],[time(),a]]:i>=e.speed.length?e.speed.push([time(),a]):(e.speed=e.speed.slice(1,i),e.speed.push([time(),a]));var n=e.speed[e.speed.length-1],o=e.speed[0],r=(n[1]-o[1])/((n[0]-o[0])/1e3);return r=core.file_size(r)+"/s",s=r,r},r=[];uploader.on("uploadBeforeSend",function(e,t){var a=urlEncode(e.file.fullPath);(void 0==a||"undefined"==a)&&(a=""),t.fullPath=a}).on("fileQueued",function(t){if(!core.upload_check())return uploader.skipFile(t),uploader.removeFile(t),void 0;var a,n=$(e),a=t.fullPath;t.finished=!1,(void 0==a||"undefined"==a)&&(a=t.name),i++,$(e).find(".item").length>0&&(n=$(e).find(".item:eq(0)"));var s='<div id="'+t.id+'" class="item"><div class="info">'+'<span class="title" title="'+G.upload_path+a+'">'+core.pathThis(a)+"</span>"+'<span class="size">'+core.file_size(t.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>';$(e).find(".item").length>0?$(s).insertBefore($(e).find(".item:eq(0)")):$(e).append(s),uploader.upload()}).on("uploadProgress",function(e,t){$(".dialog_file_upload .aui_title").text(LNG.uploading+": "+n+"/"+i+" ("+s+")");var a=o(e,t),r=$("#"+e.id),l=r.find(".progress .progress-bar");l.length||(l=$('<div class="progress progress-striped active"><div class="progress-bar" role="progressbar" style="width: 0%"></div></div>').appendTo(r).find(".progress-bar")),r.find(".state").text(parseInt(100*t)+"%("+a+")"),l.css("width",100*t+"%")}).on("uploadAccept",function(e,t){e.file.serverData=t;try{r.push(core.pathThis(t.info))}catch(a){}}).on("uploadSuccess",function(e){var t=36*$("#"+e.id).index(".item");$("#uploader").scrollTop(t),n++;var a=e.serverData;if(a.code?($("#"+e.id).addClass("success"),$("#"+e.id).find(".state").text(a.data),$("#"+e.id).find(".remove").removeClass("icon-remove").addClass("icon-ok").addClass("open").removeClass("remove")):($("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(a.data).attr("title",a.data)),uploader.removeFile(e),$("#"+e.id).find(".progress").fadeOut(),!e.fullPath){var i=r;ui.f5_callback(function(){ui.path.setSelectByFilename(i)})}}).on("uploadError",function(e,t){n++,$("#"+e.id).find(".progress").fadeOut(),$("#"+e.id).find(".state").addClass("error"),$("#"+e.id).find(".state").text(LNG.upload_error+"("+t+")")}).on("uploadFinished",function(){$(".dialog_file_upload .aui_title").text(LNG.upload_success+": "+n+"/"+i),i=0,n=0,uploader.reset(),"explorer"==Config.pageApp&&ui.tree.checkIfChange(G.this_path);var e=r;ui.f5_callback(function(){ui.path.setSelectByFilename(e),r=[]})}).on("error",function(e){core.tips.tips(e,!1)});var l;inState=!1,dragOver=function(){0==inState&&(inState=!0,MaskView.tips(LNG.upload_drag_tips)),l&&window.clearTimeout(l)},dragLeave=function(e){stopPP(e),l&&window.clearTimeout(l),l=window.setTimeout(function(){inState=!1,MaskView.close()},100)},dragDrop=function(e){try{if(e=e.originalEvent||e,core.upload_check()){var t=e.dataTransfer.getData("text/plain");t&&"http"==t.substring(0,4)?ui.pathOperate.appAddURL(t):core.upload()}stopPP(e)}catch(e){}inState&&(inState=!1,MaskView.close())}}}}),define("app/tpl/copyright.html",[],'<div class="copyright_dialog_content">\n	<div class="title">\n		<div class="logo"><i class="icon-cloud"></i>KodExplorer 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>'),define("app/tpl/search.html",[],"<div class='do_search'>\n    <div class='search_header'>\n       <div class='s_br'>\n            <input type='text' id='search_value' value='{{search}}'/><a class='right button icon-search'></a>\n            <div style='float:right'>{{LNG.path}}:<input type='text' id='search_path' value='{{path}}'/></div>\n        </div>\n       <div class='s_br'>\n            <input type='checkbox' id='search_is_case' {{if is_case}}checked='true'{{/if}}/>\n            <label for='search_is_case'>{{LNG.search_uplow}}</label>\n            <input type='checkbox' id='search_is_content' {{if is_content}}checked='true'{{/if}}/>\n            <label for='search_is_content'>{{LNG.search_content}}</label>\n            <div style='float:right'>{{LNG.file_type}}:<input type='text' id='search_ext' value='{{ext}}' title='{{LNG.search_ext_tips}}'/></div>\n        </div>\n    </div>\n    <div class='search_result'>\n        <table border='0' cellspacing='0' cellpadding='0'>\n            <tr class='search_title'>\n               <td class='name'>{{LNG.name}}</td>\n               <td class='type'>{{LNG.type}}</td>\n               <td class='size'>{{LNG.size}}</td>\n               <td class='path'>{{LNG.path}}</td>\n            </tr>\n            <tr class='message'><td colspan='4'></td></tr>\n        </table>\n    </div>\n</div>\n\n"),define("app/tpl/search_list.html",[],"{{each folderlist as v i}}\n    <tr class='list folder' data-path='{{v.path}}{{v.name}}' data-type='folder' data-size='0'>\n        <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n        <td class='type'>{{LNG.folder}}</td>\n        <td class='size'>0</td>\n        <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n    </tr>\n{{/each}}\n{{each filelist as v i}}\n<tr class='list file'\n    data-path='{{v.path}}{{v.name}}' \n    data-type='{{v.ext}}' \n    data-size='{{v.size}}'>\n    <td class='name'><a href='javascript:void(0);' title='{{LNG.open}}{{v.name}}'>{{v.name}}</a></td>\n    <td class='type'>{{v.ext}}</td>\n    <td class='size'>{{v.size_friendly}}</td>\n    <td class='path'><a href='javascript:void(0);' title='{{LNG.goto}}{{v.path}}'>{{v.path}}</a></td>\n</tr>\n{{/each}}"),define("app/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 id='picker'>{{LNG.upload_select}}</div>\n            <div class=\"upload_box_tips\">\n            <a href=\"javascript:void(0);\" class=\"upload_box_clear\">{{LNG.upload_clear}}</a> \n            <!-- \n            | <a href=\"javascript:void(0);\" class=\"upload_box_setting\">\n            {{LNG.upload_setting}}<b class=\"caret\"></b></a> \n            -->\n            </div>\n            <div style='clear:both'></div>\n        </div>\n\n        <div class=\"upload_box_config hidden\">\n            <i>{{LNG.upload_tips}}</i>\n            <div class=\"upload_check_box\">\n                <b>{{LNG.upload_exist}}</b>\n                <label><input type=\"radio\" name=\"existing\" value=\"rename\" checked=\"checked\">{{LNG.upload_exist_rename}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"replace\">{{LNG.upload_exist_replace}}</label>\n                <label><input type=\"radio\" name=\"existing\" value=\"skip\">{{LNG.upload_exist_skip}}</label>\n            </div>\n        </div>\n        <div id='uploader' class='wu-example'>\n            <div id='thelist' 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        <button class='btn btn-default btn-sm' type='button'>{{LNG.download}}</button>\n        </div>\n        <div style='clear:both'></div>\n        <div id='downloader'>\n            <div id='download_list' class='uploader-list'></div>\n        </div>\n    </div>\n</div>");
\ No newline at end of file
diff --git a/static/js/lib/util.js b/static/js/lib/util.js
index 9c8ad27..1c7895c 100755
--- a/static/js/lib/util.js
+++ b/static/js/lib/util.js
@@ -302,6 +302,15 @@ var objectValues = function(obj){
     return values;
 }
 
+var $sizeInt = function($obj){
+	var str = $obj+'';
+	var theSize = parseInt(str.replace('px',''));
+	if (isNaN(theSize)) {
+		return 0;
+	}else{
+		return theSize;
+	}
+}
 
 //通用遮罩层
 var MaskView =  (function(){
diff --git a/static/style/skin/default/app_code_edit.css b/static/style/skin/default/app_code_edit.css
index 5a8468f..bd1073f 100755
--- a/static/style/skin/default/app_code_edit.css
+++ b/static/style/skin/default/app_code_edit.css
@@ -561,7 +561,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/default/app_explorer.css b/static/style/skin/default/app_explorer.css
index a4c3126..c79b541 100755
--- a/static/style/skin/default/app_explorer.css
+++ b/static/style/skin/default/app_explorer.css
@@ -608,3 +608,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #41bbec; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/app_code_edit.css b/static/style/skin/metro/app_code_edit.css
index d9fb231..60dcfbc 100755
--- a/static/style/skin/metro/app_code_edit.css
+++ b/static/style/skin/metro/app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/app_explorer.css b/static/style/skin/metro/app_explorer.css
index f0d05cb..556755d 100755
--- a/static/style/skin/metro/app_explorer.css
+++ b/static/style/skin/metro/app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #5579BA; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/blue_app_code_edit.css b/static/style/skin/metro/blue_app_code_edit.css
index 89c4d63..b161af6 100755
--- a/static/style/skin/metro/blue_app_code_edit.css
+++ b/static/style/skin/metro/blue_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/blue_app_explorer.css b/static/style/skin/metro/blue_app_explorer.css
index 14b49dd..acc7f0a 100755
--- a/static/style/skin/metro/blue_app_explorer.css
+++ b/static/style/skin/metro/blue_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #5db2ff; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/green_app_code_edit.css b/static/style/skin/metro/green_app_code_edit.css
index 8010511..1572dce 100755
--- a/static/style/skin/metro/green_app_code_edit.css
+++ b/static/style/skin/metro/green_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/green_app_explorer.css b/static/style/skin/metro/green_app_explorer.css
index 658a3ce..6d99a76 100755
--- a/static/style/skin/metro/green_app_explorer.css
+++ b/static/style/skin/metro/green_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #008a17; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/grey_app_code_edit.css b/static/style/skin/metro/grey_app_code_edit.css
index eb8c54f..59397ad 100755
--- a/static/style/skin/metro/grey_app_code_edit.css
+++ b/static/style/skin/metro/grey_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/grey_app_explorer.css b/static/style/skin/metro/grey_app_explorer.css
index be7ec22..491265f 100755
--- a/static/style/skin/metro/grey_app_explorer.css
+++ b/static/style/skin/metro/grey_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #444; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/leaf_app_code_edit.css b/static/style/skin/metro/leaf_app_code_edit.css
index 4367df9..59b1297 100755
--- a/static/style/skin/metro/leaf_app_code_edit.css
+++ b/static/style/skin/metro/leaf_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/leaf_app_explorer.css b/static/style/skin/metro/leaf_app_explorer.css
index 6e0197e..9dde072 100755
--- a/static/style/skin/metro/leaf_app_explorer.css
+++ b/static/style/skin/metro/leaf_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #03B3B2; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/orange_app_code_edit.css b/static/style/skin/metro/orange_app_code_edit.css
index 0bdcf61..f0ccece 100755
--- a/static/style/skin/metro/orange_app_code_edit.css
+++ b/static/style/skin/metro/orange_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/orange_app_explorer.css b/static/style/skin/metro/orange_app_explorer.css
index 093f975..9f7f769 100755
--- a/static/style/skin/metro/orange_app_explorer.css
+++ b/static/style/skin/metro/orange_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #FF8F32; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/pink_app_code_edit.css b/static/style/skin/metro/pink_app_code_edit.css
index 4a34aff..a7a9d25 100755
--- a/static/style/skin/metro/pink_app_code_edit.css
+++ b/static/style/skin/metro/pink_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/pink_app_explorer.css b/static/style/skin/metro/pink_app_explorer.css
index a73a8ef..22367c6 100755
--- a/static/style/skin/metro/pink_app_explorer.css
+++ b/static/style/skin/metro/pink_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #DC4FAD; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/metro/purple_app_code_edit.css b/static/style/skin/metro/purple_app_code_edit.css
index d65a8af..4972e37 100755
--- a/static/style/skin/metro/purple_app_code_edit.css
+++ b/static/style/skin/metro/purple_app_code_edit.css
@@ -554,7 +554,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/metro/purple_app_explorer.css b/static/style/skin/metro/purple_app_explorer.css
index b46a0e6..35b0414 100755
--- a/static/style/skin/metro/purple_app_explorer.css
+++ b/static/style/skin/metro/purple_app_explorer.css
@@ -609,3 +609,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #8D3CC4; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/static/style/skin/simple/app_code_edit.css b/static/style/skin/simple/app_code_edit.css
index 216f566..ac47d99 100755
--- a/static/style/skin/simple/app_code_edit.css
+++ b/static/style/skin/simple/app_code_edit.css
@@ -573,7 +573,7 @@ body div#ace_settingsmenu,body div#kbshortcutmenu { background-color: #000; opac
 .show_code .code { background: none; padding: 0px; margin: 0;}
 .show_code .code .ace_gutter { display: inline-block; width: 30px !important; padding: 0 10px;}
 .ace_editor { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;}
-.office_page { bottom: 2px;}
+.office_page { bottom: -18px;}
 .show_office { margin: 0; width: 100%; height: 100%; margin-top: -50px;}
 .show_swf { width: 80%; margin: 0 auto; padding-top: 30px; height: 90%;}
 .music_player { width: 320px; height: 400px; box-shadow: 0 10px 100px #444; margin-top: 12%;}
diff --git a/static/style/skin/simple/app_explorer.css b/static/style/skin/simple/app_explorer.css
index 6d3d203..28d2dd2 100755
--- a/static/style/skin/simple/app_explorer.css
+++ b/static/style/skin/simple/app_explorer.css
@@ -621,3 +621,4 @@ html { overflow-x: hidden; overflow-y: hidden;}
 .frame-main .frame-right .dropdown-menu { font-size: 13px;}
 .frame-main .frame-right .dropdown-menu a:hover,.frame-main .frame-right .dropdown-menu .this a { background: #63acff; color: #fff; filter: none;}
 .frame-main .frame-right .bodymain { position: absolute; zoom: 1; z-index: 0; top: 35px; bottom: 0; left: 0; overflow: auto; width: 100%; -khtml-user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;}
+.fileList_icon div.file { transition: all 0.2s ease 0s;}
diff --git a/template/common/navbar_share.html b/template/common/navbar_share.html
index e398944..f1505b2 100755
--- a/template/common/navbar_share.html
+++ b/template/common/navbar_share.html
@@ -21,16 +21,7 @@
 				<a type="button" class="btn btn-primary button_my_share" id="button_share" href="javascript:void(0);"><?php echo $L['share'];?></a> 
 				-->
 				<div class="btn-group">
-				  <a type="button" class="btn btn-primary btn_download" target="_blank" href=""><?php echo $L['download'];?></a>
-				  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
-				    <span class="caret"></span>
-				    <span class="sr-only">Toggle Dropdown</span>
-				  </button>
-				  <ul class="dropdown-menu  download_drop_menu pull-right" role="menu">
-				    <li><a href="javascript:void(0);" class="page_share button_my_share" id="button_share">
-				    	<?php echo $L['share'];?></a>
-				    </li>
-				  </ul>
+				 	<a type="button" class="btn btn-primary btn_download" target="_blank" href=""><?php echo $L['download'];?></a>
 				</div>
 			</div>
 			<div class="menu_group">
diff --git a/template/share/file.php b/template/share/file.php
index b33f6a8..bc21fa1 100755
--- a/template/share/file.php
+++ b/template/share/file.php
@@ -23,6 +23,7 @@
 	  -o-user-select: all;
 	  user-select: all;
 	}
+	.frame-main{bottom: 32px;}
 </style>
 
 <body>
@@ -36,13 +37,13 @@
 				<div class="size"><span></span><i class="share_time"></i></div>
 				<div class="btn-group">
 				  <a type="button" class="btn btn-primary btn_download" href=""><?php echo $L['download'];?></a>
-				  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
+				  <!-- <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
 				    <span class="caret"></span>
 				    <span class="sr-only">Toggle Dropdown</span>
 				  </button>
 				  <ul class="dropdown-menu" role="menu">
 				    <li><a href="#" class="page_share button_my_share" id="button_share"><?php echo $L['share'];?></a></li>
-				  </ul>
+				  </ul> -->
 				</div>
 				<div class="error_tips"><?php echo $L['share_error_show_tips'];?></div>
 			</div>
diff --git a/template/user/login.html b/template/user/login.html
index 990f666..8126c1c 100755
--- a/template/user/login.html
+++ b/template/user/login.html
@@ -6,7 +6,7 @@
 	<title><?php echo $L['kod_name'].$L['kod_power_by'];?></title>
 	<link href="<?php echo STATIC_PATH;?>images/favicon.ico" rel="Shortcut Icon" >
 	<link href="<?php echo STATIC_PATH;?>style/bootstrap.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet"/>
-	<link href=",/static/font-awesome/css/font-awesome.css" rel="stylesheet" >
+	<link href="./static/style/font-awesome/css/font-awesome.css" rel="stylesheet" >
 	<!-- 字体不能跨域问题 -->
 	<!--[if IE 7]>
 	<link rel="stylesheet" href="./static/style/font-awesome/css/font-awesome-ie7.css">