📄 common.js
字号:
}else{w=$int(wd);}var cell=$e($uuid(d)+"!cave");if(cell){cell.style.width=zk.revisedSize(cell,w)+"px";}}var uuid=$uuid(s);var cell=$e(uuid+"!cell")||$e(uuid+"!cave");if(cell&&(!_141[j]||s.className!=_141[j][0].el.className||s.style.cssText!="")){_141[j]=[{el:s,size:zk.sumStyles(s,"lr",zk.borders)+zk.sumStyles(s,"lr",zk.paddings)},{el:cell,size:zk.sumStyles(cell,"lr",zk.borders)+zk.sumStyles(cell,"lr",zk.paddings)}];}var rwd=_140[z]-_141[j][0].size;if(cell){cell.style.width=Math.max(rwd-_141[j][1].size,0)+"px";}s.style.width=(rwd<0?0:rwd)+"px";}}z+=s.colSpan;}}}if(_13e){zk.scrollIntoView(mate.body,_13e);}if(!_13b&&(zk.safari||zk.opera)){setTimeout(function(){zk.cpCellWidth(dst,_138,mate,false,true);},5);}};zk.cpCellArrayWidth=function(dst,_158){if(dst==null||_158==null||!_158.length||!dst.cells.length){return;}for(var j=0,k=_158.length;j<k;j++){var s=_158.shift();var z=s.cellIndex;var d=dst.cells[z];var wd=0;if(s.colSpan>1){if(s.colSpan+z<=dst.cells.length){for(var k=0;k<s.colSpan;k++){var hd=dst.cells[z+k];wd+=zk.ie&&z+k==dst.cells.length-1?hd.offsetWidth-2:hd.offsetWidth;}}}else{wd+=zk.ie&&z==dst.cells.length-1?d.offsetWidth-2:d.offsetWidth;}var uuid=$uuid(s);var cell=$e(uuid+"!cell")||$e(uuid+"!cave");var rwd=zk.revisedSize(s,wd);if(cell){cell.style.width=zk.revisedSize(cell,rwd)+"px";}s.style.width=rwd+"px";}};zk.formatFixed=function(val,_164){var s=""+val;for(var j=_164-s.length;--j>=0;){s="0"+s;}return s;};zk.parseDate=function(txt,fmt,_169){if(!fmt){fmt="yyyy/MM/dd";}var val=new Date();var y=val.getFullYear(),m=val.getMonth(),d=val.getDate();var ts=txt.split(/\W+/);for(var i=0,j=0;j<fmt.length;++j){var cc=fmt.charAt(j);if(cc=="y"||cc=="M"||cc=="d"||cc=="E"){var len=1;for(var k=j;++k<fmt.length;++len){if(fmt.charAt(k)!=cc){break;}}var _174;if(k<fmt.length){var c2=fmt.charAt(k);_174=c2=="y"||c2=="M"||c2=="d"||c2=="E";}var _176=ts[i++];switch(cc){case "y":if(_174){if(len<=3){len=2;}if(_176.length>len){ts[--i]=_176.substring(len);_176=_176.substring(0,len);}}y=$int(_176);if(isNaN(y)){return null;}if(y<100){y+=y>29?1900:2000;}break;case "M":if(len<=2){if(_174&&_176.length>2){ts[--i]=_176.substring(2);_176=_176.substring(0,2);}m=$int(_176)-1;if(isNaN(m)){return null;}}else{for(var l=0;;++l){if(l==12){return null;}if(len==3){if(zk.SMON[l].split(/\W+/)[0]==_176){m=l;break;}}else{if(zk.FMON[l].split(/\W+/)[0]==_176){m=l;break;}}}}break;case "d":if(_174){if(len<2){len=2;}if(_176.length>len){ts[--i]=_176.substring(len);_176=_176.substring(0,len);}}d=$int(_176);if(isNaN(d)){return null;}break;}j=k-1;}}var dt=new Date(y,m,d);if(_169&&(dt.getFullYear()!=y||dt.getMonth()!=m||dt.getDate()!=d)){return null;}return dt;};zk.formatDate=function(val,fmt){if(!fmt){fmt="yyyy/MM/dd";}var txt="";for(var j=0;j<fmt.length;++j){var cc=fmt.charAt(j);if(cc=="y"||cc=="M"||cc=="d"||cc=="E"){var len=1;for(var k=j;++k<fmt.length;++len){if(fmt.charAt(k)!=cc){break;}}switch(cc){case "y":if(len<=3){txt+=zk.formatFixed(val.getFullYear()%100,2);}else{txt+=zk.formatFixed(val.getFullYear(),len);}break;case "M":if(len<=2){txt+=zk.formatFixed(val.getMonth()+1,len);}else{if(len==3){txt+=zk.SMON[val.getMonth()];}else{txt+=zk.FMON[val.getMonth()];}}break;case "d":txt+=zk.formatFixed(val.getDate(),len);break;default:if(len<=3){txt+=zk.SDOW[val.getDay()];}else{txt+=zk.FDOW[val.getDay()];}}j=k-1;}else{txt+=cc;}}return txt;};zk.getIntAttr=function(el,nm){return $int(el.getAttribute(nm));};zk.clearSelection=function(){try{if(window["getSelection"]){if(zk.safari){window.getSelection().collapse();}else{window.getSelection().removeAllRanges();}}else{if(document.selection){if(document.selection.empty){document.selection.empty();}else{if(document.selection.clear){document.selection.clear();}}}}return true;}catch(e){return false;}};zk.disableSelection=function(el){el=$e(el);if(el){if(zk.gecko){el.style.MozUserSelect="none";}else{if(zk.safari){el.style.KhtmlUserSelect="none";}else{if(zk.ie){el.onselectstart=function(){return false;};}}}}};zk.enableSelection=function(el){el=$e(el);if(el){if(zk.gecko){el.style.MozUserSelect="";}else{if(zk.safari){el.style.KhtmlUserSelect="";}else{if(zk.ie){el.onselectstart=null;}}}}};zk.clearSelection=function(){try{if(window["getSelection"]){if(zk.safari){window.getSelection().collapse();}else{window.getSelection().removeAllRanges();}}else{if(document.selection){if(document.selection.empty){document.selection.empty();}else{if(document.selection.clear){document.selection.clear();}}}}}catch(e){}};zk.Float=Class.create();zk.Float.prototype={initialize:function(){},close:function(id){if(this._ftid==id){this.closeFloats();}},closeFloats:function(){return this._closeFloats(false,arguments);},closeFloatsOnFocus:function(){return this._closeFloats(true,arguments);},_closeFloats:function(_185,_186){if(this._ftid){var n=$e(this._ftid);if($visible(n)&&getZKAttr(n,"animating")!="hide"&&(!_185||!zk.isAncestorX(n,_186,true))){this._close(n);this._ftid=null;return true;}}return false;},addHideCovered:function(ary){if(this._ftid){var el=$e(this._ftid);if(el){ary.push(el);}}},setFloatId:function(id){this._ftid=id;}};zk.Floats=Class.create();zk.Floats.prototype={initialize:function(){this._ftids=[];this._aspps={};},close:function(id){for(var j=this._ftids.length;j;){if(this._ftids[--j]==id){this.closeFloats();return true;}}return false;},closeFloats:function(){return this._closeFloats(false,arguments);},closeFloatsOnFocus:function(){return this._closeFloats(true,arguments);},_closeFloats:function(_18d,_18e){var _18f;for(var j=this._ftids.length;--j>=0;){var id=this._ftids[j];var n=$e(id);if($visible(n)&&getZKAttr(n,"animating")!="hide"&&((!_18d&&!this._aspps[id])||!zk.isAncestorX(n,_18e,true))){this._ftids.splice(j,1);this._close(n);_18f=true;}}return _18f;},addHideCovered:function(ary){for(var j=0;j<this._ftids.length;++j){var el=$e(this._ftids[j]);if(el){ary.push(el);}}},getFloatIds:function(){return this._ftids;},addFloatId:function(id,_197){this._ftids.push(id);if(_197){this._aspps[id]=true;}},removeFloatId:function(id){this._ftids.remove(id);delete this._aspps[id];}};zk.History=Class.create();zk.History.prototype={initialize:function(){this.curbk="";setInterval("zkau.history.checkBookmark()",520);},bookmark:function(nm){if(this.curbk!=nm){this.curbk=nm;var _19a=encodeURIComponent(nm);window.location.hash=zk.safari?_19a:"#"+_19a;if(zk.ie){this.bkIframe(nm);}}},checkBookmark:function(){var nm=this.getBookmark();if(nm!=this.curbk){this.curbk=nm;zkau.send({uuid:"",cmd:"onBookmarkChanged",data:[nm]},50);}},getBookmark:function(){var nm=window.location.hash;var j=nm.indexOf("#");return j>=0?decodeURIComponent(nm.substring(j+1)):"";}};if(zk.ie){zk.History.prototype.bkIframe=function(nm){var url=zk.getUpdateURI("/web/js/zk/html/history.html",true);if(nm){url+="?"+encodeURIComponent(nm);}var ifr=$e("zk_histy");if(ifr){ifr.src=url;}else{zk.newFrame("zk_histy",url,"display:none");}};zk.History.prototype.onHistoryLoaded=function(src){var j=src.indexOf("?");var nm=j>=0?src.substring(j+1):"";window.location.hash=nm?"#"+nm:"";this.checkBookmark();};}zk.remove=function(n){if(n){Element.remove(n);}};zk.show=function(id,_1a6){if(_1a6==false){zk.hide(id);return;}var n=$e(id);if(n){var js=getZKAttr(n,"conshow");if(js){rmZKAttr(n,"conshow");try{eval(js);}finally{setZKAttr(n,"conshow",js);}}else{action.show(n);}}};zk.hide=function(id,_1aa){if(_1aa==false){zk.show(id);return;}var n=$e(id);if(n){var js=getZKAttr(n,"conhide");if(js){rmZKAttr(n,"conhide");try{eval(js);}finally{setZKAttr(n,"conhide",js);}}else{action.hide(n);}}};zk._showExtr=function(n){if("true"!=getZKAttr(n,"float")){var ext=$e(n.id+"!chdextr");if(ext&&"true"==getZKAttr(ext,"coexist")){ext.style.display="";ext=$e(n.id+"!chdextr2");if(ext){ext.style.display="";}}}};zk._hideExtr=function(n){if("true"!=getZKAttr(n,"float")){var ext=$e(n.id+"!chdextr");if(ext&&"true"==getZKAttr(ext,"coexist")){ext.style.display="none";ext=$e(n.id+"!chdextr2");if(ext){ext.style.display="none";}}}};action={};action.show=function(id){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"zk.show");}else{zk._showExtr(n);n.style.display="";zk.onVisiAt(n);}}};action.hide=function(id){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"zk.hide");}else{zk.onHideAt(n);n.style.display="none";zk._hideExtr(n);}}};anima={};anima.appear=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.appear");}else{setZKAttr(n,"animating","show");zk._showExtr(n);Effect.Appear(n,{duration:dur?dur/1000:0.8,afterFinish:anima._afterVisi});}}};anima.slideDown=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.slideDown");}else{setZKAttr(n,"animating","show");zk._showExtr(n);Effect.SlideDown(n,{duration:dur?dur/1000:0.4,afterFinish:anima._afterVisi});}}};anima.slideUp=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.slideUp");}else{setZKAttr(n,"animating","hide");zk.onHideAt(n);Effect.SlideUp(n,{duration:dur?dur/1000:0.4,afterFinish:anima._afterHide});}}};anima.fade=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.fade");}else{setZKAttr(n,"animating","hide");zk.onHideAt(n);Effect.Fade(n,{duration:dur?dur/1000:0.55,afterFinish:anima._afterHide});}}};anima.puff=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.puff");}else{setZKAttr(n,"animating","hide");zk.onHideAt(n);Effect.Puff(n,{duration:dur?dur/1000:0.7,afterFinish:anima._afterHide0});}}};anima.dropOut=function(id,dur){var n=$e(id);if(n){if(getZKAttr(n,"animating")){zk._addAnique(n.id,"anima.dropOut");}else{setZKAttr(n,"animating","hide");zk.onHideAt(n);Effect.DropOut(n,{duration:dur?dur/1000:0.7,afterFinish:anima._afterHide0});}}};anima._afterVisi=function(ef){var n=ef.element;if(n){rmZKAttr(n,"animating");zk.onVisiAt(n);zk._doAnique(n.id);}};anima._afterHide=function(ef){var n=ef.element;if(n){zk._hideExtr(n);rmZKAttr(n,"animating");zk._doAnique(n.id);}};anima._afterHide0=function(ef){var n=ef.effects[0].element;if(n){zk._hideExtr(n);rmZKAttr(n,"animating");zk._doAnique(n.id);}};zk._anique={};zk._addAnique=function(id,_1ce){var ary=zk._anique[id];if(!ary){ary=zk._anique[id]=[];}ary.push(_1ce);};zk._doAnique=function(id){var ary=zk._anique[id];if(ary){var n=$e(id);while(ary.length){if(getZKAttr(n,"animating")){break;}var js=ary.shift();eval(js+"('"+id+"')");}if(!ary.length){delete zk._anique[id];}}};}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -