mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 20:31:31 +02:00
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:
parent
6e76361736
commit
d1a2b89815
@ -199,11 +199,11 @@ var et2_baseWidget = et2_DOMWidget.extend(et2_IAligned,
|
|||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
|
|
||||||
// Add the binding for the click handler
|
// 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) {
|
$j(this.node).bind("click.et2_baseWidget", this, function(e) {
|
||||||
return e.data.click.call(e.data, this);
|
return e.data.click.call(e.data, this);
|
||||||
});
|
}).addClass('et2_clickable');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the statustext
|
// Update the statustext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user