implement set_class for progress widget; preserve widgets base classes, if we do so

This commit is contained in:
Klaus Leithoff 2013-10-18 09:47:29 +00:00
parent 2435e925ae
commit 4dbda94f6a

View File

@ -101,10 +101,15 @@ var et2_progress = et2_valueWidget.extend([et2_IDetachedDOM],
this.node.title = _value;
},
// set's class of this.node
// set's class of this.node; preserve baseclasses et2_progress and if this.options.href is set et2_clickable
set_class: function(_value)
{
this.node.setAttribute('class', _value);
var baseClass = "et2_progress"
if (this.options.href)
{
baseClass += ' et2_clickable';
}
this.node.setAttribute('class', baseClass + ' ' + _value);
},
/**