From dd99a7ffec7c3e34c171b1c53da9fe7f35da45f5 Mon Sep 17 00:00:00 2001 From: joweecaquicla Date: Thu, 10 Sep 2020 01:34:25 +0800 Subject: [PATCH 1/3] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - modified image.js --- .../view/adminhtml/web/js/grid/columns/image.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js index bf852d0ddae68..2ddc601385496 100644 --- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js +++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js @@ -270,6 +270,7 @@ define([ */ addMessage: function (code, message) { this.messages().add(code, message); + this.closeContextMenu(); this.messages().scheduleCleanup(); }, @@ -284,6 +285,13 @@ define([ !this.massaction().massActionMode()) { this.deselectImage(); } + }, + + /** + * Action to close the context menu in media gallery. + */ + closeContextMenu: function () { + $('.media-gallery-wrap').click(); } }); }); From 5cc8b4d640c3acca3ed949016a4936011db92040 Mon Sep 17 00:00:00 2001 From: joweecaquicla Date: Thu, 10 Sep 2020 22:52:58 +0800 Subject: [PATCH 2/3] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - modified selector --- .../MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js index 2ddc601385496..b6e51fc65f3c4 100644 --- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js +++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image.js @@ -16,6 +16,7 @@ define([ deleteImageUrl: 'media_gallery/image/delete', addSelectedBtnSelector: '#add_selected', deleteSelectedBtnSelector: '#delete_selected', + gridSelector: '[data-id="media-gallery-masonry-grid"]', selected: null, fields: { id: 'id', @@ -291,7 +292,7 @@ define([ * Action to close the context menu in media gallery. */ closeContextMenu: function () { - $('.media-gallery-wrap').click(); + $(this.gridSelector).click(); } }); }); From 18023284e0a443fc21eebdce8556667800e07646 Mon Sep 17 00:00:00 2001 From: joweecaquicla Date: Fri, 11 Sep 2020 22:08:34 +0800 Subject: [PATCH 3/3] magento/adobe-stock-integration#1802: The three dots context menu is not closed after unsuccessful licensing from Media Gallery - added action group and modified sections in media gallery ui mftf --- ...nMediaGalleryContextMenuOpenedActionGroup.xml | 16 ++++++++++++++++ ...inEnhancedMediaGalleryImageActionsSection.xml | 1 + 2 files changed, 17 insertions(+) create mode 100644 app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml new file mode 100644 index 0000000000000..ede7052712b4b --- /dev/null +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AssertAdminMediaGalleryContextMenuOpenedActionGroup.xml @@ -0,0 +1,16 @@ + + + + + + Verify that context menu is closed in Media Gallery. + + + + diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml index 3f13a57697e6f..f36fca88dc760 100644 --- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml +++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Section/AdminEnhancedMediaGalleryImageActionsSection.xml @@ -9,6 +9,7 @@ xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
+