Merged BRANCHES/DEV/V3.3-BUG-FIX to HEAD:

22910: Fixed ALF-872: TinyMCE Insert/edit Link dialog does not display properly in IE6
   22914: Merged DEV/BELARUS/HEAD-2010_04_28 to V3.3-BUG-FIX
        ALF-2315: WCM Schema: Inconsistent error if not filling in required fields
   22918: Merged DEV/BELARUS/V3.3-BUG-FIX-2010_06_24 to V3.3-BUG-FIX
        ALF-2931: WCM Forms - min/maxLength ignored for xs:string elements
   22940: Merged DEV/BELARUS/V3.3-2010_05_26 to V3.3-BUG-FIX
        ALF-2742: Impossibility to manage site for MS Excel
   22949: (RECORD ONLY) Added "continuous-without-distribute" target

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22958 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2010-10-07 13:34:33 +00:00
parent c0fb578036
commit dc916dda18
3 changed files with 57 additions and 10 deletions

View File

@@ -2486,7 +2486,7 @@ public class Schema2XForms implements Serializable
case XSConstants.STRING_DT: case XSConstants.STRING_DT:
{ {
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS, result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
NamespaceConstants.XFORMS_PREFIX + ":textarea"); NamespaceConstants.XFORMS_PREFIX + ":textarea");
if (appearance == null || appearance.length() == 0) if (appearance == null || appearance.length() == 0)
{ {
appearance = "compact"; appearance = "compact";
@@ -2843,7 +2843,7 @@ public class Schema2XForms implements Serializable
typeName); typeName);
} }
final StringList lexicalPatterns = ((XSSimpleTypeDefinition)controlType).getLexicalPattern(); final StringList lexicalPatterns = ((XSSimpleTypeDefinition)controlType).getLexicalPattern();
// NOTE: from glen.johnson@alfresco.com // NOTE: from glen.johnson@alfresco.com
// Workaround to fix issue WCM-952 // Workaround to fix issue WCM-952
// //
@@ -2878,8 +2878,22 @@ public class Schema2XForms implements Serializable
} }
constraints.add("chiba:match(., '" + pattern + "',null)"); constraints.add("chiba:match(., '" + pattern + "',null)");
} }
}
XSSimpleTypeDefinition simpleControlType = ((XSSimpleTypeDefinition) controlType);
if (simpleControlType.isDefinedFacet(XSSimpleTypeDefinition.FACET_MAXLENGTH))
{
constraints.add("string-length(.) <= " + simpleControlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXLENGTH));
}
if (simpleControlType.isDefinedFacet(XSSimpleTypeDefinition.FACET_MINLENGTH))
{
constraints.add("string-length(.) >= " + simpleControlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MINLENGTH));
}
}
final short constraintType = final short constraintType =
(owner != null && owner instanceof XSElementDeclaration (owner != null && owner instanceof XSElementDeclaration
? ((XSElementDeclaration)owner).getConstraintType() ? ((XSElementDeclaration)owner).getConstraintType()

View File

@@ -92,6 +92,21 @@ function alfresco_TinyMCE_file_browser_callback(field_name, url, type, win)
cssEl.media = 'screen'; cssEl.media = 'screen';
headEl.appendChild(cssEl); headEl.appendChild(cssEl);
// ALF-872:
// Drop-down and list boxes do not have a z-index property, these are window level controls.
// When you want to show a div in a page that contains these controls, you will face an overlapping problem.
// This is a well-known problem with the IE 6 browser.
// To solve this we just hiding form's divs until FilePickerWidget is undestroyed.
if (window.ie6)
{
var divs = win.document.getElementsByTagName("div");
for (var i = 0; i < divs.length; i++)
{
divs[i].style.visibility = "hidden";
}
}
var div = win.document.createElement("div"); var div = win.document.createElement("div");
div.style.width = "100%"; div.style.width = "100%";
div.style.height = "100%"; div.style.height = "100%";
@@ -117,6 +132,17 @@ function alfresco_TinyMCE_file_browser_callback(field_name, url, type, win)
function() function()
{ {
picker.destroy(); picker.destroy();
// Please see comment above
if (window.ie6)
{
var divs = win.document.getElementsByTagName("div");
for (var i = 0; i < divs.length; i++)
{
divs[i].style.visibility = "visible";
}
}
div.parentNode.removeChild(div); div.parentNode.removeChild(div);
}, },
function(picker) function(picker)

View File

@@ -2655,13 +2655,16 @@ alfresco.xforms.AbstractGroup = alfresco.xforms.Widget.extend({
var result = []; var result = [];
for (var i = 0; i < this._children.length; i++) for (var i = 0; i < this._children.length; i++)
{ {
if (this._children[i] instanceof alfresco.xforms.AbstractGroup) if ((this._children[i].domContainer.style.display != "none") || (this._children[i].xformsNode.localName != "case"))
{ {
result = result.concat(this._children[i].getWidgetsInvalidForSubmit()); if (this._children[i] instanceof alfresco.xforms.AbstractGroup)
} {
else if (!this._children[i].isValidForSubmit()) result = result.concat(this._children[i].getWidgetsInvalidForSubmit());
{ }
result.push(this._children[i]); else if (!this._children[i].isValidForSubmit())
{
result.push(this._children[i]);
}
} }
} }
return result; return result;
@@ -4457,10 +4460,12 @@ alfresco.xforms.XForm = new Class({
case "chiba-state-changed": case "chiba-state-changed":
{ {
alfresco.log("handleStateChanged(" + xfe.targetId + ")"); alfresco.log("handleStateChanged(" + xfe.targetId + ")");
xfe.getTarget().setModified(true); var isModified = false;
if ("valid" in xfe.properties) if ("valid" in xfe.properties)
{ {
xfe.getTarget().setValid(xfe.properties["valid"] == "true"); xfe.getTarget().setValid(xfe.properties["valid"] == "true");
isModified= true;
} }
if ("required" in xfe.properties) if ("required" in xfe.properties)
{ {
@@ -4478,7 +4483,9 @@ alfresco.xforms.XForm = new Class({
{ {
alfresco.log("setting " + xfe.getTarget().id + " = " + xfe.properties["value"]); alfresco.log("setting " + xfe.getTarget().id + " = " + xfe.properties["value"]);
xfe.getTarget().setValue(xfe.properties["value"]); xfe.getTarget().setValue(xfe.properties["value"]);
isModified= true;
} }
xfe.getTarget().setModified(isModified);
break; break;
} }
case "chiba-prototype-cloned": case "chiba-prototype-cloned":