Skip to content

Commit 7da1847

Browse files
author
Sergey Semenov
committed
Merge remote-tracking branch 'mainline/develop' into BUGS
2 parents a3e24ab + 4d71bb4 commit 7da1847

File tree

47 files changed

+410
-282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+410
-282
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@
1212
* @see \Magento\AdminNotification\Block\Window
1313
*/
1414
?>
15-
<div data-mage-init='{"modalPopup": {}}' class="fade critical-notification">
16-
<div class="popup popup-<?php /* @escapeNotVerified */ echo preg_replace('#[^a-z0-9]+#', '-', strtolower($block->getSeverityText())) ?>">
17-
<div class="popup-inner">
18-
<div class="popup-header">
19-
<div class="popup-title"><?php /* @escapeNotVerified */ echo $block->getHeaderText(); ?></div>
20-
</div>
21-
<div class="popup-content">
22-
<span><?php /* @escapeNotVerified */ echo $block->getSeverityText();?></span>
23-
24-
<p class="message-text"><?php /* @escapeNotVerified */ echo $block->getNoticeMessageText(); ?></p>
25-
26-
<a href="<?php /* @escapeNotVerified */ echo $block->getNoticeMessageUrl(); ?>"><?php /* @escapeNotVerified */ echo $block->getReadDetailsText(); ?></a>
27-
</div>
28-
<span class="action close" data-dismiss="popup" title="<?php echo $block->escapeHtml(__('Close popup'));?>"><?php /* @escapeNotVerified */ echo __('Close'); ?></span>
29-
</div>
30-
</div>
31-
</div>
15+
<ul class="message-system-list"
16+
style="display: none;"
17+
data-mage-init='{
18+
"Magento_Ui/js/modal/modal": {
19+
"autoOpen": true,
20+
"buttons": false,
21+
"modalClass": "modal-system-messages",
22+
"title": "<?php /* @escapeNotVerified */ echo $block->getHeaderText(); ?>"
23+
}
24+
}'>
25+
<li class="message message-warning warning">
26+
<?php /* @escapeNotVerified */ echo $block->getNoticeMessageText(); ?><br/>
27+
<a href="<?php /* @escapeNotVerified */ echo $block->getNoticeMessageUrl(); ?>"><?php /* @escapeNotVerified */ echo $block->getReadDetailsText(); ?></a>
28+
</li>
29+
</ul>

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<table class="admin__dynamic-rows data-grid" data-role="grid">
4747
<thead if="element.columnsHeader">
4848
<tr>
49-
<th if="dndConfig.enabled"
49+
<th if="$data.dndConfig.enabled"
5050
class="data-grid-draggable-row-cell"/>
5151

5252
<th repeat="foreach: labels, item: '$label'"
@@ -67,7 +67,7 @@
6767
class="data-grid-draggable-row-cell"
6868
template="name: dndConfig.template, data: dnd"/>
6969

70-
<!-- ko fastForEach: { data: $record().elems, as: 'elem'} -->
70+
<!-- ko foreach: { data: $record().elems(), as: 'elem'} -->
7171
<td if="elem.template"
7272
visible="elem.visible"
7373
disable="elem.disabled"

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ protected function getBundleHeader()
246246
[
247247
'targetName' => 'product_form.product_form.'
248248
. self::CODE_BUNDLE_DATA . '.' . self::CODE_BUNDLE_OPTIONS,
249-
'actionName' => 'addChild',
249+
'actionName' => 'processingAddChild',
250250
]
251251
],
252252
],
@@ -272,7 +272,6 @@ protected function getBundleOptions()
272272
'template' => 'ui/dynamic-rows/templates/collapsible',
273273
'label' => '',
274274
'additionalClasses' => 'admin__field-wide',
275-
'itemTemplate' => 'record',
276275
'collapsibleHeader' => true,
277276
'columnsHeader' => false,
278277
'deleteProperty' => false,
@@ -324,18 +323,23 @@ protected function getBundleOptions()
324323
'additionalClasses' => 'admin__field-wide',
325324
'component' => 'Magento_Ui/js/dynamic-rows/dynamic-rows-grid',
326325
'template' => 'ui/dynamic-rows/templates/default',
327-
'renderDefaultRecord' => true,
328326
'columnsHeader' => false,
329327
'columnsHeaderAfterRender' => true,
330-
'recordTemplate' => 'record',
331328
'provider' => 'product_form.product_form_data_source',
332329
'dataProvider' => '${ $.dataScope }' . '.bundle_button_proxy',
330+
'identificationDRProperty' => 'product_id',
331+
'identificationProperty' => 'product_id',
333332
'map' => [
334-
'id' => 'entity_id',
335333
'product_id' => 'entity_id',
336334
'name' => 'name',
337335
'sku' => 'sku',
338336
'price' => 'price',
337+
'delete' => '',
338+
'selection_can_change_qty' => '',
339+
'selection_id' => '',
340+
'selection_price_type' => '',
341+
'selection_price_value' => '',
342+
'selection_qty' => '',
339343
],
340344
'links' => [
341345
'insertData' => '${ $.provider }:${ $.dataProvider }'

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/Composite.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public function modifyData(array $data)
124124
'selection_can_change_qty' => $productLink->getCanChangeQuantity(),
125125
'selection_qty_is_integer' => (bool)$integerQty,
126126
'position' => $productLink->getPosition(),
127+
'delete' => '',
127128
];
128129
}
129130
$data[$modelId][BundlePanel::CODE_BUNDLE_OPTIONS][BundlePanel::CODE_BUNDLE_OPTIONS][] = [

app/code/Magento/Catalog/Block/Product/View/Options/Type/Date.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,11 @@ protected function _getHtmlSelect($name, $value = null)
200200
}
201201
$extraParams .= ' data-role="calendar-dropdown" data-calendar-role="' . $name . '"';
202202
$extraParams .= ' data-selector="' . $select->getName() . '"';
203-
$select->setExtraParams($extraParams);
203+
if ($this->getOption()->getIsRequire()) {
204+
$extraParams .= ' data-validate=\'{"datetime-validation": true}\'';
205+
}
204206

