Skip to content

Commit f318191

Browse files
committed
MAGETWO-34180: Active item in Nivagation menu is not highlighted
- Merge remote-tracking branch 'origin/UI' into MAGETWO-34180 - Conflicts: - lib/web/css/source/lib/_navigation.less
2 parents 5584aaa + f6d3657 commit f318191

File tree

464 files changed

+9745
-5619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

464 files changed

+9745
-5619
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Extended.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,11 @@ protected function _prepareLayout()
203203
$this->setChild(
204204
'reset_filter_button',
205205
$this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData(
206-
['label' => __('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()']
206+
[
207+
'label' => __('Reset Filter'),
208+
'onclick' => $this->getJsObjectName() . '.resetFilter()',
209+
'class' => 'action-reset'
210+
]
207211
)
208212
);
209213
$this->setChild(

app/code/Magento/Backend/Test/Unit/Model/Menu/Filter/IteratorTest.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ class IteratorTest extends \PHPUnit_Framework_TestCase
1212
*/
1313
protected $_menuModel;
1414

15-
/**
16-
* @var \Magento\Backend\Model\Menu\Filter\Iterator
17-
*/
18-
protected $_filterIteratorModel;
19-
2015
/**
2116
* @var \Magento\Backend\Model\Menu\Item[]
2217
*/
@@ -42,9 +37,6 @@ protected function setUp()
4237
$loggerMock = $this->getMock('Psr\Log\LoggerInterface');
4338

4439
$this->_menuModel = new \Magento\Backend\Model\Menu($loggerMock);
45-
$this->_filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
46-
$this->_menuModel->getIterator()
47-
);
4840
}
4941

5042
public function testLoopWithAllItemsDisabledDoesntIterate()
@@ -54,8 +46,12 @@ public function testLoopWithAllItemsDisabledDoesntIterate()
5446
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
5547
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
5648
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
49+
$filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
50+
$this->_menuModel->getIterator()
51+
);
52+
5753
$items = [];
58-
foreach ($this->_filterIteratorModel as $item) {
54+
foreach ($filterIteratorModel as $item) {
5955
$items[] = $item;
6056
}
6157
$this->assertCount(0, $items);
@@ -70,9 +66,12 @@ public function testLoopIteratesOnlyValidItems()
7066

7167
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
7268
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
69+
$filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
70+
$this->_menuModel->getIterator()
71+
);
7372

7473
$items = [];
75-
foreach ($this->_filterIteratorModel as $item) {
74+
foreach ($filterIteratorModel as $item) {
7675
$items[] = $item;
7776
}
7877
$this->assertCount(1, $items);
@@ -88,9 +87,12 @@ public function testLoopIteratesDosntIterateDisabledItems()
8887

8988
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
9089
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
90+
$filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
91+
$this->_menuModel->getIterator()
92+
);
9193

9294
$items = [];
93-
foreach ($this->_filterIteratorModel as $item) {
95+
foreach ($filterIteratorModel as $item) {
9496
$items[] = $item;
9597
}
9698
$this->assertCount(1, $items);
@@ -106,9 +108,12 @@ public function testLoopIteratesDosntIterateNotAllowedItems()
106108

107109
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
108110
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
111+
$filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
112+
$this->_menuModel->getIterator()
113+
);
109114

