Skip to content

Commit

Permalink
[Magento Community Engineering] Community Contributions - 2.3-develop
Browse files Browse the repository at this point in the history
 - merged latest code from mainline branch
  • Loading branch information
magento-engcom-team authored Nov 25, 2019
2 parents 84647d8 + f2d026d commit 3fc0360
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

define([
'jquery',
'underscore',
'Magento_Checkout/js/view/summary/abstract-total',
'Magento_Checkout/js/model/quote',
'Magento_SalesRule/js/view/summary/discount'
], function ($, Component, quote, discountView) {
], function ($, _, Component, quote, discountView) {
'use strict';

return Component.extend({
Expand All @@ -22,19 +23,23 @@ define([
* @return {*}
*/
getShippingMethodTitle: function () {
var shippingMethod = '',
var shippingMethod,
shippingMethodTitle = '';

if (!this.isCalculated()) {
return '';
}
shippingMethod = quote.shippingMethod();

if (!_.isArray(shippingMethod) && !_.isObject(shippingMethod)) {
return '';
}

if (typeof shippingMethod['method_title'] !== 'undefined') {
shippingMethodTitle = ' - ' + shippingMethod['method_title'];
}

return shippingMethod ?
return shippingMethodTitle ?
shippingMethod['carrier_title'] + shippingMethodTitle :
shippingMethod['carrier_title'];
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>
</div>
</div>
<div class="field confirm password required" data-container="confirm-password">
<div class="field confirmation password required" data-container="confirm-password">
<label class="label" for="password-confirmation"><span><?= $block->escapeHtml(__('Confirm New Password')) ?></span></label>
<div class="control">
<input type="password" class="input-text" name="password_confirmation" id="password-confirmation"
Expand All @@ -93,7 +93,7 @@
], function($){
var dataForm = $('#form-validate');
var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>;

dataForm.mage('validation', {
<?php if ($_dob->isEnabled()) : ?>
errorPlacement: function(error, element) {
Expand Down
2 changes: 1 addition & 1 deletion lib/web/css/source/lib/_navigation.less
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
top: 0;
left: 100%;
width: 10px;
height: calc(100% + 3px);
height: calc(~'100% + 3px');
z-index: 1;
}
}
Expand Down
31 changes: 27 additions & 4 deletions lib/web/mage/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,51 @@ define([
* @private
*/
_processPanels: function () {
this.contents = this.element.find(this.options.content);
var isNotNested = this._isNotNested.bind(this);

this.collapsibles = this.element.find(this.options.collapsibleElement);
this.contents = this.element
.find(this.options.content)
.filter(isNotNested);

this.collapsibles = this.element
.find(this.options.collapsibleElement)
.filter(isNotNested);

this.collapsibles
.attr('role', 'presentation')
.parent()
.attr('role', 'tablist');

this.headers = this.element.find(this.options.header);
this.headers = this.element
.find(this.options.header)
.filter(isNotNested);

if (this.headers.length === 0) {
this.headers = this.collapsibles;
}
this.triggers = this.element.find(this.options.trigger);
this.triggers = this.element
.find(this.options.trigger)
.filter(isNotNested);

if (this.triggers.length === 0) {
this.triggers = this.headers;
}
this._callCollapsible();
},

/**
* Checks if element is not in nested container to keep the correct scope of collapsible
* @param {Number} index
* @param {HTMLElement} element
* @private
* @return {Boolean}
*/
_isNotNested: function (index, element) {
var parentContent = $(element).parents(this.options.content);

return !parentContent.length || !this.element.find(parentContent).length;
},

/**
* Setting the disabled and active tabs and calling instantiation of collapsible
* @private
Expand Down

0 comments on commit 3fc0360

Please sign in to comment.