Skip to content

Commit ec0cf53

Browse files
author
Igor Melnikov
committed
Merge branch 'upstream-develop' into MAGETWO-42977-use-factories-to-inject-dependencies
2 parents b631e3b + 2dc1854 commit ec0cf53

File tree

271 files changed

+1240
-317
lines changed

Some content is hidden

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

271 files changed

+1240
-317
lines changed

Gruntfile.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = function (grunt) {
99

1010
var _ = require('underscore'),
1111
path = require('path'),
12+
themes = require('./dev/tools/grunt/configs/themes'),
1213
configDir = './dev/tools/grunt/configs',
1314
taskDir = './dev/tools/grunt/tasks';
1415

@@ -63,14 +64,18 @@ module.exports = function (grunt) {
6364
},
6465

6566
/**
66-
* Refresh magento frontend & backend.
67+
* Refresh themes.
6768
*/
68-
refresh: [
69-
'exec:all',
70-
'less:blank',
71-
'less:luma',
72-
'less:backend'
73-
],
69+
refresh: function () {
70+
var tasks = [
71+
'clean',
72+
'exec:all'
73+
];
74+
_.each(themes, function(theme, name) {
75+
tasks.push('less:' + name);
76+
});
77+
grunt.task.run(tasks);
78+
},
7479

7580
/**
7681
* Documentation

app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define(
4848
var self = this;
4949
if (this.validateHandler() && additionalValidators.validate()) {
5050
this.isPlaceOrderActionAllowed(false);
51-
$.when(setPaymentInformationAction()).done(function() {
51+
$.when(setPaymentInformationAction(this.messageContainer)).done(function() {
5252
self.placeOrderHandler();
5353
}).fail(function() {
5454
self.isPlaceOrderActionAllowed(true);

app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
</label>
1616
</div>
1717
<div class="payment-method-content">
18+
<!-- ko foreach: getRegion('messages') -->
19+
<!-- ko template: getTemplate() --><!-- /ko -->
20+
<!--/ko-->
1821
<div class="payment-method-billing-address">
1922
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
2023
<!-- ko template: getTemplate() --><!-- /ko -->

app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66

77
// @codingStandardsIgnoreFile
88
?>
9-
<div class="fieldset additional-cache-management">
10-
<div class="legend">
9+
<div class="additional-cache-management">
10+
<h2>
1111
<span><?php /* @escapeNotVerified */ echo __('Additional Cache Management') ?></span>
12-
</div>
13-
<div class="field">
12+
</h2>
13+
<p>
1414
<button onclick="setLocation('<?php /* @escapeNotVerified */ echo $block->getCleanImagesUrl() ?>')" type="button">
1515
<?php /* @escapeNotVerified */ echo __('Flush Catalog Images Cache') ?>
1616
</button>
17-
<label class="label"><?php /* @escapeNotVerified */ echo __('Pregenerated product images files') ?></label>
18-
</div>
19-
<div class="field">
17+
<span><?php /* @escapeNotVerified */ echo __('Pregenerated product images files') ?></span>
18+
</p>
19+
<p>
2020
<button onclick="setLocation('<?php /* @escapeNotVerified */ echo $block->getCleanMediaUrl() ?>')" type="button">
2121
<?php /* @escapeNotVerified */ echo __('Flush JavaScript/CSS Cache') ?>
2222
</button>
23-
<label class="label"><?php /* @escapeNotVerified */ echo __('Themes JavaScript and CSS files combined to one file.') ?></label>
24-
</div>
23+
<span><?php /* @escapeNotVerified */ echo __('Themes JavaScript and CSS files combined to one file.') ?></span>
24+
</p>
2525
<?php
2626
if (!$block->isInProductionMode()):
2727
?>
28-
<div class="field">
28+
<p>
2929
<button onclick="setLocation('<?php /* @escapeNotVerified */ echo $block->getCleanStaticFilesUrl() ?>')" type="button">
3030
<?php /* @escapeNotVerified */ echo __('Flush Static Files Cache') ?>
3131
</button>
32-
<label class="label"><?php /* @escapeNotVerified */ echo __('Preprocessed view files and static files') ?></label>
33-
</div>
32+
<span><?php /* @escapeNotVerified */ echo __('Preprocessed view files and static files') ?></span>
33+
</p>
3434
<?php
3535
endif;
3636
?>

app/code/Magento/Braintree/Block/Adminhtml/Form/Field/Cctypes.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Cctypes extends \Magento\Framework\View\Element\Html\Select
99
{
1010
/**
1111
* All possible credit card types
12-
*
12+
*
1313
* @var array
1414
*/
1515
protected $ccTypes = [];
@@ -49,13 +49,14 @@ public function _toHtml()
4949
}
5050
}
5151
}
52-
$this->setExtraParams('multiple="multiple" style="height:80px;"');
52+
$this->setClass('cc-type-select');
53+
$this->setExtraParams('multiple="multiple"');
5354
return parent::_toHtml();
5455
}
5556

