Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: How to hide some menu items
Khaled
Junior Member

Posts: 4
Registered: 3/19/2007
Location: Riyadh
Member Is Offline
posted on 3/19/2007 at 07:56 AM Reply With Quote
How to hide some menu items


In menu_items.js, I have add to sub menu items a third field which is the function code (F1 and F2):

var MENU_ITEMS = [
['Menu 1', null, null,
['Add Company', 'AddComp.jsp', 'F1'],
['Add User', 'AddUser.jsp', 'F2']
]
];

When the user log in the system, i get his function rights as an array. for example : user1 has the rights [F1,F3,F10]
So he dont have the right to access the function F2 (Add User)
I want to hide this menu item ['Add User', 'AddUser.jsp', 'F2']

What I'm trying to do is:
Check if the function field 'F2' exists in the rights array which i got from DB, it should be displayed, otherwise it should be hidden.
I go thru Menu.js and tryed to manage this issue but i could not!!

and if you another idia to manage it, please help me.

Thanks in advance :)
View User's Profile View All Posts By User U2U Member
Khaled
Junior Member

Posts: 4
Registered: 3/19/2007
Location: Riyadh
Member Is Offline
posted on 3/19/2007 at 11:52 AM Reply With Quote

I did this modification in
Menu.js >> menu_item(o_parent,n_order) >> line 275 (init downline recursively)

I access the function field 'F1' using : this.a_config[n_order][2]
Then I compare it whth user function rights elements

and by the way, in it's for loop I remove "-3" from the statment

it works fine :)
View User's Profile View All Posts By User U2U Member
madhan
Newbie

Posts: 1
Registered: 7/10/2007
Location: chennai
Member Is Offline
posted on 7/10/2007 at 07:26 AM Reply With Quote
explain


hai
i am haveing the same problem
but i am a beginer .plz send me the code and explain it
so it will help me a lot
thanks in advance


Quote:
Originally posted by Khaled
I did this modification in
Menu.js >> menu_item(o_parent,n_order) >> line 275 (init downline recursively)

I access the function field 'F1' using : this.a_config[n_order][2]
Then I compare it whth user function rights elements

and by the way, in it's for loop I remove "-3" from the statment

it works fine :)
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Tigra Menu
Product Demonstrations Live Demos:
Traditional Blue
White Steps
Inner HTML
All Together
Frames Targeting
Free Download Free Download
Free Download Menu Builders
Online Builder
Builder for Windows
Product Documentation Documentation:
Documenation Page
Change Log
Menus Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004