mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- 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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user