Skip to content

Commit e7e006e

Browse files
author
Alex Bomko
committed
Merge remote-tracking branch 'mainline/develop' into develop
2 parents 4d67705 + 4d71bb4 commit e7e006e

File tree

127 files changed

+4521
-1819
lines changed

Some content is hidden

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

127 files changed

+4521
-1819
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/Block/System/Store/Edit/Form/Website.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
9292
if ($this->_coreRegistry->registry('store_action') == 'edit') {
9393
$groups = $this->_groupFactory->create()->getCollection()->addWebsiteFilter(
9494
$websiteModel->getId()
95-
)->setWithoutStoreViewFilter()->toOptionArray();
95+
)->toOptionArray();
9696

9797
$fieldset->addField(
9898
'website_default_group_id',

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/js/catalog-add-to-cart.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ define([
2020
productStatusSelector: '.stock.available',
2121
addToCartButtonSelector: '.action.tocart',
2222
addToCartButtonDisabledClass: 'disabled',
23-
addToCartButtonTextWhileAdding: $t('Adding...'),
24-
addToCartButtonTextAdded: $t('Added'),
25-
addToCartButtonTextDefault: $t('Add to Cart')
26-
23+
addToCartButtonTextWhileAdding: '',
24+
addToCartButtonTextAdded: '',
25+
addToCartButtonTextDefault: ''
2726
},
2827

2928
_create: function() {
@@ -108,26 +107,29 @@ define([
108107
},
109108

110109
disableAddToCartButton: function(form) {
110+
var addToCartButtonTextWhileAdding = this.options.addToCartButtonTextWhileAdding || $t('Adding...');
111111
var addToCartButton = $(form).find(this.options.addToCartButtonSelector);
112112
addToCartButton.addClass(this.options.addToCartButtonDisabledClass);
113-
addToCartButton.attr('title', this.options.addToCartButtonTextWhileAdding);
114-
addToCartButton.find('span').text(this.options.addToCartButtonTextWhileAdding);
113+
addToCartButton.find('span').text(addToCartButtonTextWhileAdding);
114+
addToCartButton.attr('title', addToCartButtonTextWhileAdding);
115115
},
116116

117117
enableAddToCartButton: function(form) {
118+
var addToCartButtonTextAdded = this.options.addToCartButtonTextAdded || $t('Added');
118119
var self = this,
119120
addToCartButton = $(form).find(this.options.addToCartButtonSelector);
120121

121-
addToCartButton.find('span').text(this.options.addToCartButtonTextAdded);
122-
addToCartButton.attr('title', this.options.addToCartButtonTextAdded);
122+
addToCartButton.find('span').text(addToCartButtonTextAdded);
123+
addToCartButton.attr('title', addToCartButtonTextAdded);
123124

124125
setTimeout(function() {
126+
var addToCartButtonTextDefault = self.options.addToCartButtonTextDefault || $t('Add to Cart');
125127
addToCartButton.removeClass(self.options.addToCartButtonDisabledClass);
126-
addToCartButton.find('span').text(self.options.addToCartButtonTextDefault);
127-
addToCartButton.attr('title', self.options.addToCartButtonTextDefault);
128+
addToCartButton.find('span').text(addToCartButtonTextDefault);
129+
addToCartButton.attr('title', addToCartButtonTextDefault);
128130
}, 1000);
129131
}
130132
});
131133

132134
return $.mage.catalogAddToCart;
133-
});
135+
});

0 commit comments

Comments
 (0)