📄 isc_tools.js
字号:
/* 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_Tools){isc.module_Tools=1;isc._moduleStart=isc._Tools_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log && isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={ message:'Tools 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.defineClass("ComponentEditor","PropertySheet");isc.A=isc.ComponentEditor.getPrototype();isc.A.immediateSave=false;isc.A.itemHoverWidth=500;isc.A.showSuperClassEvents=true;isc.A.initialGroups=3;isc.A.showAttributes=true;isc.A.showMethods=false;isc.A=isc.ComponentEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.handlerFieldBase={validateOnChange:true,validators:[{type:"isFunction"}],itemHoverHTML:function(){var _1=this.mapValueToDisplay(this.getValue());if(_1==null)return _1;if(_1==" "||_1.match(/^\W+$/))_1="";return _1.asHTML()}};isc.A.itemHoverStyle="docHover";isc.B.push(isc.A.shouldUseField=function(_1){if(!this.Super("shouldUseField",arguments)){return false}if(_1.hidden||_1.inapplicable||_1.advanced)return false;if(_1.type&&isc.DS.isLoaded(_1.type)&&_1.type!="ValueMap"&&_1.type!="Action"){return false}var _2=isc.DS.get(this.dataSource);if(!_2)return true;var _3=_2.ID,_4=_1[this.fieldIdProperty];if(isc.jsdoc.hasData()){var _5=isc.jsdoc.getDocItem(_3,_4,true);if(_1.visibility!=null&&_5==null)return false;if(isc.isAn.XMLNode(_5)&&_5.getAttribute("deprecated"))return false;if(_5&&isc.jsdoc.isAdvancedAttribute(_5))return false}return true},isc.A.bindToDataSource=function(_1,_2){var _3=this.$46d=this.Super("bindToDataSource",arguments);var _4=this.dataSource?isc.DS.get(this.dataSource):null;if(_1&&_1.length>0)return _3;if(_4==null||this.$46d==null)return _3;for(var i=0;i<_3.length;i++){var _6=_3[i],_7=_6.defaultValue;if(_7==null)continue;if(_7=="false")_7=false;else if(_7=="true")_7=true;else if(parseInt(_7).toString()==_7){_7=parseInt(_7)}_6.defaultValue=_7}if(!isc.jsdoc.hasData())return _3;var _8={},_9=false;if(this.showAttributes){for(var i=0;i<_3.length;i++){var _6=_3[i],_10=_6[this.fieldIdProperty];var _11=isc.jsdoc.getGroupForAttribute(_4.ID,_10)||_6.group||"other";if(_11==null)_11="other";if(_11!="other")_9=true;if(!_8[_11])_8[_11]=[];_8[_11].add(_6)}}if(this.showMethods){if(!this.createMethodGroups(_8,_4)&&!this.showAttributes){return[]}else{_9=true}}if(!_9)return _3;var _12=isc.getKeys(_8),_13=_4.getGroups(),_14=[];if(_13!=null){for(var i=0;i<_13.length;i++){var _15=_12.indexOf(_13[i]);if(_15==-1)continue;_12.removeAt(_15);_14.add(_13[i])}_14.addList(_12)}else{_14=_12}var _15=_14.indexOf("other");if(_15!=-1){_14.removeAt(_15);_14.add("other")}_1=[];for(var i=0;i<_14.length;i++){var _11=_14[i],_16=_8[_11],_17=isc.jsdoc.getGroupItem(_11),_18=_17&&_17.title?_17.title:_11.substring(0,1).toLocaleUpperCase()+_11.substring(1);_1[_1.length]={editorType:"GroupItem",defaultValue:_18,sectionExpanded:(i<this.initialGroups),items:_16}}return _1},isc.A.createMethodGroups=function(_1,_2){var _3=isc.ClassFactory.getClass(_2.ID);this.$46e=[];if(_3&&_3._stringMethodRegistry&&!isc.isAn.emptyObject(_3._stringMethodRegistry)){var _4=[_3];var _5=this.$du(_2.showSuperClassEvents,this.showSuperClassEvents);if(_5&&(_3.isA("Canvas")||_3.isA("FormItem"))){for(var _6=_3;_6!=isc.Class;_6=_6.getSuperClass()){_4.add(_6)}}_4.reverse();var _7,_8=[],_9,_10={};for(var i=0;i<_4.length;i++){var _6=_4[i];_7=isc.getKeys(_6._stringMethodRegistry);_9=_7.duplicate()_9.removeList(_8);_8=_7;if(_9.length==0)continue;var _12=(_6==isc.Canvas?"Basic":_6.getClassName())+" Methods";_10[_12]=[];for(var j=0;j<_9.length;j++){var _14=_9[j];var _15="method:"+_6.getClassName()+"."+_14,_16=isc.jsdoc.getDocItem(_15);if(!_16){if(!_2.methods||!_2.methods.find("name",_14)){continue}}if(_16&&isc.jsdoc.getAttribute(_16,"deprecated"))continue;var _17=this.getMethodField(_9[j]);_10[_12].add(_17)}if(_10[_12].length==0){delete _10[_12];delete _1[_12]}}var _18=isc.getKeys(_10).reverse();for(var i=0;i<_18.length;i++){_1[_18[i]]=_10[_18[i]]}return true}if(_2.methods&&_2.methods.length>0){var _19=_1[_2.ID+" Methods"]=[];for(var i=0;i<_2.methods.length;i++){var _20=_2.methods[i];var _17=this.getMethodField(_20.name);_19.add(_17)}return true}return false},isc.A.getMethodField=function(_1){var _2=isc.clone(this.handlerFieldBase);_2[this.fieldIdProperty]=_1;_2.type=this.canEditExpressions?"expression":"action";this.$46e.add(_2);return _2},isc.A.clearComponent=function(){var _1=this.currentComponent;if(_1==null)return;delete this.currentComponent;delete this.dataSource;this.setFields([])},isc.A.editComponent=function(_1,_2){var _3=_1.type,_2=_2||_1.liveObject;if(this.logIsInfoEnabled("editing")){this.logInfo("Editing component of type: "+_3+", initData: "+this.echo(_1.initData),"editing")}this.currentComponent=_1;this.setDataSource(_3);var _4={},_5=this.$46d;if(this.$46e){_5=_5.concat(this.$46e)}for(var i=0;i<_5.length;i++){var _7=_5[i];if(_7.advanced){_7.showIf=this.$46f}if(!_7.name)continue;var _8=_7.name,_9;if(_2)_9=_2[_8];var _10;if(_9===_10)continue;if(isc.isA.Function(_9)){if(!_2.getClass)continue;var _11=_2.getClass().getInstanceProperty(_8);if(_11==_9)continue}_4[_8]=_9}if(this.logIsDebugEnabled("editing")){this.logDebug("Live values: "+this.echo(_4),"editing")}this.setValues(_4)},isc.A.$46f=function(){return false},isc.A.wrapEditorColumns=function(){if(!this.items)return;var _1=0;for(var i=0;i<this.items.length;i++){var _3=this.items[i];if(_3.visible&&!_3.advanced)_1++}if(_1>10)this.numCols=4;if(_1>20)this.numCols=6}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -