Files
DzzOffice/static/js/jquery.dragsort.js
小胡 53be1fecb4 更新内容:
系统设置新增功能
1. 是否启用登录密码加密:
在许多现代系统中,登录密码加密是默认启用的,以确保用户密码的安全性。所以新增了一个系统配置项,允许管理员决定是否启用登录密码的加密传输。这一功能增强了用户密码的安全性,防止密码泄露风险。
2. UID登录(允许通过UID的方式登录验证):
引入UID(用户唯一标识符)登录方式,除了传统的用户名/邮箱/手机号登录外,用户还可以通过其UID进行登录验证,为系统访问提供另一种灵活的身份验证方式。
3. 用户在线时间更新时长:
管理员可以自定义更新用户在线时间的时间频率,这有助于更准确地反映用户的活跃状态,并对系统资源的使用进行优化。
4. 图片处理库类型:
系统新增了图片处理库类型的选择功能,允许管理员根据实际需求选择合适的图像处理库来处理缩略图和水印,以满足不同的性能和效果需求。
新增性能优化栏
1. 禁止浏览器缓冲:
通过此设置,管理员可以控制是否禁止浏览器对页面内容进行缓存。在某些场景下,禁用缓存可以提高页面的实时性和准确性。
2. 在线保持时间:
设置用户会话(session)的在线保持时间,即用户在不进行任何操作后,多久后会被视为离线。这有助于管理系统的会话资源,避免资源浪费。
3. 关闭session机制:   提供选项关闭系统的session管理机制。在某些特殊应用场景下,可能不需要使用session来跟踪用户状态,关闭session可以减少服务器负担,提高性能。
系统工具新增文件权限检查栏:    系统工具中新增了文件权限检查功能,帮助管理员快速识别和修复文件权限问题,确保系统的正常运行和数据安全。
优化提示消息框UI:
对系统的提示消息框进行了UI优化,使其更加美观、易用,提升了用户的使用体验。
压缩css、js代码优化前端性能
对前端的CSS和JS代码进行了压缩处理,减少了文件体积,加快了加载速度,从而提升了前端性能。
2024-07-21 18:38:53 +08:00

8 lines
3.5 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.dragsort=function(o,n){var r={scrollContainer:t(".bs-main-container"),contentContainer:t(".main-content"),hoder_div_css:"position:relative;background:#f7f7f7;border:1px solid #e1e1e1",width_correct:0,height_correct:0};o=t.extend(r,o);var i,s,a,c,d,l,u,h,p,f,g,m,v,b,w=0,_=o.scrollContainer.offset();Math.max(document.documentElement.clientWidth,document.body.offsetWidth);if(jQuery("#_blank").length)var y=jQuery("#_blank");else y=jQuery('<div id="_blank" class="nokpdrager" unselectable="on" onselectstart="return event.srcElement.type== \'text\';" style="display:none; url(dzz/images/b.gif); z-index:10000;width:100%;height:100%;margin:0;padding:0; right: 0px; bottom: 0px;position: absolute; top:0px; left: 0px;"></div>').appendTo(o.contentContainer);t(this).children().off("mousedown.subdrager").on("mousedown.subdrager",function(e){if(!(t(this).hasClass("nodrager")||1!=e.which||t(e.target).is("input, textarea")||t(e.target).closest(".nodrager").length||window.kp_only)){jQuery("input").trigger("blur");try{e.preventDefault?e.preventDefault():e.returnvalue=!1}catch(e){}return m=t(this),u=e.clientX,h=e.clientY,v=m.offset(),b=m.position(),l=b.left,d=b.top-o.scrollContainer.scrollTop(),e.clientX-v.left,i=e.clientY-v.top,t(document).on("mousemove.subdrager",function(e){e=e||window.event;try{e.preventDefault?e.preventDefault():e.returnValue=!1}catch(e){}var n=e.clientX,r=e.clientY;if(window.kp_only||u==n&&h==r||x(),window.kp_only){r-i<=_.top?((w+=r-i-_.top>-50?-50:r-i-_.top)<0&&(w=0),o.scrollContainer.scrollTop(w)):r+(m.height()-i)>=c+_.top&&((w+=r+(m.height()-i)-c-_.top<50?50:r+(m.height()-i)-c-_.top)>a-c&&(w=a-c),o.scrollContainer.scrollTop(w));var d=r-i-(v.top-b.top)+w;m.css({top:d});var l=r-i+g;t(s).parent().children().not(m).not(s).not(".nodrager").each(function(e){var o=t(this),n=o.offset(),r=n.top,i=n.top+o.height(),a=n.top+o.height()/2;r<l&&l<i&&(l>a?s.insertAfter(this):s.insertBefore(this))})}}),!1}}),t(this).children().off("mouseup").mouseup(function(e){window.kp_only||t(document).off("mousemove.subdrager")});var x=function(){window.kp_only=!0,y.show(),p=m.outerWidth(!0),f=m.outerHeight(!0),p/2,g=f/2,c=o.scrollContainer.height(),Math.max(document.documentElement.clientWidth,document.body.offsetWidth),w=o.scrollContainer.scrollTop(),0,a=o.contentContainer.outerHeight(!0),scrollWidth=o.contentContainer.outerWidth(!0);try{e.preventDefault?e.preventDefault():e.returnvalue=!1}catch(t){}m.before('<div id="kp_widget_holder" style="'+o.hoder_div_css+'"></div>'),(s=t("#kp_widget_holder")).css({height:m.outerHeight(!0)-o.height_correct,width:m.outerWidth(!0)-o.width_correct}),m.css({width:p-o.width_correct,height:f-o.height_correct,position:"absolute",opacity:.9,"z-index":999,left:l-o.width_correct,top:d-o.height_correct,border:"1px solid #e1e1e1",background:"#fbfbfb","box-shadow":"1px 1px 1px RGBA(0,0,0,0.7)"}),t(document).on("mouseup.subdrager",function(e){t(document).off("mouseup.subdrager").off("mousemove.subdrager");var o=s.position();o.top+=w;var r={};r.subid=m.attr("subid"),r.taskid=m.attr("taskid"),r.prevsubid=s.prev()?s.prev(".todo-item").attr("subid"):0,m.animate({left:o.left-parseInt(s.css("margin-left")),top:o.top-parseInt(s.css("margin-top"))},300,function(){m.removeAttr("style"),s.replaceWith(m),"function"==typeof n&&n(r),y.hide(),window.kp_only=null})})}}}(jQuery);