diff --git a/etemplate/js/et2_DOMWidget.js b/etemplate/js/et2_DOMWidget.js
index dd23d49573..9ed116f4da 100644
--- a/etemplate/js/et2_DOMWidget.js
+++ b/etemplate/js/et2_DOMWidget.js
@@ -64,6 +64,12 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, {
"type": "dimension",
"default": et2_no_init,
"description": "Height of the element in pixels, percentage or 'auto'"
+ },
+ "class": {
+ "name": "CSS Class",
+ "type": "string",
+ "default": et2_no_init,
+ "description": "CSS Class which is applied to the dom element of this node"
}
},
@@ -244,6 +250,20 @@ var et2_DOMWidget = et2_widget.extend(et2_IDOMNode, {
{
$j(node).css("height", _value);
}
+ },
+
+ set_class: function(_value) {
+ var node = this.getDOMNode(this);
+ if (node)
+ {
+ if (this["class"])
+ {
+ $j(node).removeClass(this["class"]);
+ }
+ $j(node).addClass(_value);
+ }
+
+ this["class"] = _value;
}
});
diff --git a/etemplate/js/et2_description.js b/etemplate/js/et2_description.js
index f34264e37a..9d3681ab76 100644
--- a/etemplate/js/et2_description.js
+++ b/etemplate/js/et2_description.js
@@ -92,8 +92,6 @@ var et2_description = et2_baseWidget.extend({
this.span.attr("for", this.options.label_for);
}
- // Create an array which contains the parts of the text with links around
- // it
et2_insertLinkText(this._parseText(), this.span[0], this.options.extra_link_target);
this.setDOMNode(this.span[0]);
diff --git a/etemplate/js/test/et2_test_description.xet b/etemplate/js/test/et2_test_description.xet
index 7a95eb4ff0..918d0946af 100644
--- a/etemplate/js/test/et2_test_description.xet
+++ b/etemplate/js/test/et2_test_description.xet
@@ -5,6 +5,23 @@
+
+
+ .eyecancer {
+ font-size: 18pt;
+ color: red;
+ text-shadow: 0 0 10px red;
+ text-decoration: blink;
+ border: 5px groove red;
+ padding: 10px;
+ width: 120px;
+ text-align: center;
+ display: inline-block;
+ border-radius: 25px;
+ -moz-border-radius: 25px;
+ margin: 30px;
+ }
+