|
8 | 8 |
|
9 | 9 | ?>
|
10 | 10 | <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"> |
13 | 14 | <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 /* @noEscape */ 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 /* @noEscape */ 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> |
33 | 34 | </thead>
|
34 |
| - |
35 | 35 | <tbody>
|
| 36 | + <?php $i=0; ?> |
36 | 37 | <?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 | + ?> |
39 | 42 | <?php if ($item->getIsVirtual()
|
40 | 43 | || ($_orderItem->isShipSeparately() && !($_orderItem->getParentItemId() || $_orderItem->getParentItem()))
|
41 | 44 | || (!$_orderItem->isShipSeparately() && ($_orderItem->getParentItemId() || $_orderItem->getParentItem()))): ?>
|
42 | 45 | <?php continue; ?>
|
43 | 46 | <?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 $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 /* @noEscape */ echo $randomId . '-' . $id; ?>" |
| 54 | + value="<?php /* @escapeNotVerified */ echo $id; ?>" |
| 55 | + class="checkbox admin__control-checkbox"> |
| 56 | + <label for="select-item-<?php /* @noEscape */ echo $randomId . '-' . $id; ?>"></label> |
| 57 | + </label> |
| 58 | + </td> |
| 59 | + <td> |
46 | 60 | <?php /* @escapeNotVerified */ echo $item->getName(); ?>
|
47 | 61 | </td>
|
48 |
| - <td class="col-weight weight "> |
| 62 | + <td data-role="item-weight"> |
49 | 63 | <?php /* @escapeNotVerified */ echo $item->getWeight(); ?>
|
50 | 64 | </td>
|
51 | 65 | <?php
|
|
56 | 70 | $customsValueDisplay = ' style="display: none;" ';
|
57 | 71 | $customsValueValidation = '';
|
58 | 72 | }
|
| 73 | + |
59 | 74 | ?>
|
60 | 75 | <td <?php /* @escapeNotVerified */ echo $customsValueDisplay ?>>
|
61 | 76 | <input type="text"
|
|
65 | 80 | size="10"
|
66 | 81 | onblur="packaging.recalcContainerWeightAndCustomsValue(this);">
|
67 | 82 | </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"> |
| 83 | + <td> |
78 | 84 | <?php /* @escapeNotVerified */ echo $item->getOrderItem()->getQtyOrdered()*1; ?>
|
79 | 85 | </td>
|
80 |
| - <td class="col-qty-edit last"> |
| 86 | + <td> |
81 | 87 | <input type="hidden" name="price" value="<?php /* @escapeNotVerified */ echo $item->getPrice(); ?>">
|
82 | 88 | <input type="text"
|
83 | 89 | name="qty"
|
84 | 90 | value="<?php /* @escapeNotVerified */ echo $item->getQty()*1; ?>"
|
85 | 91 | class="input-text admin__control-text qty<?php if ($item->getOrderItem()->getIsQtyDecimal()): ?> qty-decimal<?php endif ?>">
|
86 |
| - <button type="button" class="action-delete delete icon-btn" onclick="packaging.deleteItem(this);" style="display:none;"> |
| 92 | + <button type="button" class="action-delete" data-action="package-delete-item" onclick="packaging.deleteItem(this);" style="display:none;"> |
87 | 93 | <span><?php /* @escapeNotVerified */ echo __('Delete') ?></span>
|
88 | 94 | </button>
|
89 | 95 | </td>
|
|
0 commit comments