mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.4-BUG-FIX to HEAD
32340: Fix for ALF-11737 (refix for ALF-11247) - After clicking on any list item action in Explorer there is no effect 32341: Fix for ALF-9883 - WCM Forms: Changing 'abstract' type carries previously-added elements git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32344 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -103,10 +103,6 @@ public class UIActions extends SelfRenderingComponent
|
|||||||
this.showLink = (Boolean)values[2];
|
this.showLink = (Boolean)values[2];
|
||||||
this.verticalSpacing = (Integer)values[3];
|
this.verticalSpacing = (Integer)values[3];
|
||||||
this.groups = new HashSet<String>(4);
|
this.groups = new HashSet<String>(4);
|
||||||
|
|
||||||
// when the state of the component is restored, clear the child list of components - they
|
|
||||||
// are always rebuilt on initial page render - otherwise the list will grow forever...
|
|
||||||
this.getChildren().clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,6 +157,20 @@ public class UIActions extends SelfRenderingComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// look to see if we built a component set for that component group on a previous render
|
||||||
|
// this will need removing from the child component set to ensure that it does not grow endlessly
|
||||||
|
for (Iterator i=getChildren().iterator(); i.hasNext(); /**/)
|
||||||
|
{
|
||||||
|
UIComponent child = (UIComponent)i.next();
|
||||||
|
if (contextId.equals(child.getAttributes().get("contextId")))
|
||||||
|
{
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
logger.debug("***removing old child component set for contextId: " + contextId);
|
||||||
|
i.remove();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String groupId = getValue();
|
String groupId = getValue();
|
||||||
if (groupId != null && groupId.length() != 0)
|
if (groupId != null && groupId.length() != 0)
|
||||||
{
|
{
|
||||||
|
@@ -2844,10 +2844,17 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
|
|||||||
var contentDivWidth = "100%";
|
var contentDivWidth = "100%";
|
||||||
// the following does avoid devision by zero ... in contentDiv.offsetLeft / child.domContainer.offsetWidth
|
// the following does avoid devision by zero ... in contentDiv.offsetLeft / child.domContainer.offsetWidth
|
||||||
var ow = child.domContainer.offsetWidth;
|
var ow = child.domContainer.offsetWidth;
|
||||||
if (!(child instanceof alfresco.xforms.AbstractGroup) && ow != 0)
|
if (!(child instanceof alfresco.xforms.AbstractGroup))
|
||||||
|
{
|
||||||
|
if (ow != 0)
|
||||||
{
|
{
|
||||||
contentDivWidth = ((1 - (contentDiv.offsetLeft / ow)) * 100) + "%";
|
contentDivWidth = ((1 - (contentDiv.offsetLeft / ow)) * 100) + "%";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
contentDivWidth = "70%";
|
||||||
|
}
|
||||||
|
}
|
||||||
contentDiv.style.width = contentDivWidth;
|
contentDiv.style.width = contentDivWidth;
|
||||||
child.render(contentDiv);
|
child.render(contentDiv);
|
||||||
|
|
||||||
@@ -2873,7 +2880,26 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
|
|||||||
// (.5 * contentDiv.labelNode.offsetHeight))) + "px";
|
// (.5 * contentDiv.labelNode.offsetHeight))) + "px";
|
||||||
contentDiv.labelNode.style.position = "relative";
|
contentDiv.labelNode.style.position = "relative";
|
||||||
contentDiv.labelNode.style.top = "0px";
|
contentDiv.labelNode.style.top = "0px";
|
||||||
|
if (oh)
|
||||||
|
{
|
||||||
contentDiv.labelNode.style.height = oh + "px";
|
contentDiv.labelNode.style.height = oh + "px";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var defaultHeight = 20;
|
||||||
|
if (child instanceof alfresco.xforms.RichTextEditor)
|
||||||
|
{
|
||||||
|
defaultHeight = 200;
|
||||||
|
}
|
||||||
|
contentDiv.labelNode.style.height = defaultHeight + "px";
|
||||||
|
contentDiv.style.top = "-" + defaultHeight + "px";
|
||||||
|
child.domContainer.style.height = defaultHeight + "px";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!contentDiv.labelNode.scrollWidth)
|
||||||
|
{
|
||||||
|
contentDiv.labelNode.style.width = "30%";
|
||||||
|
}
|
||||||
contentDiv.labelNode.style.lineHeight = contentDiv.labelNode.style.height;
|
contentDiv.labelNode.style.lineHeight = contentDiv.labelNode.style.height;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4222,6 +4248,9 @@ alfresco.xforms.XForm = new Class({
|
|||||||
this.rootWidget = new alfresco.xforms.ViewRoot(this, rootGroup);
|
this.rootWidget = new alfresco.xforms.ViewRoot(this, rootGroup);
|
||||||
this.rootWidget.render(alfUI);
|
this.rootWidget.render(alfUI);
|
||||||
|
|
||||||
|
//par variable is introduced for offline domNode editing, which improves performance
|
||||||
|
var par = this.rootWidget.domNode.parentNode;
|
||||||
|
par.removeChild(this.rootWidget.domNode);
|
||||||
this.loadWidgets(rootGroup, this.rootWidget);
|
this.loadWidgets(rootGroup, this.rootWidget);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user