diff --git a/core/misc/tableheader.js b/core/misc/tableheader.js index 3ae33c2..0d4f7cd 100644 --- a/core/misc/tableheader.js +++ b/core/misc/tableheader.js @@ -130,7 +130,6 @@ $.extend(TableHeader, { /** * Sum all [data-offset-top] values and cache it. - * @todo move this out of tableheader.js into a move generic place like drupal.js. */ computeOffsetTop: function () { var $offsets = $('[data-offset-top]'); diff --git a/core/modules/toolbar/css/toolbar.base.css b/core/modules/toolbar/css/toolbar.base.css index 46ba0c3..08481df 100644 --- a/core/modules/toolbar/css/toolbar.base.css +++ b/core/modules/toolbar/css/toolbar.base.css @@ -26,10 +26,16 @@ body.toolbar-tray-open { font-size: 100%; line-height: 1; } -.toolbar-main ul, -.toolbar-main ul li, -.toolbar-main .menu li { - list-style: none; +/* These are scoped to .toolbar and not .toolbar-main because Internet Explorer +doesn't paint the list items correctly on load when scoped to the dynamic +class .toolbar-main */ +.toolbar li, +.toolbar .menu li, +.toolbar .item-list, +.toolbar .item-list li, +.toolbar .menu li.expanded { + list-style-type: none; + list-style-image: none; } .toolbar-main .menu li { padding-top: 0; @@ -70,7 +76,6 @@ body.toolbar-tray-open { z-index: 250; } .toolbar-main .vertical { - bottom: 0; left: -100%; position: absolute; } @@ -102,7 +107,10 @@ body.toolbar-tray-open { left: 0; /* LTR */ } @media screen and (min-width: 16.5em) { - .toolbar-main .tray.vertical, + .toolbar-main .vertical { + bottom: 0; + } + .toolbar-main .vertical, .toolbar-main .vertical > .lining > .edge { width: 240px; width: 15rem; @@ -119,7 +127,7 @@ body.toolbar-tray-open { } } @media screen and (min-width: 28.125em) { - .toolbar-main .tray.horizontal { + .toolbar-main .horizontal { position: fixed; } } diff --git a/core/modules/toolbar/css/toolbar.theme.css b/core/modules/toolbar/css/toolbar.theme.css index 83b5c54..10789d5 100644 --- a/core/modules/toolbar/css/toolbar.theme.css +++ b/core/modules/toolbar/css/toolbar.theme.css @@ -78,7 +78,7 @@ border-bottom: 1px solid #dddddd; } .toolbar-main .vertical .toolbar-list a { - margin-right: 3.5em; + margin-right: 20%; } .toolbar-main .vertical .level-1 + .level-1, .toolbar-main .vertical .toolbar-list > li + li, @@ -190,21 +190,19 @@ background-attachment: scroll; background-color: transparent; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTAwcHgiIGhlaWdodD0iMTAwcHgiIHZpZXdCb3g9IjI1NiAzNDYgMTAwIDEwMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAyNTYgMzQ2IDEwMCAxMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzk5OTk5OSIgZD0iTTI1NiwzOTZjMCwyNy41OTgsMjIuNCw1MCw1MCw1MGMyNy41OTgsMCw1MC0yMi40MDIsNTAtNTBjMC0yNy42LTIyLjQwMi01MC01MC01MA0KCQlDMjc4LjQsMzQ2LDI1NiwzNjguNCwyNTYsMzk2eiBNMjYxLDM5NmMwLTI0Ljg1MiwyMC4xNDktNDUsNDUtNDVjMjQuODU0LDAsNDUsMjAuMTQ4LDQ1LDQ1YzAsMjQuODU0LTIwLjE0Niw0NS00NSw0NQ0KCQlDMjgxLjE0OSw0NDEsMjYxLDQyMC44NTQsMjYxLDM5NnoiLz4NCgk8cG9seWdvbiBmaWxsPSIjNTE4MUMyIiBwb2ludHM9IjMwNiw0MTEgMjgxLDM4NiAzMzEsMzg2IAkiLz4NCjwvZz4NCjwvc3ZnPg0K); - background-origin: content-box; background-position: center center; background-repeat: no-repeat; - background-size: 100% 100%; + background-size: auto 70%; border: 0; bottom: 0; display: block; font-size: 1em; height: 100%; - padding: 0.6667em 0em; position: absolute; right: 0; text-indent: -999em; top: 0; - width: 3.5em; + width: 20%; z-index: 1; } .toolbar-main .level-2 .handle { diff --git a/core/modules/toolbar/js/toolbar.js b/core/modules/toolbar/js/toolbar.js index 3ad2ab0..c64ebdb 100644 --- a/core/modules/toolbar/js/toolbar.js +++ b/core/modules/toolbar/js/toolbar.js @@ -199,12 +199,13 @@ function changeOrientation ($trays, orientation, isOverride) { $tray.attr('data-toolbar-orientation-locked', JSON.stringify(locked)); } var currentOrientation = $tray.attr('data-toolbar-orientation'); - var isOrientationLocked = JSON.parse($tray.attr('data-toolbar-orientation-locked')); - if (!isOrientationLocked && orientation === 'horizontal' && currentOrientation === 'vertical') { - toggleOrientationToggle($tray, orientation); - } - if (orientation === 'vertical' && currentOrientation === 'horizontal') { - toggleOrientationToggle($tray, orientation); + var isOrientationLocked = JSON.parse($tray.attr('data-toolbar-orientation-locked') || null); + if ((!isOrientationLocked && orientation === 'horizontal' && currentOrientation === 'vertical') + || (orientation === 'vertical' && currentOrientation === 'horizontal')) { + $tray.attr('data-toolbar-orientation', orientation) + .removeClass('horizontal vertical') + .addClass(orientation); + toggleOrientationToggle($tray, currentOrientation); } } // Save the state of overridden trays. @@ -223,14 +224,12 @@ function changeOrientation ($trays, orientation, isOverride) { * */ function setBodyState () { - var $body = $('body'); var $activeTray = $toolbar.find('.tray.active'); - if ($activeTray.length) { - $body.addClass('toolbar-' + $activeTray.attr('data-toolbar-orientation')); - } - $body - .removeClass('toolbar-vertical toolbar-horizontal') - .toggleClass('toolbar-tray-open', !!$activeTray.length); + var orientation = $activeTray.attr('data-toolbar-orientation'); + $('body') + .toggleClass('toolbar-tray-open', !!$activeTray.length) + .toggleClass('toolbar-vertical', (!!$activeTray.length && orientation === 'vertical')) + .toggleClass('toolbar-horizontal', (!!$activeTray.length && orientation === 'horizontal')); } /** * Change the orientation toggle active state. @@ -238,10 +237,6 @@ function setBodyState () { function toggleOrientationToggle ($trays, orientation) { for (var i = 0, il = $trays.length; i < il; i++) { var $tray = $trays.eq(i); - $tray.attr('data-toolbar-orientation', orientation) - .removeClass('horizontal vertical') - .addClass(orientation); - $tray.find('.toggle-orientation button').removeClass('active'); $tray.find('.toggle-orientation button[value="' + orientation + '"]').addClass('active'); } diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 65bec0d..c725353 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -50,10 +50,10 @@ function toolbar_theme($existing, $type, $theme, $path) { /** * Implements hook_page_build(). * - * Add admin toolbar to the page_top region automatically. + * Add admin toolbar to the page_bottom region automatically. */ function toolbar_page_build(&$page) { - $page['page_top']['toolbar'] = array( + $page['page_bottom']['toolbar'] = array( '#pre_render' => array('toolbar_pre_render'), '#access' => user_access('access toolbar'), ); @@ -73,17 +73,6 @@ function toolbar_pre_render($toolbar) { } /** - * Implements hook_preprocess_HOOK() for html.tpl.php. - * - * Add some page classes, so global page theming can adjust to the toolbar. - */ -function toolbar_preprocess_html(&$vars) { - if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) { - $vars['attributes']['class'][] = 'toolbar'; - } -} - -/** * Implements hook_preprocess_HOOK() for toolbar.tpl.php. * * Adding the 'overlay-displace-top' class to the toolbar pushes the overlay @@ -96,7 +85,7 @@ function toolbar_preprocess_toolbar(&$variables) { /** * Implements hook_system_info_alter(). * - * Indicate that the 'page_top' region (in which the toolbar will be displayed) + * Indicate that the 'page_bottom' region (in which the toolbar will be displayed) * is an overlay supplemental region that should be refreshed whenever its * content is updated. * @@ -105,7 +94,7 @@ function toolbar_preprocess_toolbar(&$variables) { */ function toolbar_system_info_alter(&$info, $file, $type) { if ($type == 'theme') { - $info['overlay_supplemental_regions'][] = 'page_top'; + $info['overlay_supplemental_regions'][] = 'page_bottom'; } }