mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- making textfield wider for string types per john's request
- fixing a bug in multiselect lists (this was leftover from some changes i made yesterday - definitely a desirable fix) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4098 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -77,7 +77,6 @@ dojo.declare("alfresco.xforms.Widget",
|
||||
},
|
||||
isValidForSubmit: function()
|
||||
{
|
||||
var result = true;
|
||||
if (!this.valid)
|
||||
return false;
|
||||
if (!this.modified && this.isRequired() && this.getInitialValue() == null)
|
||||
@@ -264,6 +263,9 @@ dojo.declare("alfresco.xforms.TextField",
|
||||
this.widget.setAttribute("type", "text");
|
||||
this.widget.setAttribute("id", this.id + "-widget");
|
||||
this.widget.setAttribute("value", initial_value);
|
||||
if (this.xform.getType(this.node) == "string")
|
||||
this.widget.style.width = "100%";
|
||||
|
||||
this.domNode.appendChild(this.widget);
|
||||
// this.widget = dojo.widget.createWidget("ValidationTextBox",
|
||||
// {
|
||||
@@ -369,6 +371,8 @@ dojo.declare("alfresco.xforms.Select",
|
||||
", " + values[i].label + ", " + values[i].value);
|
||||
}
|
||||
var initial_value = this.getInitialValue();
|
||||
initial_value = initial_value ? initial_value.split(' ') : [];
|
||||
this._selectedValues = [];
|
||||
if (values.length <= 5)
|
||||
{
|
||||
for (var i = 0; i < values.length; i++)
|
||||
@@ -380,7 +384,7 @@ dojo.declare("alfresco.xforms.Select",
|
||||
checkbox.setAttribute("name", this.id + "_" + i + "-widget");
|
||||
checkbox.setAttribute("type", "checkbox");
|
||||
checkbox.setAttribute("value", values[i].value);
|
||||
if (initial_value.indexOf(values[i].value))
|
||||
if (initial_value.indexOf(values[i].value) != -1)
|
||||
{
|
||||
this._selectedValues.push(values[i].value);
|
||||
checkbox.setAttribute("checked", "true");
|
||||
@@ -392,7 +396,6 @@ dojo.declare("alfresco.xforms.Select",
|
||||
}
|
||||
else
|
||||
{
|
||||
initial_value = initial_value ? initial_value.split(' ') : [];
|
||||
this.widget = document.createElement("select");
|
||||
this.widget.setAttribute("id", this.id + "-widget");
|
||||
this.widget.setAttribute("multiple", true);
|
||||
@@ -860,7 +863,6 @@ dojo.declare("alfresco.xforms.Repeat",
|
||||
// dojo.lfx.html.slideTo(fromChild.domContainer, 5000, toChildCoords);
|
||||
// dojo.lfx.html.slideTo(toChild.domContainer, 5000, fromChildCoords);
|
||||
|
||||
|
||||
var swapNode = document.createElement("div");
|
||||
// dojo.dom.removeNode(toChild.domContainer);
|
||||
// dojo.dom.removeNode(fromChild.domContainer);
|
||||
|
Reference in New Issue
Block a user