Hello,

I need activemenu module, because other options (dhtml menu, jquery menu) don't use Ajax and therefore don't play nice with lots of menu entries.

I ported activemenu module using the coder module and some manual fixing. I removed the dependency on the jstools module, as this was also not ported yet. But I only copied the needed functions. Probably, this could be done in a better way.
I'm not sure about the setting to alter the theme registry, as I don't seem to need it.

Anyway, the module works like it should in Drupal 7 as far as I can see.

I attach a patch (my first time using git, not sure if it's done right), and an archive of the complete d7 version for convenience of testing.

If anybody is interested, I would be glad to have some feedback and maybe this could lead to a release of activemenu for Drupal 7.

Greetings,
Alex

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nedjo’s picture

Status: Needs review » Needs work

Thanks for the patch! I am unable to commit time to a Drupal 7 version. Are you interested in taking over as maintainer?

A couple of quick comments on the patch:

+version = "7.x-2.x-dev"
+project = "activemenu"
+datestamp = "1298618791"

This is extraneous (comes from a patch based on a stable release rather than Git checkout).

References to jstools in code or comments shd be changed or removed.

B-Prod’s picture

Thanks for your help.

I created a new branch for 7.x development, from which you can work and make patches. This branch was created from the files you provided. I made only very few changes to your code because I do not have enough time now to work seriously on the D7 port. But I will have some availability next month to help porting the module.

Some remarks:

  • The file jstools.js cannot belong to the project and should be added using libraries module, or be added manually when installing the module, due to Drupal code policy. So I didn't add this file in the DEV version.
  • Images should be put in a directory "images".
  • CSS for Garland theme could probably be removed, since Drupal 7 no more use Garland as base theme.
B-Prod’s picture

Title: Drupal 7 version » Port to Drupal 7
Version: 6.x-2.x-dev » 7.x-2.x-dev
alexh’s picture

FileSize
3.54 KB

Thanks to you both for your comments and making a dev branch.

I moved the needed functions from jstool.js to activemenu.js, so we get a working version (patch attached). Not sure, if this might create any conflicts with other modules which previously were part of jstools?

And, ooops, I found out that it currently works only for custom menus, due to the different block-IDs in Drupal 7. The module still hard codes the prefix "#block-menu-", but this is now only true for custom menus, while others e.g. start with "#block-system-", etc.
I can look into this problem, but at the moment have no idea how to correct this.

And well, I'm not that familiar with all code as you are, but yes, I would be interested in being co-maintainer for a start.

B-Prod’s picture

Looks good. Just one point: il is not necessary to duplicate basePath data in settings.activemenu since it already belongs to Drupal object.
Drupal.settings.basePath

So when needed in a "behavior" component (with standard declaration: function (context, settings)), it can be accessed through settings.basePath

logman’s picture

Hello, using Ajax for menu items is an excellent idea!

I tried Active menus 7.x-2.x-dev (with alexh's activemenu-1430534-4.patch) in Drupal 7.12 - default theme.

It seems, the module does not respects indent/outdent setting via links menu administration. Active menus is also incompatible with "jQuery Update" respectively newer versions of jQuery, which is a pity because last jQuery version is very important for any other modules.

Very useful would be to compatibility of "Menu Expanded", too. For many items in menu, such functionality is always handy.

I really love this menu concept, please keep working on this project.

Thanks,
Logman

johncs’s picture

Today, the released version of this module does not work. It references jstools.js which, despite the contents of its readme, is not included. Nor is there any documentation about how to install jstools using the libraries functionality. and no assurance that would work in any case.

For me, would like drop-down menus such as the one at http://js.id.au/register.php and that is done entirely in CSS. I installed this hoping I would have the menu facility I want, I don't need dynamic menus I don't imagine they will change often at all, and loading the entire menu at first glance is fine.

B-Prod’s picture

So you can simply use the mernu block module and make your own CSS.