207+
$select->setExtraParams($extraParams);
205208
if ($value === null) {
206209
$value = $this->getProduct()->getPreconfiguredValues()->getData(
207210
'options/' . $option->getId() . '/' . $name

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ protected function getHeaderContainerConfig($sortOrder)
320320
'actions' => [
321321
[
322322
'targetName' => 'ns = ${ $.ns }, index = ' . static::GRID_OPTIONS_NAME,
323-
'actionName' => 'addChild',
323+
'actionName' => 'processingAddChild',
324324
]
325325
]
326326
]

app/code/Magento/Catalog/view/adminhtml/web/catalog/product/composite/configure.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55
define([
6-
"jquery",
6+
"Magento_Ui/js/lib/view/utils/async",
77
"jquery/ui",
88
"mage/translate",
99
"prototype",
@@ -45,16 +45,18 @@ define([
4545
var self = this;
4646

4747
this._initWindowElements();
48-
this.dialog = jQuery('#product_composite_configure').modal({
49-
title: jQuery.mage.__('Configure Product'),
50-
type: 'slide',
51-
buttons: [{
52-
text: jQuery.mage.__('OK'),
53-
'class': 'action-primary',
54-
click: function () {
55-
self.onConfirmBtn();
56-
}
57-
}]
48+
jQuery.async('#product_composite_configure',function (el) {
49+
self.dialog = jQuery(el).modal({
50+
title: jQuery.mage.__('Configure Product'),
51+
type: 'slide',
52+
buttons: [{
53+
text: jQuery.mage.__('OK'),
54+
'class': 'action-primary',
55+
click: function () {
56+
self.onConfirmBtn();
57+
}
58+
}]
59+
});
5860
});
5961
},
6062

app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/date.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<?php if ($_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_DATE_TIME
2929
|| $_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_TIME): ?>
30-
<span class="time-picker"><?php echo $block->getTimeHtml() ?></span>
30+
<?php echo $block->getTimeHtml() ?>
3131
<?php endif; ?>
3232

3333
<?php if ($_option->getIsRequire()): ?>

app/code/Magento/Catalog/view/frontend/web/product/view/validation.js

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,40 @@
55
(function (factory) {
66
if (typeof define === 'function' && define.amd) {
77
define([
8-
"jquery",
9-
"jquery/ui",
10-
"mage/validation/validation"
8+
'jquery',
9+
'jquery/ui',
10+
'mage/validation/validation'
1111
], factory);
1212
} else {
1313
factory(jQuery);
1414
}
1515
}(function ($) {
16-
"use strict";
16+
'use strict';
1717

18-
$.widget("mage.validation", $.mage.validation, {
18+
$.widget('mage.validation', $.mage.validation, {
1919
options: {
2020
radioCheckboxClosest: 'ul, ol',
2121
errorPlacement: function (error, element) {
22+
var messageBox,
23+
dataValidate;
24+
25+
if ($(element).hasClass('datetime-picker')) {
26+
element = $(element).parent();
27+
28+
if (element.parent().find('[generated=true].mage-error').length) {
29+
return;
30+
}
31+
}
32+
2233
if (element.attr('data-errors-message-box')) {
23-
var messageBox = $(element.attr('data-errors-message-box'));
34+
messageBox = $(element.attr('data-errors-message-box'));
2435
messageBox.html(error);
36+
2537
return;
2638
}
27-
var dataValidate = element.attr('data-validate');
39+
40+
dataValidate = element.attr('data-validate');
41+
2842
if (dataValidate && dataValidate.indexOf('validate-one-checkbox-required-by-name') > 0) {
2943
error.appendTo('#links-advice-container');
3044
} else if (element.is(':radio, :checkbox')) {
@@ -35,6 +49,7 @@
3549
},
3650
highlight: function (element, errorClass) {
3751
var dataValidate = $(element).attr('data-validate');
52+
3853
if (dataValidate && dataValidate.indexOf('validate-required-datetime') > 0) {
3954
$(element).parent().find('.datetime-picker').each(function() {
4055
$(this).removeClass(errorClass);
@@ -50,6 +65,7 @@
5065
},
5166
unhighlight: function (element, errorClass) {
5267
var dataValidate = $(element).attr('data-validate');
68+
5369
if (dataValidate && dataValidate.indexOf('validate-required-datetime') > 0) {
5470
$(element).parent().find('.datetime-picker').removeClass(errorClass);
5571
} else if ($(element).is(':radio, :checkbox')) {

app/code/Magento/Customer/Block/Widget/Dob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public function getLabel()
175175
public function getFieldHtml()
176176
{
177177
$this->dateElement->setData([
178+
'extra_params' => $this->isRequired() ? 'data-validate="{required:true}"' : '',
178179
'name' => $this->getHtmlId(),
179180
'id' => $this->getHtmlId(),
180181
'class' => $this->getHtmlClass(),

0 commit comments

Comments
 (0)