diff --git a/core/modules/overlay/css/overlay-child.css b/core/modules/overlay/css/overlay-child.css index 8162d5b..4b86ebb 100644 --- a/core/modules/overlay/css/overlay-child.css +++ b/core/modules/overlay/css/overlay-child.css @@ -23,140 +23,59 @@ html[dir="rtl"] { -moz-box-sizing: border-box; box-sizing: border-box; display: block; - margin: 0 auto; + margin: 2em auto; max-width: 80em; max-width: 80rem; min-height: 100px; + padding: 0; position: relative; - padding: 2em 40px; - width: 100%; -} -#overlay-titlebar { - padding: 0 20px; - position: relative; - white-space: nowrap; - z-index: 100; + width: 50%; } #overlay-content { background: #fff; clear: both; color: #000; - padding: .5em 1em; position: relative; } -#overlay-title-wrapper { - overflow: hidden; +#branding { + border-bottom: 1px solid #cdcdcd; } -#overlay-title { - color: #fff; - float: left; /* LTR */ - font-size: 20px; - margin: 0; - padding: 0.3em 0; +#branding .breadcrumb, #branding .add-or-remove-shortcuts { + display: none; } -[dir="rtl"] #overlay-title { - float: right; - left: auto; +body.overlay #branding h1.page-title { + display: block; + float: none; + line-height: 2em; + padding: 0; } -#overlay-title:active, -#overlay-title:focus { - outline: 0; +.form-actions input.button-danger, .form-actions #edit-cancel { + display: none; } .overlay #skip-link a { color: #fff; /* This is white to contrast with the dark background behind it. */ } -#overlay-close-wrapper { - position: absolute; - right: 0; /* LTR */ -} -[dir="rtl"] #overlay-close-wrapper { - left: 0; - right: auto; -} #overlay-close, #overlay-close:hover { - background: #ffffff url(../images/close.png) no-repeat; - border-radius: 0 12px 12px 0; /* LTR */ + background: transparent url(../images/close.png) no-repeat scroll; + cursor: pointer; display: block; - height: 26px; - margin: 0; + height: 21px; padding: 0; - /* Replace with position:fixed to get a scrolling close button. */ position: absolute; - width: 26px; + right: 5px; /* LTR */ + top: 5px; + width: 21px; + z-index: 40; } [dir="rtl"] #overlay-close, [dir="rtl"] #overlay-close:hover { - border-radius: 12px 0 0 12px; + left: 5px; } /** - * Tabs on the overlay. - */ -#overlay-tabs { - line-height: 26px; - margin: -28px 0 0 0; - position: absolute; - right: 20px; /* LTR */ - text-transform: uppercase; -} -[dir="rtl"] #overlay-tabs { - left: 20px; - right: auto; -} -#overlay-tabs li { - display: inline-block; - list-style: none; - margin: 0; - padding: 0; -} -#overlay-tabs li a, -#overlay-tabs li a:active, -#overlay-tabs li a:visited, -#overlay-tabs li a:hover { - background-color: #a6a7a2; - border-radius: 8px 8px 0 0; - color: #000; - display: inline-block; - font-size: 11px; - font-weight: bold; - margin: 0 1px; - outline: 0; - padding: 0 14px; - text-decoration: none; -} -#overlay-tabs li.active a, -#overlay-tabs li.active a.active, -#overlay-tabs li.active a:active, -#overlay-tabs li.active a:visited { - background-color: #fff; - margin-bottom: 0; - padding-bottom: 2px; -} -#overlay-tabs li a:focus, -#overlay-tabs li a:hover { - color: #fff; -} -#overlay-tabs li.active a:focus, -#overlay-tabs li.active a:hover { - color: #000; -} - -/** - * Add to shortcuts link - */ -#overlay-titlebar .add-or-remove-shortcuts { - padding-top: 0.6em; -} -#overlay-titlebar .add-or-remove-shortcuts .icon { - margin-top: 4px; -} -#overlay-titlebar .add-or-remove-shortcuts .text { - padding-top: 0; -} -/** * Disable message. */ #overlay-disable-message { @@ -175,3 +94,4 @@ html[dir="rtl"] { .overlay-disable-message-focused #overlay-dismiss-message { float: right; } + diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index cd7cdee..264c8c0 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -162,23 +162,6 @@ Drupal.overlayChild.behaviors.tabs = function (context, settings) { }); }; -/** - * If the shortcut add/delete button exists, move it to the overlay titlebar. - */ -Drupal.overlayChild.behaviors.shortcutAddLink = function (context, settings) { - // Remove any existing shortcut button markup from the titlebar. - $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove(); - // If the shortcut add/delete button exists, move it to the titlebar. - var $addToShortcuts = $('.add-or-remove-shortcuts'); - if ($addToShortcuts.length) { - $addToShortcuts.insertAfter('#overlay-title'); - } - - $(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () { - $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove(); - }); -}; - Drupal.overlayChild.behaviors.bindDrupalViewportOffsetChangeEvent = function (context, settings) { // Workaround because of the way jQuery events works. // jQuery from the parent frame needs to be used to catch this event. diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js index 4f45299..f3e14f2 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -536,6 +536,15 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { return; } + // Only open links in the overlay if they are contextual links (but not the + // node edit link), or if the link is an action link or dropbutton link + // that is already in the overlay. + if (!($target.parent().parent().hasClass('contextual-links') && !$target.parent().hasClass('node-edit')) &&  + !$target.hasClass('button-action') &&  + !$target.parent().hasClass('dropbutton-action')) { + return; + } + var target = $target[0]; var href = target.href; // Only handle links that have an href attribute and use the HTTP(S) protocol. diff --git a/core/modules/overlay/templates/overlay.html.twig b/core/modules/overlay/templates/overlay.html.twig index 732bc33..8764ef3 100644 --- a/core/modules/overlay/templates/overlay.html.twig +++ b/core/modules/overlay/templates/overlay.html.twig @@ -20,17 +20,7 @@ #} {{ disable_overlay }} -
-
- {{ title }} -
- - {% if tabs %} -

{{ 'Primary tabs'|t }}

- {% endif %} -
+ {{ 'Close overlay'|t }} {{ page }}