diff --git a/core/modules/overlay/overlay-child-rtl.css b/core/modules/overlay/overlay-child-rtl.css index eeff66c..061d8a9 100644 --- a/core/modules/overlay/overlay-child-rtl.css +++ b/core/modules/overlay/overlay-child-rtl.css @@ -12,10 +12,6 @@ html { float: right; left: auto; } -#overlay { - padding: 0.2em; - padding-left: 26px; -} #overlay-close-wrapper { left: 0; right: auto; diff --git a/core/modules/overlay/overlay-child.css b/core/modules/overlay/overlay-child.css index 48f217d..8d63677 100644 --- a/core/modules/overlay/overlay-child.css +++ b/core/modules/overlay/overlay-child.css @@ -21,38 +21,23 @@ min-height: 100px; min-width: 700px; position: relative; - padding: .2em; padding-bottom: 2em; - padding-right: 26px; /* LTR */ - width: 88%; -} -#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; + padding: .5em; position: relative; } -#overlay-title-wrapper { - overflow: hidden; -} -#overlay-title { - color: #fff; - float: left; /* LTR */ - font-size: 20px; - margin: 0; - padding: 0.3em 0; +#branding .breadcrumb, #branding .add-shortcut { + display: none; } -#overlay-title:active, -#overlay-title:focus { - outline: 0; + +body.overlay #branding h1.page-title { + display: block; + float: none; } .overlay #skip-link { @@ -62,76 +47,20 @@ color: #fff; /* This is white to contrast with the dark background behind it. */ } -#overlay-close-wrapper { - position: absolute; - right: 0; /* LTR */ -} -#overlay-close, -#overlay-close:hover { - background: transparent url(images/close.png) no-repeat; /* LTR */ - border-top-left-radius: 0; /* LTR */ - display: block; - height: 26px; - margin: 0; - padding: 0; - /* Replace with position:fixed to get a scrolling close button. */ - position: absolute; - width: 26px; +.form-actions { + text-align: right; /* LTR */ + width: 100%; } - -/** - * Tabs on the overlay. - */ -#overlay-tabs { - line-height: 26px; - margin: -28px 0 0 0; - position: absolute; - right: 20px; /* LTR */ - text-transform: uppercase; -} -#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; +.form-actions .button { + display: none; } -#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; +.form-actions .button.button-primary { + margin-right: 0em; /* LTR */ + display: inline; } - -/** - * Add to shortcuts link - */ -#overlay-titlebar .add-or-remove-shortcuts { - padding-top: 0.9em; +.form-actions .button.overlay-close { + display: inline; + float: left; } /** diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index 80a8a2f..faefe91 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -163,20 +163,10 @@ Drupal.overlayChild.behaviors.tabs = function (context, settings) { }; /** - * If the shortcut add/delete button exists, move it to the overlay titlebar. + * Add cancel button to form actions. */ -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.cancelAddButton = function (context, settings) { + $('.form-actions', context).prepend(''); }; // Workaround because of the way jQuery events works. diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js index caf9336..8d31cbc 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -554,6 +554,13 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { var $target = $(event.target); + // Close the overlay when the link contains the overlay-close class. + if ($target.is('body') || $target.hasClass('overlay-close')) { + // Clearing the overlay URL fragment will close the overlay. + $.bbq.removeState('overlay'); + return; + } + // Only continue if clicked target (or one of its parents) is a link. if (!$target.is('a')) { $target = $target.closest('a'); @@ -567,10 +574,8 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) { return; } - // Close the overlay when the link contains the overlay-close class. - if ($target.hasClass('overlay-close')) { - // Clearing the overlay URL fragment will close the overlay. - $.bbq.removeState('overlay'); + // Only open links in the overlay if they are contextual links. + if (!$target.parent().parent().hasClass('contextual-links') && !$target.hasClass('button-action') && !$target.parent().hasClass('dropbutton-action')) { return; } diff --git a/core/modules/overlay/templates/overlay.tpl.php b/core/modules/overlay/templates/overlay.tpl.php index 38e6664..b17f5d5 100644 --- a/core/modules/overlay/templates/overlay.tpl.php +++ b/core/modules/overlay/templates/overlay.tpl.php @@ -23,15 +23,6 @@
> -
-
-

>

-
-
- -
-

-
>