Add alt attribute to image widget

This commit is contained in:
Jermolene
2014-08-20 10:00:34 +01:00
parent 1973df0809
commit fbf307c648
2 changed files with 6 additions and 1 deletions

View File

@@ -105,6 +105,9 @@ ImageWidget.prototype.render = function(parent,nextSibling) {
if(this.imageTooltip) {
domNode.setAttribute("title",this.imageTooltip);
}
if(this.imageAlt) {
domNode.setAttribute("alt",this.imageAlt);
}
// Insert element
parent.insertBefore(domNode,nextSibling);
this.domNodes.push(domNode);
@@ -120,6 +123,7 @@ ImageWidget.prototype.execute = function() {
this.imageHeight = this.getAttribute("height");
this.imageClass = this.getAttribute("class");
this.imageTooltip = this.getAttribute("tooltip");
this.imageAlt = this.getAttribute("alt");
};
/*