--- a/src/js/widgets.js Fri Mar 02 13:25:44 2012 +0100
+++ b/src/js/widgets.js Mon Mar 05 10:55:08 2012 +0100
@@ -52,6 +52,24 @@
if (config.hasOwnProperty("layoutManager")) {
this.layoutManager = config.layoutManager;
}
+ if (typeof this.selector != "undefined" && typeof Popcorn != "undefined") {
+ var _id = this._id;
+ this.selector.bind("click mouseover mouseout dragstart dragstop", function(_e) {
+ var _data = {
+ "type": _e.type,
+ "x": _e.clientX,
+ "y": _e.clientY,
+ "widget": _id,
+ "target_name": _e.target.localName,
+ "target_id": _e.target.id,
+ "target_class": _e.target.className,
+ "text": _e.target.textContent.trim(),
+ "title": _e.target.title,
+ "value": _e.target.value
+ };
+ Popcorn.trigger('IriSP.Widget.MouseEvents', _data);
+ })
+ }
};