Including security review as a submodule - with patched for Yaffs.
[yaffs-website] / web / modules / contrib / entity_browser / js / entity_browser.iframe_selection.js
1 /**
2  * @file entity_browser.iframe_selection.js
3  *
4  * Propagates selected entities from iFrame display.
5  */
6
7 (function (drupalSettings) {
8
9   'use strict';
10
11   // We need to access parent window, get it's jquery and find correct iFrame
12   // element to trigger event on.
13   parent.jQuery(parent.document)
14     .find('iframe[data-uuid*=' + drupalSettings.entity_browser.iframe.uuid + ']').hide().prev().hide()
15     .parent().find('a[data-uuid*=' + drupalSettings.entity_browser.iframe.uuid + ']')
16     .trigger('entities-selected', [drupalSettings.entity_browser.iframe.uuid, drupalSettings.entity_browser.iframe.entities])
17     .unbind('entities-selected').show();
18
19 }(drupalSettings));