Make DOM node stored in closure, not jQuery selection

This commit is contained in:
Nathan Gray 2012-03-14 19:00:38 +00:00
parent 7d4b32f5af
commit 45751ff042

View File

@ -664,7 +664,8 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
} }
if(!_value.title) { if(!_value.title) {
var self = this; var self = this;
var title = this.egw().link_title(_value.app, _value.id, function(title) {self.set_title(self.link[0], title);}, this); var node = this.link[0];
var title = this.egw().link_title(_value.app, _value.id, function(title) {self.set_title(node, title);}, this);
if(title != null) { if(title != null) {
_value.title = title; _value.title = title;
} }
@ -717,7 +718,8 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], {
* given values. * given values.
*/ */
setDetachedAttributes: function(_nodes, _values) { setDetachedAttributes: function(_nodes, _values) {
this.link = $j(_nodes[0]); this.link = jQuery(_nodes[0]);
if(typeof _values["id"] !== "undefined") this.set_id(_values['id']);
if(typeof _values["value"] !== "undefined" && typeof _values["value"].title !== "undefined") if(typeof _values["value"] !== "undefined" && typeof _values["value"].title !== "undefined")
{ {
// Direct route // Direct route