Skip to content

Commit 2534e46

Browse files
committed
Code review suggestion, reemove deprecated onmousemove from ui-select component
1 parent ebcdce4 commit 2534e46

File tree

5 files changed

+27
-43
lines changed

5 files changed

+27
-43
lines changed

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2424
</before>
2525
<after>
26-
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
27-
<actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/>
28-
<actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete">
29-
<argument name="imageName" value="{{UpdatedImageDetails.title}}"/>
30-
</actionGroup>
31-
<actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/>
32-
<actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/>
26+
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
27+
<actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/>
28+
<actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectSecondImageToDelete">
29+
<argument name="imageName" value="{{UpdatedImageDetails.title}}"/>
30+
</actionGroup>
31+
<actionGroup ref="AdminEnhancedMediaGalleryClickDeleteImagesButtonActionGroup" stepKey="clikDeleteSelectedButton"/>
32+
<actionGroup ref="AdminEnhancedMediaGalleryConfirmDeleteImagesActionGroup" stepKey="deleteImages"/>
3333
<deleteData createDataKey="category" stepKey="deleteCategory"/>
3434
</after>
3535

app/code/Magento/MediaGalleryCatalogUi/view/adminhtml/layout/media_gallery_catalog_category_index.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
<body>
1111
<referenceContainer htmlTag="div" htmlClass="media-gallery-category-container" name="content">
1212
<uiComponent name="media_gallery_category_listing"/>
13+
<block class="Magento\Backend\Block\Template" template="Magento_MediaGalleryCatalogUi::url_filter_applier.phtml" name="category_list_url_filter_applier"/>
1314
</referenceContainer>
14-
<block class="Magento\Backend\Block\Template" template="Magento_Cms::url_filter_applier.phtml" name="category_list_url_filter_applier">
15-
<arguments>
16-
<argument name="listing_namespace" xsi:type="string">media_gallery_category_listing</argument>
17-
</arguments>
18-
</block>
1915
</body>
2016
</page>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
/** @var $block \Magento\Backend\Block\Template */
8+
/** @var \Magento\Framework\Escaper $escaper */
9+
?>
10+
<script type="text/x-magento-init">
11+
{
12+
"*": {
13+
"Magento_Ui/js/grid/url-filter-applier": {
14+
"listingNamespace": "media_gallery_category_listing"
15+
}
16+
}
17+
}
18+
</script>

app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/image/image-edit.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ define([
1010
'uiLayout',
1111
'Magento_Ui/js/lib/key-codes',
1212
'Magento_MediaGalleryUi/js/action/getDetails',
13-
'mage/validation',
14-
'Magento_Ui/js/lib/view/utils/async'
13+
'mage/validation'
1514
], function ($, _, Component, layout, keyCodes, getDetails) {
1615
'use strict';
1716

@@ -55,33 +54,9 @@ define([
5554
initialize: function () {
5655
this._super().initView();
5756

58-
this.removeMouseOverEvent();
59-
6057
return this;
6158
},
6259

63-
/**
64-
* Remove mousemove event from ui-select as it deprecated
65-
*/
66-
removeMouseOverEvent: function () {
67-
68-
if (_.isUndefined(this.keywordsSelect())) {
69-
setTimeout(function () {
70-
this.removeMouseOverEvent();
71-
}.bind(this), 100);
72-
73-
return;
74-
}
75-
76-
$.async(
77-
this.keywordsSelect().rootListSelector,
78-
function () {
79-
$(this.keywordsSelect().rootListSelector).off('mousemove');
80-
}.bind(this)
81-
);
82-
83-
},
84-
8560
/**
8661
* Add a new keyword to select
8762
*/

app/code/Magento/Ui/view/base/web/js/form/element/ui-select.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,6 @@ define([
748748
return this.value() ? !!this.value().length : false;
749749
},
750750

751-
/**
752-
* @deprecated
753-
*/
754-
onMousemove: function () {},
755-
756751
/**
757752
* Handles hover on list items.
758753
*

0 commit comments

Comments
 (0)