Commit fa884b11 authored by Dries's avatar Dries
Browse files

- Patch #759524 by David_Rothstein: toolbar drawer collapsing no longer works without JavaScript.

parent f79a1a73
......@@ -5,7 +5,7 @@ body.toolbar {
}
body.toolbar-drawer {
padding-top: 6.6em;
padding-top: 5.3em;
}
/**
......
......@@ -109,7 +109,7 @@ function theme_toolbar_toggle($variables) {
function _toolbar_is_collapsed() {
// PHP converts dots into underscores in cookie names to avoid problems with
// its parser, so we use a converted cookie name.
return isset($_COOKIE['Drupal_admin_toolbar_collapsed']) ? $_COOKIE['Drupal_admin_toolbar_collapsed'] : 0;
return isset($_COOKIE['Drupal_toolbar_collapsed']) ? $_COOKIE['Drupal_toolbar_collapsed'] : 0;
}
/**
......@@ -142,7 +142,7 @@ function toolbar_pre_render($toolbar) {
* Add some page classes, so global page theming can adjust to the toolbar.
*/
function toolbar_preprocess_html(&$vars) {
if (isset($vars['page_top']['toolbar']) && user_access('access toolbar')) {
if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) {
$vars['classes_array'][] = 'toolbar';
if (!_toolbar_is_collapsed()) {
$vars['classes_array'][] = 'toolbar-drawer';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment