diff --git a/source/web/css/xforms.css b/source/web/css/xforms.css index 791b094264..0b75298b4a 100644 --- a/source/web/css/xforms.css +++ b/source/web/css/xforms.css @@ -19,7 +19,7 @@ top: 0px; left: 0px; width: 100%; - margin-bottom: 10px; +/* margin-bottom: 10px; */ /* border: 1px solid #67a4e6; */ border: 1px solid #d2d2d9; } @@ -46,6 +46,18 @@ border-bottom: 1px solid #d2d2d9; } +.xformsGroupDivider +{ + border-bottom: 1px dotted #d9d9de; + margin: 5px 3px; +} + +.xformsViewRoot +{ + padding-bottom: 5px; + border-bottom: 1px dotted #d9d9de; +} + .xformsViewRootHeader { position: relative; @@ -59,6 +71,8 @@ font-weight: bold; text-align: center; padding-bottom: 5px; + border-bottom: 1px dotted #d9d9de; + margin-bottom: 5px; } .xformsTextArea diff --git a/source/web/scripts/ajax/xforms.js b/source/web/scripts/ajax/xforms.js index 36fca5e6b5..807d7c2388 100644 --- a/source/web/scripts/ajax/xforms.js +++ b/source/web/scripts/ajax/xforms.js @@ -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 /////////////////////////////////////////////////////////////////