Skip to content

Commit 010775e

Browse files
author
Evgeniy Kolesov
committed
MAGETWO-44528: Poor UX of "Create Packages" popup while creating shipping label
1 parent fd7abdf commit 010775e

File tree

10 files changed

+370
-318
lines changed

10 files changed

+370
-318
lines changed

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

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,58 @@
88

99
?>
1010
<div class="grid">
11-
<div class="hor-scroll">
12-
<table class="data-table admin__table-primary">
11+
<?php $randomId = rand(); ?>
12+
<div class="admin__table-wrapper">
13+
<table class="data-grid">
1314
<thead>
14-
<tr>
15-
<th class="col-product no-link"><?php /* @escapeNotVerified */ echo __('Product Name') ?></th>
16-
<th class="col-weight no-link"><?php /* @escapeNotVerified */ echo __('Weight') ?></th>
17-
<th class="col-custom no-link" <?php echo $block->displayCustomsValue() ? '' : 'style="display: none;"' ?>>
18-
<?php /* @escapeNotVerified */ echo __('Customs Value') ?>
19-
</th>
20-
<th class="col-select no-link">
21-
<div class="admin__field admin__field-option">
22-
<input type="checkbox"
23-
name=""
24-
onclick="packaging.checkAllItems(this);"
25-
class="checkbox admin__control-checkbox"
26-
title="<?php /* @escapeNotVerified */ echo __('Select All') ?>">
27-
<label class="admin__field-label"></label>
28-
</div>
29-
</th>
30-
<th class="col-qty no-link"><?php /* @escapeNotVerified */ echo __('Qty Ordered') ?></th>
31-
<th class="col-qty-edit no-link last"><?php /* @escapeNotVerified */ echo __('Qty') ?></th>
32-
</tr>
15+
<tr>
16+
<th class="data-grid-checkbox-cell">
17+
<label class="data-grid-checkbox-cell-inner">
18+
<input type="checkbox"
19+
id="select-items-<?php echo $randomId; ?>"
20+
onchange="packaging.checkAllItems(this);"
21+
class="checkbox admin__control-checkbox"
22+
title="<?php /* @escapeNotVerified */ echo __('Select All') ?>">
23+
<label for="select-items-<?php echo $randomId; ?>"></label>
24+
</label>
25+
</th>
26+
<th class="data-grid-th"><?php /* @escapeNotVerified */ echo __('Product Name') ?></th>
27+
<th class="data-grid-th"><?php /* @escapeNotVerified */ echo __('Weight') ?></th>
28+
<th class="data-grid-th" <?php echo $block->displayCustomsValue() ? '' : 'style="display: none;"' ?>>
29+
<?php /* @escapeNotVerified */ echo __('Customs Value') ?>
30+
</th>
31+
<th class="data-grid-th"><?php /* @escapeNotVerified */ echo __('Qty Ordered') ?></th>
32+
<th class="data-grid-th"><?php /* @escapeNotVerified */ echo __('Qty') ?></th>
33+
</tr>
3334
</thead>
34-
3535
<tbody>
36+
<?php $i=0; ?>
3637
<?php foreach ($block->getCollection() as $item): ?>
37-
<?php $_order = $block->getShipment()->getOrder() ?>
38-
<?php $_orderItem = $_order->getItemById($item->getOrderItemId()); ?>
38+
<?php
39+
$_order = $block->getShipment()->getOrder();
40+
$_orderItem = $_order->getItemById($item->getOrderItemId());
41+
?>
3942
<?php if ($item->getIsVirtual()
4043
|| ($_orderItem->isShipSeparately() && !($_orderItem->getParentItemId() || $_orderItem->getParentItem()))
4144
|| (!$_orderItem->isShipSeparately() && ($_orderItem->getParentItemId() || $_orderItem->getParentItem()))): ?>
4245
<?php continue; ?>
4346
<?php endif; ?>
44-
<tr title="#" id="" class="">
45-
<td class="col-product name">
47+
<tr class="data-grid-controls-row data-row <?php echo ($i++ % 2 != 0) ? '_odd-row' : ''; ?>">
48+
<td class="data-grid-checkbox-cell">
49+
<?php /* @escapeNotVerified */ $id = $item->getId() ? $item->getId() : $item->getOrderItemId(); ?>
50+
<label class="data-grid-checkbox-cell-inner">
51+
<input type="checkbox"
52+
name=""
53+
id="select-item-<?php echo $randomId . '-' . $id; ?>"
54+
value="<?php /* @escapeNotVerified */ echo $id; ?>"
55+
class="checkbox admin__control-checkbox">
56+
<label for="select-item-<?php echo $randomId . '-' . $id; ?>"></label>
57+
</label>
58+
</td>
59+
<td>
4660
<?php /* @escapeNotVerified */ echo $item->getName(); ?>
4761
</td>
48-
<td class="col-weight weight ">
62+
<td data-role="item-weight">
4963
<?php /* @escapeNotVerified */ echo $item->getWeight(); ?>
5064
</td>
5165
<?php
@@ -65,19 +79,10 @@
6579
size="10"
6680
onblur="packaging.recalcContainerWeightAndCustomsValue(this);">
6781
</td>
68-
<td class="col-select">
69-
<div class="admin__field admin__field-option">
70-
<input type="checkbox"
71-
name=""
72-
value="<?php /* @escapeNotVerified */ echo $item->getId() ? $item->getId() : $item->getOrderItemId(); ?>"
73-
class="checkbox admin__control-checkbox">
74-
<label class="admin__field-label"></label>
75-
</div>
76-
</td>
77-
<td class="col-qty">
82+
<td>
7883
<?php /* @escapeNotVerified */ echo $item->getOrderItem()->getQtyOrdered()*1; ?>
7984
</td>
80-
<td class="col-qty-edit last">
85+
<td>
8186
<input type="hidden" name="price" value="<?php /* @escapeNotVerified */ echo $item->getPrice(); ?>">
8287
<input type="text"
8388
name="qty"

0 commit comments

Comments
 (0)