Merged V3.2 to HEAD

16725: Merged V3.1 to V3.2
      16721: Merged DEV/BELARUS/V3.1 to V3.1 
         16483: Fix for ETHREEOH-2728 : WCM - Forms rendering issue using IE6
   16889: Merged V3.1 to V3.2
      16888: Merged V2.2 to V3.1 
         16694: Fix for ETHREEOH-1384/ACT 11135: Poor performance when using webscript based web forms 
         16787: Fixed Web-Client Eclipse project after recent chiba JAR file name change 
         16840: Resolution to issue in ETHREEOH-2633: Change to Common.js function implemented in CHK-5134 causes problems with missing icons in Navigator panel. Implemented configuration approach so that both modes can be supported. 
         16870: Fix for ETWOTWO-119 & ALFCOM-332: WCM config override issues where the OOTB web-client-config-wcm.xml file needed to be changed and the ability to define custom scripts to load to avoid the need to edit xforms.js or XFormsProcessor.java

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16913 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-10-14 11:37:27 +00:00
parent ba3f9629b5
commit b1e86e69f2
21 changed files with 1103 additions and 100 deletions

View File

@@ -531,7 +531,9 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this._selectableTypes = "selectable_types" in params ? params["selectable_types"].split(",") : null;
this._filterMimetypes = "filter_mimetypes" in params ? params["filter_mimetypes"].split(",") : [];
this._folderRestriction = "folder_restriction" in params ? params["folder_restriction"] : null;
this._configSearchName = "config_search_name" in params ? params["config_search_name"] : null; },
this._configSearchName = "config_search_name" in params ? params["config_search_name"] : null;
this._layout = "layout" in params ? params["layout"] : null;
},
/////////////////////////////////////////////////////////////////
// overridden methods
@@ -542,6 +544,23 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this.domNode.addClass("xformsFilePicker");
attach_point.appendChild(this.domNode);
//XXXarielb support readonly and disabled
if (this._layout == "table")
{
this.widget = new alfresco.FilePickerWidgetTableLayout(this.id,
this.domNode,
this.getInitialValue(),
false,
this._filePicker_changeHandler.bindAsEventListener(this),
null /* cancel is ignored */,
this._filePicker_resizeHandler.bindAsEventListener(this),
this._selectableTypes,
this._filterMimetypes,
this._folderRestriction,
this._configSearchName);
}
else
{
this.widget = new alfresco.FilePickerWidget(this.id,
this.domNode,
this.getInitialValue(),
@@ -553,6 +572,7 @@ alfresco.xforms.FilePicker = alfresco.xforms.Widget.extend({
this._filterMimetypes,
this._folderRestriction,
this._configSearchName);
}
this.widget.render();
},
@@ -633,7 +653,14 @@ alfresco.xforms.TextField = alfresco.xforms.Widget.extend({
var borderWidth = (this.widget.offsetWidth - this.widget.clientWidth);
var marginRight = 2;
this.widget.style.marginRight = marginRight + "px";
if (attach_point.offsetWidth == 0)
{
this.widget.style.width = "100%";
}
else
{
this.widget.style.width = (((attach_point.offsetWidth - borderWidth - marginRight) / attach_point.offsetWidth) * 100) + "%";
}
this.widget.style.minWidth = "50px";
}
@@ -2698,10 +2725,13 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
? "0px"
: "30%");
contentDiv.style.width = (child instanceof alfresco.xforms.AbstractGroup
? "100%"
: (1 - (contentDiv.offsetLeft /
child.domContainer.offsetWidth)) * 100 + "%");
var contentDivWidth = "100%";
// the following does avoid devision by zero ... in contentDiv.offsetLeft / child.domContainer.offsetWidth
if (!(child instanceof alfresco.xforms.AbstractGroup) && child.domContainer.offsetWidth != 0)
{
contentDivWidth = ((1 - (contentDiv.offsetLeft / child.domContainer.offsetWidth)) * 100) + "%";
}
contentDiv.style.width = contentDivWidth;
child.render(contentDiv);
if (!(child instanceof alfresco.xforms.AbstractGroup))
{
@@ -2813,19 +2843,16 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
_updateDisplay: function(recursively)
{
this.domNode.style.width = "100%";
if (!window.ie)
{
if (this._isIndented())
{
this.domNode.style.marginLeft = 10 + "px";
this.domNode.style.marginRight = 5 + "px";
// XXXarielb can this be moved to render or insertChild?
this.domNode.style.width = (((this.domNode.offsetWidth - 15) / this.domNode.offsetWidth) * 100) + "%";
}
if (window.ie)
{
this.domNode.style.width = "100%";
}
else
{
// var x = ((this.domNode.offsetWidth - this.domNode.clientWidth) +
// this.domNode.getStyle("margin-left").toFloat() +
// this.domNode.getStyle("margin-right").toFloat());
@@ -2848,10 +2875,17 @@ alfresco.xforms.VGroup = alfresco.xforms.AbstractGroup.extend({
contentDiv.style.left = (this._children[i] instanceof alfresco.xforms.AbstractGroup
? "0px"
: "30%");
if (this._children[i].domContainer.parentNode.offsetWidth != 0)
{
contentDiv.style.width = (this._children[i] instanceof alfresco.xforms.AbstractGroup
? "100%"
: (1 - (contentDiv.offsetLeft /
this._children[i].domContainer.parentNode.offsetWidth)) * 100 + "%");
}
else
{
contentDiv.style.width = "100%";
}
if (recursively)
{
@@ -3511,7 +3545,7 @@ alfresco.xforms.Repeat = alfresco.xforms.VGroup.extend({
this._groupHeaderNode.repeat = this;
this._groupHeaderNode.onclick = function(event)
{
if (event.target == event.currentTarget)
if ((typeof(event) != 'undefined') && (typeof(event.target) != 'undefined') && (event.target == event.currentTarget))
{
event.currentTarget.repeat.setFocusedChild(null);
}