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

@@ -19,7 +19,7 @@
top: 0px; top: 0px;
left: 0px; left: 0px;
width: 100%; width: 100%;
margin-bottom: 10px; /* margin-bottom: 10px; */
/* border: 1px solid #67a4e6; */ /* border: 1px solid #67a4e6; */
border: 1px solid #d2d2d9; border: 1px solid #d2d2d9;
} }
@@ -46,6 +46,18 @@
border-bottom: 1px solid #d2d2d9; border-bottom: 1px solid #d2d2d9;
} }
.xformsGroupDivider
{
border-bottom: 1px dotted #d9d9de;
margin: 5px 3px;
}
.xformsViewRoot
{
padding-bottom: 5px;
border-bottom: 1px dotted #d9d9de;
}
.xformsViewRootHeader .xformsViewRootHeader
{ {
position: relative; position: relative;
@@ -59,6 +71,8 @@
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
padding-bottom: 5px; padding-bottom: 5px;
border-bottom: 1px dotted #d9d9de;
margin-bottom: 5px;
} }
.xformsTextArea .xformsTextArea

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 */ /** Sets the widget's required state, as indicated by an XFormsEvent */
setRequired: function(b) setRequired: function(b)
{ {
@@ -266,6 +272,11 @@ dojo.declare("alfresco.xforms.Widget",
return binding && binding.isReadonly(); return binding && binding.isReadonly();
}, },
isVisible: function()
{
return true;
},
/** Sets the widget's initial value. */ /** Sets the widget's initial value. */
setInitialValue: function(value) setInitialValue: function(value)
{ {
@@ -1300,6 +1311,18 @@ dojo.declare("alfresco.xforms.Group",
this._children.splice(position, 0, child); 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; var labelDiv = null;
if (!(child instanceof alfresco.xforms.Group)) if (!(child instanceof alfresco.xforms.Group))
{ {
@@ -1668,6 +1691,7 @@ dojo.declare("alfresco.xforms.ViewRoot",
this.domNode.widget = this; this.domNode.widget = this;
this.domNode.style.position = "relative"; this.domNode.style.position = "relative";
this.domNode.style.width = "100%"; this.domNode.style.width = "100%";
dojo.html.setClass(this.domNode, "xformsViewRoot");
this.groupHeaderNode = document.createElement("div"); this.groupHeaderNode = document.createElement("div");
this.groupHeaderNode.id = this.id + "-groupHeaderNode"; this.groupHeaderNode.id = this.id + "-groupHeaderNode";
@@ -2231,6 +2255,19 @@ dojo.declare("alfresco.xforms.Trigger",
initializer: function(xform, xformsNode) 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 // overridden methods
@@ -2241,6 +2278,11 @@ dojo.declare("alfresco.xforms.Trigger",
return true; return true;
}, },
isVisible: function()
{
return false;
},
render: function(attach_point) render: function(attach_point)
{ {
var nodeRef = document.createElement("div"); var nodeRef = document.createElement("div");
@@ -2255,16 +2297,6 @@ dojo.declare("alfresco.xforms.Trigger",
this.domContainer.style.display = "none"; 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 // DOM event handlers
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////