Don't overwrite parent variable 'node'

This commit is contained in:
Nathan Gray 2011-10-24 21:58:42 +00:00
parent a2de7dce27
commit 3bc0bdfd35

View File

@ -21,7 +21,7 @@
/** /**
* Class which implements the "image" XET-Tag * Class which implements the "image" XET-Tag
*/ */
var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, { var et2_image = et2_baseWidget.extend([et2_IDetachedDOM], {
attributes: { attributes: {
"src": { "src": {
@ -62,7 +62,7 @@ var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, {
this._super.apply(this, arguments); this._super.apply(this, arguments);
// Create the image or a/image tag // Create the image or a/image tag
var node = this.image = $j(document.createElement("img")); this.image = $j(document.createElement("img"));
if (this.options.label) if (this.options.label)
{ {
this.image.attr("alt", this.options.label).attr("title", this.options.label); this.image.attr("alt", this.options.label).attr("title", this.options.label);
@ -73,9 +73,9 @@ var et2_image = et2_baseWidget.extend(et2_IDetachedDOM, {
} }
if(this.options["class"]) if(this.options["class"])
{ {
node.addClass(this.options["class"]); this.image.addClass(this.options["class"]);
} }
this.setDOMNode(node[0]); this.setDOMNode(this.image[0]);
}, },
click: function() click: function()