-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/develop' into MAGETWO-24139
- Loading branch information
Showing
45 changed files
with
1,651 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/code/Magento/Catalog/view/frontend/web/js/validate-product.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
define([ | ||
'jquery', | ||
'mage/mage', | ||
'Magento_Catalog/product/view/validation', | ||
'catalogAddToCart' | ||
], function ($) { | ||
'use strict'; | ||
|
||
$.widget('mage.productValidate', { | ||
options: { | ||
bindSubmit: false, | ||
radioCheckboxClosest: '.nested' | ||
}, | ||
|
||
/** | ||
* Uses Magento's validation widget for the form object. | ||
* @private | ||
*/ | ||
_create: function () { | ||
var bindSubmit = this.options.bindSubmit; | ||
|
||
this.element.validation({ | ||
radioCheckboxClosest: this.options.radioCheckboxClosest, | ||
|
||
/** | ||
* Uses catalogAddToCart widget as submit handler. | ||
* @param {Object} form | ||
* @returns {Boolean} | ||
*/ | ||
submitHandler: function (form) { | ||
var jqForm = $(form).catalogAddToCart({ | ||
bindSubmit: bindSubmit | ||
}); | ||
|
||
jqForm.catalogAddToCart('submitForm', jqForm); | ||
|
||
return false; | ||
} | ||
}); | ||
} | ||
}); | ||
|
||
return $.mage.productValidate; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/paging/sizes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
define([ | ||
'Magento_Ui/js/grid/paging/sizes' | ||
], function (Sizes) { | ||
'use strict'; | ||
|
||
return Sizes.extend({ | ||
defaults: { | ||
excludedOptions: ['100', '200'] | ||
}, | ||
|
||
/** | ||
* @override | ||
*/ | ||
initialize: function () { | ||
this._super(); | ||
|
||
this.excludedOptions.forEach(function (excludedOption) { | ||
delete this.options[excludedOption]; | ||
}, this); | ||
this.updateArray(); | ||
|
||
return this; | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.