From 3de200342e0af72acefba932a890d019bac28e9c Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk Date: Mon, 21 Mar 2016 12:41:57 +0200 Subject: [PATCH 01/19] MAGETWO-50628: [Github] W3C error: Element input is missing required attribute aria-expanded. #2681 - Fixed required attribute aria-expanded --- .../Search/view/frontend/web/form-mini.js | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Search/view/frontend/web/form-mini.js b/app/code/Magento/Search/view/frontend/web/form-mini.js index be0ae90a02a91..fef7bc334cae9 100644 --- a/app/code/Magento/Search/view/frontend/web/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/form-mini.js @@ -7,9 +7,10 @@ define([ 'jquery', 'underscore', 'mage/template', + "matchMedia", 'jquery/ui', 'mage/translate' -], function ($, _, mageTemplate) { +], function ($, _, mageTemplate, mediaCheck) { 'use strict'; /** @@ -38,7 +39,8 @@ define([ '' + '', submitBtn: 'button[type="submit"]', - searchLabel: '[data-role=minisearch-label]' + searchLabel: '[data-role=minisearch-label]', + isExpandable: null }, _create: function () { @@ -50,6 +52,7 @@ define([ this.searchForm = $(this.options.formSelector); this.submitBtn = this.searchForm.find(this.options.submitBtn)[0]; this.searchLabel = $(this.options.searchLabel); + this.isExpandable = this.options.isExpandable; _.bindAll(this, '_onKeyDown', '_onPropertyChange', '_onSubmit'); @@ -57,11 +60,25 @@ define([ this.element.attr('autocomplete', this.options.autocomplete); + mediaCheck({ + media: '(max-width: 768px)', + entry: function () { + this.isExpandable = true; + }.bind(this), + exit: function () { + this.isExpandable = false; + this.element.removeAttr('aria-expanded'); + }.bind(this) + }); + this.element.on('blur', $.proxy(function () { setTimeout($.proxy(function () { if (this.autoComplete.is(':hidden')) { this.searchLabel.removeClass('active'); + if (this.isExpandable === true) { + this.element.attr('aria-expanded', 'false'); + } } this.autoComplete.hide(); this._updateAriaHasPopup(false); @@ -72,6 +89,9 @@ define([ this.element.on('focus', $.proxy(function () { this.searchLabel.addClass('active'); + if (this.isExpandable === true) { + this.element.attr('aria-expanded', 'true'); + } }, this)); this.element.on('keydown', this._onKeyDown); this.element.on('input propertychange', this._onPropertyChange); From d31b52d00fe6234e0ecfdd6a67869b47ad6efbef Mon Sep 17 00:00:00 2001 From: Oleksandr Dubovyk Date: Thu, 7 Apr 2016 18:44:21 +0300 Subject: [PATCH 02/19] MAGETWO-50741: Validation failed for sample data script in design configuration - Changed label - Removed validation --- .../Theme/view/adminhtml/ui_component/design_config_form.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml b/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml index 7ccbc32061476..1faeadc733107 100644 --- a/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml +++ b/app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml @@ -141,14 +141,11 @@ - Miscellaneous Scripts + Scripts and Style Sheets text textarea head_includes This will be included before head closing tag in page HTML. - - true - From 3e8aa279d3ba6d4754abd71ec404fc43921c9ec2 Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Fri, 8 Apr 2016 10:51:43 +0300 Subject: [PATCH 03/19] MAGETWO-51364: Some disabled fields has incorrect label color --- .../Product/Form/Modifier/Categories.php | 2 - .../Product/Form/Modifier/General.php | 2 - .../Form/Modifier/ScheduleDesignUpdate.php | 2 - .../adminhtml/ui_component/category_form.xml | 1 + .../adminhtml/ui_component/product_form.xml | 20 ++++++++ .../backend/web/css/source/forms/_fields.less | 46 +++++++++++++++---- 6 files changed, 59 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php index 7265fd1a5457c..b0e663532e869 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php @@ -104,7 +104,6 @@ protected function createNewCategoryModal(array $meta) 'config' => [ 'isTemplate' => false, 'componentType' => 'modal', - 'dataScope' => 'data.new_category', 'options' => [ 'title' => __('New Category'), ], @@ -193,7 +192,6 @@ protected function customizeCategoriesField(array $meta) 'levelsVisibility' => '1', 'elementTmpl' => 'ui/grid/filters/elements/ui-select', 'options' => $this->getCategoriesTree(), - 'scopeLabel' => null, 'listens' => [ 'index=create_category:responseData' => 'setParsed', 'newOption' => 'toggleOptionSelected' diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php index b4147229b81d6..3ec996ba2e5b3 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php @@ -273,7 +273,6 @@ protected function customizeNewDateRangeField(array $meta) $meta, [ 'label' => __('Set Product as New From'), - 'scopeLabel' => null, 'additionalClasses' => 'admin__field-date', ] ); @@ -294,7 +293,6 @@ protected function customizeNewDateRangeField(array $meta) 'additionalClasses' => 'admin__control-grouped-date', 'breakLine' => false, 'component' => 'Magento_Ui/js/form/components/group', - 'scopeLabel' => $scopeLabel, ] ); $meta = $this->arrayManager->set( diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php index 9bd9f9ae046c9..31c01496a6444 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php @@ -75,7 +75,6 @@ protected function customizeDateRangeField(array $meta) $meta, [ 'label' => __('Schedule Update From'), - 'scopeLabel' => null, 'additionalClasses' => 'admin__field-date', ] ); @@ -96,7 +95,6 @@ protected function customizeDateRangeField(array $meta) 'additionalClasses' => 'admin__control-grouped-date', 'breakLine' => false, 'component' => 'Magento_Ui/js/form/components/group', - 'scopeLabel' => $scopeLabel, ] ); $meta = $this->arrayManager->set( diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml index d8a0a53805199..83b7f26194ae4 100644 --- a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml +++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml @@ -560,6 +560,7 @@ + Schedule Update From admin__field-date 230 string diff --git a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml index 47d1ca2346d4c..e1d1335d2b05d 100644 --- a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml +++ b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml @@ -50,8 +50,10 @@ + Manage Stock select manage_stock + [GLOBAL] Magento\CatalogInventory\Model\Source\StockConfiguration Magento\Config\Model\Config\Source\Yesno @@ -114,8 +116,10 @@ + Out-of-Stock Threshold input min_qty + [GLOBAL] true @@ -156,9 +160,11 @@ + Minimum Qty Allowed in Shopping Cart Magento_CatalogInventory/js/components/qty-validator-changer input min_sale_qty + [GLOBAL] true true @@ -203,8 +209,10 @@ + Maximum Qty Allowed in Shopping Cart input max_sale_qty + [GLOBAL] true @@ -285,10 +293,12 @@ + Backorders Magento_CatalogInventory/js/components/backorders ns = ${ $.ns }, index=container_deferred_stock_update select backorders + [GLOBAL] Magento\CatalogInventory\Model\Source\StockConfiguration Magento\CatalogInventory\Model\Source\Backorders @@ -327,6 +337,8 @@ + Use deferred Stock update + [GLOBAL] select deferred_stock_update Magento\CatalogInventory\Model\Source\StockConfiguration @@ -370,7 +382,9 @@ + Notify for Quantity Below input + [GLOBAL] notify_stock_qty true @@ -412,7 +426,9 @@ + Enable Qty Increments select + [GLOBAL] enable_qty_increments Magento\CatalogInventory\Model\Source\StockConfiguration @@ -455,9 +471,11 @@ + Qty Increments Magento_CatalogInventory/js/components/qty-validator-changer input qty_increments + [GLOBAL] true true @@ -505,6 +523,8 @@ + Stock Status + [GLOBAL] select is_in_stock 1 diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less index 38bdbf2b98cf5..c6fa5ee5135ef 100644 --- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less +++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less @@ -221,6 +221,7 @@ ._disabled > & { color: @field-label__disabled__color; + cursor: default; } } @@ -253,6 +254,13 @@ position: relative; } + // Hide group legend and show first field label instead + legend { + &.admin__field-label { + opacity: 0; + } + } + // ToDo UI: Scope Labels must be moved from right side of each control to the place under the label of the control. // This code must be removed after Scope Labels are moved completely. // Till that time they'll be disabled by commenting pseudo-element content property. @@ -469,16 +477,38 @@ [class*='admin__control-grouped'], .admin__control-fields { - & > .admin__field:first-child { - position: static; + & > .admin__field { + &:first-child { + position: static; + + & > .admin__field-label { + #mix-grid .column(@field-label-grid__column, @field-grid__columns); + background: @color-white; + cursor: pointer; + left: 0; + position: absolute; + top: 0; + + span { + &:before { + display: block; + } + } + } + } + + &._disabled { + & > .admin__field-label { + cursor: default; + } + } & > .admin__field-label { - #mix-grid .column(@field-label-grid__column, @field-grid__columns); - cursor: pointer; - left: 0; - opacity: 0; - position: absolute; - top: 0; + span { + &:before { + display: none; + } + } } } } From 79605c5710a7eab4d1847dedc0f76ae49d54c963 Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Mon, 11 Apr 2016 15:24:22 +0300 Subject: [PATCH 04/19] MAGETWO-51364: Some disabled fields has incorrect label color --- .../Catalog/view/adminhtml/ui_component/category_form.xml | 1 - .../DataProvider/Product/Form/Modifier/AdvancedInventory.php | 2 ++ .../view/adminhtml/ui_component/product_form.xml | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml index c108dae6e9730..a1a86a1f8b3c7 100644 --- a/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml +++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml @@ -566,7 +566,6 @@ 230 string date - ns = ${ $.ns }, index = custom_use_parent_settings :checked diff --git a/app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php b/app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php index 7a81ad48398bf..a1163ca7e0b54 100644 --- a/app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php +++ b/app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php @@ -184,6 +184,8 @@ private function prepareMeta() 'visible' => '1', 'require' => '0', 'additionalClasses' => 'admin__field-small', + 'label' => __('Quantity'), + 'scopeLabel' => '[GLOBAL]', 'dataScope' => 'qty', 'validation' => [ 'validate-number' => true, diff --git a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml index e1d1335d2b05d..cb0cd1128dc2b 100644 --- a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml +++ b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml @@ -328,7 +328,7 @@ container Magento_Ui/js/form/components/group - Use deferred Stock update + Use Deferred Stock update stock_data 850 [GLOBAL] @@ -337,7 +337,7 @@ - Use deferred Stock update + Use Deferred Stock update [GLOBAL] select deferred_stock_update From c3a4536ba52173e3731c054a35a6bb4a21abea2d Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Mon, 11 Apr 2016 15:26:22 +0300 Subject: [PATCH 05/19] MAGETWO-51364: Some disabled fields has incorrect label color --- .../view/adminhtml/ui_component/product_form.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml index cb0cd1128dc2b..33793eba120cf 100644 --- a/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml +++ b/app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml @@ -328,7 +328,7 @@ container Magento_Ui/js/form/components/group - Use Deferred Stock update + Use Deferred Stock Update stock_data 850 [GLOBAL] @@ -337,7 +337,7 @@ - Use Deferred Stock update + Use Deferred Stock Update [GLOBAL] select deferred_stock_update From ebfaf12d0ec83c57192d1766b4f98fb20aeca5a9 Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Tue, 12 Apr 2016 18:38:19 +0300 Subject: [PATCH 06/19] MAGETWO-51364: Some disabled fields has incorrect label color - Fix static test --- .../Catalog/Ui/DataProvider/Product/Form/Modifier/General.php | 1 - .../DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php | 1 - 2 files changed, 2 deletions(-) diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php index 6d177c79aab20..ef54357c06995 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php @@ -264,7 +264,6 @@ protected function customizeNewDateRangeField(array $meta) if ($fromFieldPath && $toFieldPath) { $fromContainerPath = $this->arrayManager->slicePath($fromFieldPath, 0, -2); $toContainerPath = $this->arrayManager->slicePath($toFieldPath, 0, -2); - $scopeLabel = $this->arrayManager->get($fromFieldPath . self::META_CONFIG_PATH . '/scopeLabel', $meta); $meta = $this->arrayManager->merge( $fromFieldPath . self::META_CONFIG_PATH, diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php index 31c01496a6444..6109f7a3b222c 100644 --- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php +++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/ScheduleDesignUpdate.php @@ -68,7 +68,6 @@ protected function customizeDateRangeField(array $meta) $toFieldPath = $this->arrayManager->findPath(self::CODE_CUSTOM_DESIGN_TO, $meta, null, 'children'); $fromContainerPath = $this->arrayManager->slicePath($fromFieldPath, 0, -2); $toContainerPath = $this->arrayManager->slicePath($toFieldPath, 0, -2); - $scopeLabel = $this->arrayManager->get($fromFieldPath . self::META_CONFIG_PATH . '/scopeLabel', $meta); $meta = $this->arrayManager->merge( $fromFieldPath . self::META_CONFIG_PATH, From fd3fe4988f9fd077a44222253bd0c535acb349e5 Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Wed, 13 Apr 2016 12:58:20 +0300 Subject: [PATCH 07/19] MAGETWO-51822: Datepicker is broken on Product page for custom option --- .../luma/Magento_Catalog/web/css/source/_module.less | 1 - .../frontend/Magento/luma/web/css/source/_forms.less | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less index 12e0a5156c7aa..e8e5c3e5e916b 100644 --- a/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less @@ -311,7 +311,6 @@ @_line-height: @form-field-label-asterisk__line-height, @_font-style: @form-field-label-asterisk__font-style ); - .lib-css(margin, @form-field-label-asterisk__margin); } } } diff --git a/app/design/frontend/Magento/luma/web/css/source/_forms.less b/app/design/frontend/Magento/luma/web/css/source/_forms.less index 7a433037c75f4..76f4fe6982c61 100644 --- a/app/design/frontend/Magento/luma/web/css/source/_forms.less +++ b/app/design/frontend/Magento/luma/web/css/source/_forms.less @@ -59,7 +59,7 @@ } .legend { - span { + > span { margin-right: @indent__xs; } } @@ -141,6 +141,7 @@ @_icon-font-text-hide: true ); display: inline-block; + margin-top: -4px; vertical-align: middle; &:focus { @@ -150,6 +151,13 @@ } } + .field.date, + .field-dob { + .hasDatepicker { + &:extend(.abs-field-date-input all); + } + } + // // Sidebar forms // --------------------------------------------- From 252610180787054da73d48e69e18e03a44dfeea8 Mon Sep 17 00:00:00 2001 From: Olga Lytvynenko Date: Wed, 13 Apr 2016 17:26:45 +0300 Subject: [PATCH 08/19] MAGETWO-50424: Date Input Type Displays Login Username Dropdown --- .../view/frontend/templates/form/edit.phtml | 12 ++++++------ .../view/frontend/templates/form/register.phtml | 13 ++++++------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml index 68b5b8f438bcd..2b1191b6dd12e 100644 --- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml @@ -38,16 +38,16 @@

-
- + -