File tree Expand file tree Collapse file tree 20 files changed +234
-88
lines changed
Catalog/view/adminhtml/templates/catalog/product
Checkout/view/frontend/web/js
ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super
Shipping/view/adminhtml/templates/order/packaging
design/adminhtml/Magento/backend/web
api-functional/testsuite/Magento/Sales/Service/V1
integration/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab
unit/testsuite/Magento/Core/Model Expand file tree Collapse file tree 20 files changed +234
-88
lines changed Original file line number Diff line number Diff line change 1515 data-captcha="<?php echo $ this ->getFormId ()?> "
1616 id="captcha-container-<?php echo $ this ->getFormId ()?> "
1717 data-mage-init='{"captcha":{"url": "<?php echo $ this ->getRefreshUrl ()?> ",
18+ "imageLoader": "<?php echo $ this ->getViewFileUrl ('images/loader-2.gif ' ) ?> ",
1819 "type": "<?php echo $ this ->getFormId () ?> "}}'>
1920 <div class="control captcha-image">
2021 <img alt="<?php echo __ ('Please type the letters below ' )?> " class="captcha-img" height="<?php echo $ this ->getImgHeight () ?> " src="<?php echo $ captcha ->getImgSrc () ?> "/>
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ define([
1212 options : {
1313 refreshClass : 'refreshing' ,
1414 reloadSelector : '.captcha-reload' ,
15- imageSelector : '.captcha-img'
15+ imageSelector : '.captcha-img' ,
16+ imageLoader : ''
1617 } ,
1718
1819 /**
@@ -28,8 +29,13 @@ define([
2829 * @param e - Event
2930 */
3031 refresh : function ( e ) {
31- var reloadImage = $ ( e . currentTarget ) ;
32- reloadImage . addClass ( this . options . refreshClass ) ;
32+ var imageLoader = this . options . imageLoader ;
33+
34+ if ( imageLoader ) {
35+ this . element . find ( this . options . imageSelector ) . attr ( 'src' , imageLoader ) ;
36+ }
37+ this . element . addClass ( this . options . refreshClass ) ;
38+
3339 $ . ajax ( {
3440 url : this . options . url ,
3541 type : 'post' ,
@@ -45,7 +51,7 @@ define([
4551 }
4652 } ,
4753 complete : function ( ) {
48- reloadImage . removeClass ( this . options . refreshClass ) ;
54+ this . element . removeClass ( this . options . refreshClass ) ;
4955 }
5056 } ) ;
5157 }
Original file line number Diff line number Diff line change 5656<script type="text/javascript">
5757require([
5858 "jquery",
59+ "underscore",
5960 "mage/mage",
6061 "Magento_Catalog/catalog/type-switcher",
6162 "mage/backend/tabs",
62- "underscore "
63+ "domReady "
6364], function($){
6465 var $form = $('[data-form=edit-product]');
6566 $form.data('typeSwitcher', new TypeSwitcher(<?php echo $ this ->getTypeSwitcherData ();?> ).bindAll());
Original file line number Diff line number Diff line change @@ -218,9 +218,7 @@ define([
218218 }
219219 if ( $ . type ( response ) === 'object' && ! $ . isEmptyObject ( response ) ) {
220220 if ( response . error ) {
221- var msg = response . message || response . error_messages || response . error ,
222- billingEmailId ,
223- hasBillingEmail ;
221+ var msg = response . message || response . error_messages || response . error ;
224222
225223 if ( msg ) {
226224 if ( Array . isArray ( msg ) ) {
@@ -234,17 +232,6 @@ define([
234232
235233 $ ( this . options . countrySelector ) . trigger ( 'change' ) ;
236234
237- billingEmailId = this . options . billing . emailAddressName ;
238- hasBillingEmail = $ ( '[name="' + billingEmailId + '"]' ) . length ;
239-
240- if ( hasBillingEmail ) {
241- var emailAddress = { } ;
242- emailAddress [ billingEmailId ] = msg ;
243-
244- var billingFormValidator = $ ( this . options . billing . form ) . validate ( ) ;
245- billingFormValidator . showErrors ( emailAddress ) ;
246- }
247-
248235 alert ( msg ) ;
249236 }
250237
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use \Magento\ConfigurableProduct\Model\Product\Type\Configurable;
1414 </strong>
1515 </div>
1616
17- <div class="fieldset-wrapper-content collapse" id="<?php echo $ this ->getId () ?> -content">
17+ <div class="fieldset-wrapper-content collapse" data-collapsed="true" id="<?php echo $ this ->getId () ?> -content">
1818 <fieldset class="fieldset">
1919 <div class="field" id="variations-search-field">
2020 <label class="label" for="configurable-attribute-selector"><span>Search</span></label>
@@ -81,7 +81,6 @@ require([
8181
8282 attributesInput.prop('disabled', false);
8383
84- stockAvailabilityField.val(1);
8584 inventoryQty.prop('disabled', true);
8685 inventoryAvailabilityField.removeProp('disabled');
8786 disableElement(qtyField);
Original file line number Diff line number Diff line change 55namespace Magento \Core \Model ;
66
77use Magento \Framework \View \Design \ThemeInterface ;
8+ use Magento \Framework \App \Filesystem \DirectoryList ;
89
910/**
1011 * Theme model class
@@ -117,7 +118,6 @@ public function __construct(
117118 $ this ->_imageFactory = $ imageFactory ;
118119 $ this ->_validator = $ validator ;
119120 $ this ->_customFactory = $ customizationFactory ;
120-
121121 $ this ->addData (['type ' => self ::TYPE_VIRTUAL ]);
122122 }
123123
Original file line number Diff line number Diff line change @@ -60,12 +60,7 @@ public function __construct(
6060 */
6161 public function getPreviewImageUrl (ThemeInterface $ theme )
6262 {
63- return $ theme ->isPhysical ()
64- ? $ this ->assetRepo ->getUrlWithParams (
65- $ theme ->getPreviewImage (),
66- ['area ' => $ theme ->getData ('area ' ), 'themeModel ' => $ theme ]
67- )
68- : $ this ->storeManager ->getStore ()->getBaseUrl (\Magento \Framework \UrlInterface::URL_TYPE_MEDIA )
63+ return $ this ->storeManager ->getStore ()->getBaseUrl (\Magento \Framework \UrlInterface::URL_TYPE_MEDIA )
6964 . self ::PREVIEW_DIRECTORY_PATH . '/ ' . $ theme ->getPreviewImage ();
7065 }
7166
@@ -77,13 +72,7 @@ public function getPreviewImageUrl(ThemeInterface $theme)
7772 */
7873 public function getPreviewImagePath (ThemeInterface $ theme )
7974 {
80- return $ theme ->isPhysical ()
81- ? $ this ->assetRepo ->createAsset (
82- $ theme ->getPreviewImage (),
83- ['area ' => $ theme ->getData ('area ' ), 'themeModel ' => $ theme ]
84- )
85- ->getSourceFile ()
86- : $ this ->mediaDirectory ->getAbsolutePath (self ::PREVIEW_DIRECTORY_PATH . '/ ' . $ theme ->getPreviewImage ());
75+ return $ this ->mediaDirectory ->getAbsolutePath (self ::PREVIEW_DIRECTORY_PATH . '/ ' . $ theme ->getPreviewImage ());
8776 }
8877
8978 /**
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ require([
105105 $ customsValueValidation = '' ;
106106 }
107107 ?>
108- <td <?php echo $ customsValueDisplay ?> >
108+ <td class="col-custom" <?php echo $ customsValueDisplay ?> >
109109 <input type="text" class="customs-value input-text <?php echo $ customsValueValidation ?> " name="package_customs_value" />
110110 <span class="customs-value-currency">[<?php echo $ this ->getCustomValueCurrencyCode (); ?> ]</span>
111111 </td>
Original file line number Diff line number Diff line change @@ -1745,7 +1745,8 @@ table.items-to-invoice tbody tr:hover td {
17451745.packaging-window .col-width ,
17461746.packaging-window .col-height ,
17471747.packaging-window .col-length ,
1748- .packaging-window .data-table .col-total-weight input [type= " text" ] {
1748+ .packaging-window .data-table .col-total-weight input [type= " text" ],
1749+ .packaging-window .data-table .col-custom input [type= " text" ] {
17491750 width : 60px ;
17501751}
17511752
@@ -1759,7 +1760,8 @@ table.items-to-invoice tbody tr:hover td {
17591760}
17601761
17611762.packaging-window .data-table .col-actions ,
1762- .packaging-window .col-total-weight {
1763+ .packaging-window .col-total-weight ,
1764+ .packaging-window .data-table .col-custom {
17631765 white-space : nowrap ;
17641766}
17651767
Original file line number Diff line number Diff line change @@ -364,7 +364,9 @@ define([
364364 /* @TODO refactor collapsable as widget and avoid logic binding with such a general selectors */
365365 $ ( '.collapse' ) . collapsable ( ) ;
366366 $ . each ( $ ( '.entry-edit' ) , function ( i , entry ) {
367- $ ( '.collapse:first' , entry ) . collapse ( 'show' ) ;
367+ $ ( '.collapse:first' , entry ) . filter ( function ( ) {
368+ return $ ( this ) . data ( 'collapsed' ) !== true ;
369+ } ) . collapse ( 'show' ) ;
368370 } ) ;
369371
370372 // TODO: Move to VDE js widjets
You can’t perform that action at this time.
0 commit comments