Files
DzzOffice/static/popbox/jquery.popbox.js
小胡 5c6ade30ef V1.88.5更新内容:
核心功能修复与优化
1. 网盘空间管理优化:
    修复了删除网盘文件后,剩余空间未正确更新的问题,确保用户空间显示准确。
2. 机构用户导航体验提升:
    优化了机构用户在使用中的导航栏返回逻辑,提升了用户在不同页面间跳转时的流畅性和一致性。
用户体验与界面改进
1. 登录页面样式优化:
    解决了登录页面样式重复引用的问题,提升了页面加载速度和用户体验。
2. 移动端界面适配:
    优化了移动端界面的头部名称居中显示,增强了在不同移动设备上的视觉一致性。
3. 卡片显示效果调整:
    修改了卡片的显示效果,使信息展示更加美观和易于阅读。
性能与稳定性提升
1. JS代码压缩问题修复:
    修复了压缩JS代码过程中导致的报错问题,确保了应用的稳定性和性能。
插件与系统升级
1. jstree插件升级:
    升级了jstree插件版本,解决了在某些使用场景中无法选中节点的问题,提升了用户与树形结构交互的可靠性。
2. 应用市场UI优化:
    对应用市场界面进行了UI优化,提升了应用展示的美观度和易用性,使用户能够更方便地查找和安装所需的应用。
2024-07-22 17:45:59 +08:00

8 lines
3.2 KiB
JavaScript

/* @authorcode codestrings
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
!function(t){t.fn.popbox=function(o){var e=t(".popbox");e.length||(e=t(' <div class="popbox clearfix"> <div class="popbox-pointer">\t\t<div class="gb_I"></div>\t\t<div class="gb_H"></div> </div> <div class="popbox-container">\t <div class="loadding"></div> </div></div>').appendTo("body"));var a=t(this),n=[],c=0,p=function(o){return o&&o.preventDefault(),a.data("href")&&l(a.data("data-href")),t(".js-popbox").removeClass("openpop"),i(),a.data("closest")&&a.closest(a.data("closest")).find(".dropdown-toggle").dropdown("toggle"),!1},i=function(){var o=document.documentElement.clientWidth,n=document.documentElement.clientHeight;if(a.data("closest"))var c=a.closest(a.data("closest"));else c=a;a.addClass("openpop");var p=c.offset(),i=e.outerWidth(!0),l=e.outerHeight(!0),s=c.outerWidth(!0),d=c.outerHeight(!0),f=0,u=0;switch(e.attr("class","popbox popbox-"+a.data("bs-placement")),a.data("bs-placement")){case"cover":f=p.left,u=p.top;break;case"right":f=p.left+s+10,u=p.top+d/2-l/2;break;case"top":u=p.top-l-10,f=p.left+s/2-i/2;break;case"bottom":u=p.top+d+10,f=p.left+s/2-i/2;break;case"left":f=p.left-i-10,u=p.top+d/2-l/2;break;default:f=p.left+s+10,u=p.top+d/2-l/2}if(a.data("auto-adapt"))switch(a.data("bs-placement")){case"right":case"left":f+i>o&&(f=o-i-10),f<0&&(f=10),u+l>n+jQuery(window).scrollTop()&&(u=n+jQuery(window).scrollTop()-l-10),u<0&&(u=10);break;case"top":case"bottom":u+l>n+jQuery(window).scrollTop()&&"bottom"!=a.data("bs-placement")&&"cover"!=a.data("bs-placement")&&(u=n-l-10+jQuery(window).scrollTop()),u<0&&(u=10),f+i>o&&(f=o-i-10),f<0&&(f=10);break;case"cover":f+i>o&&(f=o-i-10),f<0&&(f=10)}switch(e.css({display:"block",left:f,top:u}),a.data("bs-placement")){case"right":case"left":(u=p.top-u+d/2-10)+25>l?u=l-25:u<5&&(u=5),e.find(".gb_I,.gb_H").attr("style","top:"+u+"px");break;case"top":case"bottom":(f=p.left-f+s/2-10)+25>i?f=i-25:f<5&&(f=5),e.find(".gb_I,.gb_H").attr("style","left:"+f+"px")}t(document).off("click.popbox").on("click.popbox",function(o){t(o.target).closest(".popbox,.ui-icon,.dzzdate,.ui-corner-all","#jquery-color-picker").length||(r(),t(".openpop").removeClass("openpop"))})},l=function(o){if(o||(o=a.data("href")),"#"==o){var e=a.siblings(".popbox-html").html();s(e)}else{o+=(-1!=o.indexOf("?")?"&":"?")+"t="+(new Date).getTime(),c=n.push(o),t.get(o,function(t){s(t)})}},s=function(o){e.find(".popbox-container").html(o),e.find(".js-popbox").on("click",function(){return l(t(this).data("href")),!1}),e.find(".js-popbox-prev").on("click",function(){return d(),!1}),e.find(".close,.cancel").on("click",function(t){t.preventDefault(),r()}),i()},d=function(){c>1?c-=1:c=0,url=n[c-1],n.splice(c-1,n.length-c+1),l(url)},r=function(){c=0,n=[],e.data("prevel",null),e.fadeOut("fast",function(){e.find(".popbox-container").html('<div class="loadding"></div>')}),a.removeClass("openpop"),t(document).off("click.popbox")};"update"==o?window.setTimeout(function(){i()}):"open"==o?window.setTimeout(function(){p()}):"close"==o?r():"getdata"==o?l():t(this).off("click.popbox").on("click.popbox",p)}}(jQuery);