File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
app/code/Magento/Shipping/view/adminhtml/templates Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 56
56
<script>
57
57
require([
58
58
"jquery",
59
+ "Magento_Ui/js/lib/registry/registry",
59
60
"mage/mage",
60
61
"prototype"
61
- ], function(jQuery){
62
+ ], function(jQuery, registry ){
62
63
63
- jQuery('body').one('packageInitialized ', function(){
64
+ registry.get('packaging ', function(packaging ){
64
65
packaging.setConfirmPackagingCallback(function(){
65
66
packaging.setParamsCreateLabelRequest($('edit_form').serialize(true));
66
67
packaging.sendCreateLabelRequest();
Original file line number Diff line number Diff line change @@ -16,18 +16,18 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
16
16
<script>
17
17
require([
18
18
"jquery",
19
+ "Magento_Ui/js/lib/registry/registry",
19
20
"prototype",
20
21
"Magento_Shipping/order/packaging"
21
- ], function(jQuery){
22
+ ], function(jQuery, registry ){
22
23
23
24
packaging = new Packaging(<?php echo $ block ->getConfigDataJson () ?> );
24
25
packaging.changeContainerType($$('select[name=package_container]')[0]);
25
26
packaging.checkSizeAndGirthParameter(
26
27
$$('select[name=package_container]')[0],
27
28
<?php echo $ girthEnabled ; ?>
28
29
);
29
-
30
- jQuery('body').trigger('packageInitialized');
30
+ registry.set('packaging', packaging);
31
31
32
32
});
33
33
</script>
You can’t perform that action at this time.
0 commit comments