diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css index e64d353ccca302066274b1a688c667f094767b96..086378eb8603010b47007ebf457681d83f405037 100644 --- a/modules/toolbar/toolbar.css +++ b/modules/toolbar/toolbar.css @@ -76,7 +76,7 @@ div#toolbar div.toolbar-menu { div#toolbar div.toolbar-menu #toolbar-user { position: absolute; - right: 35px; + right: 10px; } div#toolbar div.toolbar-menu #toolbar-menu { @@ -84,9 +84,16 @@ div#toolbar div.toolbar-menu #toolbar-menu { left: 10px; } +/** + * Give space for the shortcuts visibility toggling element when it is added. + */ +div#toolbar.toolbar-processed div.toolbar-menu #toolbar-menu { + left: 45px; +} + div#toolbar div.toolbar-menu span.toggle { position: absolute; - right: 10px; + left: 10px; cursor: pointer; background: url(toolbar.png) 0 -60px no-repeat; text-indent: -9999px; diff --git a/modules/toolbar/toolbar.js b/modules/toolbar/toolbar.js index c2653d91a67141382db53726de45adc02c8c11d3..61bfb91d4f6865212374b684cb51a87710906f7f 100644 --- a/modules/toolbar/toolbar.js +++ b/modules/toolbar/toolbar.js @@ -10,6 +10,9 @@ Drupal.behaviors.admin = { // Set the intial state of the toolbar. $('#toolbar', context).once('toolbar', Drupal.admin.toolbar.init); + // Add the toggling element for shortcuts visibility. + $('#toolbar div.toolbar-menu').prepend('<span class="toggle toggle-active"><a href="#">' + Drupal.t('Show shortcuts') + '</a></span>'); + // Toggling of admin shortcuts visibility. $('#toolbar span.toggle', context).once('toolbar-toggle').click(function() { Drupal.admin.toolbar.toggle(); diff --git a/modules/toolbar/toolbar.tpl.php b/modules/toolbar/toolbar.tpl.php index 8a68998af608e8b9831c76e5e82196600cded47d..0da130872d2754c411168fea5ab0fd6f9a6d6c7e 100644 --- a/modules/toolbar/toolbar.tpl.php +++ b/modules/toolbar/toolbar.tpl.php @@ -16,7 +16,6 @@ ?> <div id="toolbar" class="clearfix"> <div class="toolbar-menu clearfix"> - <span class="toggle toggle-active"><?php print t('Show shortcuts'); ?></span> <?php print render($toolbar['toolbar_menu']); ?> <?php print render($toolbar['toolbar_user']); ?> </div>