+ Magento supports PHP 7.3.0 or later. Please read
+
Magento System Requirements.
HTML;
diff --git a/app/code/Magento/LoginAsCustomer/Model/Config.php b/app/code/Magento/LoginAsCustomer/Model/Config.php
index 2cfafa6ac09a3..bec9527c65f95 100644
--- a/app/code/Magento/LoginAsCustomer/Model/Config.php
+++ b/app/code/Magento/LoginAsCustomer/Model/Config.php
@@ -10,16 +10,9 @@
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\LoginAsCustomerApi\Api\ConfigInterface;
-/**
- * @inheritdoc
- */
class Config implements ConfigInterface
{
- /**
- * Extension config path
- */
- private const XML_PATH_ENABLED
- = 'login_as_customer/general/enabled';
+ private const XML_PATH_ENABLED = 'login_as_customer/general/enabled';
private const XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED
= 'login_as_customer/general/store_view_manual_choice_enabled';
private const XML_PATH_AUTHENTICATION_EXPIRATION_TIME
@@ -33,9 +26,8 @@ class Config implements ConfigInterface
/**
* @param ScopeConfigInterface $scopeConfig
*/
- public function __construct(
- ScopeConfigInterface $scopeConfig
- ) {
+ public function __construct(ScopeConfigInterface $scopeConfig)
+ {
$this->scopeConfig = $scopeConfig;
}
@@ -44,7 +36,7 @@ public function __construct(
*/
public function isEnabled(): bool
{
- return (bool)$this->scopeConfig->getValue(self::XML_PATH_ENABLED);
+ return $this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED);
}
/**
@@ -52,7 +44,7 @@ public function isEnabled(): bool
*/
public function isStoreManualChoiceEnabled(): bool
{
- return (bool)$this->scopeConfig->getValue(self::XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED);
+ return $this->scopeConfig->isSetFlag(self::XML_PATH_STORE_VIEW_MANUAL_CHOICE_ENABLED);
}
/**
diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup.xml
new file mode 100644
index 0000000000000..b1b3ccd05ddfc
--- /dev/null
+++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/ActionGroup/AssertStorefrontStickyLoginAsCustomerNotificationBannerActionGroup.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ Verify Sticky Login as Customer notification banner present on page.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/StorefrontStickyLoginAsCustomerNotificationBannerTest.xml b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/StorefrontStickyLoginAsCustomerNotificationBannerTest.xml
new file mode 100644
index 0000000000000..611bc1044fd00
--- /dev/null
+++ b/app/code/Magento/LoginAsCustomer/Test/Mftf/Test/StorefrontStickyLoginAsCustomerNotificationBannerTest.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/Model/Config/Source/StoreViewLogin.php b/app/code/Magento/LoginAsCustomerAdminUi/Model/Config/Source/StoreViewLogin.php
index 265c4fedb722d..9d14a4b44d10b 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/Model/Config/Source/StoreViewLogin.php
+++ b/app/code/Magento/LoginAsCustomerAdminUi/Model/Config/Source/StoreViewLogin.php
@@ -12,14 +12,7 @@
*/
class StoreViewLogin implements \Magento\Framework\Data\OptionSourceInterface
{
- /**
- * @const int
- */
private const AUTODETECT = 0;
-
- /**
- * @const int
- */
private const MANUAL = 1;
/**
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/Plugin/Button/ToolbarPlugin.php b/app/code/Magento/LoginAsCustomerAdminUi/Plugin/Button/ToolbarPlugin.php
index c67b0d9dd5273..2cdcd5723df4b 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/Plugin/Button/ToolbarPlugin.php
+++ b/app/code/Magento/LoginAsCustomerAdminUi/Plugin/Button/ToolbarPlugin.php
@@ -8,6 +8,7 @@
namespace Magento\LoginAsCustomerAdminUi\Plugin\Button;
use Magento\Backend\Block\Widget\Button\ButtonList;
+use Magento\Backend\Block\Widget\Button\ToolbarInterface;
use Magento\Framework\AuthorizationInterface;
use Magento\Framework\Escaper;
use Magento\Framework\View\Element\AbstractBlock;
@@ -61,13 +62,13 @@ public function __construct(
/**
* Add Login as Customer button.
*
- * @param \Magento\Backend\Block\Widget\Button\ToolbarInterface $subject
- * @param \Magento\Framework\View\Element\AbstractBlock $context
- * @param \Magento\Backend\Block\Widget\Button\ButtonList $buttonList
+ * @param ToolbarInterface $subject
+ * @param AbstractBlock $context
+ * @param ButtonList $buttonList
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforePushButtons(
- \Magento\Backend\Block\Widget\Button\ToolbarInterface $subject,
+ ToolbarInterface $subject,
AbstractBlock $context,
ButtonList $buttonList
): void {
@@ -97,18 +98,17 @@ public function beforePushButtons(
*/
private function getOrder(string $nameInLayout, AbstractBlock $context)
{
- $order = null;
-
- if ('sales_order_edit' == $nameInLayout) {
- $order = $context->getOrder();
- } elseif ('sales_invoice_view' == $nameInLayout) {
- $order = $context->getInvoice()->getOrder();
- } elseif ('sales_shipment_view' == $nameInLayout) {
- $order = $context->getShipment()->getOrder();
- } elseif ('sales_creditmemo_view' == $nameInLayout) {
- $order = $context->getCreditmemo()->getOrder();
+ switch ($nameInLayout) {
+ case 'sales_order_edit':
+ return $context->getOrder();
+ case 'sales_invoice_view':
+ return $context->getInvoice()->getOrder();
+ case 'sales_shipment_view':
+ return $context->getShipment()->getOrder();
+ case 'sales_creditmemo_view':
+ return $context->getCreditmemo()->getOrder();
}
- return $order;
+ return null;
}
}
diff --git a/app/code/Magento/LoginAsCustomerAssistance/Block/Adminhtml/NotAllowedPopup.php b/app/code/Magento/LoginAsCustomerAssistance/Block/Adminhtml/NotAllowedPopup.php
index 547be1de5a008..b98ea203057b1 100644
--- a/app/code/Magento/LoginAsCustomerAssistance/Block/Adminhtml/NotAllowedPopup.php
+++ b/app/code/Magento/LoginAsCustomerAssistance/Block/Adminhtml/NotAllowedPopup.php
@@ -19,15 +19,11 @@
class NotAllowedPopup extends Template
{
/**
- * Config
- *
* @var ConfigInterface
*/
private $config;
/**
- * Json Serializer
- *
* @var Json
*/
private $json;
diff --git a/app/code/Magento/LoginAsCustomerAssistance/Model/Config.php b/app/code/Magento/LoginAsCustomerAssistance/Model/Config.php
index 2fce39cd4e85e..c2244fa3a799c 100644
--- a/app/code/Magento/LoginAsCustomerAssistance/Model/Config.php
+++ b/app/code/Magento/LoginAsCustomerAssistance/Model/Config.php
@@ -16,9 +16,6 @@
*/
class Config implements ConfigInterface
{
- /**
- * Extension config path
- */
private const XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TITLE
= 'login_as_customer/general/shopping_assistance_checkbox_title';
private const XML_PATH_SHOPPING_ASSISTANCE_CHECKBOX_TOOLTIP
diff --git a/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerDataValidatePlugin.php b/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerDataValidatePlugin.php
index 9da329b4a3991..4bbf691e2b58e 100644
--- a/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerDataValidatePlugin.php
+++ b/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerDataValidatePlugin.php
@@ -11,6 +11,7 @@
use Magento\Framework\App\RequestInterface;
use Magento\Framework\AuthorizationInterface;
use Magento\Framework\Message\MessageInterface;
+use Magento\Framework\Validator\Exception as ValidatorException;
use Magento\LoginAsCustomerAssistance\Api\IsAssistanceEnabledInterface;
use Magento\LoginAsCustomerAssistance\Model\ResourceModel\GetLoginAsCustomerAssistanceAllowed;
@@ -48,7 +49,7 @@ public function __construct(
* @param RequestInterface $request
* @param null|string $scope
* @param bool $scopeOnly
- * @throws \Magento\Framework\Validator\Exception
+ * @throws ValidatorException
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeExtractData(
@@ -74,11 +75,7 @@ public function beforeExtractData(
],
];
- throw new \Magento\Framework\Validator\Exception(
- null,
- null,
- $errorMessages
- );
+ throw new ValidatorException(null, null, $errorMessages);
}
}
}
diff --git a/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerExtractorPlugin.php b/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerExtractorPlugin.php
index 619036da8bb22..156d84bcae9bd 100644
--- a/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerExtractorPlugin.php
+++ b/app/code/Magento/LoginAsCustomerAssistance/Plugin/CustomerExtractorPlugin.php
@@ -35,27 +35,20 @@ public function __construct(
* Add assistance_allowed extension attribute value to Customer instance.
*
* @param CustomerExtractor $subject
- * @param callable $proceed
+ * @param CustomerInterface $customer
* @param string $formCode
* @param RequestInterface $request
* @param array $attributeValues
* @return CustomerInterface
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
- public function aroundExtract(
+ public function afterExtract(
CustomerExtractor $subject,
- callable $proceed,
+ CustomerInterface $customer,
string $formCode,
RequestInterface $request,
array $attributeValues = []
) {
- /** @var CustomerInterface $customer */
- $customer = $proceed(
- $formCode,
- $request,
- $attributeValues
- );
-
$assistanceAllowedStatus = $request->getParam('assistance_allowed');
if (!empty($assistanceAllowedStatus)) {
$extensionAttributes = $customer->getExtensionAttributes();
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/Plugin/InvalidateExpiredSessionPlugin.php b/app/code/Magento/LoginAsCustomerFrontendUi/Plugin/InvalidateExpiredSessionPlugin.php
index c1e035ac9637c..7c0682440b4dc 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/Plugin/InvalidateExpiredSessionPlugin.php
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/Plugin/InvalidateExpiredSessionPlugin.php
@@ -65,15 +65,17 @@ public function __construct(
*/
public function beforeExecute(ActionInterface $subject)
{
- if ($this->config->isEnabled()) {
- $adminId = $this->getLoggedAsCustomerAdminId->execute();
- $customerId = (int)$this->session->getCustomerId();
- if ($adminId && $customerId) {
- if (!$this->isLoginAsCustomerSessionActive->execute($customerId, $adminId)) {
- $this->session->clearStorage();
- $this->session->expireSessionCookie();
- $this->session->regenerateId();
- }
+ if (!$this->config->isEnabled()) {
+ return;
+ }
+
+ $adminId = $this->getLoggedAsCustomerAdminId->execute();
+ $customerId = (int)$this->session->getCustomerId();
+ if ($adminId && $customerId) {
+ if (!$this->isLoginAsCustomerSessionActive->execute($customerId, $adminId)) {
+ $this->session->clearStorage();
+ $this->session->expireSessionCookie();
+ $this->session->regenerateId();
}
}
}
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml
index aa64e78aa234f..b2e0aaf20ce34 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/templates/html/notices.phtml
@@ -11,7 +11,9 @@
$viewFileUrl = $block->getViewFileUrl('Magento_LoginAsCustomerFrontendUi::images/magento-icon.svg');
?>
getConfig()->isEnabled()): ?>
-
+
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/css/source/_module.less b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/css/source/_module.less
index d630ff06c3e34..c42f5143b4fda 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/css/source/_module.less
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/css/source/_module.less
@@ -16,43 +16,47 @@
// ---------------------------------------------
& when (@media-common = true) {
- .lac-notification {
- background-color: @lac-notification-background-color;
- color: @lac-notification-color;
- font-size: 16px;
+ .lac-notification-sticky {
+ position: relative;
+ z-index: 999;
+ .lac-notification {
+ background-color: @lac-notification-background-color;
+ color: @lac-notification-color;
+ font-size: 16px;
- .lac-notification-icon {
- float: left;
- margin: 10px 25px 10px 10px;
+ .lac-notification-icon {
+ float: left;
+ margin: 10px 25px 10px 10px;
- .logo-img {
- display: block
+ .logo-img {
+ display: block
+ }
}
- }
- .lac-notification-text {
- float: left;
- padding: 15px 0;
- }
+ .lac-notification-text {
+ float: left;
+ padding: 15px 0;
+ }
- .lac-notification-links {
- float: right;
- padding: 15px 0;
+ .lac-notification-links {
+ float: right;
+ padding: 15px 0;
- a {
- color: @lac-notification-links-color;
- font-size: 14px;
- }
+ a {
+ color: @lac-notification-links-color;
+ font-size: 14px;
+ }
- .lac-notification-close-link {
- &:after {
- background: url('../Magento_LoginAsCustomerFrontendUi/images/close.svg');
- content: ' ';
- display: inline-block;
- height: 12px;
- margin-left: 5px;
- vertical-align: middle;
- width: 12px;
+ .lac-notification-close-link {
+ &:after {
+ background: url('../Magento_LoginAsCustomerFrontendUi/images/close.svg');
+ content: ' ';
+ display: inline-block;
+ height: 12px;
+ margin-left: 5px;
+ vertical-align: middle;
+ width: 12px;
+ }
}
}
}
diff --git a/app/code/Magento/LoginAsCustomerPageCache/Plugin/PageCache/Model/Config/DisablePageCacheIfNeededPlugin.php b/app/code/Magento/LoginAsCustomerPageCache/Plugin/PageCache/Model/Config/DisablePageCacheIfNeededPlugin.php
index dabf8c62e1dee..2b98c1f6c119e 100644
--- a/app/code/Magento/LoginAsCustomerPageCache/Plugin/PageCache/Model/Config/DisablePageCacheIfNeededPlugin.php
+++ b/app/code/Magento/LoginAsCustomerPageCache/Plugin/PageCache/Model/Config/DisablePageCacheIfNeededPlugin.php
@@ -54,7 +54,7 @@ public function __construct(
public function afterIsEnabled(Config $subject, $isEnabled): bool
{
if ($isEnabled) {
- $disable = $this->scopeConfig->getValue(
+ $disable = $this->scopeConfig->isSetFlag(
'login_as_customer/general/disable_page_cache',
ScopeInterface::SCOPE_STORE
);
diff --git a/app/code/Magento/LoginAsCustomerSales/Plugin/AdminAddCommentOnOrderPlacementPlugin.php b/app/code/Magento/LoginAsCustomerSales/Plugin/AdminAddCommentOnOrderPlacementPlugin.php
index 2ae982e536f49..3a27a5ef9e561 100644
--- a/app/code/Magento/LoginAsCustomerSales/Plugin/AdminAddCommentOnOrderPlacementPlugin.php
+++ b/app/code/Magento/LoginAsCustomerSales/Plugin/AdminAddCommentOnOrderPlacementPlugin.php
@@ -25,9 +25,8 @@ class AdminAddCommentOnOrderPlacementPlugin
/**
* @param Session $session
*/
- public function __construct(
- Session $session
- ) {
+ public function __construct(Session $session)
+ {
$this->userSession = $session;
}
diff --git a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterTest.xml b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterTest.xml
index d2a04a7d21d11..a66009e9d2045 100644
--- a/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterTest.xml
+++ b/app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiUsedInProductFilterTest.xml
@@ -9,9 +9,6 @@
-
-
-
@@ -46,6 +43,8 @@
+
+
@@ -60,11 +59,13 @@
-
+
+
+
@@ -73,7 +74,7 @@
-
+
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDefaultViewWithoutFiltersTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDefaultViewWithoutFiltersTest.xml
new file mode 100644
index 0000000000000..7c2087247c574
--- /dev/null
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDefaultViewWithoutFiltersTest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryAscendingTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryAscendingTest.xml
index 4dbf3da0752b2..365252095d49e 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryAscendingTest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryAscendingTest.xml
@@ -24,58 +24,37 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryDescendingTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryDescendingTest.xml
index 025da24511b73..85c468996d515 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryDescendingTest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByDirectoryDescendingTest.xml
@@ -21,62 +21,40 @@
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameAToZTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameAToZTest.xml
index da0d8a18b75e4..9dca51065124f 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameAToZTest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameAToZTest.xml
@@ -24,58 +24,37 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameZToATest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameZToATest.xml
index 4b5086e5d63ff..71d2020d08658 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameZToATest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNameZToATest.xml
@@ -24,58 +24,37 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNewestFirstTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNewestFirstTest.xml
index 4274b26d5770f..3da0546db090a 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNewestFirstTest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByNewestFirstTest.xml
@@ -21,57 +21,37 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByOldestFirstTest.xml b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByOldestFirstTest.xml
index e67fdcfcf40b3..e6191d2d02287 100644
--- a/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByOldestFirstTest.xml
+++ b/app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminMediaGallerySortByOldestFirstTest.xml
@@ -24,54 +24,34 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_block_listing.xml b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_block_listing.xml
index 20988fad5ff35..974171617a19b 100644
--- a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_block_listing.xml
+++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_block_listing.xml
@@ -21,6 +21,8 @@
- block_id
- Asset Title
- Start typing to find assets
+ - 1000
+ - notifyWhenChangesStop
- true
- true
diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_page_listing.xml b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_page_listing.xml
index 4abeb71679bde..4e59b485df503 100644
--- a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_page_listing.xml
+++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/cms_page_listing.xml
@@ -23,6 +23,8 @@
- true
- Asset Title
- Start typing to find assets
+ - 1000
+ - notifyWhenChangesStop
- 1
diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/product_listing.xml b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/product_listing.xml
index 4634652e9cc19..0710479ec0f61 100644
--- a/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/product_listing.xml
+++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/ui_component/product_listing.xml
@@ -23,6 +23,8 @@
- true
- Asset Title
- Start typing to find assets
+ - 1000
+ - notifyWhenChangesStop
- 1
diff --git a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/directory/directoryTree.js b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/directory/directoryTree.js
index 84f253da826a8..6a8e86f2dfa21 100644
--- a/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/directory/directoryTree.js
+++ b/app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/directory/directoryTree.js
@@ -19,12 +19,14 @@ define([
defaults: {
allowedActions: [],
filterChipsProvider: 'componentType = filters, ns = ${ $.ns }',
+ bookmarkProvider: 'componentType = bookmark, ns = ${ $.ns }',
directoryTreeSelector: '#media-gallery-directory-tree',
getDirectoryTreeUrl: 'media_gallery/directories/gettree',
createDirectoryUrl: 'media_gallery/directories/create',
deleteDirectoryUrl: 'media_gallery/directories/delete',
jsTreeReloaded: null,
modules: {
+ bookmarks: '${ $.bookmarkProvider }',
directories: '${ $.name }_directories',
filterChips: '${ $.filterChipsProvider }'
},
@@ -259,6 +261,15 @@ define([
return;
}
+ if (!_.isUndefined(this.bookmarks())) {
+ if (!_.size(this.bookmarks().getViewData(this.bookmarks().defaultIndex))) {
+ setTimeout(function () {
+ this.updateSelectedDirectory();
+ }.bind(this), 500);
+
+ return;
+ }
+ }
currentTreePath = this.isFilterApplied(currentFilterPath) || _.isNull(requestedDirectory) ?
currentFilterPath : requestedDirectory;