Skip to content

Commit aaacb9c

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-62964
2 parents d4941eb + 243939c commit aaacb9c

File tree

75 files changed

+1587
-399
lines changed

Some content is hidden

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

75 files changed

+1587
-399
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/labels.phtml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,28 @@
1616
</strong>
1717
</div>
1818
<div class="fieldset-wrapper-content in collapse" id="manage-titles-content">
19-
<fieldset class="fieldset">
20-
<table class="admin__control-table" id="attribute-labels-table">
21-
<thead>
22-
<tr>
23-
<?php foreach ($block->getStores() as $_store): ?>
24-
<th class="col-store-view"><?php /* @escapeNotVerified */ echo $_store->getName() ?></th>
25-
<?php endforeach; ?>
26-
</tr>
27-
</thead>
28-
<tbody>
29-
<tr>
30-
<?php $_labels = $block->getLabelValues() ?>
31-
<?php foreach ($block->getStores() as $_store): ?>
32-
<td class="col-store-view">
33-
<input class="input-text<?php if ($_store->getId() == \Magento\Store\Model\Store::DEFAULT_STORE_ID): ?> required-option<?php endif; ?>" type="text" name="frontend_label[<?php /* @escapeNotVerified */ echo $_store->getId() ?>]" value="<?php echo $block->escapeHtml($_labels[$_store->getId()]) ?>"<?php if ($block->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
34-
</td>
35-
<?php endforeach; ?>
36-
</tr>
37-
</tbody>
38-
</table>
19+
<fieldset class="admin__fieldset fieldset">
20+
<div class="admin__control-table-wrapper">
21+
<table class="admin__control-table" id="attribute-labels-table">
22+
<thead>
23+
<tr>
24+
<?php foreach ($block->getStores() as $_store): ?>
25+
<th class="col-store-view"><?php /* @escapeNotVerified */ echo $_store->getName() ?></th>
26+
<?php endforeach; ?>
27+
</tr>
28+
</thead>
29+
<tbody>
30+
<tr>
31+
<?php $_labels = $block->getLabelValues() ?>
32+
<?php foreach ($block->getStores() as $_store): ?>
33+
<td class="col-store-view">
34+
<input class="input-text<?php if ($_store->getId() == \Magento\Store\Model\Store::DEFAULT_STORE_ID): ?> required-option<?php endif; ?>" type="text" name="frontend_label[<?php /* @escapeNotVerified */ echo $_store->getId() ?>]" value="<?php echo $block->escapeHtml($_labels[$_store->getId()]) ?>"<?php if ($block->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
35+
</td>
36+
<?php endforeach; ?>
37+
</tr>
38+
</tbody>
39+
</table>
40+
</div>
3941
</fieldset>
4042
</div>
4143
</div>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
$stores = $block->getStoresSortedBySortOrder();
1212
?>
13-
<fieldset class="fieldset">
13+
<fieldset class="admin__fieldset fieldset">
1414
<legend class="legend">
1515
<span><?php echo $block->escapeHtml(__('Manage Options (Values of Your Attribute)')); ?></span>
16-
</legend>
17-
<div id="manage-options-panel" data-index="attribute_options_select_container">
16+
</legend><br />
17+
<div class="admin__control-table-wrapper" id="manage-options-panel" data-index="attribute_options_select_container">
1818
<table class="admin__control-table" data-index="attribute_options_select">
1919
<thead>
2020
<tr id="attribute-options-table">

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<item name="config" xsi:type="array">
2424
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
2525
<item name="update_url" xsi:type="url" path="mui/index/render"/>
26+
<item name="storageConfig" xsi:type="array">
27+
<item name="dataScope" xsi:type="string">filters.store_id</item>
28+
</item>
2629
</item>
2730
</argument>
2831
</argument>

app/code/Magento/Swatches/view/adminhtml/templates/catalog/product/attribute/visual.phtml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010

1111
$stores = $block->getStoresSortedBySortOrder();
1212
?>
13-
<fieldset class="fieldset">
14-
<legend class="legend"><span><?php echo $block->escapeHtml( __('Manage Swatch (Values of Your Attribute)')); ?></span></legend>
15-
<div id="swatch-visual-options-panel">
13+
<fieldset class="admin__fieldset fieldset">
14+
<legend class="legend">
15+
<span><?php echo $block->escapeHtml( __('Manage Swatch (Values of Your Attribute)')); ?></span>
16+
</legend><br />
17+
<div class="admin__control-table-wrapper" id="swatch-visual-options-panel">
1618
<table class="data-table clearfix" cellspacing="0">
1719
<thead>
1820
<tr id="swatch-visual-options-table">
@@ -116,5 +118,4 @@ $stores = $block->getStoresSortedBySortOrder();
116118
}
117119
}
118120
</script>
119-
120121
</fieldset>

