Skip to content

Commit e7b587f

Browse files
author
Magento CICD
authored
merge magento/2.2-develop into magento-pangolin/2.2-MQE-975
2 parents d9caf9d + 84308f8 commit e7b587f

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

app/code/Magento/Search/view/frontend/web/form-mini.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,17 @@ define([
206206

207207
switch (keyCode) {
208208
case $.ui.keyCode.HOME:
209-
this._getFirstVisibleElement().addClass(this.options.selectClass);
210-
this.responseList.selected = this._getFirstVisibleElement();
209+
if (this._getFirstVisibleElement()) {
210+
this._getFirstVisibleElement().addClass(this.options.selectClass);
211+
this.responseList.selected = this._getFirstVisibleElement();
212+
}
211213
break;
212214

213215
case $.ui.keyCode.END:
214-
this._getLastElement().addClass(this.options.selectClass);
215-
this.responseList.selected = this._getLastElement();
216+
if (this._getLastElement()) {
217+
this._getLastElement().addClass(this.options.selectClass);
218+
this.responseList.selected = this._getLastElement();
219+
}
216220
break;
217221

218222
case $.ui.keyCode.ESCAPE:

app/code/Magento/Sitemap/Model/Sitemap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ protected function _finalizeSitemap($type = self::TYPE_URL)
614614
*/
615615
protected function _getCurrentSitemapFilename($index)
616616
{
617-
return self::INDEX_FILE_PREFIX . '-' . $this->getStoreId() . '-' . $index . '.xml';
617+
return str_replace('.xml', '', $this->getSitemapFilename()) . '-' . $this->getStoreId() . '-' . $index . '.xml';
618618
}
619619

620620
/**

app/code/Magento/Swatches/view/adminhtml/web/js/visual.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ define([
143143
element.hide();
144144
this.totalItems--;
145145
this.updateItemsCountField();
146+
this.updateSortOrder();
146147
}
147148
},
148149

@@ -153,6 +154,17 @@ define([
153154
$('swatch-visual-option-count-check').value = this.totalItems > 0 ? '1' : '';
154155
},
155156

157+
/**
158+
* Update sort order values
159+
*/
160+
updateSortOrder: function () {
161+
jQuery('[data-role=swatch-visual-options-container] tr:not(.no-display) [data-role=order]').each(
162+
function (index, element) {
163+
jQuery(element).val(index + 1);
164+
}
165+
);
166+
},
167+
156168
/**
157169
* Enable delete button for new option
158170
*
@@ -267,11 +279,7 @@ define([
267279
* Update component
268280
*/
269281
update: function () {
270-
$('[data-role=swatch-visual-options-container] [data-role=order]').each(
271-
function (index, element) {
272-
$(element).val(index + 1);
273-
}
274-
);
282+
swatchVisualOption.updateSortOrder();
275283
}
276284
});
277285
});

app/code/Magento/Tax/view/frontend/web/js/view/checkout/summary/tax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ define([
6767
}
6868
}
6969

70-
return amount;
70+
return parseFloat(amount);
7171
},
7272

7373
/**

lib/web/mage/utils/misc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ define([
271271
convertToMomentFormat: function (format) {
272272
var newFormat;
273273

274-
newFormat = format.replace(/yy|y/gi, 'YYYY'); // replace the year
274+
newFormat = format.replace(/yyyy|yy|y/, 'YYYY'); // replace the year
275275
newFormat = newFormat.replace(/dd|d/g, 'DD'); // replace the date
276276

277277
return newFormat;

0 commit comments

Comments
 (0)