Skip to content

Commit 76a5545

Browse files
Merge branch 'JS-323' of https://github.com/ulaharbmg/magento2ce into JS-339
Conflicts: app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js
2 parents 81c11d3 + e0efae1 commit 76a5545

File tree

498 files changed

+11670
-5833
lines changed

Some content is hidden

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

498 files changed

+11670
-5833
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/form/renderer/fieldset/element.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<?php
1111
/* @var $block \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element */
1212
$element = $block->getElement();
13-
$note = $element->getNote() ? '<div class="note" id="' . $element->getId() . '-note">' . $element->getNote() . '</div>' : '';
13+
$note = $element->getNote() ? '<div class="note admin__field-note" id="' . $element->getId() . '-note">' . $element->getNote() . '</div>' : '';
1414
$elementBeforeLabel = $element->getExtType() == 'checkbox admin__control-checkbox' || $element->getExtType() == 'radio admin__control-radio';
1515
$addOn = ($element->getBeforeElementHtml() || $element->getAfterElementHtml()) && !$element->getNoWrapAsAddon();
1616
$fieldId = ($element->getHtmlContainerId()) ? ' id="' . $element->getHtmlContainerId() . '"' : '';

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
<div class="mass-select-wrap">
4545
<select
4646
id="<?php echo $block->getHtmlId() ?>-mass-select"
47-
class="action-select-multiselect"
47+
class="action-select-multiselect _disabled"
48+
disabled="disabled"
4849
data-menu="grid-mass-select">
4950
<optgroup label="<?php /* @escapeNotVerified */ echo __('Mass Actions')?>">
5051
<option disabled selected></option>
@@ -68,10 +69,14 @@
6869
</div>
6970

