Merged 3.1 to HEAD

13305: fix for ETHREEOH-911



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13588 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Lawrence Carvalho
2009-03-12 10:19:07 +00:00
parent d5fbd06a47
commit 9884a406b6

View File

@@ -337,11 +337,27 @@ alfresco.xforms.Widget = new Class({
}
else
{
var getNodeText = function(xmlNode)
{
if(xmlNode)
{
if (xmlNode.firstChild)
{
return (typeof(xmlNode.textContent) != "undefined") ? xmlNode.textContent : xmlNode.firstChild.nodeValue;
}
else
{
return (typeof(xmlNode.textContent) != "undefined") ? xmlNode.textContent : xmlNode.nodeValue;
}
}
return '';
}
this._initialValue = (this._initialValue.nodeType == document.ELEMENT_NODE
? (this._initialValue.firstChild
? this._initialValue.firstChild.nodeValue
? getNodeText(this._initialValue)
: null)
: this._initialValue.nodeValue);
: getNodeText(this._initialValue));
if (typeof this._initialValue == "string" && this._initialValue.length == 0)
{
this._initialValue = null;