Skip to content
Snippets Groups Projects
Commit 047ea9f3 authored by Seth Hill's avatar Seth Hill
Browse files

Cherry pick changes from #3492298.

parent a165d030
No related branches found
No related tags found
2 merge requests!1013468550/Philip: Hiding extraneous Gin Sidebar in ME node form,!98Resolve #3497979 "Caching only"
......@@ -19,9 +19,12 @@
.trigger('entities-selected', [drupalSettings.entity_browser.modal.uuid, drupalSettings.entity_browser.modal.entities])
.unbind('entities-selected').show();
// This closes the mercury-dialog.
Array.from(parent.document.querySelectorAll('.entity-browser-modal-iframe')).forEach((element) => { element.closest('mercury-dialog').close(); });
// If there is a mercury-dialog element, close it. This code fires even on pages that do not have Mercury Editor so the element may not exist.
Array.from(parent.document.querySelectorAll('.entity-browser-modal-iframe')).forEach((element) => {
element.closest('mercury-dialog')?.close();
});
// TODO: Find a solution to attach Mercury libraries only to pages that have Mercury Editor.
})(drupalSettings);
})();
!function(){"use strict";!function(e){parent.jQuery(parent.document).find(":input[data-uuid*="+e.entity_browser.modal.uuid+"]").trigger("entities-selected",[e.entity_browser.modal.uuid,e.entity_browser.modal.entities]).unbind("entities-selected").show(),Array.from(parent.document.querySelectorAll(".entity-browser-modal-iframe")).forEach((e=>{e.closest("mercury-dialog").close()}))}(drupalSettings)}();
!function(){"use strict";!function(e){parent.jQuery(parent.document).find(":input[data-uuid*="+e.entity_browser.modal.uuid+"]").trigger("entities-selected",[e.entity_browser.modal.uuid,e.entity_browser.modal.entities]).unbind("entities-selected").show(),Array.from(parent.document.querySelectorAll(".entity-browser-modal-iframe")).forEach((e=>{e.closest("mercury-dialog")?.close()}))}(drupalSettings)}();
'use strict';
/**
* @file entity_browser.modal_selection.js
*
......@@ -5,7 +7,6 @@
*/
(function (drupalSettings) {
'use strict';
// For some reason, Entity Browser does not close the modal with Ajax commands.
// We follow their lead in how they close the modal.
......@@ -17,7 +18,11 @@
.trigger('entities-selected', [drupalSettings.entity_browser.modal.uuid, drupalSettings.entity_browser.modal.entities])
.unbind('entities-selected').show();
// This closes the mercury-dialog.
Array.from(parent.document.querySelectorAll('.entity-browser-modal-iframe')).forEach((element) => { element.closest('mercury-dialog').close(); });
// If there is a mercury-dialog element, close it. This code fires even on pages that do not have Mercury Editor so the element may not exist.
Array.from(parent.document.querySelectorAll('.entity-browser-modal-iframe')).forEach((element) => {
element.closest('mercury-dialog')?.close();
});
// TODO: Find a solution to attach Mercury libraries only to pages that have Mercury Editor.
})(drupalSettings);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment