summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js1
-rw-r--r--framework/Web/Javascripts/source/prado/controls/controls.js19
2 files changed, 15 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js
index aa1fd99b..d5cae7b8 100644
--- a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js
@@ -28,6 +28,7 @@ Prado.WebUI.TActiveImageButton = Class.extend(Prado.WebUI.TImageButton,
var request = new Prado.CallbackRequest(options.EventTarget, options);
request.dispatch();
Event.stop(event);
+ this.removeXYInput(event,options);
}
});
/**
diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js
index bea18e76..dac7a0c0 100644
--- a/framework/Web/Javascripts/source/prado/controls/controls.js
+++ b/framework/Web/Javascripts/source/prado/controls/controls.js
@@ -69,12 +69,9 @@ Object.extend(Prado.WebUI.TImageButton.prototype,
*/
onPostBack : function(event, options)
{
- if(!this.hasXYInput)
- {
- this.addXYInput(event,options);
- this.hasXYInput = true;
- }
+ this.addXYInput(event,options);
Prado.PostBack(event, options);
+ this.removeXYInput(event,options);
},
/**
@@ -111,6 +108,18 @@ Object.extend(Prado.WebUI.TImageButton.prototype,
y_input = INPUT({type:'hidden',name:id+'_y','id':id+'_y',value:y});
this.element.parentNode.appendChild(y_input);
}
+ },
+
+ /**
+ * Remove hidden inputs for x,y-click capturing
+ * @param event DOM click event.
+ * @param array image button options.
+ */
+ removeXYInput : function(event,options)
+ {
+ id = options['EventTarget'];
+ this.element.parentNode.removeChild($(id+"_x"));
+ this.element.parentNode.removeChild($(id+"_y"));
}
});