diff options
author | Adam Young <ayoung@redhat.com> | 2010-09-24 10:47:40 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-09-24 20:51:09 -0400 |
commit | 65b455edf97742a922e51a5d81001ce106ec0043 (patch) | |
tree | a43801c7a90fc367947a7f7cd9f28a6326697e02 /install/static/webui.js | |
parent | 346615d4a0029fb3f59344a98963b7fea8356b8c (diff) | |
download | freeipa.git-65b455edf97742a922e51a5d81001ce106ec0043.tar.gz freeipa.git-65b455edf97742a922e51a5d81001ce106ec0043.tar.xz freeipa.git-65b455edf97742a922e51a5d81001ce106ec0043.zip |
Whoami link
The 'logged in as' message in the header into an active hypoerlink that loads the details page for the current user.
Also fixed a bug where, when reloading, the search page would fail due to scl being undefined.
Fixed a typo
replaced {'user-facet':'details', 'pkey':whoami_pkey},2);
with {'user-facet':'details', 'user-pkey':whoami_pkey},2);
Diffstat (limited to 'install/static/webui.js')
-rw-r--r-- | install/static/webui.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/install/static/webui.js b/install/static/webui.js index 09ed7092..1a37aaa3 100644 --- a/install/static/webui.js +++ b/install/static/webui.js @@ -37,7 +37,7 @@ var admin_tabs_lists = [ ]; -var self_serv_tabs_lists = +var self_serv_tabs_lists = [ ['identity', 'IDENTITY', [ ['user', 'Users', ipa_entity_setup]]]]; @@ -47,11 +47,16 @@ var nav_tabs_lists; /* main (document onready event handler) */ $(function() { + var whoami_pkey; + function whoami_on_win(data, text_status, xhr) { $(window).bind('hashchange', window_hashchange); if (!data.error){ var whoami = data.result.result[0]; + whoami_pkey=whoami.uid[0]; $('#loggedinas').find('strong').text(whoami.krbprincipalname[0]); + $('#loggedinas a').fragment( + {'user-facet':'details', 'user-pkey':whoami_pkey},2); if (whoami.hasOwnProperty('memberof_rolegroup') && whoami.memberof_rolegroup.length > 0){ nav_tabs_lists = admin_tabs_lists; @@ -59,7 +64,7 @@ $(function() { }else{ nav_tabs_lists = self_serv_tabs_lists; - var state = {'user-pkey': whoami.uid[0], + var state = {'user-pkey':whoami_pkey , 'user-facet': jQuery.bbq.getState('user-facet') || 'details'}; $.bbq.pushState(state); |