diff --git a/core/modules/overlay/overlay-child.css b/core/modules/overlay/overlay-child.css index 8d63677..45dc77b 100644 --- a/core/modules/overlay/overlay-child.css +++ b/core/modules/overlay/overlay-child.css @@ -27,11 +27,10 @@ #overlay-content { clear: both; color: #000; - padding: .5em; position: relative; } -#branding .breadcrumb, #branding .add-shortcut { +#branding .breadcrumb, #branding .add-or-remove-shortcuts { display: none; } @@ -47,20 +46,21 @@ body.overlay #branding h1.page-title { color: #fff; /* This is white to contrast with the dark background behind it. */ } -.form-actions { - text-align: right; /* LTR */ - width: 100%; -} -.form-actions .button { - display: none; -} -.form-actions .button.button-primary { - margin-right: 0em; /* LTR */ - display: inline; -} -.form-actions .button.overlay-close { - display: inline; - float: left; +#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; } /** diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index faefe91..8675a3d 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -162,13 +162,6 @@ Drupal.overlayChild.behaviors.tabs = function (context, settings) { }); }; -/** - * Add cancel button to form actions. - */ -Drupal.overlayChild.behaviors.cancelAddButton = function (context, settings) { - $('.form-actions', context).prepend(''); -}; - // Workaround because of the way jQuery events works. // jQuery from the parent frame needs to be used to catch this event. parent.jQuery(document).bind('offsettopchange', function () { diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js index 8d31cbc..c69425f 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -554,13 +554,6 @@ 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'); @@ -574,6 +567,13 @@ 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'); + return; + } + // 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 b17f5d5..8baf621 100644 --- a/core/modules/overlay/templates/overlay.tpl.php +++ b/core/modules/overlay/templates/overlay.tpl.php @@ -23,6 +23,9 @@
> +
+ +
>