app/code/Magento/Ui/view/base/web/js/grid/data-storage.js

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ define([
2020
method: 'GET',
2121
dataType: 'json'
2222
},
23+
dataScope: '',
2324
data: {}
2425
},
2526

@@ -29,8 +30,16 @@ define([
2930
* @returns {DataStorage} Chainable.
3031
*/
3132
initConfig: function () {
33+
var scope;
34+
3235
this._super();
3336

37+
scope = this.dataScope;
38+
39+
if (typeof scope === 'string') {
40+
this.dataScope = scope ? [scope] : [];
41+
}
42+
3443
this._requests = [];
3544

3645
return this;
@@ -77,10 +86,12 @@ define([
7786
* @returns {jQueryPromise}
7887
*/
7988
getData: function (params, options) {
80-
var cachedRequest = this.getRequest(params);
89+
var cachedRequest;
8190

82-
if (params && params.filters && params.filters['store_id']) {
83-
cachedRequest = false;
91+
if (this.hasScopeChanged(params)) {
92+
this.clearRequests();
93+
} else {
94+
cachedRequest = this.getRequest(params);
8495
}
8596

8697
options = options || {};
@@ -90,6 +101,30 @@ define([
90101
this.requestData(params);
91102
},
92103

104+
/**
105+
* Tells whether one of the parameters defined in the "dataScope" has
106+
* changed since the last request.
107+
*
108+
* @param {Object} params - Request parameters.
109+
* @returns {Boolean}
110+
*/
111+
hasScopeChanged: function (params) {
112+
var lastRequest = _.last(this._requests),
113+
keys,
114+
diff;
115+
116+
if (!lastRequest) {
117+
return false;
118+
}
119+
120+
diff = utils.compare(lastRequest.params, params);
121+
122+
keys = _.pluck(diff.changes, 'path');
123+
keys = keys.concat(Object.keys(diff.containers));
124+
125+
return _.intersection(this.dataScope, keys).length > 0;
126+
},
127+
93128
/**
94129
* Extends records of current data object
95130
* with the provided records collection.

app/design/adminhtml/Magento/backend/web/css/source/forms/fields/_control-table.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
&._required {
132132
span {
133133
&:after {
134+
.lib-css(margin, @form-field-label-asterisk__margin);
134135
color: @validation__color;
135136
content: '*';
136137
}

app/design/adminhtml/Magento/backend/web/css/styles-old.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@
744744
// --------------------------------------
745745

746746
fieldset {
747+
min-width: 0;
747748
padding: 20px;
748749
}
749750

@@ -5049,6 +5050,10 @@
50495050
}
50505051
}
50515052
}
5053+
5054+
.admin__control-table-wrapper {
5055+
clear: both;
5056+
}
50525057
}
50535058

50545059
.catalog-product-set-index {

dev/tests/functional/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"magento/mtf": "1.0.0-rc51",
3+
"magento/mtf": "1.0.0-rc52",
44
"php": "~5.6.5|7.0.2|~7.0.6",
55
"phpunit/phpunit": "~4.8.0|~5.5.0",
66
"phpunit/phpunit-selenium": ">=1.2"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../vendor/magento/mtf/Magento/Mtf/Repository/etc/repository.xsd">
9+
<repository class="Magento\Braintree\Test\Repository\BraintreeSandboxCustomer">
10+
<dataset name="braintree_sandbox_default">
11+
<field name="environment" xsi:type="string">BRAINTREEE_ENVIRONMENT</field>
12+
<field name="merchantId" xsi:type="string">BRAINTREEE_MERCHANT_ID</field>
13+
<field name="publicKey" xsi:type="string">BRAINTREE_PUBLIC_KEY</field>
14+
<field name="privateKey" xsi:type="string">BRAINTREE_PRIVATE_KEY</field>
15+
</dataset>
16+
</repository>
17+
</config>

dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli/Cache.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ class Cache extends Cli
2929
const PARAM_CACHE_ENABLE = 'cache:enable';
3030

3131
/**
32-
* Flush cache.
32+
* Flush Cache.
33+
* If no parameters are set, all cache types are flushed.
3334
*
35+
* @param array $cacheTypes
3436
* @return void
3537
*/
36-
public function flush()
38+
public function flush(array $cacheTypes = [])
3739
{
38-
parent::execute(Cache::PARAM_CACHE_FLUSH);
40+
$options = empty($cacheTypes) ? '' : ' ' . implode(' ', $cacheTypes);
41+
parent::execute(Cache::PARAM_CACHE_FLUSH . $options);
3942
}
4043

4144
/**

0 commit comments

Comments
 (0)