[module] DHTML Menu

Compatibility:

0
Project page quote (external)

DHTML Menu uses Javascript to reduce the number of page loads when using nested menus; this is particularly useful with Drupal's administration system.

Ordinarily in Drupal, in order to see the sub-items in a menu, you need to click the link of this item and wait for a full page load. After enabling DHTML Menu, clicking a menu link once will expand it to reveal its sub-items without reloading the page. A double-click on the item will load the page normally. Additionally, a cookie stores which menus are open and which are closed, so that the state of the menus remain consistent as you navigate around the site.

As far as I can tell, DHTML still loads behind the scenes each entire menu it is applied to, so it does not seem to have any performance advantage over JQuery menu (which has the advantage that it combines with Advanced Book Blocks, and it is far more configurable per menu, making JQuery Menu my current winner and is used throughout this site). By comparison, Active menus performs AJAX interrogation of the children of a parent menu item on opening, which in principle makes it more efficient when very large menus are involved.

UPDATE: The 7.x-1.0-beta1 release of DHTML is a great improvement. But it was still not compatible visually with the Bartik theme (massive gaps between menu items and the UGLY open/close folder icons), and it introduced some JavaScript bugs (see below). Unfortunately, the latest 7.x-1.x-dev (2013-Sep-30) - which fixed the JavaScript problems - again has problem with alignment of the icons for opening/closing trees in the Bartik theme (see below) !

I recommend disabling all animations, and then I recommend enabling the option to:

[x] Expand on Bullet: All links will continue to function as static links. To expand an item, click the bullet icon next to the link.
But there is a minor BUG in 7.x-1.0-beta1, one can thereafter no longer expand the ANIMATION and OTHER EFFECTS and DISABLING DHTML options under the DTHML /admin/config/user-interface/dhtml_menu ! So set all other option first with regular No collapsing mode. Or install the latest DEV version (see below).
Concerns, issues, warnings, gotchas
RESOLVED: Older 7.x-1.x-dev version had strange folder icon and did not work well with Bartik

Visually I far prefer the Drupal6 version which used Drupal's core open/close arrow style, the Older 7.x-1.x-dev version for Drupal7 for some reason used relatively large and IMO ugly white open/close folder icons, which I found cluttered. This is known as "fixing" something that wasn't broken. I tried overriding this in CSS without much success.

As far as I can tell, older 7.x-1.x-dev DHTML for Drupal7 did not play well with the Bartik theme; instead of clicking on the open/close folder, one had to click on a strange unwanted space between the open/close folders and the menu link.
affects version: 
7.x-1.x-dev (OLDER)
fixed in version: 
7.x-1.0-beta1
BUG: Expand on Bullet option prevents access to some admin settings

If you enable this option:

[x] Expand on Bullet: All links will continue to function as static links. To expand an item, click the bullet icon next to the link.

You can thereafter no longer expand the ANIMATION and OTHER EFFECTS and DISABLING DHTML options under the DTHML /admin/config/user-interface/dhtml_menu ! To get at the options, re-enable (temporarily) the default No Collapsing: option, then after setting all options, re-enable Expand on Bullet: again.

affects version: 
7.x-1.0-beta1
fixed in version: 
7.x-1.x-dev (2013-Sep-30)
BUG: JavaScript error in DHTML Menu 7.x-1.0-beta1 blocks widget from JQuery Colorpicker

It's not the fault of JQuery Module, but it's a hard problem to catch and worth listing here. When using DHTML menu version 7.x-1.0-beta1 (2010-Nov-09) you can't see the Jquery Colorpicker widgets, all you see is:

'Enter a hexidecimal color value. Enabling javascript will replace this input with a graphical color selector.'

Inspecting the JavaScript console shows:

Uncaught TypeError: Cannot read property 'replace' of undefined dhtml_menu.js?nhl7qt:179
Drupal.behaviors.dhtmlMenu.attach drupal.js?nhl7qt:76
(anonymous function)jquery.js ?v=1.4.4:33
b.extend.eachdrupal.js?nhl7qt:74
Drupal.attachBehaviorsdrupal.js?nhl7qt:412
(anonymous function) jquery.js?v=1.4.4:30
b.extend.ready jquery.js?v=1.4.4:38 u

Easily fixed, upgrade to DHTML from 7.x-1.x-dev (2013-Sep-30).

BUT DHTML from 7.x-1.x-dev (2013-Sep-30) introduces some new theming errors, see below !
affects version: 
7.x-1.0-beta1 (2010-Nov-09)
fixed in version: 
7.x-1.x-dev (2013-Sep-30)
BUG: Not compatible with Bartik theme: unwanted space between open/close icons and page menu link

The 7.x-1.0-beta1 release of DHTML was a great improvement. But it is still not compatible visually with the Bartik theme, and it introduced some JavaScript bugs (see below). Unfortunately, the latest 7.x-1.x-dev (2013-Sep-30) - which fixed the JavaScript problems - again has problem with alignment of the plus/minus icons for open/closing trees in the Bartik theme (see below).

affects version: 
7.x-1.x-dev (2013-Sep-30)
Visit also