diff --git a/css/entity_browser.iframe.css b/css/entity_browser.iframe.css index c74a6af..badefbb 100644 --- a/css/entity_browser.iframe.css +++ b/css/entity_browser.iframe.css @@ -7,4 +7,15 @@ .entity-browser-iframe-container iframe { border: none; + position: relative; + z-index: 501; +} + +.entity-browser-iframe-container .ajax-progress-fullscreen { + position: absolute; + z-index: 500; +} + +.entity-browser-iframe-container { + position: relative; } diff --git a/js/entity_browser.iframe.js b/js/entity_browser.iframe.js index 2a18e62..feb8335 100644 --- a/js/entity_browser.iframe.js +++ b/js/entity_browser.iframe.js @@ -45,12 +45,14 @@ } ); + var throbber = $('
'); + // Register callbacks. if (drupalSettings.entity_browser.iframe[uuid].js_callbacks || false) { Drupal.entityBrowser.registerJsCallbacks(this, drupalSettings.entity_browser.iframe[uuid].js_callbacks, 'entities-selected'); } - $(this).parent().append(iframe).trigger('entityBrowserIFrameAppend'); + $(this).parent().append(throbber).append(iframe).trigger('entityBrowserIFrameAppend'); $(this).hide(); }; diff --git a/js/entity_browser.modal_selection.js b/js/entity_browser.modal_selection.js index 6783b42..dda2000 100644 --- a/js/entity_browser.modal_selection.js +++ b/js/entity_browser.modal_selection.js @@ -17,6 +17,6 @@ // This is a silly solution, but works fo now. We should close the modal // via ajax commands. - parent.jQuery(parent.document).find('.entity-browser-modal-iframe').parents('.ui-dialog').eq(0).find('.ui-dialog-titlebar-close').click(); + parent.jQuery(parent.document).find('.entity-browser-modal-iframe').hide().parents('.ui-dialog').eq(0).find('.ui-dialog-titlebar-close').click(); }(drupalSettings));