2 * @file entity_browser.modal_selection.js
4 * Propagates selected entities from modal display.
7 (function (drupalSettings) {
11 // We need to access parent window, get it's jquery and find correct modal
12 // element to trigger event on.
13 parent.jQuery(parent.document)
14 .find(':input[data-uuid*=' + drupalSettings.entity_browser.modal.uuid + ']')
15 .trigger('entities-selected', [drupalSettings.entity_browser.modal.uuid, drupalSettings.entity_browser.modal.entities])
16 .unbind('entities-selected').show();
18 // This is a silly solution, but works fo now. We should close the modal
20 parent.jQuery(parent.document).find('.entity-browser-modal-iframe').parents('.ui-dialog').eq(0).find('.ui-dialog-titlebar-close').click();