Closed (fixed)
Project:
Menu Attach Block
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 May 2013 at 02:49 UTC
Updated:
19 Mar 2015 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Yuri commentedThis issue is actually about the hover functionality of auto-expand and collapse. It is useful for a menu to auto collapse and expand on hover.
Comment #2
tisteegz commentedI second this. It would be a great feature to be able to have menu items automatically collapse.
Comment #3
bamberjp commentedI have made several modifications to enhance this module for a project I am currently working on and wanted to share the results. This version includes configuration options for auto-expand/collapse, hover/click trigger and the ability to make the link itself the droplink. Hopefully this will help further the modules development. Thanks for the great module. - John
Comment #4
bamberjp commentedI've made a small change to menu_attach_block.js so that the animation is differed until after ajax content is loaded successfully. Best - John
Comment #5
cameron tod commentedThanks for the patch, bamberj!
There's quite a lot of changes here, so I've tried to convert the indents to the Drupal coding standards ones to make things a little easier to compare.
Comment #6
cameron tod commenteddrupalcbf to the rescue - more style cleanup. Hopefully we can now see only the actual code changes :)
Comment #8
cameron tod commentedThis has now been merged into head. I'll go ahead and do a new release now that incorporates this :)
Thanks bamberj!
Comment #9
bamberjp commentedAwesome and thanks for the great module. My project required that the block automatically collapse when clicking outside of the parent
<li>, so I've added the following code on my local copy to menu_attach_block.js,Thought this may be useful to others as well. Best - John
Comment #10
bamberjp commentedI've noticed an issue on anchors with class
expand-on-clicknot retracting their attached block due to the hover out callback not being fired. I believe this is due to the content withinmenu-attach-block-wrapperexpanding the width of the<li>. Additionally, the "if click outside, collapse" snippet I've previously provided doesn't take into account anchors with the classexpand-on-clickand will collapse expanded hovers when clicking on contents within theirmenu-attach-block-wrapper.Here is an updated version of menu_attach_block.js,
Feedback welcome. Best - John
Comment #11
bamberjp commentedI've made a few more modifications from the current dev to meet my project requirements. Thought they may be useful to others as well.
Changes:
<block>and<droplink>paths and added<void>option. Solved the first part of 2258157 by replacing<block>with "Disable Link" checkbox. Now have Droplink radio field that will alter the output accordingly (void link click to expand/collapse block, link with path and hover to expand/collapse block, external link click to expand/collapse block and external link hover to expand/collapse block).Best - John
Comment #12
bamberjp commentedMinor fix in
menu_attach_block_link. Best - JohnComment #13
cameron tod commentedHi bamberj - would it be possible for you to post these as patch files? It makes it much easier for me to quickly review them and (hopefully) add them onto the module trunk.
https://www.drupal.org/node/707484
Comment #14
bamberjp commentedPlease find the attached requested patch. This patch includes additional modifications to improve the UI. Additional validation has also been added to prevent the attachment of the menu which parents the link (recursive). I have added the ability to generate both the link as a droplink and add an external link with different triggers which may be beneficial for this modules translation to mobile formatting. Best, John