From 35e3d9b3d493825a422e60eaa07923c86471fa82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?"J.=20Rene=CC=81e=20Beach"?= Date: Tue, 19 Mar 2013 13:12:58 -0400 Subject: [PATCH] Issue #1889150: Simplify overlay look, *only use for contextual operations* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: J. Renée Beach --- core/modules/overlay/images/background.png | 2 +- core/modules/overlay/images/close.png | 15 +-- core/modules/overlay/overlay-child-rtl.css | 33 +----- core/modules/overlay/overlay-child.css | 128 +++++------------------- core/modules/overlay/overlay-child.js | 17 ---- core/modules/overlay/overlay-parent.js | 9 ++ core/modules/overlay/templates/overlay.tpl.php | 10 +- 7 files changed, 41 insertions(+), 173 deletions(-) diff --git a/core/modules/overlay/images/background.png b/core/modules/overlay/images/background.png index 9be2193..5b1a8f4 100644 --- a/core/modules/overlay/images/background.png +++ b/core/modules/overlay/images/background.png @@ -2,4 +2,4 @@  IHDR -2ϽIDATc```O$UHOTJ~\IENDB` \ No newline at end of file +2ϽsBIT|d pHYs  ~tEXtSoftwareAdobe Fireworks CS6輲tEXtCreation Time1/25/13rWIDATcd``e 0hT!a.IENDB` \ No newline at end of file diff --git a/core/modules/overlay/images/close.png b/core/modules/overlay/images/close.png index 44d2b6b..97bf4ee 100644 --- a/core/modules/overlay/images/close.png +++ b/core/modules/overlay/images/close.png @@ -1,14 +1,5 @@ PNG  - IHDRJL pHYs   -OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, -!{kּ> H3Q5 B.@ -$pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB -dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ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exԌ-(rK2}Qo~@ +8$}xfT8D܋V Li;I_IENDB` \ No newline at end of file diff --git a/core/modules/overlay/overlay-child-rtl.css b/core/modules/overlay/overlay-child-rtl.css index 4195530..79b6ce1 100644 --- a/core/modules/overlay/overlay-child-rtl.css +++ b/core/modules/overlay/overlay-child-rtl.css @@ -8,36 +8,7 @@ html { direction: rtl; } -#overlay-title { - float: right; - left: auto; -} -#overlay { - padding: 0.2em; - padding-left: 26px; -} -#overlay-close-wrapper { - left: 0; - right: auto; -} -#overlay-close, -#overlay-close:hover { - background: transparent url(images/close.png) no-repeat; - border-top-right-radius: 0; - - -webkit-border-top-left-radius: 12px; - -webkit-border-bottom-left-radius: 12px; - -moz-border-radius-topleft: 12px; - -moz-border-radius-bottomleft: 12px; - border-top-left-radius: 12px; - border-bottom-left-radius: 12px; - background-color: #ffffff; -} - -/** - * Tabs on the overlay. - */ -#overlay-tabs { - left: 20px; +#overlay-close { + left: 5px; right: auto; } diff --git a/core/modules/overlay/overlay-child.css b/core/modules/overlay/overlay-child.css index ecfa4cb..23b63d9 100644 --- a/core/modules/overlay/overlay-child.css +++ b/core/modules/overlay/overlay-child.css @@ -21,38 +21,32 @@ 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%; + box-shadow: 0 0 2em 0 rgba(0,0,0,0.5); } #overlay-content { - background: #fff; clear: both; color: #000; - padding: .5em 1em; position: relative; } -#overlay-title-wrapper { - overflow: hidden; +#branding { + border-bottom: 1px solid #cdcdcd; +} + +#branding .breadcrumb, #branding .add-or-remove-shortcuts { + display: none; } -#overlay-title { - color: #fff; - float: left; /* LTR */ - font-size: 20px; - margin: 0; - padding: 0.3em 0; + +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 { @@ -62,92 +56,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 */ +#overlay-close { + 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; - - -webkit-border-top-right-radius: 12px; - -webkit-border-bottom-right-radius: 12px; - -moz-border-radius-topright: 12px; - -moz-border-radius-bottomright: 12px; - border-top-right-radius: 12px; - border-bottom-right-radius: 12px; - background-color: #ffffff; -} - -/** - * 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; + right: 5px; /* LTR */ + top: 5px; + width: 21px; + z-index: 40; } /** - * 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 { diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index 80a8a2f..8675a3d 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(); - }); -}; - // 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 caf9336..9965298 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -574,6 +574,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.tpl.php b/core/modules/overlay/templates/overlay.tpl.php index 38e6664..29d6599 100644 --- a/core/modules/overlay/templates/overlay.tpl.php +++ b/core/modules/overlay/templates/overlay.tpl.php @@ -23,15 +23,7 @@
> -
-
-

>

-
-
- -
-

-
+
>
-- 1.7.10.4