110115
$items = [];
111-
foreach ($this->_filterIteratorModel as $item) {
116+
foreach ($filterIteratorModel as $item) {
112117
$items[] = $item;
113118
}
114119
$this->assertCount(1, $items);
@@ -125,9 +130,12 @@ public function testLoopIteratesMixedItems()
125130

126131
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
127132
$this->_menuModel->add($this->getMock('Magento\Backend\Model\Menu\Item', [], [], '', false));
133+
$filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator(
134+
$this->_menuModel->getIterator()
135+
);
128136

129137
$items = [];
130-
foreach ($this->_filterIteratorModel as $item) {
138+
foreach ($filterIteratorModel as $item) {
131139
$items[] = $item;
132140
}
133141
$this->assertCount(1, $items);

app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
</div>
1616
<div class="clear"></div>
1717
<script id="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template">
18-
<div id="<%= data.id %>" class="file-row">
19-
<span class="file-info"><%= data.name %> (<%= data.size %>)</span>
18+
<div id="<%- data.id %>" class="file-row">
19+
<span class="file-info"><%- data.name %> (<%- data.size %>)</span>
2020
<div class="progressbar-container">
2121
<div class="progressbar upload-progress" style="width: 0%;"></div>
2222
</div>

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
<% if (data.items.length) { %>
3131
<% _.each(data.items, function(value){ %>
3232
<li class="item"
33-
<%= data.optionData(value) %>
33+
<%- data.optionData(value) %>
3434
>
35-
<a href="<%= value.url %>" class="title"><%= value.name %></a>
36-
<span class="type"><%= value.type %></span>
37-
<%= value.description || "" %>
35+
<a href="<%- value.url %>" class="title"><%- value.name %></a>
36+
<span class="type"><%- value.type %></span>
37+
<%- value.description || "" %>
3838
</li>
3939
<% }); %>
4040
<% } else { %>

app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ protected function _prepareLayout()
152152
'add_selection_button',
153153
'Magento\Backend\Block\Widget\Button',
154154
[
155-
'id' => $this->getFieldId() . '_<%= data.index %>_add_button',
155+
'id' => $this->getFieldId() . '_<%- data.index %>_add_button',
156156
'label' => __('Add Products to Option'),
157157
'class' => 'add add-selection'
158158
]
@@ -162,7 +162,7 @@ protected function _prepareLayout()
162162
'close_search_button',
163163
'Magento\Backend\Block\Widget\Button',
164164
[
165-
'id' => $this->getFieldId() . '_<%= data.index %>_close_button',
165+
'id' => $this->getFieldId() . '_<%- data.index %>_close_button',
166166
'label' => __('Close'),
167167
'on_click' => 'bSelection.closeSearch(event)',
168168
'class' => 'back no-display'
@@ -272,12 +272,12 @@ public function getTypeSelectHtml()
272272
'Magento\Framework\View\Element\Html\Select'
273273
)->setData(
274274
[
275-
'id' => $this->getFieldId() . '_<%= data.index %>_type',
275+
'id' => $this->getFieldId() . '_<%- data.index %>_type',
276276
'class' => 'select select-product-option-type required-option-select',
277277
'extra_params' => 'onchange="bOption.changeType(event)"',
278278
]
279279
)->setName(
280-
$this->getFieldName() . '[<%= data.index %>][type]'
280+
$this->getFieldName() . '[<%- data.index %>][type]'
281281
)->setOptions(
282282
$this->_optionTypes->toOptionArray()
283283
);
@@ -293,9 +293,9 @@ public function getRequireSelectHtml()
293293
$select = $this->getLayout()->createBlock(
294294
'Magento\Framework\View\Element\Html\Select'
295295
)->setData(
296-
['id' => $this->getFieldId() . '_<%= data.index %>_required', 'class' => 'select']
296+
['id' => $this->getFieldId() . '_<%- data.index %>_required', 'class' => 'select']
297297
)->setName(
298-
$this->getFieldName() . '[<%= data.index %>][required]'
298+
$this->getFieldName() . '[<%- data.index %>][required]'
299299
)->setOptions(
300300
$this->_yesno->toOptionArray()
301301
);

app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ public function getPriceTypeSelectHtml()
131131
'Magento\Framework\View\Element\Html\Select'
132132
)->setData(
133133
[
134-
'id' => $this->getFieldId() . '_<%= data.index %>_price_type',
134+
'id' => $this->getFieldId() . '_<%- data.index %>_price_type',
135135
'class' => 'select select-product-option-type required-option-select',
136136
]
137137
)->setName(
138-
$this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][selection_price_type]'
138+
$this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][selection_price_type]'
139139
)->setOptions(
140140
$this->_priceType->toOptionArray()
141141
);
@@ -155,9 +155,9 @@ public function getQtyTypeSelectHtml()
155155
$select = $this->getLayout()->createBlock(
156156
'Magento\Framework\View\Element\Html\Select'
157157
)->setData(
158-
['id' => $this->getFieldId() . '_<%= data.index %>_can_change_qty', 'class' => 'select']
158+
['id' => $this->getFieldId() . '_<%- data.index %>_can_change_qty', 'class' => 'select']
159159
)->setName(
160-
$this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][selection_can_change_qty]'
160+
$this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][selection_can_change_qty]'
161161
)->setOptions(
162162
$this->_yesno->toOptionArray()
163163
);
@@ -195,8 +195,8 @@ public function getCheckboxScopeHtml()
195195
{
196196
$checkboxHtml = '';
197197
if ($this->isUsedWebsitePrice()) {
198-
$fieldsId = $this->getFieldId() . '_<%= data.index %>_price_scope';
199-
$name = $this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][default_price_scope]';
198+
$fieldsId = $this->getFieldId() . '_<%- data.index %>_price_scope';
199+
$name = $this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][default_price_scope]';
200200
$class = 'bundle-option-price-scope-checkbox';
201201
$label = __('Use Default Value');
202202
$disabled = $this->getCanEditPrice() === false ? ' disabled="disabled"' : '';

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,65 @@
99
/** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */
1010
?>
1111
<script id="bundle-option-template" type="text/x-magento-template">
12-
<div id="<?php echo $block->getFieldId() ?>_<%= data.index %>" class="option-box">
13-
<div class="fieldset-wrapper collapsable-wrapper opened" id="<?php echo $block->getFieldId() ?>_<%= data.index %>-wrapper">
12+
<div id="<?php echo $block->getFieldId() ?>_<%- data.index %>" class="option-box">
13+
<div class="fieldset-wrapper collapsable-wrapper opened" id="<?php echo $block->getFieldId() ?>_<%- data.index %>-wrapper">
1414
<div class="fieldset-wrapper-title">
15-
<strong class="title" data-toggle="collapse" data-target="#<?php echo $block->getFieldId() ?>_<%= data.index %>-content">
16-
<span><%= data.default_title %></span>
15+
<strong class="title" data-toggle="collapse" data-target="#<?php echo $block->getFieldId() ?>_<%- data.index %>-content">
16+
<span><%- data.default_title %></span>
1717
</strong>
1818
<div class="actions">
1919
<?php echo $block->getOptionDeleteButtonHtml() ?>
2020
</div>
2121
<div data-role="draggable-handle" class="draggable-handle"></div>
2222
</div>
23-
<div class="fieldset-wrapper-content in collapse" id="<?php echo $block->getFieldId() ?>_<%= data.index %>-content">
23+
<div class="fieldset-wrapper-content in collapse" id="<?php echo $block->getFieldId() ?>_<%- data.index %>-content">
2424
<fieldset class="fieldset">
2525
<fieldset class="fieldset-alt">
2626
<div class="field field-option-title required">
27-
<label class="label" for="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title">
27+
<label class="label" for="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title">
2828
<?php echo __('Option Title') ?>
2929
</label>
3030
<div class="control">
3131
<?php if ($block->isDefaultStore()): ?>
3232
<input class="input-text required-entry"
3333
type="text"
34-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][title]"
35-
id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title"
36-
value="<%= data.title %>"
37-
data-original-value="<%= data.title %>" />
34+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][title]"
35+
id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title"
36+
value="<%- data.title %>"
37+
data-original-value="<%- data.title %>" />
3838
<?php else: ?>
3939
<input class="input-text required-entry"
4040
type="text"
41-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][default_title]"
42-
id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_default_title"
43-
value="<%= data.default_title %>"
44-
data-original-value="<%= data.default_title %>" />
41+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][default_title]"
42+
id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_default_title"
43+
value="<%- data.default_title %>"
44+
data-original-value="<%- data.default_title %>" />
4545
<?php endif; ?>
4646
<input type="hidden"
47-
id="<?php echo $block->getFieldId() ?>_id_<%= data.index %>"
48-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][option_id]"
49-
value="<%= data.option_id %>" />
47+
id="<?php echo $block->getFieldId() ?>_id_<%- data.index %>"
48+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][option_id]"
49+
value="<%- data.option_id %>" />
5050
<input type="hidden"
51-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][delete]"
51+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][delete]"
5252
value=""
5353
data-state="deleted" />
5454
</div>
5555
</div>
5656
<?php if (!$block->isDefaultStore()): ?>
5757
<div class="field field-option-store-view required">
58-
<label class="label" for="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title_store">
58+
<label class="label" for="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title_store">
5959
<?php echo __('Store View Title') ?>
6060
</label>
6161
<div class="control">
6262
<input class="input-text required-entry" type="text"
63-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][title]"
64-
id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title_store"
65-
value="<%= data.title %>" />
63+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][title]"
64+
id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title_store"
65+
value="<%- data.title %>" />
6666
</div>
6767
</div>
6868
<?php endif; ?>
6969
<div class="field field-option-input-type required">
70-
<label class="label" for="<?php echo $block->getFieldId() . '_<%= data.index %>_type' ?>">
70+
<label class="label" for="<?php echo $block->getFieldId() . '_<%- data.index %>_type' ?>">
7171
<?php echo __('Input Type') ?>
7272
</label>
7373
<div class="control">
@@ -93,8 +93,8 @@
9393
<div class="control">
9494
<input class="input-text validate-zero-or-greater"
9595
type="text"
96-
name="<?php echo $block->getFieldName() ?>[<%= data.index %>][position]"
97-
value="<%= data.position %>"
96+
name="<?php echo $block->getFieldName() ?>[<%- data.index %>][position]"
97+
value="<%- data.position %>"
9898
id="field-option-position" />
9999
</div>
100100
</div>
@@ -107,7 +107,7 @@
107107
</fieldset>
108108
</div>
109109
</div>
110-
<div id="<?php echo $block->getFieldId() ?>_search_<%= data.index %>" class="selection-search"></div>
110+
<div id="<?php echo $block->getFieldId() ?>_search_<%- data.index %>" class="selection-search"></div>
111111
</div>
112112
</script>
113113

0 commit comments

Comments
 (0)