Skip to content

Commit

Permalink
Merge pull request #184 from magento-frontend/MAGETWO-55217-new
Browse files Browse the repository at this point in the history
[Frontend] Process Public Pull Requests
  • Loading branch information
Yaroslav Onischenko authored Jul 26, 2016
2 parents 17726ef + fcd3dde commit 2d0d716
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ $jsonHelper = $this->helper('Magento\Framework\Json\Helper\Data');

<script>
require([
'prototype'
], function () {
'jquery'
], function ($) {
window.resetRobotsToDefault = function(){
$('design_search_engine_robots_custom_instructions').value = <?php
$('#design_search_engine_robots_custom_instructions').val(<?php
/* @escapeNotVerified */ echo $jsonHelper->jsonEncode($block->getRobotsDefaultCustomInstructions())
?>;
?>);
}
});
</script>

<?php echo $block->getButtonHtml() ?>
<?php echo $block->getButtonHtml(); ?>
13 changes: 10 additions & 3 deletions app/code/Magento/Theme/view/frontend/templates/html/print.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
*/
?>
<script>
jQuery(function() {
window.print();
});
require(
[
'jquery'
],
function($) {
$(function() {
window.print();
});
}
);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ define([
},

/**
* Change page to previos
* Change page to previous
*/
previousPage: function () {
this.currentPage(this.currentPage() - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define([
this.validation['required-entry'] = false;
this.required(false);
} else {
if (!option['is_region_required']) {
if (option && !option['is_region_required']) {
this.error(false);
this.validation = _.omit(this.validation, 'required-entry');
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@
require([
'jquery',
'mage/template',
'prototype'
], function(jQuery, mageTemplate){
], function($, mageTemplate){

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

if (!jQuery('#edit_form').valid()) {
if (!$('#edit_form').valid()) {
return false;
}
codeElement = $F(codeElement);
themeElement = $F(themeElement);

url = mageTemplate(urlTemplate, {
data: {
'code': codeElement,
'theme_id': themeElement
'code': $('#' + codeElement).val(),
'theme_id': $('#' + themeElement).val()
}
});

Expand Down
2 changes: 1 addition & 1 deletion dev/tests/js/jasmine/tests/lib/mage/gallery.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ define([
expect($(navSelector + ':eq(1)').attr('data-active') === 'true').toBeTruthy();
});

it('show previos', function () {
it('show previous', function () {
galleryAPI.prev();
expect($(navSelector + ':eq(0)').attr('data-active') === 'true').toBeTruthy();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/backend/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
* @protected
*/
_onError: function() {
this.trigger('processStop');
$('body').trigger('processStop');

if (this.options.errorUrl) {
location.href = this.options.errorUrl;
Expand Down
4 changes: 2 additions & 2 deletions lib/web/mage/gallery/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div data-gallery-role="fotorama__focusable-start" tabindex="-1"></div>
<div class="fotorama__wrap fotorama__wrap--css3 fotorama__wrap--slide fotorama__wrap--toggle-arrows">
<div class="fotorama__stage" data-fotorama-stage="fotorama__stage">
<div class="fotorama__arr fotorama__arr--prev" tabindex="0" role="button" aria-label="Previos" data-gallery-role="arrow">
<div class="fotorama__arr fotorama__arr--prev" tabindex="0" role="button" aria-label="Previous" data-gallery-role="arrow">
<div class="fotorama__arr__arr"></div>
</div>
<div class="fotorama__stage__shaft" tabindex="0" data-gallery-role="stage-shaft">
Expand All @@ -25,7 +25,7 @@
<div class="fotorama__nav-wrap" data-gallery-role="nav-wrap">
<div class="fotorama__nav fotorama__nav--thumbs">
<div class="fotorama__fullscreen-icon" data-gallery-role="fotorama__fullscreen-icon" tabindex="0" aria-label="Exit fullscreen" role="button"></div>
<div class="fotorama__thumb__arr fotorama__thumb__arr--left" role="button" aria-label="Previos" data-gallery-role="arrow" tabindex = "-1">
<div class="fotorama__thumb__arr fotorama__thumb__arr--left" role="button" aria-label="Previous" data-gallery-role="arrow" tabindex = "-1">
<div class="fotorama__thumb--icon"></div>
</div>
<div class="fotorama__nav__shaft">
Expand Down
1 change: 1 addition & 0 deletions lib/web/mage/utils/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ define([
'EEEE': 'dddd',
'EEE': 'ddd',
'e': 'd',
'yyyy': 'YYYY',
'y': 'YYYY',
'a': 'A'
};
Expand Down
2 changes: 1 addition & 1 deletion lib/web/mage/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
],
"stripped-min-length": [
function (value, element, param) {
return $(value).text().length >= param;
return value.length >= param;
},
'Please enter at least {0} characters'
],
Expand Down

0 comments on commit 2d0d716

Please sign in to comment.