⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isc_forms.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 5 页
字号:
/*  SmartClient Ajax RIA system  Version 6.5/LGPL Development Only (2008-04-30)  Copyright 2000-2007 Isomorphic Software, Inc. All rights reserved.  "SmartClient" is a trademark of Isomorphic Software, Inc.  LICENSE NOTICE     INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE     SOFTWARE EVALUATION LICENSE AGREEMENT. If you have received this file     without an Isomorphic Software license file, please see:         http://www.isomorphic.com/licenses/isc_eval_license_050316.html     You are not required to accept this agreement, however, nothing else     grants you the right to copy or use this software. Unauthorized copying     and use of this software is a violation of international copyright law.  EVALUATION ONLY     This software is provided for limited evaluation purposes only. You must     acquire a deployment license from Isomorphic Software in order to use     the SmartClient system, or any portion thereof, in any non-evaluation     application, including internal or non-commercial applications.  PROPRIETARY & PROTECTED MATERIAL     This software contains proprietary materials that are protected by     contract and intellectual property law. YOU ARE EXPRESSLY PROHIBITED     FROM ATTEMPTING TO REVERSE ENGINEER THIS SOFTWARE OR MODIFY THIS     SOFTWARE FOR HUMAN READABILITY.  CONTACT ISOMORPHIC     For more information regarding license rights and restrictions, or to     report possible license violations, please contact Isomorphic Software     by email (licensing@isomorphic.com) or web (www.isomorphic.com).*/if(window.isc&&window.isc.module_Core&&!window.isc.module_Forms){isc.module_Forms=1;isc._moduleStart=isc._Forms_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log && isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={ message:'Forms load/parse time: ' + (isc._moduleStart-isc._moduleEnd) + 'ms', category:'loadTime'};if(isc.Log && isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime')else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTMelse isc._preLog=[isc._pTM]}isc.A=isc.Canvas;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.applyTableResizePolicy=function(_1,_2,_3,_4,_5,_6,_7){var _8=this.logIsDebugEnabled("tablePolicy"),_9=this.logIsInfoEnabled("tablePolicy"),_10=this.logIsDebugEnabled("tablePlacement");var _11=_1.$8j;if(!this.$8k(_1)){_11=_1.$8j=[];var _12=0,_13=0;for(var _14=0;_14<_1.length;_14++){var _15=_1[_14];if(!_15.alwaysTakeSpace&&!_15.visible)continue;var _16=_15.getColSpan(),_17=_15.getRowSpan();if(_17==0||_16==0)continue;if(_16==null)_16=1;if(_17==null)_17=1;var _18=_16;if(_16=="*")_18=1;var _19=_15.getTitleOrientation();if(_15.showTitle&&(_19==isc.Canvas.LEFT||_19==isc.Canvas.RIGHT)){_18+=1;if(_16!="*")_16+=1}var _20=(_15.isStartRow?_15.isStartRow():_15.startRow),_21=(_15.isEndRow?_15.isEndRow():_15.endRow);if(_10){this.logDebug("at: "+["row"+_12,"col"+_13]+", item: "+(_15.name||_15.Class)+(_16=="*"?", colSpan:'*'":"")+", required cols:"+_18+(_17>1?", rowSpan:"+_17:"")+(_20?", startRow:true":"")+(_21?", endRow:true":""),"tablePlacement")}var _22=null,_23=null;if(_13>=_4||(_20&&_13!=0)){_12++;_13=0;_15.$8l=true}else{_15.$8l=false}if(_12<_11.length){for(;_12<_11.length;_12++){var _24=_11[_12];if(_24==null)break;for(;_13<_4;_13++){if(_24[_13]!=null)continue;for(var j=_13;j<_4;j++){if(_24[j]!=null)break;if((j-_13)+1>=_18){_22=_12;_23=_13;break}}if(_23!=null)break}if(_23!=null)break;_13=0;_15.$8l=true}}if(_23==null){_22=_12;_23=0;_15.$8l=true}_13=_23;if(_16=="*")_16=_4-_13;if(!isc.isA.Number(_17))_17=1;for(var r=_12;r<_12+_17;r++){if(!_11[r])_11[r]=[];for(var c=_13;c<_13+_16;c++){_11[r][c]=_14}}_15.$8m=[_23,_22,_23+_16,_22+_17];_13+=_16;if(_21)_13=_4;if(_10){this.logDebug("item: "+(_15.name||_15.Class)+" placed at: "+["row"+_22,"col"+_23]+(_15.$8l?", marked startRow ":"")+", rowTable: "+this.echoAll(_11),"tablePlacement")}}var _28=0;for(var r=0;r<_11.length;r++){var _29=_11[r];if(_29==null)break;var _30=0,_31=null;for(var c=0;c<_29.length;c++){if(_29[c]==null){_30++;continue}if(r>0&&_11[r-1]!=null&&_29[c]==_11[r-1][c])continue;var _14=_29[c],_15=_1[_14];if(_15==_31||_15==null)continue;_15.$8n=_28;_15.$8o=_30;if(_10&&(_30>0||_28>0)){this.logDebug("itemNum:"+_14+" ("+(_15.name||_15.Class)+") at: "+["row"+_22,"col"+_23]+" preceded by "+(_30>0?_30+" empty cells":"")+(_28>0?" "+_28+" empty rows":""),"tablePlacement")}_30=_28=0;_31=_15}if(_31==null){_28++;_30=0}}}if(!_5||!isc.isAn.Array(_5)){if(!isc.isAn.Array(_5)){this.logWarn(" 'colWidths' not an array - Ignoring.","tableResizePolicy")}_5=[]}_5=_5.duplicate();for(var c=0;c<_5.length;c++){var _32=_5[c];if(isc.isA.String(_32)){if(_32=="*")_5[c]=[0,1000,0,1];else if(_32.contains("*"))_5[c]=[0,1000,0,parseInt(_32)];else if(_32.contains("%"))_5[c]=[0,1000,parseInt(_32),0]}}_1.colWidths=_5;if(!_6){_6=[];for(var r=0;r<_11.length;r++){var _29=_11[r],_33=null,_34=100000,_35=0,_36=0;if(!_29)continue;for(var c=0;c<_29.length;c++){var _15=_1[_29[c]];if(!_15)continue;var _37=_15.getCellHeight(_7);var _17=(_15.$8m[3]-_15.$8m[1]);if(_8)this.logWarn("item at: "+[r,c]+" has height: "+_37+", item is: "+_15);_15.$8p=false;if(isc.isA.Number(_37)){_37=Math.floor(_37/ _17);if(_8)this.logWarn("item: "+_15+" has pixel size: "+_37);if(_33==null||_37>_33){_33=_37}if(_37>_34)_34=_37}else if(isc.isA.String(_37)){if(_37.contains("*")){_15.$8p=true;var _38=(_37=="*"?1:parseFloat(_37))/ _17;                        if (_8) this.logWarn("item: " + _15 + " has star size: " + _38);						_36 = Math.max(_36, _38);					// else if height is a percentage					} else {                        _15.$8p = true;						// get the percentage as a number						// NOTE: if the item takes up more than one row, split it evenly across                        // its rows						var _39 = parseFloat(_37) /_17;if(_8)this.logWarn("item: "+_15+" has percent size: "+_39);if(_39>_35)_35=_39}if(_15.minHeight>_33){_33=_15.minHeight}if(_15.minHeight>_34){_34=_15.minHeight}if(_15.maxHeight<_34&&_33<_15.maxHeight){_34=_15.maxHeight}}if(_35>0||_36>0){if(_33==null)_33=0;_6[r]=[_33,_34,_35,_36]}else{if(_33==null){_33=_1.$8q||22}_6[r]=_33}}}}_1.rowHeights=_6;if(_9)this.logInfo("\ntotalWidth: "+_2+", totalHeight: "+_3+"\nspecified sizes:\n"+"cols:"+this.echoAll(_1.colWidths)+", rows: "+this.echoAll(_1.rowHeights),"tablePolicy");_1.$8r=_5=isc.Canvas.stretchResizeList(_1.colWidths,_2);_1.$8s=_6=isc.Canvas.stretchResizeList(_1.rowHeights,_3);if(_9)this.logInfo("\nderived sizes:\n"+"cols:"+this.echoAll(_1.$8r)+", rows: "+this.echoAll(_1.$8s),"tablePolicy");for(_14=0;_14<_1.length;_14++){_15=_1[_14];if(!_15.visible)continue;var _40=isc.isA.Canvas(_15),_32=_40?_15.getWidth():_15.width,_41=_40?_15.getHeight():_15.getCellHeight(_7),_19=_15.getTitleOrientation(),_42=_15.$8m,_43=0;if(_15.showTitle){if(_19==isc.Canvas.LEFT){_43=_5[_42[0]]}else{_43=_5[_42[2]]}}if(_32=="*"){_32=0;var _44=(_15.showTitle&&_19==isc.Canvas.LEFT)?1:0,_45=(_15.showTitle&&_19==isc.Canvas.RIGHT)?1:0,_46=_42[0],_47=_42[2];for(var c=_46+_44;c<_47-_45;c++){_32+=_5[c]}}if(_15.$8p){_41=0;var _20=_42[1],_21=_42[3];for(var c=_20;c<_21;c++){_41+=_6[c]}}_15.$8t=[_32,_41];_15.$8u=_43}},isc.A.$8k=function(_1){if(!_1.$8j)return false;return true},isc.A.invalidateTableResizePolicy=function(_1){delete _1.$8j;delete _1.$8s;delete _1.$8r},isc.A.stretchResizeList=function(_1,_2){var _3=0,_4=0,_5=0,_6=_1.duplicate();for(var i=0;i<_1.length;i++){var _8=_6[i];if(isc.isA.Number(_8)){_8=Math.max(_8,1);_5+=_8;_6[i]=_8}else{var _9=_8[2],_10=_8[3];if(_10==0){_3+=_9}_4+=_10}}if(_4){var _11=0;if(_3<100){_11=(100-_3)/_4}for(var r=0;r<_1.length;r++){var _8=_6[r];if(isc.isA.Number(_8))continue;var _9=_8[2],_10=_8[3],_13=_10*_11;if(_9<_13){_8[2]=_13}if(_10>0)_3+=_8[2]}}if(_3<=0)return _6;var _14=Math.max(0,_2-_5);for(var r=0;r<_1.length;r++){var _15=Math.max(0,_14/ _3),_8=_6[r];if(isc.isA.Number(_8))continue;var _16=_8[0];if(_16==0)continue;var _17=_8[2],_18=_15*_17;if(_18<_16){_6[r]=_16;_14-=_16;_3-=_17;r=0}}for(var r=0;r<_1.length;r++){var _15=Math.max(0,_14/ _3),_8=_6[r];if(isc.isA.Number(_8))continue;var _19=_8[1],_17=_8[2],_18=_15*_17;if(_18>_19){_6[r]=_19;_14-=_19;_3-=_17;r=0}}_15=Math.max(0,_14/ _3);for(var r=0;r<_1.length;r++){_8=_6[r];if(isc.isA.Number(_8))continue;var _17=_8[2];_6[r]=Math.floor(_17*_15)}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -