Comments

Anonymous’s picture

+1

kmajzlik’s picture

+1

xacto’s picture

Priority: Critical » Normal
xacto’s picture

Priority: Critical » Normal

+1

xacto’s picture

You know we may want to also add the issue pointed out in this link as well as an official port.

Auto-expand parent menu item(s) for active menu item..
http://drupal.org/node/344916

BTW thanks Aaron for this awesome module and your effort!!!

Can anyone help with this port to D7. :-)

xacto’s picture

Priority: Normal » Critical
izkreny’s picture

Priority: Normal » Critical

+1

v.zhakov’s picture

Priority: Normal » Critical

subscribe

Scondo’s picture

+1

lpalgarvio’s picture

+1!

bazzly’s picture

So is there any movement on this? Out of curiosity....whats involved in porting...or how do you do it?

drupa11y’s picture

A D7 Version would be great.
Currently I use "DHTML menu" which also works fine.

Stefan Haas’s picture

subscribe

PixelClever’s picture

There will be a D7 release sometime soon. Right now I am overloaded with building a house, a new baby and my paid work. I encourage anyone who is interested in speeding things up to post patches or full versions. This is on my radar, but it may take a bit.

perhenrik’s picture

subscribe

lagpro’s picture

StatusFileSize
new19.31 KB

Hi,

Here is a start to converting this module to release 7. I am not getting the jquery menus to activate and it may be a problem with the block/menu setup code (not sure). I chased it for a day but unfortunately need to move on with my project. The one thing that I was looking at (and probably should be done) is to compartmentalize the jquery/css code into a javascript drupal library so it can be made more modular. The idea would be to permit other jquery plugins to be added to bring in more interesting behaviors and expose the lib to the rest of the system - one of the nice changes in 7. Here is a start.

xacto’s picture

Thanks!! Can Aaron review and maybe start a dev branch?

PixelClever’s picture

Thank you lagpro, I appreciate this. I will try to work on this this weekend and get a dev release up.

rosk0’s picture

subscribing

likewhoa’s picture

Title: Drupal 7 release » Port JQuery menu to Drupal 7
Category: feature » task
Status: Active » Needs review

subscribing

vthirteen’s picture

subscribe

v.zhakov’s picture

