From: Linda Nichols Date: Fri, 20 Jun 2014 04:24:34 +0000 (+0000) Subject: Issue #23853: All widgets working, still need to tweak grid X-Git-Tag: v4.6.0-beta~23^2~16 X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=7b4443be1b658f681b620bd1abf85eea01e5ac59;p=xtuple Issue #23853: All widgets working, still need to tweak grid --- diff --git a/enyo-client/application/source/widgets/relation.js b/enyo-client/application/source/widgets/relation.js index 673095e33..6a02bbab2 100644 --- a/enyo-client/application/source/widgets/relation.js +++ b/enyo-client/application/source/widgets/relation.js @@ -31,46 +31,27 @@ regexp:true, undef:true, trailing:true, white:true, strict:false */ published: { showAddress: false }, - components: [ - {controlClasses: 'enyo-inline', components: [ - {name: "label", classes: "xv-label"}, - {kind: "onyx.InputDecorator", name: "decorator", classes: "xv-icon-decorator", components: [ - {name: "input", kind: "onyx.Input", - onkeyup: "keyUp", onkeydown: "keyDown", onblur: "receiveBlur", - onfocus: "receiveFocus"}, - {kind: "onyx.MenuDecorator", components: [ - {kind: "onyx.IconButton", classes: "icon-folder-open-alt"}, - {kind: "onyx.Menu", name: 'popupMenu', floating: true, components: [ - {kind: "XV.MenuItem", name: "searchItem", content: "_search".loc()}, - {kind: "XV.MenuItem", name: "openItem", content: "_open".loc(), disabled: true}, - {kind: "XV.MenuItem", name: "newItem", content: "_new".loc(), disabled: true} - ]} - ]}, - {name: "completer", kind: "XV.Completer"} - ]} + descriptionComponents: [ + {name: "jobTitleRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: 'xv-description', name: "name"} ]}, - {name: 'descriptionContainer', components: [ - {name: "jobTitleRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: 'xv-description', name: "name"} - ]}, - {name: "phoneRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: "xv-description hyperlink", target: '_blank', name: "description"} - ]}, - {name: "alternateRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: "xv-description hyperlink", target: "_blank", name: "alternate"} - ]}, - {name: "faxRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: "xv-description hyperlink", target: "_blank", name: "fax"} - ]}, - {name: "emailRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: 'xv-description hyperlink', target: "_blank", name: "email"} - ]}, - {name: "webAddressRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: 'xv-description hyperlink', target: "_blank", name: "webAddress"} - ]}, - {name: "addressRow", controlClasses: "enyo-inline", showing: false, components: [ - {classes: "xv-description", name: "address", allowHtml: true} - ]} + {name: "phoneRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: "xv-description hyperlink", target: '_blank', name: "description"} + ]}, + {name: "alternateRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: "xv-description hyperlink", target: "_blank", name: "alternate"} + ]}, + {name: "faxRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: "xv-description hyperlink", target: "_blank", name: "fax"} + ]}, + {name: "emailRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: 'xv-description hyperlink', target: "_blank", name: "email"} + ]}, + {name: "webAddressRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: 'xv-description hyperlink', target: "_blank", name: "webAddress"} + ]}, + {name: "addressRow", controlClasses: "enyo-inline", showing: false, components: [ + {classes: "xv-description", name: "address", allowHtml: true} ]} ], setValue: function (value, options) { diff --git a/lib/enyo-x/source/less/pullout.less b/lib/enyo-x/source/less/pullout.less index 5d53c5400..6b1b0af3a 100644 --- a/lib/enyo-x/source/less/pullout.less +++ b/lib/enyo-x/source/less/pullout.less @@ -36,6 +36,12 @@ width: 100%; margin: 0 4px 6px 0; + .xv-input, .xv-pickerwidget { + .onyx-input-decorator { + border: none; + } + } + .xv-buttons { text-align: center; } diff --git a/lib/enyo-x/source/less/screen.less b/lib/enyo-x/source/less/screen.less index 036452c8c..ca1d85994 100644 --- a/lib/enyo-x/source/less/screen.less +++ b/lib/enyo-x/source/less/screen.less @@ -80,6 +80,11 @@ a, .hyperlink { cursor: pointer; } +.xv-invisible-wrapper { + padding: 0; + border: none; +} + .xv-app-panel { /* Setting this as min-width overrides enyo-narrow 100% */ width: @defaultPanelWidth; diff --git a/lib/enyo-x/source/stylesheets/screen.css b/lib/enyo-x/source/stylesheets/screen.css index aecaaf1d8..a7486876a 100755 --- a/lib/enyo-x/source/stylesheets/screen.css +++ b/lib/enyo-x/source/stylesheets/screen.css @@ -1528,6 +1528,10 @@ a, color: #357ec7; cursor: pointer; } +.xv-invisible-wrapper { + padding: 0; + border: none; +} .xv-app-panel { /* Setting this as min-width overrides enyo-narrow 100% */ width: 320px; @@ -3155,6 +3159,10 @@ a, .xv-pullout .xv-parameter-panel .enyo-fittable-columns-layout > * { vertical-align: middle; } +.xv-pullout .xv-parameter-panel .xv-input .onyx-input-decorator, +.xv-pullout .xv-parameter-panel .xv-pickerwidget .onyx-input-decorator { + border: none; +} .xv-pullout .xv-parameter-panel .xv-buttons { text-align: center; } @@ -3441,6 +3449,10 @@ a, .xv-search .xv-search-container .enyo-fittable-columns-layout > * { vertical-align: middle; } +.xv-search .xv-search-container .xv-input .onyx-input-decorator, +.xv-search .xv-search-container .xv-pickerwidget .onyx-input-decorator { + border: none; +} .xv-search .xv-search-container .xv-buttons { text-align: center; } diff --git a/lib/enyo-x/source/widgets/characteristics.js b/lib/enyo-x/source/widgets/characteristics.js index 94ed8ffdc..fd2ae2c2c 100644 --- a/lib/enyo-x/source/widgets/characteristics.js +++ b/lib/enyo-x/source/widgets/characteristics.js @@ -176,8 +176,8 @@ white:true*/ @todo Document the controlValueChanged method. */ controlValueChanged: function (inSender, inEvent) { - var attr = inSender.getAttr(), - value = inSender.getValue(), + var attr = inEvent.originator.getAttr(), + value = inEvent.originator.getValue(), attributes = {}, model = this.getValue(), characteristic, @@ -276,15 +276,10 @@ white:true*/ {kind: "XV.CharacteristicItem"} ]}, {controlClasses: 'enyo-inline', classes: "xv-buttons", components: [ - {name: "label", classes: "xv-label"}, {kind: "onyx.Button", name: "newButton", classes: "icon-plus xv-characteristic-button", onclick: "newItem"} ]} ], - create: function () { - this.inherited(arguments); - this.showLabelChanged(); - }, disabledChanged: function () { this.$.newButton.setDisabled(this.disabled); }, @@ -389,13 +384,6 @@ white:true*/ this.value.sort(); this.lengthChanged(); }, - - /** - Sets visibility of the widget label. - */ - showLabelChanged: function () { - this.$.label.setShowing(this.getShowLabel()); - } }); }()); diff --git a/lib/enyo-x/source/widgets/parameter.js b/lib/enyo-x/source/widgets/parameter.js index 996247f3b..5efc2e0e4 100644 --- a/lib/enyo-x/source/widgets/parameter.js +++ b/lib/enyo-x/source/widgets/parameter.js @@ -31,7 +31,7 @@ white:true*/ onValueChange: "parameterChanged" }, components: [ - {name: "input", classes: "xv-parameter-item-input"} + {name: "input"} ], defaultKind: "XV.InputWidget", /** diff --git a/lib/enyo-x/source/widgets/relation.js b/lib/enyo-x/source/widgets/relation.js index 3db986415..d6ff92027 100644 --- a/lib/enyo-x/source/widgets/relation.js +++ b/lib/enyo-x/source/widgets/relation.js @@ -66,12 +66,12 @@ regexp:true, undef:true, trailing:true, white:true, strict:false */ {name: "completer", kind: "XV.Completer"} ]} ]}, - // TODO: refactor this out into a separate array that is added on create - {name: 'descriptionContainer', classes: 'xv-invisible-wrapper', components: [ - {controlClasses: 'enyo-inline', components: [ - {name: "name", classes: "xv-description"}, - {name: "description", classes: "xv-description"} - ]} + {name: 'descriptionContainer', classes: 'xv-invisible-wrapper'} + ], + descriptionComponents: [ + {controlClasses: 'enyo-inline', components: [ + {name: "name", classes: "xv-description"}, + {name: "description", classes: "xv-description"} ]} ], /** @@ -144,6 +144,11 @@ regexp:true, undef:true, trailing:true, white:true, strict:false */ this.listChanged(); this.labelChanged(); this.disabledChanged(); + + // create description components + _.each(this.descriptionComponents, function (component) { + this.$.descriptionContainer.createComponent(component, {owner: this}); + }, this); }, /** @todo Document the disabledChanged method.