jQuery Menus where inaccessible options are not shown

Discussion for TimeTrex open source community developers.
Locked
joel
Posts: 11
Joined: Tue Dec 22, 2009 2:06 pm

jQuery Menus where inaccessible options are not shown

Post by joel »

The attached patch replaces the proprietary milonic navbar menu with jquery superfish 1.4.8 based menus (http://users.tpg.com.au/j_birch/plugins/superfish/)

These menu options DO NOT appear if the user doesn't have privileges to access the functionality in question. This seems far more user friendly to me.
Attachments
jquery-superfish-menus-v1.txt
Patch
(222.23 KiB) Downloaded 545 times
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: jQuery Menus where inaccessible options are not shown

Post by shaunw »

These menu options DO NOT appear if the user doesn't have privileges to access the functionality in question. This seems far more user friendly to me.
Thanks for your contribution, however I'm confused by that statement.

The existing menu system does not allow access to functionality that users do not have permissions too. In some cases if the same web browser is used to switch between users with different permissions then the cache may need to be cleared for the menu to be updated, but even so the user cannot access areas of TimeTrex that they don't have permission to.

Could you please explain in more detail what your goal was when creating this patch.
joel
Posts: 11
Joined: Tue Dec 22, 2009 2:06 pm

Re: jQuery Menus where inaccessible options are not shown

Post by joel »

At least on my install, the menu item is available, but when you click it, the page comes up "Access Denied" or something like that. I figure why even give the user to click something they can't do?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: jQuery Menus where inaccessible options are not shown

Post by shaunw »

Yeah, that has nothing to do with the menu system, its the browsers cache.

Next time menu items appear that shouldn't, hold in the SHIFT key while pressing refresh/reload and they should immediately disappear.

TimeTrex used to be a little too aggressive in its caching, but this will be relaxed slightly in upcoming versions to hopefully reduce how often the above issues appears.
joel
Posts: 11
Joined: Tue Dec 22, 2009 2:06 pm

Re: jQuery Menus where inaccessible options are not shown

Post by joel »

That's great news Shaun. I presume there is little interest in changing, but the fade in / fade out's in the jquery superfish menu look a bit nicer and its not proprietary menuing code. Anyway, just wanted to post in case folks are interested in it.
joel
Posts: 11
Joined: Tue Dec 22, 2009 2:06 pm

Re: jQuery Menus where inaccessible options are not shown

Post by joel »

By the way, the code for this can be found here:

http://github.com/joelwreed/TimeTrex/tree/superfish
Locked