Don't show duration if the field is empty for the row

This commit is contained in:
Nathan Gray 2012-03-13 19:38:48 +00:00
parent 53d2d9641b
commit ea084fb41f

View File

@ -407,9 +407,12 @@ var et2_date_duration_ro = et2_date_duration.extend([et2_IDetachedDOM],{
_nodes[i].removeChild(_nodes[i].childNodes[j]); _nodes[i].removeChild(_nodes[i].childNodes[j]);
} }
} }
var display = this._convert_to_display(_values.value); if(typeof _values.value !== 'undefined')
_nodes[0].appendChild(document.createTextNode(display.value)); {
_nodes[1].appendChild(document.createTextNode(display.unit)); var display = this._convert_to_display(_values.value);
_nodes[0].appendChild(document.createTextNode(display.value));
_nodes[1].appendChild(document.createTextNode(display.unit));
}
} }
}); });