5657
/**
5758
* All possible credit card types
58-
*
59+
*
5960
* @return array
6061
*/
6162
protected function _getCcTypes()

app/code/Magento/Braintree/Test/Unit/Block/Adminhtml/Form/Field/CctypesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testToHtml()
2727
);
2828

2929
$result = $ccTypes->_toHtml();
30-
$expected = '<select name="" id="" class="" title="" multiple="multiple" style="height:80px;">'
30+
$expected = '<select name="" id="" class="cc-type-select" title="" multiple="multiple">'
3131
. '<option value="" ></option></select>';
3232
$this->assertSame($expected, $result);
3333
}

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/braintree-paypal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ define(
103103
}
104104
});
105105
} else {
106-
messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'});
106+
this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')});
107107
}
108108
},
109109
isValid: function () {

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ define(
103103
clientToken: this.clientToken
104104
});
105105
} else {
106-
messageList.addErrorMessage({'message': 'Can not initialize PayPal (Braintree)'});
106+
this.messageContainer.addErrorMessage({'message': $t('Can not initialize PayPal (Braintree)')});
107107
}
108108

109109
return this;
@@ -116,7 +116,7 @@ define(
116116
var self = this,
117117
cardInfo = null;
118118

119-
messageList.clear();
119+
this.messageContainer.clear();
120120
this.quoteBaseGrandTotals = quote.totals().base_grand_total;
121121

122122
this.isPaymentProcessing = $.Deferred();
@@ -194,9 +194,9 @@ define(
194194
this.paymentMethodNonce('');
195195

196196
if (_.isObject(error)) {
197-
messageList.addErrorMessage(error);
197+
this.messageContainer.addErrorMessage(error);
198198
} else {
199-
messageList.addErrorMessage({
199+
this.messageContainer.addErrorMessage({
200200
message: error
201201
});
202202
}

app/code/Magento/Braintree/view/frontend/web/template/payment/braintree-paypal-form.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
</div>
1818

1919
<div class="payment-method-content">
20+
<!-- ko foreach: getRegion('messages') -->
21+
<!-- ko template: getTemplate() --><!-- /ko -->
22+
<!--/ko-->
2023
<fieldset class="fieldset" data-bind='attr: {id: "payment_form_" + getCode()}'>
2124
<div data-bind="afterRender: initPayPalContainer.bind($data)"></div>
2225
</fieldset>

app/code/Magento/Braintree/view/frontend/web/template/payment/cc-form.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
</div>
2323

2424
<div class="payment-method-content">
25+
<!-- ko foreach: getRegion('messages') -->
26+
<!-- ko template: getTemplate() --><!-- /ko -->
27+
<!--/ko-->
2528
<div class="payment-method-billing-address">
2629
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
2730
<!-- ko template: getTemplate() --><!-- /ko -->

0 commit comments

Comments
 (0)