From 1100a36effe63a058b3a4d0e18dc46a718acf929 Mon Sep 17 00:00:00 2001 From: Linda Nichols Date: Wed, 18 Jun 2014 20:26:48 +0000 Subject: [PATCH] stable checkin --- lib/enyo-x/source/less/characteristics.less | 34 -------- lib/enyo-x/source/less/grid.less | 86 +++++++-------------- lib/enyo-x/source/less/widgets.less | 26 ------- lib/enyo-x/source/stylesheets/screen.css | 75 +++++------------- lib/enyo-x/source/widgets/checkbox.js | 22 +----- lib/enyo-x/source/widgets/combobox.js | 2 +- lib/enyo-x/source/widgets/date.js | 1 + lib/enyo-x/source/widgets/file_input.js | 10 +-- lib/enyo-x/source/widgets/number_spinner.js | 2 - lib/enyo-x/source/widgets/toggle_button.js | 5 +- 10 files changed, 55 insertions(+), 208 deletions(-) delete mode 100644 lib/enyo-x/source/less/characteristics.less delete mode 100644 lib/enyo-x/source/less/widgets.less diff --git a/lib/enyo-x/source/less/characteristics.less b/lib/enyo-x/source/less/characteristics.less deleted file mode 100644 index 589679749..000000000 --- a/lib/enyo-x/source/less/characteristics.less +++ /dev/null @@ -1,34 +0,0 @@ -/** - Characteristics -*/ - -.xv-characteristics-widget {} - -.xv-characteristic-picker { - border: none; - .onyx-picker-decorator .onyx-button { - width: 130px; - } -} - -.xv-characteristic-item { - border-bottom: 1px solid @smoke; - .onyx-input-decorator > input { - width: 115px; - margin-top: 10px; - margin-bottom: 10px; - } - > .xv-input { - border: none; - } -} - -.xv-characteristic-buttons { - margin: 8px; -} - -.xv-characteristic-button { - margin-left: 4px; - color: @slate-blue; - font-size: 24px; -} diff --git a/lib/enyo-x/source/less/grid.less b/lib/enyo-x/source/less/grid.less index 8dd651f9e..610342799 100644 --- a/lib/enyo-x/source/less/grid.less +++ b/lib/enyo-x/source/less/grid.less @@ -1,6 +1,8 @@ /* Styles relating to the grid box */ +@widgetFontSize: 13px; + /* Entire box including the grid and the summary panel */ .xv-grid-box { @@ -34,10 +36,10 @@ } .xv-grid-attr { - // This limits the text to three lines + // This limits the text to four lines overflow: hidden; display: -webkit-box; - -webkit-line-clamp: 3; + -webkit-line-clamp: 4; -webkit-box-orient: vertical; &.bold { @@ -168,82 +170,46 @@ height: 26px; padding-top: 3px; width: 100%; - font-size: 13px; + font-size: @widgetFontSize; } } .xv-input { + padding-top: 6px; + width: 100%; border: none; + } - .xv-picker-label { + .xv-label, .xv-flexible-label, .xv-picker-label { display: none; } - .xv-datewidget { - margin-right: 10px; - padding-top: 0; + .xv-relationwidget { + .xv-description { + margin: 0; + margin-top: 5px; + } + &.xv-private-item-site-widget { + border-bottom: 0; + } .onyx-input-decorator { - padding: 0; - width: 100%; - input { - width: 85%; - font-size: 13px; - } + .tightened-input-decorator(85%); } } - .xv-numberwidget { - padding-top: 6px; + .xv-datewidget { .onyx-input-decorator { - .tightened-input-decorator; + .tightened-input-decorator(75%); } } .xv-combobox { - padding-left: 0; - input { - padding-top: 3px; - width: 80px; - font-size: 13px; - } - } - .xv-moneywidget { - padding-bottom: 0; .onyx-input-decorator { - .tightened-input-decorator; + .tightened-input-decorator(60%); } } .xv-useraccount-widget { - // Hack: we shouldn't have to force this. - .xv-subinput { + .xv-input { width: 80px; height: 16px; } } - .xv-subinput { - width: 100%; - } - .xv-input { - padding-top: 6px; - width: 100%; - border: none; - } - .xv-label, .xv-flexible-label { - display: none; - } - .xv-relationwidget { - .xv-description { - margin: 0; - margin-top: 5px; - } - .onyx-input-decorator { - width: 100%; - padding-top: 6px; - } - .onyx-input { - width: 85%; - padding-right: 4px; - } - } - .xv-private-item-site-widget { - border-bottom: 0; - } } } } @@ -284,12 +250,12 @@ } } -.tightened-input-decorator (@width: 100%) { +.tightened-input-decorator (@inputWidth: 100%) { padding: 0; - width: @width; + width: 100%; margin: 0; input { - width: (@width); - font-size: 13px; + width: @inputWidth; + font-size: @widgetFontSize; } } diff --git a/lib/enyo-x/source/less/widgets.less b/lib/enyo-x/source/less/widgets.less deleted file mode 100644 index c8645af09..000000000 --- a/lib/enyo-x/source/less/widgets.less +++ /dev/null @@ -1,26 +0,0 @@ -/** - Styles relating to misc widgets -*/ - -.onyx-input-decorator { - border: 0; - input { - width: 150px; - } -} - -.xv-dependency-picker { - .onyx-picker-decorator { - .onyx-button { - width: 280px; - margin-left: 6px; - } - } -} - -.xv-dependency-button { - color: @slate-blue; - font-size: 24px; - border: none; - background: transparent; -} diff --git a/lib/enyo-x/source/stylesheets/screen.css b/lib/enyo-x/source/stylesheets/screen.css index f73f1d2c5..aecaaf1d8 100755 --- a/lib/enyo-x/source/stylesheets/screen.css +++ b/lib/enyo-x/source/stylesheets/screen.css @@ -2329,7 +2329,7 @@ a, .xv-grid-box .xv-grid-attr { overflow: hidden; display: -webkit-box; - -webkit-line-clamp: 3; + -webkit-line-clamp: 4; -webkit-box-orient: vertical; } .xv-grid-box .xv-grid-attr.bold { @@ -2459,86 +2459,53 @@ a, font-size: 13px; } .xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input { + padding-top: 6px; + width: 100%; border: none; } +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-label, +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-flexible-label, .xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-picker-label { display: none; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget { - margin-right: 10px; - padding-top: 0; +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .xv-description { + margin: 0; + margin-top: 5px; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator { +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget.xv-private-item-site-widget { + border-bottom: 0; +} +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input-decorator { padding: 0; width: 100%; + margin: 0; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator input { +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input-decorator input { width: 85%; font-size: 13px; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget { - padding-top: 6px; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator { +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator { padding: 0; width: 100%; margin: 0; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator input { - width: 100%; - font-size: 13px; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox { - padding-left: 0; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox input { - padding-top: 3px; - width: 80px; +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator input { + width: 75%; font-size: 13px; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget { - padding-bottom: 0; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator { +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox .onyx-input-decorator { padding: 0; width: 100%; margin: 0; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator input { - width: 100%; +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox .onyx-input-decorator input { + width: 60%; font-size: 13px; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-useraccount-widget .xv-subinput { +.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-useraccount-widget .xv-input { width: 80px; height: 16px; } -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-subinput { - width: 100%; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input { - padding-top: 6px; - width: 100%; - border: none; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-label, -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-flexible-label { - display: none; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .xv-description { - margin: 0; - margin-top: 5px; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input-decorator { - width: 100%; - padding-top: 6px; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input { - width: 85%; - padding-right: 4px; -} -.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-private-item-site-widget { - border-bottom: 0; -} .xv-grid-box.xv-groupbox .xv-sales-summary-panel { border: none; margin-top: 0; diff --git a/lib/enyo-x/source/widgets/checkbox.js b/lib/enyo-x/source/widgets/checkbox.js index a74f20096..15f3e839d 100644 --- a/lib/enyo-x/source/widgets/checkbox.js +++ b/lib/enyo-x/source/widgets/checkbox.js @@ -30,32 +30,12 @@ regexp:true, undef:true, trailing:true, white:true */ clear: function (options) { this.setValue(false, options); }, - /** - @todo Document the create method. - */ - create: function () { - this.inherited(arguments); - this.labelChanged(); - }, - disabledChanged: function () { - this.inherited(arguments); - this.$.label.addRemoveClass("disabled", this.getDisabled()); - }, - /** - @todo Document the inputChanged method. - */ + inputChanged: function (inSender, inEvent) { var input = this.$.input.getValue(); this.setValue(input); }, /** - @todo Document the labelChanged method. - */ - labelChanged: function () { - var label = (this.getLabel() || ("_" + this.attr || "").loc()) + ":"; - this.$.label.setContent(label); - }, - /** @todo Document the valueChanged method. */ valueChanged: function (value) { diff --git a/lib/enyo-x/source/widgets/combobox.js b/lib/enyo-x/source/widgets/combobox.js index 559f410fd..0c84c4df4 100644 --- a/lib/enyo-x/source/widgets/combobox.js +++ b/lib/enyo-x/source/widgets/combobox.js @@ -16,6 +16,7 @@ regexp:true, undef:true, trailing:true, white:true, browser:true */ name: "XV.ComboboxWidget", kind: "XV.InputWidget", published: { + attr: null, collection: "", filter: null, disabled: false, @@ -113,7 +114,6 @@ regexp:true, undef:true, trailing:true, white:true, browser:true */ setDisabled: function (isDisabled) { this.inherited(arguments); this.$.iconButton.setDisabled(isDisabled); - this.$.label.addRemoveClass("disabled", isDisabled); }, /** @todo Document the keyDown method. diff --git a/lib/enyo-x/source/widgets/date.js b/lib/enyo-x/source/widgets/date.js index 7049874c1..46ae0a3a5 100644 --- a/lib/enyo-x/source/widgets/date.js +++ b/lib/enyo-x/source/widgets/date.js @@ -18,6 +18,7 @@ regexp:true, undef:true, trailing:true, white:true */ kind: "XV.InputWidget", classes: "xv-input xv-datewidget", published: { + attr: null, nullValue: null, nullText: "" }, diff --git a/lib/enyo-x/source/widgets/file_input.js b/lib/enyo-x/source/widgets/file_input.js index 98299bf6a..b3ac65c97 100644 --- a/lib/enyo-x/source/widgets/file_input.js +++ b/lib/enyo-x/source/widgets/file_input.js @@ -15,6 +15,8 @@ regexp:true, undef:true, trailing:true, white:true */ /** @lends XV.FileInput# */{ name: "XV.FileInput", kind: "XV.InputWidget", + showLabel: false, + type: "file", events: { onValueChange: "", onNotify: "" @@ -22,13 +24,9 @@ regexp:true, undef:true, trailing:true, white:true */ handlers: { onValueChange: "valueChange" }, - published: { - attr: null - }, components: [ - {name: "label", content: "", fit: true, classes: "xv-flexible-label"}, - {name: "input", type: "file", kind: "onyx.Input", - classes: "xv-subinput", onchange: "inputChanged"}, + {name: "label", fit: true, classes: "xv-label"}, + {name: "input", kind: "onyx.Input", onchange: "inputChanged"}, {name: "scrim", kind: "onyx.Scrim", showing: false, floating: true} ], diff --git a/lib/enyo-x/source/widgets/number_spinner.js b/lib/enyo-x/source/widgets/number_spinner.js index b81052561..226b8bc0e 100644 --- a/lib/enyo-x/source/widgets/number_spinner.js +++ b/lib/enyo-x/source/widgets/number_spinner.js @@ -47,9 +47,7 @@ regexp:true, undef:true, trailing:true, white:true */ ], create: function () { this.inherited(arguments); - this.labelChanged(); this.showSliderChanged(); - this.showLabelChanged(); }, /** Decreases the value of the input field by an increment of diff --git a/lib/enyo-x/source/widgets/toggle_button.js b/lib/enyo-x/source/widgets/toggle_button.js index d266be36d..230b90e44 100644 --- a/lib/enyo-x/source/widgets/toggle_button.js +++ b/lib/enyo-x/source/widgets/toggle_button.js @@ -16,9 +16,6 @@ regexp:true, undef:true, trailing:true, white:true */ name: "XV.ToggleButtonWidget", kind: "XV.InputWidget", classes: "xv-inputwidget xv-checkboxwidget", - published: { - attr: null - }, events: { onValueChange: "" }, @@ -26,7 +23,7 @@ regexp:true, undef:true, trailing:true, white:true */ onChange: "changed" }, components: [ - {kind: "FittableColumns", components: [ + {controlClasses: 'enyo-inline', components: [ {name: "label", content: "", classes: "xv-label"}, {kind: "onyx.InputDecorator", classes: "xv-input-decorator", components: [ -- 2.39.2