Merged V3.2 to HEAD

17053: Merged V3.1 to V3.2
      17052: Merged V2.2 to V3.1
         17050: Fix for layout issues in ETWOTWO-490: xf:switch cannot be used in repeating field type

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17055 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-10-20 15:03:33 +00:00
parent f3f3e40efa
commit af64d567f6

View File

@@ -3105,14 +3105,12 @@ alfresco.xforms.SwitchGroup = alfresco.xforms.VGroup.extend({
_insertChildAt: function(child, position)
{
var childDomContainer = this.parent(child, position);
if (child.id == this._selectedCaseId)
{
this._getCaseToggleTriggerByCaseId(this._selectedCaseId).fire();
}
else
{
childDomContainer.style.display = "none";
}
return childDomContainer;
},
@@ -4145,6 +4143,21 @@ alfresco.xforms.XForm = new Class({
" is a prototype, ignoring");
continue;
}
// fix for ETWOTWO-490, hide elements after rendering
if (xformsNode.childNodes[i].nodeName == "chiba:data" &&
parentWidget instanceof alfresco.xforms.SwitchGroup)
{
var selectedCase = parentWidget._selectedCaseId;
for (var x = 0; x < parentWidget._children.length; x++)
{
if (parentWidget._children[x].id != selectedCase)
{
parentWidget._children[x].domContainer.style.display = "none";
}
}
}
var w = this.createWidget(xformsNode.childNodes[i]);
if (w != null)
{