lagpro, thanks for your work!
I install jQuery_menu 7.x (#16) to my site.
I see settings page, mark one menu to create Jquery_menu. But on block page I doesn't see any blocks, which must be created with jQuery_menu module. Can anybody helps me?

v.zhakov’s picture

hook_block in jquerymenu.module (attachment #16) must be changed (drupal 7.x) to hook_block_info() & hook_block_view($delta = 0) for working module better

pat redmond’s picture

I've submitted a D7 version for Aaron to have a look at - it is my first D6->D7 conversion so I think it's best for someone to look at it before I put it up here.
Thanks to lagpro for the above version (which I wish I had seen when I started this)!. I used your js files because I couldn't get it to work myself. The reason it wasn't displaying for you is that hook_block() has been replaced with hook_block_info() and hook_block_view() in D7.

I have also fixed a few of the 'unknown variable' errors.

This is a direct port - I haven't added any features. But I will look at the issues list, and see whether I am up to doing any more work on the module.

pat redmond’s picture

Status: Needs review » Patch (to be ported)
StatusFileSize
new19.71 KB

Here is the code for the D7 port. Let me know what you think - it is the first time I've tried anything like this.

gitesh.koli’s picture

gitesh.koli’s picture

Pat,

I have used your module and I had to fix the update function for D7.

Please update your version of the module.

/**
 * 
 * This is a one time cleanup to remove blocks and menus that have gotten out of sync.
 * This update will reset blocks that were created directly by jquery menu
 * you will need to visit the blocks page after running this to re-enable those blocks.
 * 
 */
function jquerymenu_update_7001() {
  $result = db_query("SELECT mid, menu_name FROM {jquerymenus}");
  $enabledmenus = array();
  while ($enabled = $result->fetchAssoc()) {
    $title ='';
    $title = db_query("SELECT title FROM {menu_custom} WHERE menu_name = ':menu_name'", 
              array(":menu_name" => $enabled['menu_name']))->fetchField();
    if (empty($title)) {
      db_query("DELETE FROM {jquerymenus} WHERE menu_name = ':menu_name'", array(":menu_name" => $enabled['menu_name']));
      db_query("DELETE FROM {block} WHERE module = 'jquerymenu'");
    }
  }
}

gitesh.koli’s picture

StatusFileSize
new1.52 KB

Ignore this patch file

gitesh.koli’s picture

StatusFileSize
new1.69 KB

Attached is the patch for fixing the install file.

akalsey’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new1.02 KB

Updated the upload from #25 to fix the menu paths. putting things directly in the config menu is now discouraged, so I put this under the config/user-interface menu

pat redmond’s picture

StatusFileSize
new19.69 KB

Thanks gitesh.koli and akalsey!

Here is an updated zip file - in case anyone else out there isn't sure what to do with the patch files...

How do we get this listed as an official module?

summit’s picture

Hi,
Installed the module under #31. But I do not get the menu settings which should show underr:
admin/user-interface/jquerymenu.

SO I can't get the module functioning yet..
Greetings, Martijn

pat redmond’s picture

Summit: since changing the code, my menu settings are appearing directly under admin/config
Check there, and let me know what you see.

summit’s picture

Hi, Nope, no jquery under user-interface menu under admin/config.
Testing version 1.1 from http://drupal.org/node/996444#comment-5459662

Disabling/deinstalling and installing again didn't help also, sorry.
What could be the problem please?

greetings, Martijn

jonathan_hunt’s picture

StatusFileSize
new25.64 KB

Attached is an extensive update to the module bundled in #31:
- passes coder style review
- remove redundant menu declarations
- changed variable, function names to be more consistent with module namespace

Please can we get a 7.x version in git?

summit’s picture

Hi,

Using this new module #35, I got the admin screen! Enabling a jQuery Menu blocks I got:

Notice: Undefined index: jq_edit_link in jquerymenu_admin_settings_submit() (regel 85 van /sites/all/modules/jquerymenu/jquerymenu.admin.inc).

EDIT: Besides this error, the menu itself works!

Thanks for going into this!
Greetings, Martijn

jonathan_hunt’s picture

StatusFileSize
new25.6 KB

Thanks. Looks like I missed a variable name change. Improved complete 7.x module directory attached.

diff --git a/modules/jquerymenu/jquerymenu.admin.inc b/modules/jquerymenu/jquerymenu.admin.inc
index 7cfca20..6b7da59 100755
--- a/modules/jquerymenu/jquerymenu.admin.inc
+++ b/modules/jquerymenu/jquerymenu.admin.inc
@@ -82,7 +82,7 @@ function jquerymenu_admin_settings_submit($form, &$form_state) {
 
   // Save animation and edit link toggles.
   variable_set('jquerymenu_animate', $form_state['values']['jquerymenu_animate']);
-  variable_set('jquerymenu_edit_link', $form_state['values']['jq_edit_link']);
+  variable_set('jquerymenu_edit_link', $form_state['values']['jquerymenu_edit_link']);
Garret Huntress’s picture

The module in #37 works well for the most part. However, I get the following notice for every single link in an enabled jquery menu block when "Display Edit Link" is disabled:

Notice: Undefined variable: editpath in recursive_link_creator() (line 263 of /var/www/Drupal7/sites/all/modules/jquerymenu/jquerymenu.module).

jonathan_hunt’s picture

StatusFileSize
new25.54 KB

Fixed notice reported in #38. Specified version as 7.x-1.0-alpha1

Garret Huntress’s picture

Confirming #39 fixes the disabling of "Display Edit Link". Many thanks!

jonathan_hunt’s picture

StatusFileSize
new25.64 KB

Updated to 7.x-1.0-alpha2: Add theme callback theme_jquerymenu_listitem(). Harmonize theme callback naming. Harmonize use of $variables as theme parameter. Assign active class to homepage. Reorder some functions.

I don't think this module is handling active path correctly. Haven't had a chance to investigate yet.

pat redmond’s picture

StatusFileSize
new18.33 KB
new27.76 KB

I was getting a few errors, so I think I've fixed them. Jonathan, can you check my diff file? I'm not sure whether the translations have come across.

Definitely not handling active path correctly - it hasn't for a while. I've been meaning to have a look at that too.

pat redmond’s picture

StatusFileSize
new28.52 KB
new18.96 KB

OK, so I think I've fixed the issue of opening the active path. The problem is that it is opening all menu items which are in the current path. For example if the path is www.example.com/what/comes/next then menu items which point to www.example.com/what will be opened, even if they aren't in the same branch of the menu.

This appears to be an issue which existed in the D6 version of the module too.

jonathan_hunt’s picture

The code in #43 appears to be working, but it looks like you have DOS line endings (at least in the zip file), see https://drupal.org/node/707484

pat redmond’s picture

Super - thanks. For some reason every time I quit Notepad++ it changes back to DOS line endings, and tabs instead of spacing. Driving me nuts...

pat redmond’s picture

Version: 6.x-3.3 » 7.x-1.0
Assigned: Unassigned » pat redmond
Status: Needs review » Closed (fixed)

Ok, we now have the D7 release.
If there are further issues, please create a new issue and we can address it.

Anonymous’s picture

Thanks very much for the work done on this!