Closed (fixed)
Project:
Node Hierarchy
Version:
6.x-2.x-dev
Component:
Drupal/PHP Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 May 2010 at 05:57 UTC
Updated:
23 Apr 2011 at 20:41 UTC
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
| Comment | File | Size | Author |
|---|---|---|---|
| nodehierarchy-fix-always-in-menu.patch | 1.57 KB | davidmprice |
Comments
Comment #1
markhalliwellThis 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.
Comment #2
markhalliwellI 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.
Comment #3
jbylsma commentedI 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.
Comment #4
jbylsma commentedAlso pushed to 6.x-2.x-dev.
Comment #5
markhalliwellFirst, 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....
Comment #6
markhalliwellClosing ticket as it fixes the initial 2.x bug. Moving issue to the 3.x branch: #1122118: JavaScript Rewrite: Implement Framework.