From 5da8313b668340494f06afe6d3459f368948588f Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 16 Nov 2010 18:10:40 -0600 Subject: Service and Host Provisioning The service and host details pages have been modified to display Kerberos key provisioning status and to provide a way to unprovision. The host enrollment via OTP has not been implemented yet. The ipa_details_field has been modified to remove any old
tags it created in the previous load operation. This is to support other widgets that need to perform load operation without removing
tags. The certificate_status_panel has been converted into a widget. The host entity has been rewritten using the new framework. The unit tests has been updated. --- install/static/user.js | 56 ++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 25 deletions(-) (limited to 'install/static/user.js') diff --git a/install/static/user.js b/install/static/user.js index 74c003e5..2a9bc7d0 100644 --- a/install/static/user.js +++ b/install/static/user.js @@ -26,7 +26,7 @@ ipa_entity_set_search_definition('user', [ ['uidnumber', 'UID', null], ['mail', 'EMAIL', null], ['telephonenumber', 'Phone', null], - ['title', 'Job Title', null], + ['title', 'Job Title', null] ]); ipa_entity_set_add_definition('user', [ @@ -89,10 +89,13 @@ ipa_entity_set_association_definition('user', { function user_status_load(container, result) { - var lock_field = 'nsaccountlock'; - var dt = $('dt[title='+this.name+']', container); - if (!dt.length) return; + $('dd', container).remove(); + + var dd = ipa_create_first_dd(this.name); + dd.appendTo(container); + + var lock_field = 'nsaccountlock'; var locked = result[lock_field] && result[lock_field][0].toLowerCase() === 'true'; @@ -134,8 +137,7 @@ function user_status_load(container, result) { return (false); } }); - - dt.after(ipa_create_first_dd(this.name, status_field)); + status_field.appendTo(dd); } @@ -191,17 +193,20 @@ function resetpwd_on_click(){ } function user_password_load(container, result) { - var dt = $('dt[title='+this.name+']', container); - if (!dt.length) return; - - dt.after(ipa_create_first_dd( - this.name, - $('',{ - href:"jslink", - click:resetpwd_on_click, - title:'userpassword', - text: 'reset password' - }))); + + $('dd', container).remove(); + + var dd = ipa_create_first_dd(this.name); + dd.appendTo(container); + + var link = $('',{ + href:"jslink", + click:resetpwd_on_click, + title:'userpassword', + text: 'reset password' + }); + link.appendTo(dd); + } var select_temp = ''; @@ -215,17 +220,18 @@ var states = [ 'WA', 'WV', 'WI', 'WY', '' ]; function user_state_load(container, result) { - var dt = $('dt[title='+this.name+']', container); - if (!dt.length) return; - var next = dt.next(); - next.css('clear', 'none'); - next.css('width', '70px'); + $('dd', container).remove(); + + //var next = dt.next(); + //next.css('clear', 'none'); + //next.css('width', '70px'); - var dd = ipa_create_first_dd(this.name, select_temp); - dt.after(dd); + var dd = ipa_create_first_dd(this.name); + dd.append(select_temp); + dd.appendTo(container); - var sel = dt.next().children().first(); + var sel = dd.children().first(); for (var i = 0; i < states.length; ++i) sel.append(option_temp.replace(/V/g, states[i])); -- cgit