Skip to content

Commit 6be12b9

Browse files
author
Oleg Zinoviev
committed
MAGETWO-32302: Create New Order
- Fixed Unit Tests - Order UI updates
1 parent f85c055 commit 6be12b9

File tree

14 files changed

+59
-28
lines changed

14 files changed

+59
-28
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ protected function _getCheckboxHtml($value, $checked)
113113
$html .= 'value="' . $this->escapeHtml($value) . '" ';
114114
$html .= 'class="' .
115115
($this->getColumn()->getInlineCss() ? $this->getColumn()->getInlineCss() : 'checkbox') .
116+
' admin__control-checkbox' .
116117
'"';
117118
$html .= $checked . $this->getDisabled() . '/>';
119+
$html .= '<label></label>';
118120
return $html;
119121
}
120122

app/code/Magento/Catalog/Block/Product/View/Options/Type/Select.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ public function getValuesHtml()
3838
$select = $this->getLayout()->createBlock(
3939
'Magento\Framework\View\Element\Html\Select'
4040
)->setData(
41-
['id' => 'select_' . $_option->getId(), 'class' => $require . ' product-custom-option admin__control-select']
41+
[
42+
'id' => 'select_' . $_option->getId(),
43+
'class' => $require . ' product-custom-option admin__control-select'
44+
]
4245
);
4346
if ($_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_DROP_DOWN) {
4447
$select->setName('options[' . $_option->getid() . ']')->addOption('', __('-- Please Select --'));

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/text.phtml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,20 @@
99
?>
1010
<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\Text */ ?>
1111
<?php $_option = $block->getOption(); ?>
12-
<div class="field admin__field<?php if ($_option->getIsRequire()) {
13-
echo ' required _required' ?>">
12+
<div class="field admin__field<?php if ($_option->getIsRequire()) echo ' required _required' ?>">
1413
<label class="admin__field-label label">
1514
<?php echo $block->escapeHtml($_option->getTitle()) ?>
1615
<?php echo $block->getFormatedPrice() ?>
1716
</label>
1817
<div class="control admin__field-control">
19-
<div class="input-box">
2018
<?php if ($_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_FIELD): ?>
2119
<input type="text" id="options_<?php echo $_option->getId() ?>_text" class="input-text admin__control-text <?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-' . $_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" value="<?php echo $block->escapeHtml($block->getDefaultValue()) ?>" price="<?php echo $block->getCurrencyPrice($_option->getPrice(true)) ?>" />
2220
<?php elseif ($_option->getType() == \Magento\Catalog\Model\Product\Option::OPTION_TYPE_AREA): ?>
2321
<textarea id="options_<?php echo $_option->getId() ?>_text" class="admin__control-textarea <?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-' . $_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" rows="5" cols="25" price="<?php echo $block->getCurrencyPrice($_option->getPrice(true)) ?>"><?php echo $block->escapeHtml($block->getDefaultValue()) ?></textarea>
24-
<?php endif;
25-
} ?>
22+
<?php endif;?>
23+
2624
<?php if ($_option->getMaxCharacters()): ?>
2725
<p class="note"><?php echo __('Maximum number of characters:')?> <strong><?php echo $_option->getMaxCharacters() ?></strong></p>
2826
<?php endif; ?>
29-
</div>
3027
</div>
3128
</div>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/qty.phtml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010

1111
<?php /* @var $block \Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Qty */ ?>
1212

