From 0bef54c7899da717a8c60e1562c838381d014c10 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Tue, 19 Dec 2017 08:23:53 -0500 Subject: [PATCH] Bug 1420771 - Remove global footer --- Bugzilla/Search/Saved.pm | 5 +- buglist.cgi | 3 +- .../bug/create/create-client-bounty.html.tmpl | 3 - .../hook/global/footer-intro.html.tmpl | 16 -- .../global/header-external-links.html.tmpl | 29 +++ extensions/BMO/web/images/moz-fav-bw-rgb.svg | 14 ++ extensions/BMO/web/images/mozilla-tab.png | Bin 7535 -> 0 bytes images/footer-mozilla.png | Bin 528 -> 0 bytes images/moz-logo-bw-rgb.svg | 22 -- js/dropdown.js | 85 +++++-- qa/t/test_bmo_enter_new_bug.t | 8 +- qa/t/test_saved_searches.t | 8 +- qa/t/test_shared_searches.t | 27 ++- skins/standard/IE-fixes.css | 19 -- skins/standard/global.css | 217 ++++++++---------- skins/standard/mobile.css | 6 +- .../account/prefs/saved-searches.html.tmpl | 10 +- template/en/default/global/footer.html.tmpl | 23 +- .../global/header-search-dropdown.html.tmpl | 48 ++++ template/en/default/global/header.html.tmpl | 27 ++- .../en/default/global/useful-links.html.tmpl | 73 ------ 21 files changed, 309 insertions(+), 334 deletions(-) delete mode 100644 extensions/BMO/template/en/default/hook/global/footer-intro.html.tmpl create mode 100644 extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl create mode 100644 extensions/BMO/web/images/moz-fav-bw-rgb.svg delete mode 100644 extensions/BMO/web/images/mozilla-tab.png delete mode 100644 images/footer-mozilla.png delete mode 100644 images/moz-logo-bw-rgb.svg create mode 100644 template/en/default/global/header-search-dropdown.html.tmpl delete mode 100644 template/en/default/global/useful-links.html.tmpl diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm index 23507c039..1511cd87b 100644 --- a/Bugzilla/Search/Saved.pm +++ b/Bugzilla/Search/Saved.pm @@ -368,9 +368,10 @@ The CGI parameters for the search, as a string. =item C -Whether or not this search should be displayed in the footer for the +Whether or not this search should be displayed in the Search Bar for the I (not the owner of the search, but the person actually -using Bugzilla right now). +using Bugzilla right now). It says "footer" for historical reasons as the link +was previously displayed on the global footer. =item C diff --git a/buglist.cgi b/buglist.cgi index e650dfcf6..4d3ad1a86 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -213,7 +213,8 @@ sub LookupNamedQuery { # query - The query part of the buglist.cgi URL, unencoded. Must not be # empty, or we will throw a UserError. # link_in_footer (optional) - 1 if the Named Query should be -# displayed in the user's footer, 0 otherwise. +# displayed in the user's Search Bar, 0 otherwise. It says "footer" for +# historical reasons as the link was previously displayed on the global footer. # # All parameters are validated before passing them into the database. # diff --git a/extensions/BMO/template/en/default/bug/create/create-client-bounty.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-client-bounty.html.tmpl index 5d9d20be8..799b2b35b 100644 --- a/extensions/BMO/template/en/default/bug/create/create-client-bounty.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-client-bounty.html.tmpl @@ -81,9 +81,6 @@ #client_bounty_form .form_section { margin-bottom: 10px; } -#useful-links { - display: none; -} [% END %] [% inline_javascript = BLOCK %] diff --git a/extensions/BMO/template/en/default/hook/global/footer-intro.html.tmpl b/extensions/BMO/template/en/default/hook/global/footer-intro.html.tmpl deleted file mode 100644 index cb157ec48..000000000 --- a/extensions/BMO/template/en/default/hook/global/footer-intro.html.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - - diff --git a/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl new file mode 100644 index 000000000..6c7d58816 --- /dev/null +++ b/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl @@ -0,0 +1,29 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + + diff --git a/extensions/BMO/web/images/moz-fav-bw-rgb.svg b/extensions/BMO/web/images/moz-fav-bw-rgb.svg new file mode 100644 index 000000000..1e91f0603 --- /dev/null +++ b/extensions/BMO/web/images/moz-fav-bw-rgb.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/extensions/BMO/web/images/mozilla-tab.png b/extensions/BMO/web/images/mozilla-tab.png deleted file mode 100644 index 417f6a5c6c15cec3940cb9b086ac9d30bbc3eb10..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 7535 zc-jGP9gyOQP)4Tx0C)kNmUmQBSrfqTdoR7v5<-y@dJRoV0Fe@U zkzPe5BmqJR7!t5oLbpCc6H zqI?@={d8%D5al;0(=!CzYydD6nO!2_rJ!tuGDRE_#zA==00c_%EKZ!o62USwPXIWX zS zj`sE}8w<4jU*%sHzk2;U$a?$5<7MdQoaVsz{O95^ejS$UX;36cb2fe1Y+3Y{{cC>d?H zh%b}~Geu0H=$|_LAH!zlAj2Q0Uf9TEuaUC0Snjw z2jC3cfEVxw!5{*}g2jLbQa}a}gIur*tOxm^5bOYZKsl%aHJ}bOfD@nvoCX)bWpEwb z1byH>7z88W8JGmG!3+dJc!&zoAT>xEGJwn=8;A|fhrFObC=7~)5};&A1WBP)&_<{b zDu&9TgHRpxBXkP709}Q8pu5lzG!Fdvq zf1r2MCzX|yZIz>xmnl~$pHUuUAPhr>A0wSn#5lp|XS`F#WweHcflJworSw_BrjROl77! zGo4w=>|jpnXz2LrNOcbCbnDFM8tF#rZqRMieW*v$W9ud9?bd78o7C6V57J+yU$1}9 zfM~!rNHN%J&}lGjXk-{|xY@A9aLh>6$j@knQN7UvW2&*M@lxYz|7l}t!?UTdxjmOU*L&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yB18ZH diff --git a/images/footer-mozilla.png b/images/footer-mozilla.png deleted file mode 100644 index 593c10308248d9cd7ab297f5845b62a227b83136..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 528 zc-rd>@N?(olHy`uVBq!ia0vp^u|O=r!3-qVTQTYZDT4r?5LY0*n-p*=$1V@3hrcAq zFPK44$=D?{t-NFAs@-SqzH`(1I+KBcvBA^DF{I+w*(o>s4lD4u@>&$$`2Rm&Jx(L{ z>ZO%aCO+GDgQezCE6cy7+eH3mP6%Q)cy3kkelJskJ*&Z-)l+7)G33}BD9{T^iDK9= zo#(mI&ui5!`xiAY=B@L5-o{$;DtSk{!mjQ575>MiS^96;ZY?&qx^XH~x>r{+PW9vO z5H|VZ^Xp&sd8NBbemcm|t99{^sDE?V9pSm*>tD`UzS45{uJc+l8%_&)s@Pt-+;new zUtrNan@sV51u+XvPJjE}-Ys|U!rBLWl+&ymrmar@F=NV-yrZtZb!OcOj^(YrvNObv z_*F?|>$-`|TC!=uYP-v;OZf`i#NM8s^{(vH&NVO6UQDdJu{kyU&AnP*ciza$n-}hX z<+H*2%Ac-0XRnTUf749U?5a7*@s~P{TPu~zwaa|Z7yU54YwBzIp^ABZZRDl32ds*s zFF4xY)9Kx^Z;MWsRLaV*S$(V%&rK66>G-UF>|t;T_pQ{o%N}QioAyOtWc1!XMeb!C mn_%!Z>*KEvN+sn#WIy@U - - - - - - - - diff --git a/js/dropdown.js b/js/dropdown.js index 32ce4696f..58aa4fee2 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -30,31 +30,63 @@ $(function() { if (e.keyCode == 38 || e.keyCode == 40) { $('.dropdown-content').each(function() { var $content = $(this); + var content_id = $content.attr('id'); + var $controller = content_id ? $('[aria-controls="' + content_id + '"]') : $(); if ($content.is(':visible')) { e.preventDefault(); e.stopPropagation(); - var $items = $content.find('[role="menuitem"]'); - // if none focused select the first or last - var $any_focused = $items.filter(':focus'); - if ($any_focused.length == 0) { + var $items = $content.find('[role="menuitem"], [role="option"]'); + // if none active select the first or last + var $link = $items.filter('.active'); + if ($link.length == 0) { var index = e.keyCode == 40 ? 0 : $items.length - 1; - var $link = $items.eq(index); - $link.addClass('active').focus(); - return; + $link = $items.eq(index); + } else { + // otherwise move up or down the list based on arrow key pressed + var move = $items.index($link) + (e.keyCode == 40 ? 1 : -1); + + // remove active state first + if ($link.length) { + $link.removeClass('active'); + + if ($link.attr('id') === content_id + '-active-item') { + $link.removeAttr('id'); + } + } + + // get the new active element + $link = $items.eq(move % $items.length); + } + + $link.addClass('active'); + + if (content_id && !$link.attr('id')) { + $link.attr('id', content_id + '-active-item'); + } + + if ($link.attr('id')) { + $controller.attr('aria-activedescendant', $link.attr('id')); + } + + // move focus when the dropdown's controller is not search box + if (!$controller.eq('input')) { + $link.focus(); } - // otherwise move up or down the list based on arrow key pressed - var inc = e.keyCode == 40 ? 1 : -1; - var move = $items.index($any_focused) + inc; - var $link = $items.eq(move % $items.length); - $content.find('a').removeClass('active'); - $link.addClass('active').focus(); } }); } - // enter clicks on a link + // navigate to an active link or click on it + // note that `trigger('click')` doesn't always work if (e.keyCode == 13) { - $('.dropdown-content:visible a.active').trigger('click'); + var $link = $('.dropdown-content:visible a.active'); + if ($link.length) { + if ($link.attr('href')) { + location.href = $link.attr('href'); + } else { + $link.trigger('click'); + } + } } }); @@ -70,8 +102,18 @@ $(function() { $button.click(function(e) { toggleDropDown(e, $button, $content); }).keydown(function(e) { - // allow enter to toggle menu if (e.keyCode == 13) { + if ($button.eq('input') && !$button.val()) { + // prevent the form being submitted if the search bar is empty + e.preventDefault(); + // navigate to an active link if any + var $link = $content.find('a.active'); + if ($link.length) { + location.href = $link.attr('href'); + } + } + + // allow enter to toggle menu toggleDropDown(e, $button, $content); } }); @@ -85,8 +127,19 @@ $(function() { $expanded.attr('aria-expanded', false); } + // don't expand the dropdown if there's no item + var $items = $content.find('[role="menuitem"], [role="option"]'); + if (!$items.length) { + return; + } + // clear all active links $content.find('a').removeClass('active'); + var content_id = $content.attr('id'); + if (content_id) { + $('[aria-controls="' + content_id + '"]').removeAttr('aria-activedescendant'); + $content.find('#' + content_id + '-active-item').removeAttr('id'); + } if ($content.is(':visible')) { $content.hide(); $button.attr('aria-expanded', false); diff --git a/qa/t/test_bmo_enter_new_bug.t b/qa/t/test_bmo_enter_new_bug.t index 6e5753c74..375a59fcb 100644 --- a/qa/t/test_bmo_enter_new_bug.t +++ b/qa/t/test_bmo_enter_new_bug.t @@ -212,7 +212,7 @@ _check_group('pr-private'); _check_product('Legal'); _check_component('Legal', 'Contract Request'); -_check_group('mozilla-employee-confidential'); +_check_group('mozilla-employee-confidential'); $sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=Legal&format=legal"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -289,7 +289,7 @@ sub _check_component { $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Edit components for which product?"); - $sel->click_ok("link=$product"); + $sel->click_ok("//div[\@id='bugzilla-body']//a[normalize-space(text())='$product']"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Select component of product '$product'"); @@ -311,7 +311,7 @@ sub _check_component { $sel->click_ok("link=components"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Edit components for which product?"); - $sel->click_ok("link=$product"); + $sel->click_ok("//div[\@id='bugzilla-body']//a[normalize-space(text())='$product']"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Select component of product '$product'"); $sel->click_ok("link=Add"); @@ -372,7 +372,7 @@ sub _check_version { $sel->click_ok("link=versions"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Edit versions for which product?"); - $sel->click_ok("link=$product"); + $sel->click_ok("//div[\@id='bugzilla-body']//a[normalize-space(text())='$product']"); $sel->wait_for_page_to_load(WAIT_TIME); my $text = trim($sel->get_text("bugzilla-body")); diff --git a/qa/t/test_saved_searches.t b/qa/t/test_saved_searches.t index b5f47ff4a..b39458fa5 100644 --- a/qa/t/test_saved_searches.t +++ b/qa/t/test_saved_searches.t @@ -50,7 +50,7 @@ $sel->click_ok("link=SavedSearchTEST1"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bug List: SavedSearchTEST1"); -# Remove the saved search from the page footer. It should no longer be displayed there. +# Remove the saved search from the Search Bar. It should no longer be displayed there. $sel->click_ok("link=Preferences"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -76,8 +76,8 @@ $sel->type_ok("short_desc", "bilboa"); $sel->click_ok("Search"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bug List"); -# As we said, this saved search should no longer be displayed in the page footer. -ok(!$sel->is_text_present("SavedSearchTEST1"), "SavedSearchTEST1 is not present in the page footer"); +# As we said, this saved search should no longer be displayed in the Search Bar. +ok(!$sel->is_text_present("SavedSearchTEST1"), "SavedSearchTEST1 is not present in the Search Bar"); $sel->type_ok("save_newqueryname", "SavedSearchTEST1"); $sel->click_ok("remember"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -86,7 +86,7 @@ $text = trim($sel->get_text("message")); ok($text =~ /Your search named SavedSearchTEST1 has been updated./, "Saved searche SavedSearchTEST1 has been updated."); # Make sure our new criteria has been saved (let's edit the saved search). -# As the saved search is no longer displayed in the footer, we have to go +# As the saved search is no longer displayed in the Search Bar, we have to go # to the "Preferences" page to edit it. $sel->click_ok("link=Preferences"); diff --git a/qa/t/test_shared_searches.t b/qa/t/test_shared_searches.t index 3e5838c03..98237f756 100644 --- a/qa/t/test_shared_searches.t +++ b/qa/t/test_shared_searches.t @@ -34,7 +34,7 @@ my $text = trim($sel->get_text("message")); ok($text =~ /OK, you have a new search named Shared Selenium buglist./, "New search named 'Shared Selenium buglist' has been created"); # Retrieve the newly created saved search's internal ID and make sure it's displayed -# in the footer by default. +# in the Search Bar by default. $sel->click_ok("link=Preferences"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -47,10 +47,10 @@ $ssname =~ /(?:link_in_footer_(\d+))/; my $saved_search1_id = $1; $sel->is_checked_ok("link_in_footer_$saved_search1_id"); -# As an admin, the "Add to footer" checkbox must be displayed, but unchecked by default. +# As an admin, the "Add to Search Bar" checkbox must be displayed, but unchecked by default. $sel->select_ok("share_$saved_search1_id", "label=canconfirm"); -ok(!$sel->is_checked("force_$saved_search1_id"), "Shared search not displayed in other users' footer by default"); +ok(!$sel->is_checked("force_$saved_search1_id"), "Shared search not displayed in other users' Search Bar by default"); $sel->click_ok("force_$saved_search1_id"); $sel->click_ok("update"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -58,9 +58,10 @@ $sel->title_is("User Preferences"); logout($sel); # Log in as the "canconfirm" user. The search shared by the admin must appear -# in the footer. +# in the Search Bar. log_in($sel, $config, 'canconfirm'); +$sel->click_ok("quicksearch_top"); $sel->is_text_present_ok("Shared Selenium buglist"); $sel->click_ok("link=Shared Selenium buglist"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -78,7 +79,7 @@ $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); $sel->is_text_present_ok($config->{admin_user_login}); -# Remove the shared search from your footer. +# Remove the shared search from your Search Bar. $sel->is_checked_ok("link_in_footer_$saved_search1_id"); $sel->click_ok("link_in_footer_$saved_search1_id"); @@ -89,7 +90,8 @@ $sel->title_is("User Preferences"); $sel->click_ok("link=Permissions"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); -ok(!$sel->is_text_present("Shared Selenium buglist"), "Shared query no longer displayed in the footer"); +$sel->click_ok("quicksearch_top"); +ok(!$sel->is_text_present("Shared Selenium buglist"), "Shared query no longer displayed in the Search Bar"); # Create your own saved search, and share it with the canconfirm group. @@ -113,7 +115,7 @@ $sel->title_is("User Preferences"); $ssname = $sel->get_attribute('//input[@type="checkbox" and @alt="helpwanted"]@name'); $ssname =~ /(?:link_in_footer_(\d+))/; my $saved_search2_id = $1; -# Our own saved searches are displayed in the footer by default. +# Our own saved searches are displayed in the Search Bar by default. $sel->is_checked_ok("link_in_footer_$saved_search2_id"); $sel->select_ok("share_$saved_search2_id", "label=canconfirm"); $sel->click_ok("update"); @@ -123,9 +125,10 @@ logout($sel); # Log in as admin again. The other user is not a blesser for the 'canconfirm' # group, and so his shared search must not be displayed by default. But it -# must still be available and can be added to the footer, if desired. +# must still be available and can be added to the Search Bar, if desired. log_in($sel, $config, 'admin'); +$sel->click_ok("quicksearch_top"); ok(!$sel->is_text_present("helpwanted"), "No 'helpwanted' shared search displayed"); $sel->click_ok("link=Preferences"); $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -133,6 +136,7 @@ $sel->title_is("User Preferences"); $sel->click_ok("link=Saved Searches"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); +$sel->click_ok("quicksearch_top"); $sel->is_text_present_ok("helpwanted"); $sel->is_text_present_ok($config->{canconfirm_user_login}); @@ -141,7 +145,7 @@ $sel->click_ok("link_in_footer_$saved_search2_id"); $sel->click_ok("update"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); -# This query is now available from the footer. +# This query is now available from the Search Bar. $sel->click_ok("link=helpwanted"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bug List: helpwanted"); @@ -167,13 +171,15 @@ logout($sel); # user as he doesn't belong to the 'canconfirm' group. log_in($sel, $config, 'QA_Selenium_TEST'); -ok(!$sel->is_text_present("helpwanted"), "The 'helpwanted' query is not displayed in the footer"); +$sel->click_ok("quicksearch_top"); +ok(!$sel->is_text_present("helpwanted"), "The 'helpwanted' query is not displayed in the Search Bar"); $sel->click_ok("link=Preferences"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); $sel->click_ok("link=Saved Searches"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); +$sel->click_ok("quicksearch_top"); ok(!$sel->is_text_present("helpwanted"), "The 'helpwanted' query is not shared with this user"); logout($sel); @@ -186,6 +192,7 @@ $sel->title_is("User Preferences"); $sel->click_ok("link=Saved Searches"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("User Preferences"); +$sel->click_ok("quicksearch_top"); ok(!$sel->is_text_present("Shared Selenium buglist"), "The 'Shared Selenium buglist' is no longer available"); $sel->click_ok('//a[contains(@href,"buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd=helpwanted")]', undef, "Deleting the 'helpwanted' search"); diff --git a/skins/standard/IE-fixes.css b/skins/standard/IE-fixes.css index 0e326286d..fd96e4afe 100644 --- a/skins/standard/IE-fixes.css +++ b/skins/standard/IE-fixes.css @@ -26,25 +26,6 @@ form#Create #comp_desc { margin: .5em 1em; } -#footer #useful-links li { - padding-bottom: 0.8ex; -} - -#footer .label { - display: block; - float: left; - width: 8.2em; - padding-bottom: 0.1ex; -} - -#footer #links-actions .label { - padding-top: 0.35em; -} - -#footer .links { - display: inline; -} - #bug_id_container, .search_field_grid, .search_email_fields, ul.bug_changes li { zoom: 1; diff --git a/skins/standard/global.css b/skins/standard/global.css index 12dab11f5..9b9ae6550 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -91,6 +91,10 @@ pointer-events: none; /* Make sure button is clickable on Chrome & Safari */ } + #header img { + vertical-align: top; + } + #header .inner { display: flex; align-items: center; @@ -154,7 +158,7 @@ #header .searchbox-outer { position: relative; - width: 240px; + width: 280px; height: 32px; } @@ -239,34 +243,8 @@ box-shadow: none; } - #header-tools-menu-button { - width: 32px; - height: 32px; - border-radius: 4px; - } - - #header-tools-menu-button .icon { - text-indent: -.7em; - letter-spacing: -.7em; - } - - #header-tools-menu-button .icon::before { - content: '\E5CC\E5CC'; - } - - #header-account-menu-button img { - display: block; - border-radius: 50%; - } - - #header-account-menu-button .icon::before { - font-size: 32px; - content: '\E853'; - } - #header .dropdown-content { top: calc(100% + 4px); - right: -4px; border-color: #BBB #999 #777; border-radius: 4px; padding: 4px 0; @@ -276,6 +254,14 @@ box-shadow: 0 2px 8px rgba(0,0,0,.3); } + #header .dropdown-content.right { + left: -4px; + } + + #header .dropdown-content.left { + right: -4px; + } + #header .dropdown-content::before, #header .dropdown-content::after { content: ''; @@ -283,12 +269,21 @@ width: 0; height: 0; position: absolute; - right: 10px; border-width: 8px; border-color: transparent; border-style: solid; } + #header .dropdown-content.right::before, + #header .dropdown-content.right::after { + left: 10px; + } + + #header .dropdown-content.left::before, + #header .dropdown-content.left::after { + right: 10px; + } + #header .dropdown-content::before { top: -17px; border-bottom-color: #BBB; @@ -304,9 +299,80 @@ padding: 2px 16px; line-height: 1.5; white-space: normal; + color: inherit !important; background-color: transparent; } + #header-search h2 { + position: absolute; + left: -99999px; + } + + #header-search-dropdown { + right: auto; + min-width: calc(100% + 8px) !important; + max-width: calc(200% + 8px) !important; + } + + #header-search-dropdown-wrapper { + overflow-x: hidden; + overflow-y: scroll; + max-height: 400px; + } + + #header-search-dropdown h3 { + position: sticky; + top: -4px; + left: 0; + margin: -4px 8px 0; + padding: 8px 0 4px; + color: #999; + background: #FFF; + font-size: 12px; + font-weight: normal; + } + + #header-search-dropdown ul { + margin: 0; + padding: 0; + list-style: none; + } + + #header-search-dropdown a { + overflow: hidden; + white-space: nowrap !important; + text-overflow: ellipsis; + } + + #header-tools-menu-button { + width: 32px; + height: 32px; + border-radius: 4px; + } + + #header-tools-menu-button .icon { + text-indent: -.7em; + letter-spacing: -.7em; + } + + #header-tools-menu-button .icon::before { + content: '\E5CC\E5CC'; + } + + #header-account-menu-button img { + display: block; + border-radius: 50%; + } + + #header-account-menu-button .icon::before { + font-size: 32px; + content: '\E853'; + } + + #header-external-links.first { + order: -1; + } + #header .account-label * { overflow: hidden; white-space: nowrap; @@ -360,92 +426,6 @@ } /* header (end) */ -/* footer (begin) - * See also the "header" section for styles that apply - * to both the header and footer. - */ - #footer { - display: flex; - clear: both; - margin: 15px 0 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); - padding: 8px; - color: #bbb; - background-color: #fff; - line-height: 1.5; - } - - #footer .intro { - flex: none; - display: flex; - align-items: center; - border-right: 1px solid #DDD; - padding: 16px 24px 16px 16px; - } - - #footer .org-links { - display: flex; - align-items: center; - } - - #footer .org-links h1 { - margin: 0; - font-size: 1em; - } - - #footer .org-links h1 a { - display: block; - width: 100px; - height: 30px; - background-image: url(../../images/moz-logo-bw-rgb.svg); - background-repeat: no-repeat; - background-size: contain; - text-indent: -9999px; - } - - #footer .org-links ul { - display: flex; - margin: 0 0 0 16px; - padding: 0; - } - - #footer .org-links li { - flex: none; - } - - #footer .org-links li:not(:last-child) { - margin-right: 16px; - } - - #footer #useful-links { - flex: auto; - display: flex; - flex-direction: column; - justify-content: center; - margin: 0 0 0 24px; - padding: 0; - } - - #footer ul { - list-style-type: none; - } - #links-saved ul { - display: inline; - } - #links-saved th { - vertical-align: top; - } - - #footer .label { - white-space: nowrap; - vertical-align: top; - } - - #footer .links { - vertical-align: top; - } -/* footer (end) */ - /* link lists (begin) */ ul.links { margin: 0; @@ -783,7 +763,7 @@ div.user_match { /* Rules specific for printing */ @media print { - #header, #footer { + #header { display: none; } @@ -1075,6 +1055,7 @@ input.required, select.required, span.required_explanation { } body { + min-height: 400px; background: #f6f4ec; background-image: url(../../images/noise.png); background-image: url(../../images/noise.png), -moz-linear-gradient(#d7d3c8, #f6f4ec 400px); @@ -1088,11 +1069,11 @@ body, td, th, input, select, option, optgroup, button, .text_input { font-family: "Fira Sans", "Open Sans", "Helvetica Neue", Arial, Helvetica, sans-serif; } -a, #footer a, #footer a:visited { +a { color: #0095dd; } -a:hover, #footer a:hover { +a:hover { color: #00539f; } @@ -1148,7 +1129,7 @@ hr { background: none; border: none; color: #404040; - margin: 15px auto; + margin: 15px auto 0; } #bugzilla-body th { diff --git a/skins/standard/mobile.css b/skins/standard/mobile.css index 244726f21..f112c2a3b 100644 --- a/skins/standard/mobile.css +++ b/skins/standard/mobile.css @@ -8,7 +8,7 @@ @media only screen and (max-device-width : 720px) { - #header, #footer { + #header { display: none; } .cookie-notify { @@ -52,10 +52,6 @@ only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { - #footer .org-links { - font-size: small; - } - body { font-size: medium; } diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index ce9623372..7b71ccf6d 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -59,7 +59,7 @@ Show in - Footer + Search Bar [% may_share = user.in_group(Param('querysharegroup')) && queryshare_groups.size %] [% IF may_share %] @@ -137,7 +137,7 @@ %]class="bz_default_hidden"[% END %]> - + [% END %] [% IF q.shared_with_users %] @@ -151,8 +151,8 @@ [% END %] [% IF user.can_bless %] -

Note that for every search that has the "Add to footer" selected, a - link to the shared search is added to the footer of every user that is +

Note that for every search that has the "Add to Search Bar" selected, a + link to the shared search is added to the Search Bar of every user that is a direct member of the group at the time you click Submit Changes.

[% END %] @@ -179,7 +179,7 @@ Show in - Footer + Search Bar [% FOREACH q = user.queries_available %] diff --git a/template/en/default/global/footer.html.tmpl b/template/en/default/global/footer.html.tmpl index 29d17bccd..4578c1084 100644 --- a/template/en/default/global/footer.html.tmpl +++ b/template/en/default/global/footer.html.tmpl @@ -19,28 +19,7 @@ # Svetlana Harisova #%] -[%# INTERFACE: - # This template has no interface. However, you must fulfill the interface to - # global/useful-links.html.tmpl. - #%] - - - -[%# Migration note: below this point, this file corresponds to the old Param - # 'footerhtml' - #%] - - + [%# bugzilla-body %] [% Hook.process("end") %] diff --git a/template/en/default/global/header-search-dropdown.html.tmpl b/template/en/default/global/header-search-dropdown.html.tmpl new file mode 100644 index 000000000..590c95d31 --- /dev/null +++ b/template/en/default/global/header-search-dropdown.html.tmpl @@ -0,0 +1,48 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Gervase Markham + # Svetlana Harisova + # Marc Schumann + #%] + +[% PROCESS global/variables.none.tmpl %] + + diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 9baecbb53..81db1910b 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -246,16 +246,20 @@ [%# header %] diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl deleted file mode 100644 index 90a3268cb..000000000 --- a/template/en/default/global/useful-links.html.tmpl +++ /dev/null @@ -1,73 +0,0 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Gervase Markham - # Svetlana Harisova - # Marc Schumann - #%] - -[%# Migration note: this whole file corresponds to the old %commandmenu% - substitution param in 'footerhtml' %] - -[% PROCESS global/variables.none.tmpl %] - - -- 2.47.3