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..f72153c 100644 --- a/core/modules/overlay/overlay-child.css +++ b/core/modules/overlay/overlay-child.css @@ -21,22 +21,21 @@ min-height: 100px; min-width: 700px; position: relative; - padding: .2em; padding-bottom: 2em; - padding-right: 26px; /* LTR */ - width: 88%; + width: 50%; + background: #fff; } #overlay-titlebar { padding: 0 20px; position: relative; white-space: nowrap; z-index: 100; + border-bottom: 1px solid #d0d0d0; } #overlay-content { - background: #fff; clear: both; color: #000; - padding: .5em 1em; + padding: .5em; position: relative; } @@ -44,16 +43,19 @@ overflow: hidden; } #overlay-title { - color: #fff; + color: #4e4e4e; float: left; /* LTR */ font-size: 20px; margin: 0; - padding: 0.3em 0; + padding: .8em .2em; } #overlay-title:active, #overlay-title:focus { outline: 0; } +#branding { + display: none; +} .overlay #skip-link { margin-top: -20px; @@ -62,76 +64,8 @@ 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; -} - -/** - * 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; -} -#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.9em; +.form-actions { + text-align: right; } /** 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..925aa42 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,13 +574,6 @@ 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; - } - 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.tpl.php b/core/modules/overlay/templates/overlay.tpl.php index 38e6664..dfdc663 100644 --- a/core/modules/overlay/templates/overlay.tpl.php +++ b/core/modules/overlay/templates/overlay.tpl.php @@ -27,10 +27,6 @@

>

-
- -
-

>