When the option "show item in menu" is set to "always" the javascript hides all the nodehierarchy menu options on the edit node page (menu drop down, customize, expand and description). The attached patch fixes this by adding a hidden field so that the javascript knows that the menu is always enabled. I'm happy to rework this patch if needed.

Thanks,
David

Comments

markhalliwell’s picture

Status: Needs review » Needs work

This functionality is by design. If you have "Show item in menu" set to "always" then it hides the field so not to give the option to edit it. I will agree that this method seems a bit crude using JavaScript in the first place, so I think this needs to be re-evaluated and maybe just set the checkbox to disabled (graying out, not the value). This could possibly be implemented in a potential commit #921198: Rework administration and node create/edit with new features and clean design.

markhalliwell’s picture

I didn't include any JS patches with my latest patch in the issue referenced above, however I do think that the JS framework needs to be looked at a little more closely to work with showing the right features at the right time. I will use this issue for any future JS patches.

jbylsma’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Component: Code » JavaScript Code
Assigned: Unassigned » jbylsma
Status: Needs work » Fixed

I had taken a stab at this at #936006: Allow menu settings to be customized if the content type's "Show item in menu" is set to "Always" before I knew it was a dupe. I took davidmprice's code and reduced it down to a pure Javascript fix. Now, the jQuery is checking to see if .nodehierarchy-menu-enable exists and it's value is "checked" (it's a checkbox). Applied to 6.x-3.x.

jbylsma’s picture

Also pushed to 6.x-2.x-dev.

markhalliwell’s picture

Component: JavaScript Code » Drupal/PHP Code
Status: Fixed » Needs work

First, good fix for the JS portion guys :)

However, I feel this needs to be worked out in more detail on the Drupal back end. The only time JS needs to be involved is if the user is given the option to enable or disable the menu item in the first place. If they are not given an option either way, then the form should be rendered with or with out the checkbox.

See:
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....

markhalliwell’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Needs work » Fixed

Closing ticket as it fixes the initial 2.x bug. Moving issue to the 3.x branch: #1122118: JavaScript Rewrite: Implement Framework.

Status: Fixed » Closed (fixed)

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