7071
<script>
71-
require(['jquery'], function($){
72+
require(['jquery', 'domReady!'], function($){
7273
'use strict';
73-
$('#<?php echo $block->getHtmlId() ?>-mass-select').change(function () {
74+
$('#<?php echo $block->getHtmlId() ?>-mass-select')
75+
.removeClass('_disabled')
76+
.prop('disabled', false)
77+
.change(function () {
7478
var massAction = $('option:selected', this).val();
79+
this.blur();
7580
switch (massAction) {
7681
<?php if ($block->getUseSelectAll()):?>
7782
case 'selectAll':
@@ -88,7 +93,6 @@
8893
return <?php /* @escapeNotVerified */ echo $block->getJsObjectName() ?>.unselectVisible();
8994
break;
9095
}
91-
this.blur();
9296
});
9397
});
9498
<?php if (!$block->getParentBlock()->canDisplayContainer()): ?>

app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -21,59 +21,28 @@
2121
<argument name="requestFieldName" xsi:type="string">id</argument>
2222
<argument name="data" xsi:type="array">
2323
<item name="config" xsi:type="array">
24+
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
2425
<item name="update_url" xsi:type="url" path="mui/index/render"/>
2526
</item>
2627
</argument>
2728
</argument>
28-
<argument name="data" xsi:type="array">
29-
<item name="js_config" xsi:type="array">
30-
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
31-
</item>
32-
</argument>
3329
</dataSource>
34-
<container name="listing_top">
30+
<listingToolbar name="listing_top">
3531
<argument name="data" xsi:type="array">
3632
<item name="config" xsi:type="array">
37-
<item name="template" xsi:type="string">ui/grid/toolbar</item>
33+
<item name="sticky" xsi:type="boolean">true</item>
3834
</item>
3935
</argument>
40-
<bookmark name="bookmarks">
41-
<argument name="data" xsi:type="array">
42-
<item name="config" xsi:type="array">
43-
<item name="storageConfig" xsi:type="array">
44-
<item name="namespace" xsi:type="string">product_listing</item>
45-
</item>
46-
</item>
47-
</argument>
48-
</bookmark>
49-
<component name="columns_controls">
50-
<argument name="data" xsi:type="array">
51-
<item name="config" xsi:type="array">
52-
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
53-
<item name="displayArea" xsi:type="string">dataGridActions</item>
54-
<item name="columnsData" xsi:type="array">
55-
<item name="provider" xsi:type="string">product_listing.product_listing.product_columns</item>
56-
</item>
57-
</item>
58-
</argument>
59-
</component>
36+
<bookmark name="bookmarks"/>
37+
<columnsControls name="columns_controls"/>
6038
<filters name="listing_filters">
61-
<argument name="data" xsi:type="array">
62-
<item name="config" xsi:type="array">
63-
<item name="columnsProvider" xsi:type="string">product_listing.product_listing.product_columns</item>
64-
<item name="storageConfig" xsi:type="array">
65-
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
66-
<item name="namespace" xsi:type="string">current.filters</item>
67-
</item>
68-
</item>
69-
</argument>
7039
<filterSelect name="store_id">
7140
<argument name="optionsProvider" xsi:type="configurableObject">
7241
<argument name="class" xsi:type="string">Magento\Store\Ui\Component\Listing\Column\Store\Options</argument>
7342
</argument>
7443
<argument name="data" xsi:type="array">
7544
<item name="config" xsi:type="array">
76-
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.listing_filters</item>
45+
<item name="provider" xsi:type="string">${ $.parentName }</item>
7746
<item name="dataScope" xsi:type="string">store_id</item>
7847
<item name="caption" xsi:type="string" translate="true">All Store Views</item>
7948
<item name="label" xsi:type="string" translate="true">Store View</item>
@@ -84,9 +53,7 @@
8453
<massaction name="listing_massaction">
8554
<argument name="data" xsi:type="array">
8655
<item name="config" xsi:type="array">
87-
<item name="selectProvider" xsi:type="string">product_listing.product_listing.product_columns.ids</item>
8856
<item name="component" xsi:type="string">Magento_Ui/js/grid/tree-massactions</item>
89-
<item name="indexField" xsi:type="string">entity_id</item>
9057
</item>
9158
</argument>
9259
<action name="delete">
@@ -136,25 +103,11 @@
136103
</argument>
137104
</action>
138105
</massaction>
139-
<paging name="listing_paging">
140-
<argument name="data" xsi:type="array">
141-
<item name="config" xsi:type="array">
142-
<item name="selectProvider" xsi:type="string">product_listing.product_listing.product_columns.ids</item>
143-
<item name="storageConfig" xsi:type="array">
144-
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
145-
<item name="namespace" xsi:type="string">current.paging</item>
146-
</item>
147-
</item>
148-
</argument>
149-
</paging>
150-
</container>
106+
<paging name="listing_paging"/>
107+
</listingToolbar>
151108
<columns name="product_columns" class="Magento\Catalog\Ui\Component\Listing\Columns">
152109
<argument name="data" xsi:type="array">
153110
<item name="config" xsi:type="array">
154-
<item name="storageConfig" xsi:type="array">
155-
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
156-
<item name="namespace" xsi:type="string">current</item>
157-
</item>
158111
<item name="childDefaults" xsi:type="array">
159112
<item name="fieldAction" xsi:type="array">
160113
<item name="provider" xsi:type="string">product_listing.product_listing.product_columns.actions</item>
@@ -164,11 +117,6 @@
164117
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
165118
</item>
166119
</item>
167-
<item name="storageConfig" xsi:type="array">
168-
<item name="provider" xsi:type="string">product_listing.product_listing.listing_top.bookmarks</item>
169-
<item name="root" xsi:type="string">columns.${ $.index }</item>
170-
<item name="namespace" xsi:type="string">current.${ $.storageConfig.root}</item>
171-
</item>
172120
</item>
173121
</item>
174122
</argument>

app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@
2020
</div>
2121
</div>
2222
</div>
23+
<!--Fix for jumping content. Loader must be the same size as gallery.-->
24+
<script type="text/javascript">
25+
var config = {
26+
"width": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'width'); ?>,
27+
"thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
28+
?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
29+
"navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>",
30+
"height": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'height'); ?>
31+
},
32+
thumbBarHeight = 0,
33+
loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0];
34+
35+
if (config.navtype === 'horizontal') {
36+
thumbBarHeight = config.thumbheight;
37+
}
38+
39+
loader.style.paddingBottom = ( config.height / config.width * 100) + "%";
40+
</script>
2341
<script type="text/x-magento-init">
2442
{
2543
"[data-gallery-role=gallery-placeholder]": {

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,6 @@ protected function _saveProductAttributes(array $attributesData)
11201120
{
11211121
foreach ($attributesData as $tableName => $skuData) {
11221122
$tableData = [];
1123-
$where = [];
11241123
foreach ($skuData as $sku => $attributes) {
11251124
$productId = $this->skuProcessor->getNewSku($sku)['entity_id'];
11261125

@@ -1133,30 +1132,8 @@ protected function _saveProductAttributes(array $attributesData)
11331132
'value' => $storeValue,
11341133
];
11351134
}
1136-
/*
1137-
If the store based values are not provided for a particular store,
1138-
we default to the default scope values.
1139-
In this case, remove all the existing store based values stored in the table.
1140-
*/
1141-
$where[] = $this->_connection->quoteInto(
1142-
'(store_id NOT IN (?)',
1143-
array_keys($storeValues)
1144-
) . $this->_connection->quoteInto(
1145-
' AND attribute_id = ?',
1146-
$attributeId
1147-
) . $this->_connection->quoteInto(
1148-
' AND entity_id = ?)',
1149-
$productId
1150-
);
1151-
if (count($where) >= self::ATTRIBUTE_DELETE_BUNCH) {
1152-
$this->_connection->delete($tableName, implode(' OR ', $where));
1153-
$where = [];
1154-
}
11551135
}
11561136
}
1157-
if (!empty($where)) {
1158-
$this->_connection->delete($tableName, implode(' OR ', $where));
1159-
}
11601137
$this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
11611138
}
11621139
return $this;

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -504,18 +504,6 @@ public function testSaveProductAttributes()
504504
$this->_connection->expects($this->any())
505505
->method('quoteInto')
506506
->willReturnCallback([$this, 'returnQuoteCallback']);
507-
$this->_connection
508-
->expects($this->once())
509-
->method('delete')
510-
->with(
511-
$this->equalTo($testTable),
512-
$this->equalTo(
513-
'(store_id NOT IN ('
514-
. $storeId . ') AND attribute_id = '
515-
. $attributeId . ' AND entity_id = '
516-
. self::ENTITY_ID . ')'
517-
)
518-
);
519507

520508
$tableData[] = [
521509
'entity_id' => self::ENTITY_ID,

app/code/Magento/Checkout/Controller/Cart/Delete.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ class Delete extends \Magento\Checkout\Controller\Cart
1515
*/
1616
public function execute()
1717
{
18+
if (!$this->_formKeyValidator->validate($this->getRequest())) {
19+
return $this->resultRedirectFactory->create()->setPath('*/*/');
20+
}
21+
1822
$id = (int)$this->getRequest()->getParam('id');
1923
if ($id) {
2024
try {

app/code/Magento/Checkout/Model/DefaultConfigProvider.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public function getConfig()
265265
$output['isCustomerLoginRequired'] = $this->isCustomerLoginRequired();
266266
$output['registerUrl'] = $this->getRegisterUrl();
267267
$output['checkoutUrl'] = $this->getCheckoutUrl();
268+
$output['defaultSuccessPageUrl'] = $this->getDefaultSuccessPageUrl();
268269
$output['pageNotFoundUrl'] = $this->pageNotFoundUrl();
269270
$output['forgotPasswordUrl'] = $this->getForgotPasswordUrl();
270271
$output['staticBaseUrl'] = $this->getStaticBaseUrl();
@@ -451,6 +452,17 @@ public function pageNotFoundUrl()
451452
return $this->urlBuilder->getUrl('checkout/noroute');
452453
}
453454

455+
/**
456+
* Retrieve default success page URL
457+
*
458+
* @return string
459+
* @codeCoverageIgnore
460+
*/
461+
public function getDefaultSuccessPageUrl()
462+
{
463+
return $this->urlBuilder->getUrl('checkout/onepage/success/');
464+
}
465+
454466
/**
455467
* Retrieve selected shipping method
456468
*

app/code/Magento/Checkout/etc/adminhtml/system.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
<label>Allow Guest Checkout</label>
2222
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
2323
</field>
24-
<field id="customer_must_be_logged" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0">
25-
<label>Require Customer To Be Logged In To Checkout</label>
26-
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
27-
<depends>
28-
<field id="guest_checkout">0</field>
29-
</depends>
30-
</field>
3124
</group>
3225
<group id="cart" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
3326
<label>Shopping Cart</label>

app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<item name="component" xsi:type="string">Magento_Checkout/js/view/authentication</item>
4242
<item name="displayArea" xsi:type="string">authentication</item>
4343
<item name="children" xsi:type="array">
44-
<!--Additional authentication fields-->
44+
<!--Additional authentication fields-->
4545
<item name="errors" xsi:type="array">
4646
<item name="sortOrder" xsi:type="string">0</item>
4747
<item name="component" xsi:type="string">Magento_Checkout/js/view/authentication-messages</item>
@@ -167,7 +167,7 @@
167167
<item name="children" xsi:type="array">
168168
<!-- address-list-additional-addresses -->
169169
</item>
170-
</item>
170+
</item>
171171
<item name="before-shipping-method-form" xsi:type="array">
172172
<item name="component" xsi:type="string">uiComponent</item>
173173
<item name="displayArea" xsi:type="string">before-shipping-method-form</item>
@@ -184,7 +184,7 @@
184184
</item>
185185
<item name="displayArea" xsi:type="string">additional-fieldsets</item>
186186
<item name="children" xsi:type="array">
187-
<!-- The following items override configuration of corresponding address attributes -->
187+
<!-- The following items override configuration of corresponding address attributes -->
188188
<item name="region" xsi:type="array">
189189
<!-- Make region attribute invisible on frontend. Corresponding input element is created by region_id field -->
190190
<item name="visible" xsi:type="boolean">false</item>
@@ -310,6 +310,17 @@
310310
<item name="1" xsi:type="string">checkout.steps.billing-step.payment.additional-payment-validators</item>
311311
</item>
312312
</item>
313+
<item name="children" xsi:type="array">
314+
<item name="before-place-order" xsi:type="array">
315+
<item name="component" xsi:type="string">uiComponent</item>
316+
<item name="displayArea" xsi:type="string">before-place-order</item>
317+
<item name="dataScope" xsi:type="string">before-place-order</item>
318+
<item name="provider" xsi:type="string">checkoutProvider</item>
319+
<item name="config" xsi:type="array">
320+
<item name="template" xsi:type="string">Magento_Checkout/payment/before-place-order</item>
321+
</item>
322+
</item>
323+
</item>
313324
</item>
314325
<!-- merge your payment methods here -->
315326
<item name="afterMethods" xsi:type="array">
@@ -433,4 +444,4 @@
433444
</referenceContainer>
434445
<referenceContainer name="page.messages" remove="true"/>
435446
</body>
436-
</page>
447+
</page>

app/code/Magento/Checkout/view/frontend/requirejs-config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@ var config = {
1414
checkoutData: 'Magento_Checkout/js/checkout-data',
1515
proceedToCheckout: 'Magento_Checkout/js/proceed-to-checkout'
1616
}
17-
},
18-
deps: [
19-
"Magento_Checkout/js/checkout-loader"
20-
]
17+
}
2118
};

0 commit comments

Comments
 (0)