mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged V3.2 to HEAD
17201: Fix for ETHREEOH-1786: Time fields are displayed incorrectly 17202: Fix for ETHREEOH-1886: alf:hint tag in XSDs results in error 17204: Fix for ETHREEOH-1941: gMonth element is not correctly handled on creating web content based on web form process 17206: Fixed ETHREEOH-1134 "Incorrect behavior of tab indexes for windows" 17212: Fixed ETHREEOH-3063 "It is impossible to add tags after creating duplicate wiki page" 17214: Fix for ETHREEOH-1940: Problem with creating web forms containing mandatory boolean attributes with default values 17226: Fixed ETHREEOH-3105 "Error occurs when user add tag containing disallowed symbols." 17228: ETHREEOH-3181 - Tag inconsistence between JSF and Share client ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.2:r17201-17204,17206-17207,17211-17216,17219-17228 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18025 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -956,9 +956,15 @@ public class Schema2XForms implements Serializable
|
||||
" at " + newPathToRoot);
|
||||
try
|
||||
{
|
||||
final String defaultValue = (currentAttributeUse.getConstraintType() == XSConstants.VC_NONE
|
||||
String defaultValue = (currentAttributeUse.getConstraintType() == XSConstants.VC_NONE
|
||||
? null
|
||||
: currentAttributeUse.getConstraintValue());
|
||||
// make sure boolean attributes have a default value
|
||||
if (defaultValue == null && "boolean".equals(currentAttribute.getTypeDefinition().getName()))
|
||||
{
|
||||
defaultValue = "false";
|
||||
}
|
||||
|
||||
if (namespacePrefix.length() > 0)
|
||||
{
|
||||
defaultInstanceElement.setAttributeNS(this.targetNamespace,
|
||||
@@ -1714,6 +1720,12 @@ public class Schema2XForms implements Serializable
|
||||
Node value = xformsDocument.createTextNode(element.getConstraintValue());
|
||||
newDefaultInstanceElement.appendChild(value);
|
||||
}
|
||||
else if ("boolean".equals(element.getTypeDefinition().getName()))
|
||||
{
|
||||
// we have a boolean element without a default value, default to false
|
||||
Node value = xformsDocument.createTextNode("false");
|
||||
newDefaultInstanceElement.appendChild(value);
|
||||
}
|
||||
|
||||
this.addElement(xformsDocument,
|
||||
modelSection,
|
||||
|
@@ -396,7 +396,7 @@ public class DatePickerRenderer extends BaseRenderer
|
||||
|
||||
if (showTime)
|
||||
{
|
||||
out.write(" type='text' size='1' maxlength='2'");
|
||||
out.write(" type='text' size='2' maxlength='2'");
|
||||
|
||||
if (component.getAttributes().get("disabled") != null)
|
||||
{
|
||||
|
38
source/test-resources/xforms/tests/bugs/ETHREEOH-1886.xsd
Normal file
38
source/test-resources/xforms/tests/bugs/ETHREEOH-1886.xsd
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
targetNamespace="http://www.alfresco.org"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:element name="simple">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<!-- Test an empty hint -->
|
||||
<xs:element name="no-hint" type="xs:normalizedString">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:hint></alf:hint>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<!-- Test an empty alert -->
|
||||
<xs:element name="no-alert" type="xs:normalizedString" minOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:hint>This control does not have an overridden alert</alf:hint>
|
||||
<alf:alert></alf:alert>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="hint-alert" type="xs:normalizedString" minOccurs="1">
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<alf:alert>Please enter a value for hint-alert</alf:alert>
|
||||
<alf:hint>This control should have a hint.</alf:hint>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
15
source/test-resources/xforms/tests/bugs/ETHREEOH-1940.xsd
Normal file
15
source/test-resources/xforms/tests/bugs/ETHREEOH-1940.xsd
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified">
|
||||
<xs:element name="upload-simple">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="boolean_with_default_false" type="xs:boolean" default="false"/>
|
||||
<xs:element name="file_from_element" type="xs:boolean" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="boolean_with_default_true" type="xs:boolean" default="true"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="file_from_attribute" type="xs:boolean" use="required"/>
|
||||
<xs:attribute name="file_from_attribute_fixed" type="xs:boolean" use="required" fixed="true"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
17
source/test-resources/xforms/tests/bugs/ETHREEOH-1941.xsd
Normal file
17
source/test-resources/xforms/tests/bugs/ETHREEOH-1941.xsd
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
elementFormDefault="qualified">
|
||||
<xs:element name="gMonth">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="string_with_default" type="xs:gMonth" default="--03"/>
|
||||
<xs:element name="file_from_element" type="xs:gMonth" minOccurs="1" maxOccurs="unbounded"/>
|
||||
<xs:element name="file_from_element_with_default" type="xs:gMonth" default="--04"/>
|
||||
<xs:element name="year-month" type="xs:gYearMonth" />
|
||||
<xs:element name="month-day" type="xs:gMonthDay" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="file_from_attribute" type="xs:gMonth" use="required"/>
|
||||
<xs:attribute name="file_from_attribute_fixed" type="xs:gMonth" use="required" fixed="--05"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@@ -77,8 +77,11 @@ var AlfTagger = new Class(
|
||||
|
||||
// Add click event handlers for the add and cancel buttons
|
||||
$(this.id + "-addTag-ok").addEvent("click", function()
|
||||
{
|
||||
if (this.validateTagBox())
|
||||
{
|
||||
this.addTag($(this.id + "-addTag-box").value);
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
$(this.id + "-addTag-cancel").addEvent("click", function()
|
||||
@@ -110,11 +113,24 @@ var AlfTagger = new Class(
|
||||
{
|
||||
e.stop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Add validation of tagName and cancel enter keys
|
||||
$(this.id + "-addTag-box").addEvents(
|
||||
{
|
||||
"keyup": fnEnterStop,
|
||||
"keyup": function(e)
|
||||
{
|
||||
var addTagOk = $(this.id + "-addTag-ok")
|
||||
if (!this.validateTagBox())
|
||||
{
|
||||
addTagOk.setStyle("opacity", 0.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
addTagOk.setStyle("opacity", 1);
|
||||
}
|
||||
fnEnterStop(e);
|
||||
}.bind(this),
|
||||
"keypress": fnEnterStop
|
||||
});
|
||||
},
|
||||
@@ -585,5 +601,11 @@ var AlfTagger = new Class(
|
||||
{
|
||||
}
|
||||
}).request();
|
||||
},
|
||||
|
||||
validateTagBox: function()
|
||||
{
|
||||
var tagBox = $(this.id + "-addTag-box");
|
||||
return tagBox && tagBox.value && tagBox.value.length > 0 && validateName(tagBox);
|
||||
}
|
||||
});
|
@@ -430,15 +430,29 @@ alfresco.xforms.Widget = new Class({
|
||||
/** Returns the widget's alert text. */
|
||||
getAlert: function()
|
||||
{
|
||||
var result = "";
|
||||
var node = this._getChildXFormsNode("alert");
|
||||
return node ? node.firstChild.nodeValue : "";
|
||||
|
||||
if (node && node.firstChild !== null)
|
||||
{
|
||||
result = node.firstChild.nodeValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
/** Returns the widget's alert text. */
|
||||
getHint: function()
|
||||
{
|
||||
var result = null;
|
||||
var node = this._getChildXFormsNode("hint");
|
||||
return node ? node.firstChild.nodeValue : null;
|
||||
|
||||
if (node && node.firstChild !== null)
|
||||
{
|
||||
result = node.firstChild.nodeValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
/** Makes the label red. */
|
||||
@@ -2310,6 +2324,7 @@ alfresco.xforms.MonthPicker = alfresco.xforms.ComboboxSelect1.extend({
|
||||
initialize: function(xform, xformsNode)
|
||||
{
|
||||
this.parent(xform, xformsNode);
|
||||
dojo.require("dojo.date.format");
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user