Skip to content

Commit 9c54a3f

Browse files
committed
Merge branch 'MAGETWO-34653' of https://github.corp.ebay.com/magento-firedrakes/magento2ce into MAGETWO-34653
2 parents d037e05 + 6593ba1 commit 9c54a3f

File tree

3 files changed

+23
-32
lines changed

3 files changed

+23
-32
lines changed

app/code/Magento/Shipping/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"magento/module-tax": "0.74.0-beta2",
1515
"magento/module-catalog-inventory": "0.74.0-beta2",
1616
"magento/module-quote": "0.74.0-beta2",
17-
"magento/module-ui": "0.74.0-beta2",
1817
"magento/framework": "0.74.0-beta2",
1918
"ext-gd": "*",
2019
"magento/magento-composer-installer": "*"

app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,35 +56,9 @@
5656
<script>
5757
require([
5858
"jquery",
59-
"Magento_Ui/js/lib/registry/registry",
6059
"mage/mage",
6160
"prototype"
62-
], function(jQuery, registry){
63-
64-
registry.get('packaging', function(packaging){
65-
packaging.setConfirmPackagingCallback(function(){
66-
packaging.setParamsCreateLabelRequest($('edit_form').serialize(true));
67-
packaging.sendCreateLabelRequest();
68-
});
69-
packaging.setLabelCreatedCallback(function(response){
70-
setLocation("<?php echo $block->getUrl(
71-
'sales/order/view',
72-
['order_id' => $block->getShipment()->getOrderId()]
73-
); ?>");
74-
});
75-
packaging.setCancelCallback(function() {
76-
packaging.cleanPackages();
77-
$('create_shipping_label').checked = false;
78-
toggleCreateLabelCheckbox();
79-
});
80-
packaging.setItemQtyCallback(function(itemId){
81-
var item = $$('[name="shipment[items]['+itemId+']"]')[0];
82-
if (item && !isNaN(item.value)) {
83-
return item.value;
84-
}
85-
});
86-
});
87-
61+
], function(jQuery){
8862
jQuery('#edit_form').mage('form').mage('validation');
8963

9064
});

app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,37 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
1616
<script>
1717
require([
1818
"jquery",
19-
"Magento_Ui/js/lib/registry/registry",
2019
"prototype",
2120
"Magento_Shipping/order/packaging"
22-
], function(jQuery, registry){
21+
], function(jQuery){
2322

2423
packaging = new Packaging(<?php echo $block->getConfigDataJson() ?>);
2524
packaging.changeContainerType($$('select[name=package_container]')[0]);
2625
packaging.checkSizeAndGirthParameter(
2726
$$('select[name=package_container]')[0],
2827
<?php echo $girthEnabled; ?>
2928
);
30-
registry.set('packaging', packaging);
31-
29+
packaging.setConfirmPackagingCallback(function(){
30+
packaging.setParamsCreateLabelRequest($('edit_form').serialize(true));
31+
packaging.sendCreateLabelRequest();
32+
});
33+
packaging.setLabelCreatedCallback(function(response){
34+
setLocation("<?php echo $block->getUrl(
35+
'sales/order/view',
36+
['order_id' => $block->getShipment()->getOrderId()]
37+
); ?>");
38+
});
39+
packaging.setCancelCallback(function() {
40+
packaging.cleanPackages();
41+
$('create_shipping_label').checked = false;
42+
toggleCreateLabelCheckbox();
43+
});
44+
packaging.setItemQtyCallback(function(itemId){
45+
var item = $$('[name="shipment[items]['+itemId+']"]')[0];
46+
if (item && !isNaN(item.value)) {
47+
return item.value;
48+
}
49+
});
3250
});
3351
</script>
3452
<div id="packaging_window" class="packaging-window" style="display:none;">

0 commit comments

Comments
 (0)