From aa48d3b72efa4a9e285815c01ec89fc98ccaa22c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 17 Jan 2011 20:43:43 +0700 Subject: New certificate and Kerberos key status behavior. The status panel for certificates and Kerberos keys has been modified to display only the current status with the relevant buttons. New icons have been added to replace the red/yellow/green bullets. --- install/static/service.js | 58 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'install/static/service.js') diff --git a/install/static/service.js b/install/static/service.js index 62243c22..fb99b74d 100644 --- a/install/static/service.js +++ b/install/static/service.js @@ -274,45 +274,57 @@ function service_provisioning_status_widget(spec) { that.widget_create(container); - var table = $('', { - 'class': 'kerberos-key-status' + var dd = $('
', { + 'class': 'first' }).appendTo(container); - var tr = $('
').appendTo(table); + var div = $('
', { + 'class': 'kerberos-key-valid' + }).appendTo(dd); + + $('', { + src: 'check.png', + style: 'float: left;', + 'class': 'status-icon' + }).appendTo(div); - var td = $('
').appendTo(table); + div = $('
', { + name: 'kerberos-key-missing' + }).appendTo(dd); - td = $('
').appendTo(tr); - $('
', { - 'class': 'status-icon status-valid' - }).appendTo(td); + var content_div = $('
', { + style: 'float: left;' + }).appendTo(div); - td = $('
').appendTo(tr); - td.append('Kerberos Key Present, Service Provisioned:'); + content_div.append('Kerberos Key Present, Service Provisioned:'); - td = $('').appendTo(tr); + content_div.append(' '); $('', { 'type': 'button', 'name': 'unprovision', 'value': 'Delete Key, Unprovision' - }).appendTo(td); + }).appendTo(content_div); - tr = $('
').appendTo(tr); - $('
', { - 'class': 'status-icon status-missing' - }).appendTo(td); + $('', { + src: 'caution.png', + style: 'float: left;', + 'class': 'status-icon' + }).appendTo(div); - td = $('
').appendTo(tr); - td.append('Kerberos Key Not Present'); + content_div = $('
', { + style: 'float: left;' + }).appendTo(div); + + content_div.append('Kerberos Key Not Present'); }; that.setup = function(container) { that.widget_setup(container); - that.valid = $('.status-valid', that.container); - that.missing = $('.status-missing', that.container); + that.valid = $('div[name=kerberos-key-valid]', that.container); + that.missing = $('div[name=kerberos-key-missing]', that.container); var button = $('input[name=unprovision]', that.container); that.unprovision_button = IPA.button({ @@ -366,10 +378,8 @@ function service_provisioning_status_widget(spec) { }; function set_status(status) { - that.valid.toggleClass('status-valid-active', status == 'valid'); - that.missing.toggleClass('status-missing-active', status == 'missing'); - - that.unprovision_button.css('visibility', status == 'valid' ? 'visible' : 'hidden'); + that.valid.css('display', status == 'valid' ? 'inline' : 'none'); + that.missing.css('display', status == 'missing' ? 'inline' : 'none'); } return that; -- cgit