From 775fc23738d8a882bdd9cff9064b50594901e518 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 17 Nov 2010 22:15:09 -0500 Subject: batch init this batches together the calls to json_metadata, i18n_messages, and user-find [whoami] tostreamline the init process, and also allow us to add a call to enumerate the plugins. --- install/static/webui.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'install/static/webui.js') diff --git a/install/static/webui.js b/install/static/webui.js index bf367ee9..b588876a 100644 --- a/install/static/webui.js +++ b/install/static/webui.js @@ -53,20 +53,20 @@ var self_serv_tab_set = {name:'user', label:'Users', setup:ipa_entity_setup}]}]; -var ipa_whoami_pkey; /* main (document onready event handler) */ $(function() { - function whoami_on_win(data, text_status, xhr) { + + function init_on_win(data, text_status, xhr) { $(window).bind('hashchange', window_hashchange); - var whoami = data.result.result[0]; - ipa_whoami_pkey=whoami.uid[0]; + var whoami = IPA.whoami; + IPA.whoami_pkey=whoami.uid[0]; $('#loggedinas').find('strong').text(whoami.krbprincipalname[0]); $('#loggedinas a').fragment( - {'user-facet':'details', 'user-pkey':ipa_whoami_pkey},2); + {'user-facet':'details', 'user-pkey':IPA.whoami_pkey},2); for (var i=0; i