Toolbar.js is using the Drupal.admin namespace. No other module uses this, nor should toolbar. It can use some more cleaning but lets review this one first to keep things simple.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mfer’s picture

The patch was almost there but Drupal.behaviors.admin should be Drupal.behaviors.toolbar. Using the admin on the end is a namespace mismatch. The attached patch changes that as well.

mfer’s picture

Also note, the deeper something is nested in JavaScript the slower it is. By removing the extra layer of referencing there is an ever so small performance improvement.

seutje’s picture

looks like u got em all in the code, but shouldn't u also change the comments?

/**
 * Implementation of Drupal.behaviors for admin.
 */
Drupal.behaviors.toolbar = {
/**
 * Collapse the admin toolbar.
 */
Drupal.toolbar.collapse = function() {
sun’s picture

Status: Needs review » Needs work
seutje’s picture

Status: Needs work » Needs review
FileSize
3.64 KB

changed comments

sun’s picture

+++ modules/toolbar/toolbar.js
@@ -1,18 +1,20 @@
 /**
- * Implementation of Drupal.behaviors for admin.
+ * Implementation of Drupal.behaviors for the toolbar.
  */

This should either state what the behavior is actually doing, or it simply needs to go. The former is preferred ;)

Powered by Dreditor.

mfer’s picture

Updated the patch per Suns comments.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good now - didn't test though. (hope you did ;)

mfer’s picture

I did test it... works :)

seutje’s picture

yay \o/

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. This is probably leftover from when yhahn made a Drupal 7 patch from Admin module.

Committed to HEAD.

jide’s picture

Status: Fixed » Needs review
FileSize
1.12 KB

There are some more strings to be changed in toolbar.module.
Correcting these fixes sticky tables.

sun’s picture

Status: Needs review » Reviewed & tested by the community
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

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