Skip to content

Commit 72d9c49

Browse files
committed
Merge remote-tracking branch 'mainline/2.1-develop' into 2.1-backport
2 parents 64af0d9 + 87046fa commit 72d9c49

File tree

38 files changed

+360
-175
lines changed

38 files changed

+360
-175
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,11 @@ public function reindex()
10921092
if ($this->flatState->isFlatEnabled()) {
10931093
$flatIndexer = $this->indexerRegistry->get(Indexer\Category\Flat\State::INDEXER_ID);
10941094
if (!$flatIndexer->isScheduled()) {
1095-
$flatIndexer->reindexRow($this->getId());
1095+
$idsList = [$this->getId()];
1096+
if ($this->dataHasChangedFor('url_key')) {
1097+
$idsList = array_merge($idsList, explode(',', $this->getAllChildren()));
1098+
}
1099+
$flatIndexer->reindexList($idsList);
10961100
}
10971101
}
10981102
$productIndexer = $this->indexerRegistry->get(Indexer\Category\Product::INDEXER_ID);

app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function testReindexFlatEnabled($flatScheduled, $productScheduled, $expec
437437
->will($this->returnValue(true));
438438

439439
$this->flatIndexer->expects($this->exactly(1))->method('isScheduled')->will($this->returnValue($flatScheduled));
440-
$this->flatIndexer->expects($this->exactly($expectedFlatReindexCalls))->method('reindexRow')->with('123');
440+
$this->flatIndexer->expects($this->exactly($expectedFlatReindexCalls))->method('reindexList')->with(['123']);
441441

442442
$this->productIndexer->expects($this->exactly(1))->method('isScheduled')->will($this->returnValue($productScheduled));
443443
$this->productIndexer->expects($this->exactly($expectedProductReindexCall))->method('reindexList')->with($pathIds);

app/code/Magento/Catalog/etc/events.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@
5757
<event name="admin_system_config_changed_section_catalog">
5858
<observer name="catalog_update_price_attribute" instance="Magento\Catalog\Observer\SwitchPriceAttributeScopeOnConfigChange" />
5959
</event>
60+
<event name="catalog_product_save_before">
61+
<observer name="set_special_price_start_date" instance="Magento\Catalog\Observer\SetSpecialPriceStartDate" />
62+
</event>
6063
</config>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,22 @@ var catalogWysiwygEditor = {
6969
$(elementId + '_editor').value = $(elementId).value;
7070
},
7171
okDialogWindow : function(dialogWindow) {
72-
if (dialogWindow.options.firedElementId) {
73-
wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
72+
var $firedElement = jQuery('#' + dialogWindow.options.firedElementId),
73+
$editorElement = jQuery('#' + dialogWindow.options.firedElementId + '_editor'),
74+
firedElementId = $firedElement.attr('id'),
75+
wysiwygObj = window['wysiwyg' + firedElementId + '_editor'];
76+
77+
if ($firedElement.length) {
7478
wysiwygObj.turnOff();
7579
if (tinyMCE.get(wysiwygObj.id)) {
76-
$(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
80+
$firedElement.val(tinyMCE.get(wysiwygObj.id).getContent()).change();
7781
} else {
78-
if ($(dialogWindow.options.firedElementId+'_editor')) {
79-
$(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId+'_editor').value;
80-
}
82+
$firedElement.val($editorElement.val()).change();
83+
}
84+
85+
if (tinyMCE.get(firedElementId)) {
86+
tinyMCE.get(firedElementId).load();
8187
}
82-
tinyMCE.editors[dialogWindow.options.firedElementId].load();
8388
if (typeof varienGlobalEvents != undefined) {
8489
varienGlobalEvents.fireEvent('tinymceChange');
8590
}

app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ define([
66
'jquery',
77
'underscore',
88
'uiRegistry',
9-
'jquery/ui'
9+
'jquery/ui',
10+
'mage/translate'
1011
], function ($, _, registry) {
1112
'use strict';
1213

app/code/Magento/Catalog/view/adminhtml/web/component/image-size-field.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ define([
77
'jquery',
88
'Magento_Ui/js/lib/validation/utils',
99
'Magento_Ui/js/form/element/abstract',
10-
'Magento_Ui/js/lib/validation/validator'
10+
'Magento_Ui/js/lib/validation/validator',
11+
'mage/translate'
1112
], function ($, utils, Abstract, validator) {
1213
'use strict';
1314

app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44
*/
55
define([
66
'uiComponent',
7-
'Magento_Customer/js/customer-data'
7+
'Magento_Customer/js/customer-data',
8+
'mage/translate'
89
], function (Component, customerData) {
910
'use strict';
1011

1112
var sidebarInitialized = false;
1213

1314
function initSidebar() {
1415
if (sidebarInitialized) {
15-
return ;
16+
return;
1617
}
1718
sidebarInitialized = true;
1819
require([
1920
'jquery',
2021
'mage/mage'
2122
], function ($) {
23+
/*eslint-disable max-len*/
2224
$('[data-role=compare-products-sidebar]').mage('compareItems', {
23-
"removeConfirmMessage": $.mage.__(
24-
"Are you sure you want to remove this item from your Compare Products list?"
25-
),
26-
"removeSelector": "#compare-items a.action.delete",
27-
"clearAllConfirmMessage": $.mage.__(
28-
"Are you sure you want to remove all items from your Compare Products list?"
29-
),
30-
"clearAllSelector": "#compare-clear-all"
25+
'removeConfirmMessage': $.mage.__('Are you sure you want to remove this item from your Compare Products list?'),
26+
'removeSelector': '#compare-items a.action.delete',
27+
'clearAllConfirmMessage': $.mage.__('Are you sure you want to remove all items from your Compare Products list?'),
28+
'clearAllSelector': '#compare-clear-all'
3129
});
30+
31+
/*eslint-enable max-len*/
3232
});
3333
}
3434

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ define([
224224

225225
if (msg) {
226226
alert({
227-
content: $.mage.__(msg)
227+
content: msg
228228
});
229229
}
230230
}

app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ define([
7070
'qty': ':input.cart-item-qty',
7171
'button': ':button.update-cart-item'
7272
},
73-
'confirmMessage': $.mage.__(
74-
'Are you sure you would like to remove this item from the shopping cart?'
75-
)
73+
'confirmMessage': $.mage.__('Are you sure you would like to remove this item from the shopping cart?')
7674
});
7775
}
7876

app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ require([
2929
'jquery',
3030
'mage/template',
3131
'jquery/file-uploader',
32-
'domReady!'
32+
'domReady!',
33+
'mage/translate'
3334
], function ($, mageTemplate) {
3435
$('#<?php echo $block->getHtmlId() ?> .fileupload').fileupload({
3536
dataType: 'json',

0 commit comments

Comments
 (0)