/* * Isomorphic SmartClient * Version SNAPSHOT_v10.1d_2015-04-30 (2015-04-30) * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved. * "SmartClient" is a trademark of Isomorphic Software, Inc. * * licensing@smartclient.com * * http://smartclient.com/license */ if(window.isc&&window.isc.module_Core&&!window.isc.module_RichTextEditor){isc.module_RichTextEditor=1;isc._moduleStart=isc._RichTextEditor_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'RichTextEditor 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._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="SNAPSHOT_v10.1d_2015-04-30/LGPL Development Only"){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'SNAPSHOT_v10.1d_2015-04-30/LGPL Development Only'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))} isc.defineClass("ListPropertiesSampleTile","StatefulCanvas");isc.A=isc.ListPropertiesSampleTile.getPrototype();isc.A.baseStyle="simpleTile";isc.A.overflow="hidden";isc.A.showRollOver=true;isc.A.redrawOnStateChange=true;isc.A._redrawWithParent=true;isc.A=isc.ListPropertiesSampleTile.getPrototype();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.initWidget=function isc_ListPropertiesSampleTile_initWidget(){this.Super("initWidget",arguments);this.$1177=isc.ListPropertiesPane.getCanonicalListProperties(this.listProperties);this.$1178=this.imgHTML(isc.Canvas.$wz,40,3,"' style='background-color:#999;vertical-align:middle")},isc.A.getInnerHTML=function isc_ListPropertiesSampleTile_getInnerHTML(){var _1=this.$1177,_2=_1.style,_3=isc.ListPropertiesPane.getListType(_1)=="unordered",_4=_3?"ul":"ol",_5=this.creator.listProperties.startNumber;if(_5==null)_5=this.creator.startNumberField.getValue();var _6="
";return _6},isc.A.click=function isc_ListPropertiesSampleTile_click(){this.creator.setSelectedStyle(this.listProperties.style,this.listProperties.image,true)});isc.B._maxIndex=isc.C+3;isc.defineClass("ListPropertiesPane","Layout");isc.A=isc.ListPropertiesPane;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultSamplesList=[{style:"disc"},{style:"circle"},{style:"square"},{style:"decimal"},{style:"upper-roman"},{style:"lower-roman"},{style:"upper-alpha"},{style:"lower-alpha"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_blue.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_green.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_red.png"},{style:"custom-image",image:"[SKIN]/RichTextEditor/bullet_purple.png"}];isc.A.listStyleTypeMap={"lower-latin":"lower-alpha","upper-latin":"upper-alpha"};isc.A.$118k=[1000,"M",900,"CM",500,"D",400,"CD",100,"C",90,"XC",50,"L",40,"XL",10,"X",9,"IX",5,"V",4,"IV",1,"I"];isc.B.push(isc.A.getCanonicalImageURL=function isc_c_ListPropertiesPane_getCanonicalImageURL(_1){if(!_1)return"[SKIN]/RichTextEditor/bullet_blue.png";var _2=_1.indexOf("/images/RichTextEditor/");if(_2>=0){return"[SKIN]/"+_1.substring(_2+8)} return _1},isc.A.getCanonicalListProperties=function isc_c_ListPropertiesPane_getCanonicalListProperties(_1){if(_1==null)return{$118f:true,style:"disc"};if(_1.$118f)return _1;var _2={$118f:true,style:this.getCanonicalListStyleType(_1.style)};if(this.getListType(_1)=="ordered"){if("startNumber"in _1)_2.startNumber=_1.startNumber<<0}else{if(_2.style=="custom-image"){_2.image=this.getCanonicalImageURL(_1.image)}} return _2},isc.A.getCanonicalListStyleType=function isc_c_ListPropertiesPane_getCanonicalListStyleType(_1){if(!_1)return"disc";if(this.listStyleTypeMap.hasOwnProperty(_1))return this.listStyleTypeMap[_1];return _1},isc.A.getListType=function isc_c_ListPropertiesPane_getListType(_1){if(_1==null)return"unordered";var _2=this.getCanonicalListStyleType(_1.style);return(_2=="none"||_2=="disc"||_2=="circle"||_2=="square"||_2=="custom-image"||_2=="box"||_2=="check"||_2=="diamond"||_2=="dash"?"unordered":"ordered")},isc.A.convertFromExcelLetters=function isc_c_ListPropertiesPane_convertFromExcelLetters(_1){if(!_1)return null;var _2=_1.charCodeAt(_1.length-1),_3=_2-(_2>=97?96:64),_4=26;for(var _5=_1.length-1;_5>0;--_5,_4*=26){_2=_1.charCodeAt(_5-1);var r=_2-(_2>=97?96:64);_3+=r*_4} return _3},isc.A.convertFromRomanNumerals=function isc_c_ListPropertiesPane_convertFromRomanNumerals(_1){var _2=this.$118k;_1=_1.toUpperCase();var _3=0,_4=0;for(var p=0;p<_2.length;p+=2){var s=_2[p+1];while(_1.indexOf(s,_4)==_4){_3+=_2[p];_4+=s.length}} return _3},isc.A.convertToExcelLetters=function isc_c_ListPropertiesPane_convertToExcelLetters(_1,_2){if(!isc.isA.Number(_1))return null;var _3=_2?97:65;if(_1<=26){return String.fromCharCode(_3+_1-1)} var _4=[];while(_1>26){var r=(_1-1)%26 _4[_4.length]=_3+r;_1=((_1-r)/26)<<0} _4[_4.length]=_3+_1-1;_4.reverse();return String.fromCharCode.apply(String,_4)},isc.A.convertToRomanNumerals=function isc_c_ListPropertiesPane_convertToRomanNumerals(_1,_2){if(!isc.isA.Number(_1))return null;if(_1>3999)return String(_1);var _3=this.$118k;var _4=[];for(var p=0;p<_3.length;p+=2){var b=_3[p];while(_1>=b){_4[_4.length]=_3[p+1];_1-=b}} var _7=_4.join(isc.emptyString);if(_2)_7=_7.toLowerCase();return _7});isc.B._maxIndex=isc.C+8;isc.A=isc.ListPropertiesPane.getPrototype();isc.A.vertical=true;isc.A.width=400;isc.A.overflow="visible";isc.A.sampleTileLayoutDefaults={_constructor:"TileLayout",width:400,height:260,tileWidth:80,tileHeight:80,tileMargin:5};isc.A.sampleTileDefaults={_constructor:"ListPropertiesSampleTile"};isc.A.startNumberFormDefaults={_constructor:"DynamicForm",width:"100%",colWidths:[90,"*"],numCols:2};isc.A.startNumberFieldTitle="Start at";isc.A.startNumberFieldDefaults={editorType:"SpinnerItem",defaultValue:1,step:1,width:75,change:function(_1,_2,_3,_4){this.form.creator.setStartNumber(_3,true)},getPreviousValue:function(_1,_2){var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=isc.ListPropertiesPane.getListType(_3)=="unordered",_5=_3.style,_6=(_4||_5=="decimal"?0:1);return Math.max(_6,_1+_2)},getNextValue:function(_1,_2){var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=_3.style;if(_4=="upper-roman"||_4=="lower-roman"){return Math.min(_1+_2,3999-3)} return _1+_2},$79d:function(_1){if(!isc.isA.String(_1)||(_1=_1.trim())=="") {return this.Super("$79d",arguments)} var _2=_1.indexOf('.');if(_2>=0){_1=_1.substring(0,_2).trim()} var _3=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_4=_3.style;if(_4=="upper-roman"||_4=="lower-roman"){return isc.ListPropertiesPane.convertFromRomanNumerals(_1)}else if(_4=="upper-alpha"||_4=="lower-alpha"){return isc.ListPropertiesPane.convertFromExcelLetters(_1)} return this.Super("$79d",arguments)},formatEditorValue:function(_1,_2,_3,_4){var _5=isc.ListPropertiesPane.getCanonicalListProperties(this.form.creator.listProperties),_6=_5.style;if(_6=="upper-roman"){return isc.ListPropertiesPane.convertToRomanNumerals(_1,false)+"."}else if(_6=="lower-roman"){return isc.ListPropertiesPane.convertToRomanNumerals(_1,true)+"."}else if(_6=="upper-alpha"){return isc.ListPropertiesPane.convertToExcelLetters(_1,false)+"."}else if(_6=="lower-alpha"){return isc.ListPropertiesPane.convertToExcelLetters(_1,true)+"."} return String(_1)+"."}};isc.A=isc.ListPropertiesPane.getPrototype();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.initWidget=function isc_ListPropertiesPane_initWidget(){this.Super("initWidget",arguments);var _1=this.listProperties=this.listProperties||{};var _2=this.samplesList;if(_2==null){this.samplesList=_2=isc.ListPropertiesPane.defaultSamplesList.duplicate()} var _3=[];for(var i=0,_5=_2.length;i<_5;++i){_3[i]=this.createAutoChild("sampleTile",{listProperties:_2[i]})} this.addAutoChild("sampleTileLayout",{tiles:_3});var _6=this.$1175(_1);if(_6!=null){_6.setSelected(true);this.$1176=_6} var _7=isc.addProperties({},this.startNumberFieldDefaults,this.startNumberFieldProperties,{name:"startNumber",title:this.startNumberFieldTitle,value:_1.startNumber,disabled:isc.ListPropertiesPane.getListType(_1)=="unordered"});this.addAutoChild("startNumberForm",{items:[_7]});_7=this.startNumberField=this.startNumberForm.getField("startNumber");_1.startNumber=_7.getValue()},isc.A.setListProperties=function isc_ListPropertiesPane_setListProperties(_1){_1=this.listProperties=isc.ListPropertiesPane.getCanonicalListProperties(_1);this.setStartNumber(_1.startNumber);this.setSelectedStyle(_1.style,_1.image)},isc.A.setSelectedStyle=function isc_ListPropertiesPane_setSelectedStyle(_1,_2,_3){if(this.$1176!=null){this.$1176.setSelected(false);this.$1176=null} var _4=this.listProperties;_4.$118f=false;_4.style=_1;_4.image=_2;if(_4.startNumber==null)_4.startNumber=this.startNumberField.getValue();_4=this.listProperties=isc.ListPropertiesPane.getCanonicalListProperties(_4);var _5=this.startNumberField.getValue();this.startNumberField.setValue(_5);var _6=this.startNumberField.getValue();if(_5!=_6){this.setStartNumber(_6)} var _7=this.$1175(_4);if(_7!=null){_7.setSelected(true);this.$1176=_7} var _8=isc.ListPropertiesPane.getListType(_4)=="unordered";this.startNumberField.setDisabled(_8);if(_3&&this.listPropertiesChanged)this.listPropertiesChanged(_4)},isc.A.setStartNumber=function isc_ListPropertiesPane_setStartNumber(_1,_2){var _3=this.listProperties;_1=(_1!=null?_1<<0:this.startNumberField.getValue());this.startNumberField.setValue(_1);_3.startNumber=this.startNumberField.getValue();this.sampleTileLayout.markForRedraw();if(_2&&this.listPropertiesChanged)this.listPropertiesChanged(_3)},isc.A.$1175=function isc_ListPropertiesPane__findCorrespondingSampleTile(_1){_1=isc.ListPropertiesPane.getCanonicalListProperties(_1);var _2=_1.style,_3=_1.image,_4=this.sampleTileLayout.tiles,_5=_2=="custom-image";for(var i=0,_7=_4.length;i<_7;++i){var _8=_4[i];_1=_8.$1177;if(_1==null){_1=_8.$1177=isc.ListPropertiesPane.getCanonicalListProperties(_8.listProperties)} if(_1.style==_2&&(!_5||_1.image==_3)){return _8}} return null});isc.B._maxIndex=isc.C+5;isc.ListPropertiesPane.registerStringMethods({listPropertiesChanged:"listProperties"});isc.defineClass("ListPropertiesDialog","Window");isc.A=isc.ListPropertiesDialog.getPrototype();isc.A.title="List Properties";isc.A.autoSize=true;isc.A.listPropertiesPaneDefaults={_constructor:"ListPropertiesPane",autoParent:"none"};isc.A.bottomLayoutDefaults={_constructor:"HLayout",autoParent:"none",rightPadding:5,bottomPadding:5,leftPadding:5,width:400,height:22,align:"right",membersMargin:5};isc.A.applyButtonTitle="Apply";isc.A.applyButtonDefaults={_constructor:"IButton",autoParent:"bottomLayout",autoFit:true,click:function(){this.creator.applyClick(this.creator.listPropertiesPane.listProperties)}};isc.A.cancelButtonTitle="Cancel";isc.A.cancelButtonDefaults={_constructor:"IButton",autoParent:"bottomLayout",autoFit:true,click:function(){this.creator.cancelClick()}};isc.A=isc.ListPropertiesDialog.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.applyClick=isc.Class.NO_OP;isc.A.cancelClick=isc.Class.NO_OP;isc.B.push(isc.A.initWidget=function isc_ListPropertiesDialog_initWidget(){var _1=this.addAutoChild("listPropertiesPane"),_2=this.addAutoChild("bottomLayout");this.addAutoChild("applyButton",{title:this.applyButtonTitle});this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});this.items=[_1,_2];this.Super("initWidget",arguments)});isc.B._maxIndex=isc.C+1;isc.ListPropertiesDialog.registerStringMethods({applyClick:"listProperties",cancelClick:""});isc.ClassFactory.defineClass("RichTextCanvas","Canvas");isc.A=isc.RichTextCanvas;isc.A.FULL="full";isc.A.unsupportedErrorMessage="Rich text editing not supported in this browser";isc.A=isc.RichTextCanvas.getPrototype();isc.A.editable=true;isc.A.canSelectText=true;isc.A.canFocus=true;isc.A._useFocusProxy=false;isc.A.moveFocusOnTab=true;isc.A.overflow=isc.Canvas.AUTO;isc.A.showCustomScrollbars=false;isc.A.fullSyntaxHiliteDelay=3000;isc.A.contents="";isc.A=isc.RichTextCanvas;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.supportsRichTextEditing=function isc_c_RichTextCanvas_supportsRichTextEditing(){var _1=((isc.Browser.isSafari&&isc.Browser.safariVersion>=312)||(isc.Browser.isIE)||(isc.Browser.isMoz&&!isc.Browser.isCamino)||isc.Browser.isOpera);return _1},isc.A.$120i=function isc_c_RichTextCanvas__fixTabSpan(_1){_1.innerHTML=" "});isc.B._maxIndex=isc.C+2;isc.A=isc.RichTextCanvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$160i=[""];isc.A.$jf="Tab";isc.A.$120e="\t";isc.A.$9z="","
")} this.Super("init",arguments)},isc.A.$18y=function isc_RichTextItem__createCanvas(){this.$1138=true;var _1=this.getValue();_1=this.mapValueToDisplay(_1);var _2={ID:this.getID()+"$21b",value:_1,moveFocusOnTab:this.moveFocusOnTab};var _3=this.controlGroups;if(_3!=null){var _4="Properties",_5="_autoMaker",_6="Constructor";_2.controlGroups=_3;for(var i=0;i<_3.length;i++){if(this[_3[i]]){var _8=_3[i],_9=this[_8];_2[_8]=_9;for(var _10=0;_10<_9.length;_10++){var _11=_9[_10]+_4,_12=_9[_10]+_5,_13=_9[_10]+_6;if(this[_11])_2[_11]=this[_11];if(this[_12])_2[_12]=this[_12];if(this[_13]) _2[_13]=this[_13]}}}} if(this.defaultControlConstructor!=null){_2.defaultControlConstructor=this.defaultControlConstructor} this.canvas=_2;this.Super("$18y",arguments);delete this.$1138},isc.A.setMoveFocusOnTab=function isc_RichTextItem_setMoveFocusOnTab(_1){this.moveFocusOnTab=_1;if(this.canvas)this.canvas.setMoveFocusOnTab(_1)},isc.A.editAreaFocusChanged=function isc_RichTextItem_editAreaFocusChanged(){this.hasFocus=this.canvas.editArea.hasFocus;if(this.hasFocus){this.elementFocus();this.form.setFocusItem(this)}else{this.elementBlur()}},isc.A.mapValueToDisplay=function isc_RichTextItem_mapValueToDisplay(_1){var _2=isc.FormItem.$b4.mapValueToDisplay.call(this,_1);if(_2==null)return isc.emptyString;return _2},isc.A.showValue=function isc_RichTextItem_showValue(_1,_2,_3,_4){if(!this.canvas)return;this.canvas.setValue(_1)});isc.B._maxIndex=isc.C+6;isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('RichTextEditor');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._RichTextEditor_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('RichTextEditor module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;if(isc.Page)isc.Page.handleEvent(null,"moduleLoaded",{moduleName:'RichTextEditor',loadTime:(isc._moduleEnd-isc._moduleStart)});}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'RichTextEditor'.");} /* * Isomorphic SmartClient * Version SNAPSHOT_v10.1d_2015-04-30 (2015-04-30) * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved. * "SmartClient" is a trademark of Isomorphic Software, Inc. * * licensing@smartclient.com * * http://smartclient.com/license */