Skip to content

Commit 2d0d716

Browse files
author
Yaroslav Onischenko
authored
Merge pull request #184 from magento-frontend/MAGETWO-55217-new
[Frontend] Process Public Pull Requests
2 parents 17726ef + fcd3dde commit 2d0d716

File tree

10 files changed

+27
-22
lines changed

10 files changed

+27
-22
lines changed

app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ $jsonHelper = $this->helper('Magento\Framework\Json\Helper\Data');
1616

1717
<script>
1818
require([
19-
'prototype'
20-
], function () {
19+
'jquery'
20+
], function ($) {
2121
window.resetRobotsToDefault = function(){
22-
$('design_search_engine_robots_custom_instructions').value = <?php
22+
$('#design_search_engine_robots_custom_instructions').val(<?php
2323
/* @escapeNotVerified */ echo $jsonHelper->jsonEncode($block->getRobotsDefaultCustomInstructions())
24-
?>;
24+
?>);
2525
}
2626
});
2727
</script>
2828

29-
<?php echo $block->getButtonHtml() ?>
29+
<?php echo $block->getButtonHtml(); ?>

app/code/Magento/Theme/view/frontend/templates/html/print.phtml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
*/
66
?>
77
<script>
8-
jQuery(function() {
9-
window.print();
10-
});
8+
require(
9+
[
10+
'jquery'
11+
],
12+
function($) {
13+
$(function() {
14+
window.print();
15+
});
16+
}
17+
);
1118
</script>

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ define([
380380
},
381381

382382
/**
383-
* Change page to previos
383+
* Change page to previous
384384
*/
385385
previousPage: function () {
386386
this.currentPage(this.currentPage() - 1);

app/code/Magento/Ui/view/base/web/js/form/element/region.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ define([
3636
this.validation['required-entry'] = false;
3737
this.required(false);
3838
} else {
39-
if (!option['is_region_required']) {
39+
if (option && !option['is_region_required']) {
4040
this.error(false);
4141
this.validation = _.omit(this.validation, 'required-entry');
4242
} else {

app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,19 @@
88
require([
99
'jquery',
1010
'mage/template',
11-
'prototype'
12-
], function(jQuery, mageTemplate){
11+
], function($, mageTemplate){
1312

1413
setSettings = function(urlTemplate, codeElement, themeElement) {
1514
var url;
1615

17-
if (!jQuery('#edit_form').valid()) {
16+
if (!$('#edit_form').valid()) {
1817
return false;
1918
}
20-
codeElement = $F(codeElement);
21-
themeElement = $F(themeElement);
2219

2320
url = mageTemplate(urlTemplate, {
2421
data: {
25-
'code': codeElement,
26-
'theme_id': themeElement
22+
'code': $('#' + codeElement).val(),
23+
'theme_id': $('#' + themeElement).val()
2724
}
2825
});
2926

dev/tests/js/jasmine/tests/lib/mage/gallery.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ define([
9999
expect($(navSelector + ':eq(1)').attr('data-active') === 'true').toBeTruthy();
100100
});
101101

102-
it('show previos', function () {
102+
it('show previous', function () {
103103
galleryAPI.prev();
104104
expect($(navSelector + ':eq(0)').attr('data-active') === 'true').toBeTruthy();
105105
});

lib/web/mage/backend/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
* @protected
203203
*/
204204
_onError: function() {
205-
this.trigger('processStop');
205+
$('body').trigger('processStop');
206206

207207
if (this.options.errorUrl) {
208208
location.href = this.options.errorUrl;

lib/web/mage/gallery/gallery.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div data-gallery-role="fotorama__focusable-start" tabindex="-1"></div>
99
<div class="fotorama__wrap fotorama__wrap--css3 fotorama__wrap--slide fotorama__wrap--toggle-arrows">
1010
<div class="fotorama__stage" data-fotorama-stage="fotorama__stage">
11-
<div class="fotorama__arr fotorama__arr--prev" tabindex="0" role="button" aria-label="Previos" data-gallery-role="arrow">
11+
<div class="fotorama__arr fotorama__arr--prev" tabindex="0" role="button" aria-label="Previous" data-gallery-role="arrow">
1212
<div class="fotorama__arr__arr"></div>
1313
</div>
1414
<div class="fotorama__stage__shaft" tabindex="0" data-gallery-role="stage-shaft">
@@ -25,7 +25,7 @@
2525
<div class="fotorama__nav-wrap" data-gallery-role="nav-wrap">
2626
<div class="fotorama__nav fotorama__nav--thumbs">
2727
<div class="fotorama__fullscreen-icon" data-gallery-role="fotorama__fullscreen-icon" tabindex="0" aria-label="Exit fullscreen" role="button"></div>
28-
<div class="fotorama__thumb__arr fotorama__thumb__arr--left" role="button" aria-label="Previos" data-gallery-role="arrow" tabindex = "-1">
28+
<div class="fotorama__thumb__arr fotorama__thumb__arr--left" role="button" aria-label="Previous" data-gallery-role="arrow" tabindex = "-1">
2929
<div class="fotorama__thumb--icon"></div>
3030
</div>
3131
<div class="fotorama__nav__shaft">

lib/web/mage/utils/misc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ define([
3838
'EEEE': 'dddd',
3939
'EEE': 'ddd',
4040
'e': 'd',
41+
'yyyy': 'YYYY',
4142
'y': 'YYYY',
4243
'a': 'A'
4344
};

lib/web/mage/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
],
327327
"stripped-min-length": [
328328
function (value, element, param) {
329-
return $(value).text().length >= param;
329+
return value.length >= param;
330330
},
331331
'Please enter at least {0} characters'
332332
],

0 commit comments

Comments
 (0)