callumbwhyte / meganav

A flexible, draggable link picker for constructing site navigation menus in Umbraco
MIT License
35 stars 34 forks source link

Settings per menu item/Udi Support/Umbraco 7.12 support #9

Closed ArnoldV closed 5 years ago

ArnoldV commented 7 years ago

This pull requests adds settings per menu item. These settings can be added as pre-values on the Datatype, the same as Settings on a grid row work. All the default editors are supported:

Example config:

[ { "label": "Textstring", "description": "Textstring description", "key": "textstring", "view": "textstring" }, { "label": "Textarea", "description": "Textarea description", "key": "textarea", "view": "textarea" }, { "label": "Radiobuttonlist", "description": "Radiobuttonlist description", "key": "radiobuttonlist", "view": "radiobuttonlist", "prevalues": [ "value_1", "value_2", "value_3" ] }, { "label": "mediapicker", "description": "mediapicker description", "key": "mediapicker", "view": "mediapicker" }, { "label": "imagepicker", "description": "imagepicker description", "key": "imagepicker", "view": "imagepicker" }, { "label": "boolean", "description": "boolean description", "key": "boolean", "view": "boolean" }, { "label": "treepicker", "description": "treepicker description", "key": "treepicker", "view": "treepicker" }, { "label": "treesource", "description": "treesource description", "key": "treesource", "view": "treesource" }, { "label": "number", "description": "number description", "key": "number", "view": "number" }, { "label": "multivalues", "description": "multivalues description", "key": "multivalues", "view": "multivalues" } ]

Also this Pull requests removes menu items that are marked by "umbracoNaviHide" by default (don't think this should be optional, this is something that should 'just be handled'). They DO show in the Umbraco backend, but will have a opacity like the unpublished items, but also get a red-dotted-border around them to indicate they are hidden in navigation.

Did not properly check the umbraco/nuget package creation, there could be something there, but it seems by default all new files should be added since they are in the same location as the current ones?

ArnoldV commented 7 years ago

Updated this pull request to make .NaviHide optional instead of default removing NaviHide items.

SudoCat commented 7 years ago

Just tested this out on my current project, unfortunately it looks like there's a little typo in the filenames - meganav.prevaule.controller.js instead of meganav.prevalue.controller.js (the word prevalue).

Having a deeper look through, the prevalue settings aspect doesn't seem to be anywhere near finished - the meganav.prevalue.controller.js is literally just a console.log.

Were you still working on this? It'd probably be better to rename this PR to avoid confusion.

ArnoldV commented 7 years ago

Aah wait! I see what is wrong. Fixing now!

ArnoldV commented 7 years ago

Should be working now. Sorry for incompleteness!

SudoCat commented 7 years ago

Huzzah! After a bit of poking, it all seems to be in great working order 👍 🙌 This is exactly what I was looking for, thanks a bunch for your hard work on this!

Although the prevaules controller file still needs renaming to make it work 😜

Now hopefully Cogworks can get this pulled in.

ArnoldV commented 7 years ago

ahum filenaming ahum

ArnoldV commented 5 years ago

Updated:

meganav_update_screen02 meganav_update_screen01 meganav_update_screen03