summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/prado.js
diff options
context:
space:
mode:
authorwei <>2006-08-27 04:18:31 +0000
committerwei <>2006-08-27 04:18:31 +0000
commit887da1b3668499821f046665b461aeadb0a9fb2e (patch)
tree776f742ea179c823c90e7b81d2262a4344610eca /framework/Web/Javascripts/js/prado.js
parent1180e6486139a9c9662984367c4f624394e06f35 (diff)
Adding TActiveImage and TActiveImageButton
Diffstat (limited to 'framework/Web/Javascripts/js/prado.js')
-rw-r--r--framework/Web/Javascripts/js/prado.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index e3930cfd..87996c28 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -360,7 +360,15 @@ Event.stop(event);},onPostBack:function(event,options)
{if(!this.hasXYInput)
{this.addXYInput(event,options);this.hasXYInput=true;}
Prado.PostBack(event,options);},addXYInput:function(event,options)
-{var imagePos=Position.cumulativeOffset(this.element);var clickedPos=[event.clientX,event.clientY];var x=clickedPos[0]-imagePos[0]+1;var y=clickedPos[1]-imagePos[1]+1;var id=options['EventTarget'];var x_input=INPUT({type:'hidden',name:id+'_x',value:x});var y_input=INPUT({type:'hidden',name:id+'_y',value:y});this.element.parentNode.appendChild(x_input);this.element.parentNode.appendChild(y_input);}});Prado.WebUI.TRadioButton=Class.extend(Prado.WebUI.PostBackControl);Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize=Prado.WebUI.TRadioButton.prototype.initialize;Object.extend(Prado.WebUI.TRadioButton.prototype,{initialize:function(options)
+{imagePos=Position.cumulativeOffset(this.element);clickedPos=[event.clientX,event.clientY];x=clickedPos[0]-imagePos[0]+1;y=clickedPos[1]-imagePos[1]+1;x=x<0?0:x;y=y<0?0:y;id=options['EventTarget'];x_input=$(id+"_x");y_input=$(id+"_y");if(x_input)
+{x_input.value=x;}
+else
+{x_input=INPUT({type:'hidden',name:id+'_x','id':id+'_x',value:x});this.element.parentNode.appendChild(x_input);}
+if(y_input)
+{y_input.value=y;}
+else
+{y_input=INPUT({type:'hidden',name:id+'_y','id':id+'_y',value:y});this.element.parentNode.appendChild(y_input);}
+Logger.info("x="+x+", y="+y);}});Prado.WebUI.TRadioButton=Class.extend(Prado.WebUI.PostBackControl);Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize=Prado.WebUI.TRadioButton.prototype.initialize;Object.extend(Prado.WebUI.TRadioButton.prototype,{initialize:function(options)
{this.element=$(options['ID']);if(!this.element.checked)
this.onRadioButtonInitialize(options);}});Prado.WebUI.TTextBox=Class.extend(Prado.WebUI.PostBackControl,{onInit:function(options)
{if(options['TextMode']!='MultiLine')