only bind click event if we have a handler and add et2_clickable css class so user knows widget is clickable

This commit is contained in:
Ralf Becker 2013-10-16 09:17:51 +00:00
parent 6e76361736
commit d1a2b89815

View File

@ -199,11 +199,11 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned,
this._super.apply(this, arguments);
// Add the binding for the click handler
if (this.node)
if (this.node && typeof this.onclick == 'function')
{
$j(this.node).bind("click.et2_baseWidget", this, function(e) {
return e.data.click.call(e.data, this);
});
}).addClass('et2_clickable');
}
// Update the statustext