mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41:10 +01:00
Bind onmouseenter event of add contact+ button on url-email set_value, as widget might be created by apps client side code, not directly loaded from xet file
This commit is contained in:
parent
2abc38e08e
commit
e7bc170c4e
@ -308,39 +308,8 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
this.span.attr("target", "_blank");
|
this.span.attr("target", "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Code for implementing et2_IDetachedDOM
|
|
||||||
*
|
|
||||||
* @param {array} _attrs array to add further attributes to
|
|
||||||
*/
|
|
||||||
getDetachedAttributes: function(_attrs)
|
|
||||||
{
|
|
||||||
_attrs.push("value", "class");
|
|
||||||
},
|
|
||||||
|
|
||||||
getDetachedNodes: function()
|
|
||||||
{
|
|
||||||
return [this.span[0]];
|
|
||||||
},
|
|
||||||
|
|
||||||
setDetachedAttributes: function(_nodes, _values)
|
|
||||||
{
|
|
||||||
// Update the properties
|
|
||||||
this.span = jQuery(_nodes[0]);
|
|
||||||
if (typeof _values["value"] != "undefined")
|
|
||||||
{
|
|
||||||
this.set_value(_values["value"]);
|
|
||||||
}
|
|
||||||
if (typeof _values["class"] != "undefined")
|
|
||||||
{
|
|
||||||
_nodes[0].setAttribute("class", _values["class"]);
|
|
||||||
}
|
|
||||||
// Add contact_plus button
|
// Add contact_plus button
|
||||||
if (this.options.contact_plus && this._type == "url-email" )
|
if (this.options.contact_plus)
|
||||||
{
|
{
|
||||||
// If user doesn't have access to addressbook, stop
|
// If user doesn't have access to addressbook, stop
|
||||||
if(!egw.app('addressbook')) return;
|
if(!egw.app('addressbook')) return;
|
||||||
@ -384,6 +353,38 @@ var et2_url_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Code for implementing et2_IDetachedDOM
|
||||||
|
*
|
||||||
|
* @param {array} _attrs array to add further attributes to
|
||||||
|
*/
|
||||||
|
getDetachedAttributes: function(_attrs)
|
||||||
|
{
|
||||||
|
_attrs.push("value", "class");
|
||||||
|
},
|
||||||
|
|
||||||
|
getDetachedNodes: function()
|
||||||
|
{
|
||||||
|
return [this.span[0]];
|
||||||
|
},
|
||||||
|
|
||||||
|
setDetachedAttributes: function(_nodes, _values)
|
||||||
|
{
|
||||||
|
// Update the properties
|
||||||
|
this.span = jQuery(_nodes[0]);
|
||||||
|
if (typeof _values["value"] != "undefined")
|
||||||
|
{
|
||||||
|
this.set_value(_values["value"]);
|
||||||
|
}
|
||||||
|
if (typeof _values["class"] != "undefined")
|
||||||
|
{
|
||||||
|
_nodes[0].setAttribute("class", _values["class"]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
Loading…
Reference in New Issue
Block a user