I installed this module. Seemed like a fairly straight forward thing, but so far it does not seem to work at all.

In case this matters: Using Rubik as the administration theme and Zen as default.

CommentFileSizeAuthor
#7 toolbar_hide_1058228_7.patch708 bytesJosh The Geek
#4 fix.patch686 bytessohum

Comments

Josh The Geek’s picture

Status: Needs work » Postponed (maintainer needs more info)

I need more info. Does the toolbar show up? Is it hidden? Does the keyboard shortcut work (default `)? What are the settings?

(BTW: Please start issues at active, not needs work. needs work and needs review are for issues with patches)

3rdLOF’s picture

The toolbar is there. I tried changing the key to different types, but nothing.

jonaswouters’s picture

I get an error:
toolbar_hide.js:4 SyntaxError: Parse error

"Drupal.settings.toolbar_hide.default" does not work

sohum’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new686 bytes

The module breaks when "Aggregate Javascript" is turned on, because a component of it requires a Drupal setting before that setting is set.

The attached patch is a quick'n'dirty fix.

Josh The Geek’s picture

Title: Not working » Incompatible with Javascript Aggregator and core js aggregation

Hmm. TBH is a port of Admin Menu Hider, one of my other modules. I had the same issue with AMD at #1012738: Incompatible with Javascript Aggregator and core js aggregation. I'll make a quick port of that patch to d7, and commit.

Josh The Geek’s picture

Assigned: Unassigned » Josh The Geek

Patch:

diff --git toolbar_hide.module toolbar_hide.module
index 8d9d685..348dcd1 100644
--- toolbar_hide.module
+++ toolbar_hide.module
@@ -33,11 +33,11 @@ function toolbar_hide_init() {
     'default' => variable_get('toolbar_hide_default', 0),
   );
 
-  drupal_add_js($path . '/toolbar_hide.js', array('defer' => TRUE));
+  drupal_add_js($path . '/toolbar_hide.js', array('defer' => TRUE, 'preprocess' => FALSE));
   drupal_add_js(array('toolbar_hide' => $settings), array('type' => 'setting', 'scope' => JS_DEFAULT));
   if (variable_get('toolbar_hide_css',1) == 1)
   {
-    drupal_add_css($path . '/toolbar_hide.css');
+    drupal_add_css($path . '/toolbar_hide.css', array('preprocess' => FALSE));
   }
 }
 

(Sorry, I find it more convenient to pass git dff though to pbcopy, not a file.)

Josh The Geek’s picture

StatusFileSize
new708 bytes

Real patch.

Josh The Geek’s picture

Status: Needs review » Fixed

Commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

star-szr’s picture

I think it's time for a new stable release that includes this bug fix, please :)