Revision: 3818
Author: seba.wagner
Date: Mon Jun 13 08:55:06 2011
Log: fix < > in text fields
http://code.google.com/p/openmeetings/source/detail?r=3818
Modified:
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawLetter.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawWords.lzx
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawLetter.lzx
Sun Apr 25 09:18:21 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawLetter.lzx
Mon Jun 13 08:55:06 2011
@@ -3,6 +3,14 @@
<class name="whiteBoardTextField" extends="text" >
<attribute name="typeOfObject" value="text" type="string" />
+ <method name="setTextEncoded" args="tString">
+ <![CDATA[
+ tString = tString.replace("<","<");
+ tString = tString.replace(">",">");
+
+ this.setAttribute("text",tString);
+ ]]>
+ </method>
</class>
<class name="baseDrawLetter" extends="baseDrawObject">
@@ -112,6 +120,7 @@
if ($debug)
Debug.write("drawTextFieldByName ",txtName,textforfield,width,x,y);
//this.checkForChanges(txtName,textforfield,width,x,y,height);
this.edittextLetterObject.setAttribute('text',textforfield);
+ this.edittextLetterObject.setTextEncoded(textforfield);
this.edittextLetterObject.setAttribute('width',width);
this.edittextLetterObject.setAttribute('height',height);
this.edittextLetterObject.setAttribute('visible',true);
@@ -209,6 +218,7 @@
var editObj =
this.getObjectByName(actionObject[actionObject.length-1]);
//Debug.write("editTextByHistory: ",editObj,actionObject,actionObject.length);
editObj.setAttribute('text',actionObject[1]);
+ editObj.setTextEncoded(actionObject[1]);
editObj.setAttribute('width',actionObject[actionObject.length-3]);
editObj.setAttribute('height',actionObject[actionObject.length-2]);
editObj.setAttribute('fontsize',actionObject[3]);
@@ -236,6 +246,7 @@
<method name="newTextField"
args="obj,naming,textforfield,width,height,x,y,fontsize,fgcolor,fontstyle">
this.currentlayer = new
lz.whiteBoardTextField(obj,{name:naming,x:x,y:y,height:height,multiline:true,width:width,text:textforfield,fontsize:fontsize,fgcolor:fgcolor,fontstyle:fontstyle});
+ this.currentlayer.setTextEncoded(textforfield);
//Add Layer to global Layer
return this.currentlayer;
</method>
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawWords.lzx
Mon Jun 13 07:52:13 2011
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/conference/whiteboard/base/baseDrawWords.lzx
Mon Jun 13 08:55:06 2011
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<library>
-<class name="styleableInput" extends="customInputtext" x="1" y="1"
bgcolor="white" multiline="true"
+<class name="styleableInput" extends="customInputtext" x="1" y="1"
bgcolor="0xFFFFFF" multiline="true"
width="${ parent.width-2 }" height="${ parent.height-2 }" >
<attribute name="startAdjustHight" value="false" type="boolean" />
@@ -34,6 +34,20 @@
<handler name="onheight">
if (this.startAdjustHight) this.parent.parent.adjustHeight();
</handler>
+
+ <method name="getURLEncodedText">
+ <![CDATA[
+
+ var tString = this.getText();
+
+ //tString = tString.replace("<","<");
+ //tString = tString.replace(">",">");
+
+ return tString;
+
+ ]]>
+ </method>
+
</class>
<class name="baseDrawWords" extends="view" bgcolor="black"
@@ -47,7 +61,7 @@
<method name="drawtoArray">
<![CDATA[
if ($debug) Debug.write("drawtoArray");
- if (this._textview._textview.getText().length!=0 &&
this.inittext.length==0){
+ if (this._textview._textview.getURLEncodedText().length!=0 &&
this.inittext.length==0){
//var scale = this.parent._drawarea.width /
this.parent._drawarea.initW;
var y = ( this.getAttributeRelative('y',this.refObj)-this.refObj.y+1
);
@@ -62,11 +76,11 @@
}
- this.refObj.drawTextField(this._textview._textview.getText(),
+
this.refObj.drawTextField(this._textview._textview.getURLEncodedText(),
this._textview._textview.width,
this._textview._textview.height,x,y);
- } else if (this._textview._textview.getText().length!=0 &&
this.inittext.length!=0){
+ } else if (this._textview._textview.getURLEncodedText().length!=0
&& this.inittext.length!=0){
if ($debug) Debug.write("edit modi ",this.initTextName);
var y =
(this.getAttributeRelative('y',this.refObj)-this.refObj.y+1);
@@ -81,12 +95,12 @@
}
this.refObj.setTextFieldByName(this.initTextName,
- this._textview._textview.getText(),
+ this._textview._textview.getURLEncodedText(),
this._textview._textview.width,
x,y,this._textview._textview.height);
} else {
- if ($debug) Debug.write("text smaller then
0",this._textview._textview.getText());
+ if ($debug) Debug.write("text smaller then
0",this._textview._textview.getURLEncodedText());
if ($debug)
Debug.write("this.gridWidth",canvas._drawarea.gridWidth);
if ($debug)
Debug.write("this.isSnapToGrid",canvas._drawarea.isSnapToGrid);
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.