- adding support for alerts

- allowing overriding of label and specification of alert using xs:appinfo and inner alfresco:label, alfresco:alert tags. 



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4027 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-10-05 05:55:22 +00:00
parent 54ac87ef6b
commit e8643d2003
5 changed files with 3219 additions and 3139 deletions

View File

@@ -122,11 +122,28 @@ dojo.declare("alfresco.xforms.Widget",
}
return null;
},
_getAlertNode: function()
{
var labels = this.node.getElementsByTagName("alert");
for (var i = 0; i < labels.length; i++)
{
dojo.debug("parent " + labels[i].parentNode.nodeName +
" o " + this.node.nodeName);
if (labels[i].parentNode == this.node)
return labels[i];
}
return null;
},
getLabel: function()
{
var node = this._getLabelNode();
return node ? dojo.dom.textContent(node) : "";
},
getAlert: function()
{
var node = this._getAlertNode();
return node ? dojo.dom.textContent(node) : "";
},
_updateDisplay: function()
{
// this.domContainer.style.backgroundColor =
@@ -1206,7 +1223,7 @@ dojo.declare("alfresco.xforms.XForm",
msg += "<br/><ul>";
for (var j = 0; j < invalid.length; j++)
{
msg += "<li>" + invalid[j].getLabel() + "</li>";
msg += "<li>" + invalid[j].getAlert() + "</li>";
}
msg += "</ul>";
_show_error(msg);