13-
<fieldset id="product_composite_configure_fields_qty" class="fieldset admin__fieldset <?php echo $block->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
13+
<fieldset id="product_composite_configure_fields_qty"
14+
class="fieldset product-composite-qty-block admin__fieldset <?php echo $block->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
1415
<div class="field admin__field">
1516
<label class="label admin__field-label">
1617
<span><?php echo __('Quantity') ?></span>
1718
</label>
1819
<div class="control admin__field-control">
19-
<input id="product_composite_configure_input_qty" class="input-text admin__control-text" type="text" name="qty" value="<?php echo $block->getQtyValue() * 1 ?>">
20+
<input id="product_composite_configure_input_qty"
21+
class="input-text admin__control-text qty"
22+
type="text"
23+
name="qty"
24+
value="<?php echo $block->getQtyValue() * 1 ?>" />
2025
</div>
2126
</div>
2227
</fieldset>

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ protected function _prepareColumns()
204204
'type' => 'checkbox',
205205
'name' => 'in_products',
206206
'values' => $this->_getSelectedProducts(),
207-
'align' => 'center',
208207
'index' => 'entity_id',
209208
'sortable' => false
210209
]

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
?>
1010
<div class="grid">
11-
<table cellspacing="0" class="data order-tables">
11+
<table class="data order-tables">
1212
<thead>
1313
<tr class="headings">
1414
<th class="col-product"><span><?php echo __('Product') ?></span></th>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// /**
2+
// * Copyright © 2015 Magento. All rights reserved.
3+
// * See COPYING.txt for license details.
4+
// */
5+
6+
.product-composite-configure-inner {
7+
.product-composite-qty-block {
8+
.admin__field-label {
9+
width: auto;
10+
}
11+
}
12+
.admin__control-text {
13+
&.qty {
14+
&:extend(.abs-control-qty);
15+
}
16+
}
17+
}

app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order-create.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@
256256
float: left;
257257
}
258258
.field-email {
259+
margin-top: 0;
259260
overflow: hidden;
260261
}
261262
}

app/design/adminhtml/Magento/backend/web/css/source/components/_data-grid-temp.less

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@data-grid-temp-td__border-inner-style: dashed;
2121
@data-grid-temp-td__border-outer-style: solid;
2222
@data-grid-temp-td__even__background-color: @color-white-smoke;
23-
@data-grid-temp-td__hover__background-color: darken(@data-grid-temp-td__even__background-color, 2%);
23+
@data-grid-temp-td__hover__background-color: #e5f7fe;
2424
@data-grid-temp-td__odd__background-color: @page__background-color;
2525

2626
@data-grid-temp-th__border-color: #8a837f;
@@ -66,6 +66,12 @@
6666
border-bottom: @data-grid-temp-cell__border-width @data-grid-temp-td__border-outer-style @data-grid-temp-td__border-color;
6767
}
6868
}
69+
&:hover {
70+
td {
71+
background-color: @data-grid-temp-td__hover__background-color;
72+
cursor: pointer;
73+
}
74+
}
6975
}
7076

7177
th,
@@ -196,20 +202,16 @@
196202
&:after {
197203
position: absolute;
198204
right: 0;
199-
top: 1px;
200-
}
201-
&:hover:after {
202-
color: @data-grid-temp-td__hover__background-color;
205+
top: -1px;
203206
}
204207
}
205208

206209
.sort-arrow-asc {
207210
.icon-font(
208211
@icon-caret-down__content,
209212
@_icon-font: @icons-admin__font-name,
210-
@_icon-font-color: @data-grid-temp-td__even__background-color,
211-
@_icon-font-color-hover: @data-grid-temp-td__hover__background-color,
212-
@_icon-font-size: 13px,
213+
@_icon-font-color: @data-grid-temp-th__color,
214+
@_icon-font-size: 15px,
213215
@_icon-font-position: after
214216
);
215217
}
@@ -218,9 +220,8 @@
218220
.icon-font(
219221
@icon-caret-up__content,
220222
@_icon-font: @icons-admin__font-name,
221-
@_icon-font-color: @data-grid-temp-td__even__background-color,
222-
@_icon-font-color-hover: @data-grid-temp-td__hover__background-color,
223-
@_icon-font-size: 13px,
223+
@_icon-font-color: @data-grid-temp-th__color,
224+
@_icon-font-size: 15px,
224225
@_icon-font-position: after
225226
);
226227
}

app/design/adminhtml/Magento/backend/web/css/source/components/_messages.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
// ---------------------------------------------
4242

4343
.messages {
44-
margin: 0 0 2rem;
44+
.message {
45+
&:last-child {
46+
margin: 0 0 2rem;
47+
}
48+
}
4549
}
4650

4751
.message {

0 commit comments

Comments
 (0)