mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-01-21 00:26:49 +08:00
核心功能修复与优化
1. 网盘空间管理优化:
修复了删除网盘文件后,剩余空间未正确更新的问题,确保用户空间显示准确。
2. 机构用户导航体验提升:
优化了机构用户在使用中的导航栏返回逻辑,提升了用户在不同页面间跳转时的流畅性和一致性。
用户体验与界面改进
1. 登录页面样式优化:
解决了登录页面样式重复引用的问题,提升了页面加载速度和用户体验。
2. 移动端界面适配:
优化了移动端界面的头部名称居中显示,增强了在不同移动设备上的视觉一致性。
3. 卡片显示效果调整:
修改了卡片的显示效果,使信息展示更加美观和易于阅读。
性能与稳定性提升
1. JS代码压缩问题修复:
修复了压缩JS代码过程中导致的报错问题,确保了应用的稳定性和性能。
2. 压缩css、js代码优化前端性能
对前端的CSS和JS代码进行了压缩处理,减少了文件体积,加快了加载速度,从而提升了前端性能。
插件与系统升级
1. jstree插件升级:
升级了jstree插件版本,解决了在某些使用场景中无法选中节点的问题,提升了用户与树形结构交互的可靠性。
2. 应用市场UI优化:
对应用市场界面进行了UI优化,提升了应用展示的美观度和易用性,使用户能够更方便地查找和安装所需的应用。
1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
var _selectfile={};function getExtOpen(e,t){if("folder"===e.type||"user"===e.type||"app"===e.type||"pan"===e.type||"storage"===e.type||"disk"===e.type)return!0;var l=[],i="dzz";""===e.bz||void 0===e.bz?i=e.rbz?e.rbz.split(":")[0]:"dzz":i=e.bz.split(":")[0];var r=i+":"+e.ext,s=0;if(r&&_explorer.extopen.ext[r]){if(t&&_explorer.extopen.all[_explorer.extopen.user[r]])return _explorer.extopen.user[r];for(s=0;s<_explorer.extopen.ext[r].length;s++)if(_explorer.extopen.all[_explorer.extopen.ext[r][s]]){if(t&&_explorer.extopen.all[_explorer.extopen.ext[r][s]].isdefault>0)return _explorer.extopen.all[_explorer.extopen.ext[r][s]].extid;l.push(_explorer.extopen.all[_explorer.extopen.ext[r][s]])}}if(e.ext&&_explorer.extopen.ext[e.ext]){if(t&&_explorer.extopen.all[_explorer.extopen.user[e.ext]])return _explorer.extopen.user[e.ext];for(s=0;s<_explorer.extopen.ext[e.ext].length;s++)if(_explorer.extopen.all[_explorer.extopen.ext[e.ext][s]]){if(t&&_explorer.extopen.all[_explorer.extopen.ext[e.ext][s]].isdefault>0)return _explorer.extopen.all[_explorer.extopen.ext[e.ext][s]].extid;l.push(_explorer.extopen.all[_explorer.extopen.ext[e.ext][s]])}}if(e.type!==e.ext&&_explorer.extopen.ext[e.type]){if(t&&_explorer.extopen.all[_explorer.extopen.user[e.type]])return _explorer.extopen.user[e.type];for(s=0;s<_explorer.extopen.ext[e.type].length;s++)if(_explorer.extopen.all[_explorer.extopen.ext[e.type][s]]){if(t&&_explorer.extopen.all[_explorer.extopen.ext[e.type][s]].isdefault>0)return _explorer.extopen.all[_explorer.extopen.ext[e.type][s]].extid;l.push(_explorer.extopen.all[_explorer.extopen.ext[e.type][s]])}}if(t)return l.length>0&&l[0].extid;var o=[];for(s in l)$.inArray(l[s].appid,o)>-1?l.splice(s,1):o.push(l[s].appid);return l.length>0&&l}function extopen_replace(e,t){e.icoid=e.rid;var l=_explorer.extopen.all[t],i="";if(!e||!l)return!1;for(var r in e)i=l.url.replace(/{(\w+)}/g,function(t){return"url"===(r=t.replace(/[{}]/g,""))?encodeURIComponent(e[r]):"icoid"===r?e.rid:"path"===r?e.dpath:e[r]});return-1===i.indexOf("dzzjs:")&&-1!==i.indexOf("?")&&-1===i.indexOf("path=")&&(i=i+"&path="+e.dpath),i}_selectfile=function(e,t,l){var i=isNaN(parseInt(l.page))?1:parseInt(l.page),r=isNaN(parseInt(l.total))?1:parseInt(l.total);this.string="_selectfile.cons."+this.id,this.container=l.container,this.total=r,this.bz=l.bz||"",this.perpage=l.perpage,this.totalpage=Math.ceil(this.total/this.perpage),this.totalpage=this.totalpage<1?1:this.totalpage,this.id=e,this.string="_selectfile.cons."+this.id;var s=e.split("-");"f"==s[0]?this.fid=s[1]:this.fid=0,this.subfix=s[0],this.winid=e,this.keyword=l.keyword,this.localsearch=l.localsearch,this.view=isNaN(parseInt(l.view))?_selectfile.view:parseInt(l.view),this.disp=isNaN(parseInt(l.disp))?_selectfile.disp:parseInt(l.disp),this.asc=l.asc,this.detailper=_selectfile.detailper,this.data||(this.data={}),this.data=t,this.currentpage=i,this.container=l.container,this.odata=[],this.sum=0,_selectfile.cons[this.id]=this,_selectfile.fid=this.fid,_selectfile.subfix=this.subfix,_selectfile.winid=this.id,this.pageloadding=!0,this.exts=l.exts||"",this.tags=l.tags||"",this.before=l.before||"",this.after=l.after||"",this.fids=l.fids||"",this.gid=l.gid||""},_selectfile.selectall={position:{},container:"",icos:[]},_selectfile.saveurl="index.php?mod=system&op=save",_selectfile.speed=5,_selectfile.perpage=100,_selectfile.cons={},_selectfile.view=4,_selectfile.disp=0,_selectfile.asc=1,_selectfile.detailper=[47,10,20,15,8],_selectfile.onmousemove=null,_selectfile.onmouseup=null,_selectfile.onselectstart=1,_selectfile.stack_data={},_selectfile.showicosTimer={},_selectfile.apicacheTimer={},_selectfile.infoPanelUrl="",_selectfile.viewstyle=["bigicon","middleicon","middlelist","smalllist","detaillist"],_selectfile.select_Scrolly=function(e){var t=document.documentElement.clientHeight;e||(e=$(".selectScroll-y")),e.each(function(){var e=$(this),l=e.offset(),i=t-l.top-100;if(_explorer.type>0)i=t-l.top-140;e.css({overflow:"auto",height:i}),new PerfectScrollbar(this)})},_selectfile.icon=function(){jQuery(".icons-thumbnail").attr("iconview",obj.view).find(".dzz").removeClass("dzz-view-module").removeClass("dzz-view-list").addClass(2===obj.view?"dzz-view-list":"dzz-view-module"),jQuery(".icons-thumbnail").attr("folderid",obj.id)},_selectfile.get_template=function(e,t,l,i){var r=_selectfile.cons[e],s="";if(t){switch(r.view){case 0:case 1:case 2:case 3:s=jQuery("#template_middleicon").html();break;case 4:s=jQuery("#template_detaillist").html()}s=s.replace(/\{asc_\d\}/g,r.asc);var o=new RegExp("{show_"+r.disp+"}","ig");s=(s=s.replace(o,"inline-block")).replace(/\{show_\d}/gi,"none")}else switch(r.view){case 0:case 1:case 2:case 3:s=jQuery("#template_middleicon .js-file-item-tpl").html();break;case 4:s=jQuery("#template_detaillist .js-file-item-tpl").html()}return s},_selectfile.prototype.CreateIcos=function(e,t){var l=this,i="filemanage-"+this.winid;if(t||!this.data[e.rid]){this.data[e.rid]=e;var r=_selectfile.get_template(this.id);e.flag?(e.img||(e.img="dzz/styles/thame/"+_explorer.thame.system.folder+"/system/"+e.flag+".png"),e.error="dzz/images/default/system/"+e.flag+".png"):"folder"===e.type?e.gid>0?(e.icon=e.img?e.img:e.icon,e.error=e.icon||"dzz/images/default/system/folder-read.png",e.img=e.icon?e.icon.replace("dzz/images/default","dzz/styles/thame/"+_explorer.thame.system.folder):"dzz/styles/thame/"+_explorer.thame.system.folder+"/system/folder-read.png"):(e.icon=e.img?e.img:e.icon,e.error=e.icon||"dzz/images/default/system/folder.png",e.img=e.icon?e.icon.replace("dzz/images/default","dzz/styles/thame/"+_explorer.thame.system.folder):"dzz/styles/thame/"+_explorer.thame.system.folder+"/system/folder.png"):"shortcut"===e.type&&"folder"===e.ttype?e.tdata.gid>0?(e.error=e.tdata.img||"dzz/images/default/system/folder-read.png",e.img=(e.tdata.img+"").replace("dzz/images/default","dzz/styles/thame/"+_explorer.thame.system.folder)):(e.error=e.tdata.img||"dzz/images/default/system/folder.png",e.img=e.tdata.img?(e.tdata.img+"").replace("dzz/images/default","dzz/styles/thame/"+_explorer.thame.system.folder):"dzz/styles/thame/"+_explorer.thame.system.folder+"/system/folder.png"):e.error="dzz/images/default/icodefault.png";var s=r.replace(/\{name\}/g,e.name);if(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s.replace(/\{rid\}/g,e.rid)).replace(/tsrc=\"\{img\}\"/g,'src="{img}"')).replace(/\{img\}/g,e.img)).replace(/\{username\}/g,e.username)).replace(/\{replynum\}/g,e.replynum?e.replynum:"0")).replace(/\{zIndex\}/g,10)).replace(/\{error\}/g,e.error)).replace(/\{size\}/g,"folder"===e.type||"app"===e.type||"shortcut"===e.type?"":e.fsize)).replace(/\{fsize\}/g,e.fsize)).replace(/\{type\}/g,e.type)).replace(/\{ftype\}/g,e.ftype)).replace(/\{dateline\}/g,e.dateline)).replace(/\{fdateline\}/g,e.fdateline)).replace(/\{flag\}/g,e.flag)).replace(/\{position\}/g,e.relpath)).replace(/\{dpath\}/g,e.dpath)).replace(/\{from\}/g,e.from)).replace(/\{delusername\}/g,e.username)).replace(/\{deldateline\}/g,e.deldateline)).replace(/\{finallydate\}/g,e.finallydate)).replace(/\{views\}/g,e.views)).replace(/\{times\}/g,e.times)).replace(/\{downs\}/g,e.downs)).replace(/\{expireday\}/g,e.expireday)).replace(/\{sharelink\}/g,e.sharelink)).replace(/dsrc=\"\{qrcode\}\"/g,'src="{qrcode}"')).replace(/dsrc='\{qrcode\}'/g,"src='{qrcode}'")).replace(/\{qrcode\}/g,e.qrcode)).replace(/\{password\}/g,e.password)).replace(/\{count\}/g,e.count),e.status<0)var o='<span style="color: red;">('+e.fstatus+")</span>";else o="";if(e.collect)var a='<a href="javascript:;" class="dzz-colllection-item" ><i class="dzz dzz-star" title=""></i></a>';else a='<a href="javascript:;" class="dzz-colllection-item hide"><i class="dzz dzz-star" title=""></i></a>';s=(s=s.replace(/\{collectstatus\}/g,a)).replace(/\{sharestatus\}/g,o),"image"!==e.type&&(s=s.replace(/data-start=\"image\".+?data-end=\"image\"/gi,""));var c="";c=e.gid>0?e.pfid>0?"#group&do=file&gid="+e.gid+"&fid="+e.pfid:"#group&gid="+e.gid:"#home&do=file&fid="+e.pfid,s=s.replace(/\{position_hash\}/g,c);var n=null;t&&jQuery(".Icoblock[rid="+e.rid+"]").length>0?(jQuery(".Icoblock[rid="+e.rid+"]").replaceWith(s),n=jQuery(".Icoblock[rid="+e.rid+"]")):(jQuery("#"+i+" .js-file-item-tpl").prepend(s),n=jQuery(".Icoblock[rid="+e.rid+"]"),jQuery("#shareinfo_"+e.rid).on("click",function(e){return!1})),this.view<4?(n.on("mouseenter",function(){jQuery(this).addClass("hover")}),n.on("mouseleave",function(){jQuery(this).removeClass("hover")}),n.find(".icoblank_rightbottom").on("click",function(){var e=!0,t=jQuery(this).parent(),i=t.attr("rid");return t.hasClass("Icoselected")&&(e=!1),_select.SelectedStyle("filemanage-"+l.id,i,e,!0),!1}),n.on("click",function(e){var t=e.srcElement?e.srcElement:e.target;if(/input|textarea/i.test(t.tagName))return!0;var i=jQuery(this).closest(".Icoblock"),r=i.attr("rid");if("folder"==_explorer.sourcedata.icos[r].type)return _selectfile.Open(r),!1;var s=!0;(_hotkey.ctrl&&i.hasClass("Icoselected")||i.hasClass("Icoselected")&&1===_selectfile.selectall.icos.length&&_selectfile.selectall.icos[0]===r)&&(s=!1);var o=!(!_hotkey.ctrl||!_explorer.mulitype);return _select.SelectedStyle("filemanage-"+l.id,jQuery(this).attr("rid"),s,o),!1}),0==this.total&&0==jQuery("#"+i).find(".emptyPage").length?jQuery(jQuery("#template_nofile_notice").html()).appendTo(jQuery("#"+i)):jQuery("#"+i).find(".emptyPage").remove()):(n.bind("mouseenter",function(){jQuery(this).addClass("hover")}),n.bind("mouseleave",function(){jQuery(this).removeClass("hover")}),n.on("click",function(e){var t=(e=e||window.event).srcElement?e.srcElement:e.target;if(/input|textarea/i.test(t.tagName))return!0;var i=jQuery(this).closest(".Icoblock"),r=i.attr("rid");if("folder"==_explorer.sourcedata.icos[r].type)return _selectfile.Open(r),!1;var s=!0;(_hotkey.ctrl&&i.hasClass("Icoselected")||i.hasClass("Icoselected")&&1===_selectfile.selectall.icos.length&&_selectfile.selectall.icos[0]===r)&&(s=!1);var o=!(!_hotkey.ctrl||!_explorer.mulitype);return _select.SelectedStyle("filemanage-"+l.id,i.attr("rid"),s,o),!1})),n.on("dblclick",function(e){if(!_selectfile.fid&&"recycle-list"==_selectfile.winid)return!0;var t=e.srcElement?e.srcElement:e.target;return!!/input|textarea/i.test(t.tagName)||(_selectfile.Open(n.attr("rid")),dfire("click"),!1)}),n.on("contextmenu",function(e){var t=(e=e||window.event).srcElement?e.srcElement:e.target;return!!/input|textarea/i.test(t.tagName)||(_contextmenu.right_ico(e,jQuery(this).attr("rid")),!1)}),jQuery.inArray(e.rid,_selectfile.selectall.icos)>-1&&n.addClass("Icoselected"),t||(_selectfile.glow(n),this.sum++,this.total++,jQuery("#"+i+" .scroll-y").scrollTop(9999999),this.currentdata["icos_"+e.rid]=e),0==this.total&&0==jQuery("#"+i).find(".emptyPage").length?jQuery(jQuery("#template_nofile_notice").html()).appendTo(jQuery("#"+i)):jQuery("#"+i).find(".emptyPage").remove()}else{var d=jQuery("#"+i+" .Icoblock[rid="+e.rid+"]");_selectfile.glow(d)}},_selectfile.changefileName=function(e){var t="";e?t=_explorer.sourcedata.icos[e].name:t=_explorer.defaultfilename;$("#savenewname").val(t)},_selectfile.getData=function(e,t){jQuery.getJSON(e,function(l){if(l.error)return alert(l.error),!1;for(var i in l.data)_explorer.sourcedata.icos[i]=l.data[i];for(var r in l.folderdata)_explorer.sourcedata.folder[r]=l.folderdata[r];_explorer.createMenuSwidth(_selectfile.fid);var s=null;l.param.page>1?((s=_selectfile.cons[l.sid]).appendIcos(l.data),s.total=parseInt(l.total),s.totalpage=Math.ceil(s.total/s.perpage)):(s=new _selectfile(l.sid,l.data,l.param),_selectfile.selectall.container!=="_selectfile-"+l.sid&&(_selectfile.selectall={position:{},container:"",icos:[]}),s.showIcos()),s.url=e,jQuery(".icons-thumbnail").attr("iconview",s.view).find(".dzz").removeClass("dzz-view-module").removeClass("dzz-view-list").addClass(2===s.view?"dzz-view-list":"dzz-view-module"),jQuery(".icons-thumbnail").attr("iconview",s.view).find(".dzz").attr("data-bs-original-title",2===s.view?__lang.deltail_lsit:__lang.medium_icons),jQuery(".icons-thumbnail").attr("folderid",s.id),"function"==typeof t&&t(s)})},_selectfile.prototype.showIcos=function(e){var t=this;_selectfile.showicosTimer[this.winid]&&window.clearTimeout(_selectfile.showicosTimer[this.winid]);var l="filemanage-"+this.winid;jQuery("#"+l).empty(),this.createIcosContainer();var i=null;for(var r in this.keyword?(i=_selectfile.Sort(_selectfile.Search(this.data,this.keyword),this.disp,this.asc),jQuery("#searchInput_"+this.id).val(this.keyword)):i=_selectfile.Sort(this.data,this.disp,this.asc),e&&(i=_file.Searchext(i,e)),this.currentdata=i,_selectfile.stack_data[t.id]=Array(),i)_selectfile.stack_data[t.id].push({data:i[r],obj:t});window.setTimeout(function(){_selectfile.stack_run(t.id)},1),this.pageloadding=!1},_selectfile.prototype.Resize=function(){_selectfile.select_Scrolly(jQuery(".scroll-y")),_selectfile.searchall()},$(parent).resize(function(){_selectfile.select_Scrolly()}),_selectfile.Open=function(e,t,l){var i=_explorer.sourcedata.icos[e],r=i.name,s={};if(s.type=i.type,s.ext=i.ext,s.id=e,s.text=r,s.dpath=i.dpath,"link"!==s.type){if("folder"===s.type){var o="",a=i.oid;return o=i.gid>0?"#group&do=file&gid="+i.gid+(a>0?"&fid="+a:""):"#home&do=file&fid="+a,window.location.hash=o,!1}if(t||(t=getExtOpen(i,!0)),t){if(_explorer.extopen.all[t].appid>0&&_explorer.sourcedata.app[_explorer.extopen.all[t].appid].available<1)return void Alert(__lang.regret_app+_explorer.sourcedata.app[_explorer.extopen.all[t].appid].appname+__lang.already_close,5,null,null,"info");var c=extopen_replace(i,t);if(c){if(0===(c=c.replace(/{\w+}/g,"")).indexOf("dzzjs:OpenPicWin"))return jQuery("img[data-original]:visible").dzzthumb(),void jQuery(".Icoblock[rid="+e+"] img[data-original]").trigger("click");if(0===c.indexOf("dzzjs:"))return void window.open(i.url);window.open(c)}}else top.showDialog("文件没有可以打开的应用")}else window.open(i.url)},_selectfile.prototype._selectInfo=function(){var e=_selectfile.selectall.icos.length,t=jQuery("#filemanage-"+this.id).find(".Icoblock").length,l=jQuery("#template_file").html(),i=location.hash;return e>0?(jQuery(".navtopheader").css("display","block"),jQuery(".navtopheader").html(l),jQuery(".selectall-box").addClass("Icoselected"),jQuery(".selectall-box .select-info").html('已选中<span class="num">'+e+"</span>个文件"),jQuery(".docunment-allfile").hide(),e>=t&&jQuery(".selectall-box").addClass("Icoselected")):(jQuery(".navtopheader").css("display","none"),jQuery(".navtopheader").html(""),jQuery(".selectall-box").removeClass("Icoselected"),jQuery(".selectall-box .select-info").html(this.view<4?"全选":""),jQuery(".docunment-allfile").show(),-1!=i.indexOf("recycle")&&jQuery(".recycle-option-icon").hide()),!1},_selectfile.prototype.selectInfo=function(){var e=this;this.selectinfoTimer&&window.clearTimeout(this.selectinfoTimer),this.selectinfoTimer=window.setTimeout(function(){e._selectInfo()},200)},_selectfile.prototype.appendIcos=function(e){var t=this;for(var l in _selectfile.showicosTimer[this.winid]&&window.clearTimeout(_selectfile.showicosTimer[this.winid]),_selectfile.stack_data[t.winid]=Array(),e)_selectfile.stack_data[t.winid].push({data:e[l],obj:t});window.setTimeout(function(){_selectfile.stack_run(t.winid)},1),this.pageloadding=!1},_selectfile.prototype.createIcosContainer=function(){var e=this,t="filemanage-"+this.id,l=document.getElementById(t);if(l){l.className="icosContainer",l.setAttribute("unselectable","on"),l.setAttribute("onselectstart","return event.srcElement.type== 'text';");l.innerHTML=_selectfile.get_template(this.id,!0),_selectfile.select_Scrolly();var i=jQuery(l);i.find(".js-file-item-tpl").empty(),jQuery(".middlecenter").on("contextmenu",function(t){var l=(t=t||window.event).srcElement?t.srcElement:t.target;return!!/input|textarea/i.test(l.tagName)||(_contextmenu.right_body(t,e.fid),!1)}).on("click",function(l){var r=(l=l||window.event).srcElement?l.srcElement:l.target;if(/input|textarea/i.test(r.tagName))return!0;t===_selectfile.selectall.container&&(_selectfile.selectall.container=t,_selectfile.selectall.icos=[],_selectfile.selectall.position={},i.find(".Icoblock").removeClass("Icoselected"),i.find(".selectall-box").removeClass("Icoselected"),_explorer.type&&_selectfile.changefileName(""),e.selectInfo())}).end().find(".selectall-box").on("click",function(){var l=jQuery(this),i=!0;return l.hasClass("Icoselected")?(l.removeClass("Icoselected"),i=!1,_selectfile.selectall.icos=[]):(l.addClass("Icoselected"),i=!0,_selectfile.selectall.icos=[]),_selectfile.selectall.container=t,jQuery("#"+t).find(".Icoblock").each(function(){i?(jQuery(this).addClass("Icoselected"),_selectfile.selectall.icos.push(jQuery(this).attr("rid"))):jQuery(this).removeClass("Icoselected")}),e.selectInfo(),!1}),_explorer.mulitype&&_select.init(t),this.view<4||jQuery("#"+t).find(".detail_header:not(.detail_header_select)").on("click",function(){var t=parseInt(jQuery(this).attr("disp"));1*t==1*e.disp?e.asc>0?e.asc=0:e.asc=1:(_selectfile.Disp(this,e.id,t),e.asc=1),e.disp=t,e.fid&&(_explorer.sourcedata.folder[e.fid].disp=t),0===e.bz.indexOf("ALIOSS")||0===e.bz.indexOf("JSS")?e.showIcos():e.pageClick(1)}),i.closest(".scroll-srcollbars").scroll(function(){var t=jQuery(this);if(t.height()+t.scrollTop()>=t.children().first().height()){if(e.currentpage>=e.totalpage||e.pageloadding)return;e.pageloadding=!0,e.currentpage++,e.pageClick(e.currentpage)}}),this.fid&&$.getScript(MOD_PATH+"/scripts/uplodfile.js",function(){jQuery(".wangpan-upload-file").each(function(){fileupload(jQuery(this),e.fid)})}),this.total<1&&0==jQuery("#"+t).find(".emptyPage").length?jQuery(jQuery("#template_nofile_notice").html()).appendTo(l):jQuery("#"+t).find(".emptyPage").remove()}},_selectfile.prototype.pageClick=function(e){this.pageloadding=!0,e||(e=1);var t=this.keyword?this.keyword:jQuery("#searchval").val();t&&t!==__lang.search||(t=""),!this.exts&&_explorer.defaultexttype&&(this.exts=_explorer.defaultexttype);var l=this.url.replace(/&disp\=\d/gi,"").replace(/&asc\=\d/gi,"").replace(/&iconview\=\d/gi,"").replace(/&page\=\d+/gi,"").replace(/&exts\=[\w,]*(&|$)/gi,"&").replace(/&tags\=[\w,]*(&|$)/gi,"&").replace(/&keyword\=\w*(&|$)/,"&").replace(/&fid\=\w*(&|$)/,"&").replace(/&gid\=\w*(&|$)/,"&").replace(/&before\=\w*(&|$)/,"&").replace(/&after\=\w*(&|$)/,"&").replace(/&marker\=\w*(&|$)/,"&").replace(/&t\=\d+/,"");l=l.replace(/&+$/gi,""),_selectfile.getData(l+"&exts="+this.exts+"&tags="+this.tags+"&disp="+this.disp+"&fids="+this.fids+"&gid="+this.gid+"&before="+this.before+"&after="+this.after+"&asc="+this.asc+"&iconview="+this.view+"&keyword="+encodeURI(t)+"&page="+e+"&marker="+(this.fid?_explorer.sourcedata.folder[this.fid].nextMarker:"")+"&t="+(new Date).getTime(),function(){})},_selectfile.stack_run=function(e){if(_selectfile.stack_data[e].length>0){_selectfile.stack_data[e][0].obj;for(var t=0;t<_selectfile.speed&&_selectfile.stack_data[e].length>0;t++)_selectfile.stack_data[e][0].obj.CreateIcos(_selectfile.stack_data[e][0].data,1),_selectfile.stack_data[e].splice(0,1);_selectfile.showicosTimer[e]=window.setTimeout(function(){_selectfile.stack_run(e)},1)}else jQuery(document).trigger("showIcos_done")},_selectfile.prototype.tddrager_start=function(e){this.XX=e.clientX,document.getElementById("_blank").style.cursor="e-resize",jQuery("#_blank").show(),this.AttachEvent(e),eval("document.onmousemove=function(e){"+this.string+".tddraging(e?e:window.event);};"),eval("document.onmouseup=function(e){"+this.string+".tddraged(e?e:window.event);};")},_selectfile.prototype.tddraging=function(){document.body.style.cursor="e-resize"},_selectfile.prototype.tddraged=function(e){this.DetachEvent(e),jQuery("#_blank").hide();var t=e.clientX-this.XX,l=_window.windows[this.winid].bodyWidth-jQuery("#jstree_area").width(),i=l*this.detailper[this.tddrager_disp]/100,r=t+i;r<50&&(r=50);for(var s=[],o=0,a=0;a<4;a++)s[a]=l*this.detailper[a]/100;var c=r-i;if(t>0){if(s[this.tddrager_disp+1]-c>50)s[this.tddrager_disp+1]-=c;else{var n=c+(s[this.tddrager_disp+1]-50);if(s[this.tddrager_disp+1]=50,this.tddrager_disp+1+1<4)if(s[this.tddrager_disp+1+1]-n>50)s[this.tddrager_disp+1+1]-=c;else{var d=n+(s[this.tddrager_disp+1+1]-50);s[this.tddrager_disp+1+1]=50,this.tddrager_disp+1+1+1<4&&(s[this.tddrager_disp+1+1+1]-d>50?s[this.tddrager_disp+1+1+1]-=c:s[this.tddrager_disp+1+1+1]=50)}}for(o=0,a=0;a<4;a++)a!==this.tddrager_disp&&(o+=s[a]);s[this.tddrager_disp]=l-o}else s[this.tddrager_disp]=r,s[this.tddrager_disp+1]-=c;for(o=0,a=0;a<4;a++)a!=this.tddrager_disp&&(o+=s[a]);for(s[this.tddrager_disp]=l-o,a=0;a<4;a++)this.detailper[a]=Math.floor(s[a]/l*100);this.showIcos(this.winid)},_selectfile.prototype.DetachEvent=function(){document.onmousemove=_selectfile.onmousemove,document.onmouseup=_selectfile.onmouseup,document.onselectstart=_selectfile.onselectstart},_selectfile.prototype.AttachEvent=function(e){_selectfile.onmousemove=document.onmousemove,_selectfile.onmouseup=document.onmouseup,_selectfile.onselectstart=document.onselectstart;try{document.onselectstart=function(){return!1},e.preventDefault?e.preventDefault():this.board.setCapture&&this.board.setCapture()}catch(e){}},_selectfile.Search=function(e,t){var l={};for(var i in e)-1!==e[i].name.toLowerCase().indexOf(t.toLowerCase())&&(l[i]=e[i]);return l},_selectfile.Sort=function(e,t,l){var i=[];if(!e)return[];for(var r in e)switch(parseInt(t)){case 0:"folder"===e[r].type?i[i.length]=" "+e[r].name.replace(/_/g,"")+" ___"+r:i[i.length]=e[r].name.replace(/_/g,"")+"___"+r;break;case 1:i[i.length]=e[r].size+"___"+r;break;case 2:"folder"===e[r].type?i[i.length]=" ___"+r:i[i.length]=e[r].ext+e[r].type+"___"+r;break;case 3:i[i.length]=e[r].dateline+"___"+r}i=1===parseInt(t)?i.sort(function(e,t){return parseInt(e)-parseInt(t)}):i.sort();var s={},o="";if(l>0)for(r=0;r<i.length;r++)s["icos_"+(o=i[r].split("___"))[1]]=e[o[1]];else for(r=i.length-1;r>=0;r--)s["icos_"+(o=i[r].split("___"))[o.length-1]]=e[o[o.length-1]];return s},_selectfile.get_template=function(e,t,l,i){var r=_selectfile.cons[e],s="";if(t){switch(r.view){case 0:case 1:case 2:case 3:s=jQuery("#template_middleicon").html();break;case 4:s=jQuery("#template_detaillist").html()}s=s.replace(/\{asc_\d\}/g,r.asc);var o=new RegExp("{show_"+r.disp+"}","ig");s=(s=s.replace(o,"inline-block")).replace(/\{show_\d}/gi,"none")}else switch(r.view){case 0:case 1:case 2:case 3:s=jQuery("#template_middleicon .js-file-item-tpl").html();break;case 4:s=jQuery("#template_detaillist .js-file-item-tpl").html()}return s},_selectfile.rename=function(e){if(_explorer.sourcedata.icos[e]){var t=_selectfile.cons[_selectfile.winid],l=jQuery("#file_text_"+e);l.css("overflow","visible"),l.closest("td").addClass("renaming"),jQuery("#Icoblock_middleicon_"+e).find(".IcoText_div").css("overflow","visible"),t.oldtext=l.html();var i="";i=t.view>3?"<input type='text' class='' name='text' id='input_"+e+"' style=\"width:"+(l.closest("td").width()-110)+'px;height:30px;padding:2px; " value="'+t.oldtext+'">':"<textarea type='textarea' class='textarea' name='text' id='input_"+e+'\' style="width:100%;height:30px;padding:2px;overflow:hidden;margin-top:3px;color:#666666 ">'+t.oldtext+"</textarea>",l.html(i);var r=jQuery("#input_"+e);r.select(),r.on("keyup",function(t){13===(t=t||event).keyCode&&jQuery(document).trigger("mousedown.file_text_"+e)}),jQuery(document).on("mousedown.file_text_"+e,function(i){var s=(i=i||window.event).srcElement?i.srcElement:i.target;if(jQuery(s).closest("#file_text_"+e).length<1){jQuery(document).off(".file_text_"+e);var o=r.val()||"";if(/^\s*$/.test(o))return top.showDialog(__lang.name_is_must,"error","",function(){l.html(t.oldtext),l.css("overflow","hidden"),l.closest("td").removeClass("renaming"),jQuery("#Icoblock_middleicon_"+e).find(".IcoText_div").css("overflow","hidden")}),!1;o=o.replace("\n",""),t.oldtext!==o?_selectfile.Rename(e,o):(l.html(t.oldtext),l.css("overflow","hidden"),l.closest("td").removeClass("renaming"),jQuery("#Icoblock_middleicon_"+e).find(".IcoText_div").css("overflow","hidden"))}})}},_selectfile.Rename=function(e,t){var l=_explorer.sourcedata.icos[e],i=_selectfile.cons[_selectfile.winid];jQuery.ajax({type:"post",url:_explorer.appUrl+"&do=dzzcp&operation=rename",data:{text:t,path:l.dpath,t:(new Date).getTime()},dataType:"json",success:function(t){t.rid?(_explorer.sourcedata.icos[t.rid].name=t.name,i.data[t.rid].name=t.name,i.CreateIcos(_explorer.sourcedata.icos[t.rid],!0)):(jQuery("#file_text_"+e).html(i.oldtext),t.error&&top.showmessage(t.error,"danger",3e3,1))},error:function(){jQuery("#file_text_"+e).html(i.oldtext),json.error&&top.showmessage(json.error,"danger",3e3,1),top.showmessage(__lang.js_network_error,"danger",3e3,1)}})},_selectfile.downAttach=function(e){e||(e=_selectfile.selectall.icos[0]);var t=_explorer.sourcedata.icos[e];if(!t)return!1;var l=DZZSCRIPT+"?mod=io&op=download&path="+encodeURIComponent(t.dpath)+"&t="+(new Date).getTime();return BROWSER.ie?window.open(l):window.frames.hideframe.location=l,!1},_selectfile.downThumb=function(e){var t=_explorer.sourcedata.icos[e],l=t.url+"&filename="+encodeURIComponent(t.name)+"&a=down&t="+(new Date).getTime();return BROWSER.ie?window.open(l):window.frames.hideframe.location=l,!1},_selectfile.property=function(e,t){var l="";if(t){var i=_explorer.sourcedata.folder[e];l=encodeURIComponent("fid_"+i.path)}else{var r=[],s=null;if(_selectfile.selectall.icos.length>0&&jQuery.inArray(e,_selectfile.selectall.icos)>-1)for(var o=0;o<_selectfile.selectall.icos.length;o++)s=_explorer.sourcedata.icos[_selectfile.selectall.icos[o]],r.push(s.dpath);else r=[(s=_explorer.sourcedata.icos[e]).dpath];l=encodeURIComponent(r.join(","))}showWindow("property",_explorer.appUrl+"&do=ajax&operation=property&paths="+l)},_selectfile.NewIco=function(e,t){(t||_selectfile.fid)&&(t||(t=_selectfile.fid),"newFolder"===e?$.post(_explorer.appUrl+"&do=ajax&operation=newFolder",{fid:t},function(e){"success"===e.msg?(_explorer.sourcedata.icos[e.rid]=e,_selectfile.cons["f-"+t].CreateIcos(e),_selectfile.rename(e.rid)):top.showDialog(e.error)},"json"):"newLink"===e?showWindow("newLink",_explorer.appUrl+"&do=ajax&operation="+e+"&fid="+t):$.post(_explorer.appUrl+"&do=ajax&operation=newIco&type="+e,{fid:t},function(e){"success"===e.msg?(_explorer.sourcedata.icos[e.rid]=e,_selectfile.cons["f-"+t].CreateIcos(e),_selectfile.rename(e.rid)):top.showDialog(e.error)},"json"))},_selectfile.glow=function(e){for(var t=0;t<4;t++)window.setTimeout(function(){e.find(".toggleGlow").toggleClass("glow")},200*t)},_selectfile.Arrange=function(e,t,l){var i=jQuery(e);t||(t=_selectfile.winid);var r=_selectfile.cons[t];l?l*=1:l=parseInt(i.attr("iconview"))<4?4:2,jQuery(".icons-thumbnail").attr("iconview",l).find(".dzz").removeClass("dzz-view-module").removeClass("dzz-view-list").addClass(2===l?"dzz-view-list":"dzz-view-module"),jQuery(".icons-thumbnail").attr("iconview",l).find(".dzz").attr("data-bs-original-title",2===l?__lang.deltail_lsit:__lang.medium_icons);var s=_selectfile.fid;s>0&&_explorer.Permission_Container("admin",s)&&(jQuery.post(_selectfile.saveurl+"&do=folder",{fid:s,iconview:l}),_explorer.sourcedata.folder[s].iconview=l),r.view=l,r.showIcos(),jQuery("#right_contextmenu .menu-icon-iconview").each(function(){1*jQuery(this).attr("view")==1*l?jQuery(this).removeClass("dzz-check-box-outline-blank").addClass("dzz-check-box"):jQuery(this).addClass("dzz-check-box-outline-blank").removeClass("dzz-check-box")})},_selectfile.Disp=function(e,t,l){var i=_selectfile.cons[t];if("f"===i.subfix){var r=i.fid;r>0&&_explorer.Permission_Container("admin",r)&&jQuery.post(_selectfile.saveurl+"&do=folder",{fid:r,disp:parseInt(l)}),_explorer.sourcedata.folder[r].disp=parseInt(l)}else"cat"===i.subfix&&jQuery.post(_selectfile.saveurl+"&do=catsearch",{catid:t.replace("cat-",""),disp:parseInt(l)});1*l==1*i.disp&&(i.asc=i.asc>0?0:1),i.disp=parseInt(l),0===i.bz.indexOf("ALIOSS")||0===i.bz.indexOf("JSS")?i.showIcos():i.pageClick(1),jQuery("#right_contextmenu .menu-icon-disp").each(function(){1*jQuery(this).attr("disp")==1*l?(jQuery(this).removeClass("dzz-check-box-outline-blank").addClass("dzz-check-box"),jQuery(this).next().find(".caret").removeClass("asc").removeClass("desc").addClass(i.asc>0?"asc":"desc")):(jQuery(this).addClass("dzz-check-box-outline-blank").removeClass("dzz-check-box"),jQuery(this).next().find(".caret").removeClass("asc").removeClass("desc"))})},_selectfile.copy=function(e){e||(e=_selectfile.selectall.icos[0]);var t=_explorer.sourcedata.icos[e],l=[],i={};if(_selectfile.selectall.icos.length>0&&jQuery.inArray(e,_selectfile.selectall.icos)>-1)if(t.bz&&t.bz){for(var r in _selectfile.selectall.icos)l.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[r]].dpath);i={rids:l,bz:t.bz}}else{for(var r in _selectfile.selectall.icos)l.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[r]].dpath);i={rids:l}}else i=t.bz&&t.bz?{rids:[t.dpath],bz:t.bz}:{rids:[t.dpath]};i.copytype=1;var s=_explorer.appUrl+"&do=dzzcp&operation=copyfile&t="+(new Date).getTime();jQuery.post(s,i,function(e){if("success"===e.msg){var t="";for(var l in _explorer.cut.iscut=0,_explorer.cut.icos=e.rid,e.rid)jQuery(".Icoblock[rid="+e.rid[l]+"]").removeClass("iscut"),t+=_explorer.sourcedata.icos[e.rid[l]].name+",";t=t.substr(0,t.length-1),top.showmessage(t+__lang.copy_success,"success",1e3,1,"right-bottom")}else top.showmessage(e.msg,"error",3e3,1,"right-bottom")},"json")},_selectfile.cut=function(e){var t=_selectfile.cons[_selectfile.winid];_selectfile.winid,t.total;e||(e=_selectfile.selectall.icos[0]);var l=_explorer.sourcedata.icos[e],i=[],r={};if(_selectfile.selectall.icos.length>0&&jQuery.inArray(e,_selectfile.selectall.icos)>-1)if(l.bz&&l.bz){for(var s in _selectfile.selectall.icos)i.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[s]].dpath);r={rids:i,bz:l.bz}}else{for(var s in _selectfile.selectall.icos)i.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[s]].dpath);r={rids:i}}else r=l.bz&&l.bz?{rids:[l.dpath],bz:l.bz}:{rids:[l.dpath]};r.copytype=2;var o=_explorer.appUrl+"&do=dzzcp&operation=copyfile";jQuery.post(o,r,function(e){if("success"===e.msg){var t="";for(var l in _explorer.cut.iscut=1,_explorer.cut.icos=e.rid,jQuery(".Icoblock").removeClass("iscut"),e.rid)jQuery(".Icoblock[rid="+e.rid[l]+"]").addClass("iscut"),t+=_explorer.sourcedata.icos[e.rid[l]].name+",",0;t=t.substr(0,t.length-1),top.showmessage(t+__lang.cut_success,"success",1e3,1,"right-bottom")}else top.showmessage(e.msg,"error",3e3,1,"right-bottom")},"json")},_selectfile.paste=function(e){var t=_explorer.sourcedata.folder[e];if(!t)return!1;var l={tpath:t.fid,tbz:t.bz},i=_explorer.appUrl+"&do=dzzcp&operation=paste",r=0,s=null;jQuery.post(i,l,function(l){if(e===_selectfile.fid){if(l.folderarr){for(r=0;r<l.folderarr.length;r++)_explorer.sourcedata.folder[l.folderarr[r].fid]=l.folderarr[r];s=jQuery("#position").jstree(!0).get_node(t.gid>0?t.type>0?"#g_"+t.gid:"#gid_"+t.gid:"#f-"+t.pfid),jQuery("#position").jstree("refresh",s),jQuery("#position").jstree("correct_state",s)}if(l.icoarr){var i=_selectfile.cons["f-"+e];for(r=0;r<l.icoarr.length;r++)l.icoarr[r].pfid===i.fid&&(_explorer.sourcedata.icos[l.icoarr[r].rid]=l.icoarr[r],i.CreateIcos(l.icoarr[r]))}}else top.showmessage("粘贴成功","success",3e3,1)},"json")},_selectfile.delIco=function(e,t){var l=_selectfile.cons[_selectfile.winid];_selectfile.winid,l.total;e||(e=_selectfile.selectall.icos[0]);var i=_explorer.sourcedata.icos[e];if(!t){return _selectfile.selectall.icos.length>0&&jQuery.inArray(e,_selectfile.selectall.icos)>-1?void(_explorer.sourcedata.icos[_selectfile.selectall.icos[0]].isdelete>0||_explorer.sourcedata.icos[_selectfile.selectall.icos[0]].bz&&_explorer.sourcedata.icos[_selectfile.selectall.icos[0]].bz?top.showDialog(__lang.js_delete_selectall,"confirm","",function(){_selectfile.delIco(e,1)}):top.showDialog(__lang.js_delete_selectall_recycle,"confirm","",function(){_selectfile.delIco(e,1)})):"folder"===_explorer.sourcedata.icos[e].type&&_explorer.sourcedata.folder[_explorer.sourcedata.icos[e].oid]&&_explorer.sourcedata.folder[_explorer.sourcedata.icos[e].oid].iconum?void(_explorer.sourcedata.icos[e].isdelete>0||_explorer.sourcedata.icos[e].bz&&_explorer.sourcedata.icos[e].bz?top.showDialog(__lang.js_delete_folder.replace("{name}",_explorer.sourcedata.icos[e].name),"confirm","",function(){_selectfile.delIco(e,1)}):top.showDialog(__lang.js_delete_folder_recycle.replace("{name}",_explorer.sourcedata.icos[e].name),"confirm","",function(){_selectfile.delIco(e,1)})):void(_explorer.sourcedata.icos[e].isdelete>0||_explorer.sourcedata.icos[e].bz&&_explorer.sourcedata.icos[e].bz?top.showDialog(__lang.js_delete_confirm.replace("{name}",_explorer.sourcedata.icos[e].name),"confirm","",function(){_selectfile.delIco(e,1)}):top.showDialog(__lang.js_delete_confirm_recycle.replace("{name}",_explorer.sourcedata.icos[e].name),"confirm","",function(){_selectfile.delIco(e,1)}))}var r=[],s={};if(_selectfile.selectall.icos.length>0&&jQuery.inArray(e,_selectfile.selectall.icos)>-1)if(i.bz&&i.bz){for(var o in _selectfile.selectall.icos)r.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[o]].dpath);s={rids:r,bz:i.bz}}else{for(var o in _selectfile.selectall.icos)r.push(_explorer.sourcedata.icos[_selectfile.selectall.icos[o]].dpath);s={rids:r}}else s=i.bz&&i.bz?{rids:[i.dpath],bz:i.bz}:{rids:[i.dpath]};var a=_explorer.appUrl+"&do=dzzcp&operation=deleteIco&t="+(new Date).getTime();top.showmessage("<p>"+__lang.deleting_not_please_close+'</p><div class="progress progress-striped active" style="margin:0"><div class="progress-bar" style="width:100%;"></div></div>',"success",0,1,"right-bottom"),jQuery.post(a,s,function(e){var t=[];for(var l in e.msg)"success"===e.msg[l]?(top.showmessage(_explorer.sourcedata.icos[l].name+__lang.delete_success,"success",1e3,1,"right-bottom"),t.push(l),0):top.showmessage(e.msg[l],"error",3e3,1,"right-bottom");_selectfile.removeridmore(t)},"json")},_selectfile.removerid=function(e){var t=_explorer.sourcedata.icos[e],l="filemanage-"+_selectfile.winid;if(jQuery("#"+l+" .Icoblock[rid="+e+"]").remove(),"folder"===t.type){var i=jQuery("#position").jstree(!0).get_node(t.gid>0?t.type>0?"#g_"+t.gid:"#gid_"+t.gid:"#f-"+t.oid);jQuery("#position").jstree("refresh",i),jQuery("#position").jstree("correct_state",i)}var r=_selectfile.cons[_selectfile.winid],s=jQuery.inArray(e,_selectfile.selectall.icos);s>-1&&_selectfile.selectall.icos.splice(s,1),delete r.data[e],delete r.currentdata["icos_"+e],r.sum--,r.total--,r.selectInfo(),_selectfile.stack_run(r.winid)},_selectfile.removeridmore=function(e){if(e.length>1){var t=e[0],l=_explorer.sourcedata.icos[t],i="filemanage-"+_selectfile.winid,r=[];for(var s in e){var o=e[s];jQuery("#"+i+" .Icoblock[rid="+o+"]").remove();var a=_explorer.sourcedata.icos[o];r.push(a.type)}if(-1!=$.inArray("folder",r)){var c=jQuery("#position").jstree(!0).get_node(l.gid>0?l.type>0?"#g_"+l.gid:"#gid_"+l.gid:"#f-"+l.oid);jQuery("#position").jstree("refresh",c),jQuery("#position").jstree("correct_state",c)}var n=_selectfile.cons[_selectfile.winid];for(var s in e){o=e[s];var d=jQuery.inArray(o,_selectfile.selectall.icos);d>-1&&_selectfile.selectall.icos.splice(d,1),delete n.data[o],delete n.currentdata["icos_"+o],n.sum--,n.total--,n.selectInfo(),_selectfile.stack_run(n.winid)}}else _selectfile.removerid(e[0])}; |