文件操作 - splitter.min.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/local/cwpsrv/var/services/roundcube-ssd/skins/classic/splitter.min.js
编辑文件内容
/** * Roundcube splitter GUI class * * @licstart The following is the entire license notice for the * JavaScript code in this file. * * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * @licend The above is the entire license notice * for the JavaScript code in this file. * * @constructor */ function rcube_splitter(t){this.p1id=t.p1,this.p2id=t.p2,this.id=t.id||this.p1id+"_"+this.p2id+"_splitter",this.orientation=t.orientation,this.horizontal="horizontal"==this.orientation||"h"==this.orientation,this.pos=t.start?+t.start:0,this.relative=!!t.relative,this.drag_active=!1,this.callback=t.callback;var s=this;function e(t){s.drag_active=!0,(bw.konq||bw.chrome||bw.safari)&&(document.body.style.webkitUserSelect="none"),s.p1pos=s.relative?$(s.p1).position():$(s.p1).offset(),s.p2pos=s.relative?$(s.p2).position():$(s.p2).offset(),$(document).on("mousemove."+s.id,i).on("mouseup."+s.id,o),$("iframe").each(function(){$('<div class="iframe-splitter-fix"></div>').css({background:"#fff",width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css($(this).offset()).appendTo("body")})}function i(i){return s.drag_active&&(window.clearTimeout(s.ts),s.ts=window.setTimeout(function(){var t,e=i;e=rcube_event.get_mouse_pos(e),s.relative&&(t=$(s.p1.parentNode).offset(),e.x-=t.left,e.y-=t.top),s.horizontal?e.y-1.5*s.layer.height>s.p1pos.top&&e.y+1.5*s.layer.height<s.p2pos.top+s.p2.offsetHeight&&(s.pos=e.y,s.resize()):e.x-1.5*s.layer.width>s.p1pos.left&&e.x+1.5*s.layer.width<s.p2pos.left+s.p2.offsetWidth&&(s.pos=e.x,s.resize()),s.p1pos=s.relative?$(s.p1).position():$(s.p1).offset(),s.p2pos=s.relative?$(s.p2).position():$(s.p2).offset()},1)),!1}function o(t){return s.drag_active=!1,(bw.konq||bw.chrome||bw.safari)&&(document.body.style.webkitUserSelect="auto"),$(document).off("."+s.id),$("div.iframe-splitter-fix").remove(),s.set_cookie(),"function"==typeof s.callback&&s.callback(s),!!bw.safari||rcube_event.cancel(t)}function h(t){var e;s.horizontal?(e=parseInt(s.p2.parentNode.offsetHeight,10)-parseInt(s.p2.style.top,10),s.p2.style.height=(0<e?e:0)+"px"):(e=parseInt(s.p2.parentNode.offsetWidth,10)-parseInt(s.p2.style.left,10),s.p2.style.width=(0<e?e:0)+"px")}this.init=function(){this.p1=document.getElementById(this.p1id),this.p2=document.getElementById(this.p2id),this.p1pos=this.relative?$(this.p1).position():$(this.p1).offset(),this.p2pos=this.relative?$(this.p2).position():$(this.p2).offset(),this.horizontal?(t=this.p1pos.top+this.p1.offsetHeight,this.layer=new rcube_layer(this.id,{x:0,y:t,height:10,width:"100%",vis:1,parent:this.p1.parentNode})):(t=this.p1pos.left+this.p1.offsetWidth,this.layer=new rcube_layer(this.id,{x:t,y:0,width:10,height:"100%",vis:1,parent:this.p1.parentNode})),this.elm=this.layer.elm,this.elm.className="splitter "+(this.horizontal?"splitter-h":"splitter-v"),this.elm.unselectable="on",$(this.elm).mousedown(e),$(window).resize(function(t){t.target===window&&s.resize()}),bw.ie&&$(window).resize(h);var t=rcmail.get_cookie(this.id);t&&!isNaN(t)?(this.pos=parseFloat(t),this.resize()):this.pos&&(this.resize(),this.set_cookie())},this.resize=function(){var t;this.horizontal?(t=this.layer.height,this.p1.style.height=Math.floor(this.pos-this.p1pos.top-t/2)+"px",this.p2.style.top=Math.ceil(this.pos+t/2)+"px",this.layer.move(this.layer.x,Math.round(this.pos-t/2+1)),bw.ie&&(t=parseInt(this.p2.parentNode.offsetHeight,10)-parseInt(this.p2.style.top,10),this.p2.style.height=(0<t?t:0)+"px")):(t=$(window).width()-$(this.p1).offset().left-150,t=Math.min(this.pos,t),this.p1.style.width=Math.floor(t-this.p1pos.left-this.layer.width/2)+"px",this.p2.style.left=Math.ceil(t+this.layer.width/2)+"px",this.layer.move(Math.round(t-this.layer.width/2+1),this.layer.y),bw.ie&&(t=parseInt(this.p2.parentNode.offsetWidth,10)-parseInt(this.p2.style.left,10),this.p2.style.width=(0<t?t:0)+"px")),$(this.p2).resize(),$(this.p1).resize()},this.set_cookie=function(){var t=new Date;t.setYear(t.getFullYear()+1),rcmail.set_cookie(this.id,this.pos,t)}}
修改文件时间
将文件时间修改为当前时间的前一年
删除文件