adding hortizontal rules between groups per linton's latest mockups.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4888 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-01-20 02:19:11 +00:00
parent 36b5c6288c
commit a6ac2399ef
2 changed files with 57 additions and 11 deletions

View File

@@ -231,6 +231,12 @@ dojo.declare("alfresco.xforms.Widget",
{
},
/** Returns the widget's enabled state */
isEnabled: function()
{
return true;
},
/** Sets the widget's required state, as indicated by an XFormsEvent */
setRequired: function(b)
{
@@ -266,6 +272,11 @@ dojo.declare("alfresco.xforms.Widget",
return binding && binding.isReadonly();
},
isVisible: function()
{
return true;
},
/** Sets the widget's initial value. */
setInitialValue: function(value)
{
@@ -1300,6 +1311,18 @@ dojo.declare("alfresco.xforms.Group",
this._children.splice(position, 0, child);
}
if (this.getAppearance() == "full" &&
!(this instanceof alfresco.xforms.Repeat) &&
child.isVisible() &&
((child instanceof alfresco.xforms.Group && position != 0) ||
this._children[position - 1] instanceof alfresco.xforms.Group))
{
var divider = document.createElement("div");
dojo.html.setClass(divider, "xformsGroupDivider");
this.domNode.childContainerNode.insertBefore(divider,
child.domContainer);
}
var labelDiv = null;
if (!(child instanceof alfresco.xforms.Group))
{
@@ -1668,6 +1691,7 @@ dojo.declare("alfresco.xforms.ViewRoot",
this.domNode.widget = this;
this.domNode.style.position = "relative";
this.domNode.style.width = "100%";
dojo.html.setClass(this.domNode, "xformsViewRoot");
this.groupHeaderNode = document.createElement("div");
this.groupHeaderNode.id = this.id + "-groupHeaderNode";
@@ -2231,6 +2255,19 @@ dojo.declare("alfresco.xforms.Trigger",
initializer: function(xform, xformsNode)
{
},
/////////////////////////////////////////////////////////////////
// methods & properties
/////////////////////////////////////////////////////////////////
/** TODO: DOCUMENT */
getAction: function()
{
var action = _getElementsByTagNameNS(this.xformsNode,
alfresco_xforms_constants.XFORMS_NS,
alfresco_xforms_constants.XFORMS_PREFIX,
"action")[0];
return new alfresco.xforms.XFormsAction(this.xform, dojo.dom.firstElement(action));
},
/////////////////////////////////////////////////////////////////
// overridden methods
@@ -2241,6 +2278,11 @@ dojo.declare("alfresco.xforms.Trigger",
return true;
},
isVisible: function()
{
return false;
},
render: function(attach_point)
{
var nodeRef = document.createElement("div");
@@ -2255,16 +2297,6 @@ dojo.declare("alfresco.xforms.Trigger",
this.domContainer.style.display = "none";
},
/** TODO: DOCUMENT */
getAction: function()
{
var action = _getElementsByTagNameNS(this.xformsNode,
alfresco_xforms_constants.XFORMS_NS,
alfresco_xforms_constants.XFORMS_PREFIX,
"action")[0];
return new alfresco.xforms.XFormsAction(this.xform, dojo.dom.firstElement(action));
},
/////////////////////////////////////////////////////////////////
// DOM event handlers
/////////////////////////////////////////////////////////////////