From 55e9d2db7d69d1767f73ecfea051aefd5d72af4f Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edewata@redhat.com>
Date: Thu, 13 Jan 2011 17:20:12 +0700
Subject: [PATCH] Certificate and Kerberos key status adjustments.

The OTP field has been moved into a separate row to avoid line
wrapping. The line height inside tables has been increased to
avoid overlapping buttons in certificate status panel.
---
 install/static/certificate.js |    8 +++++++-
 install/static/host.js        |   14 ++++++++++++--
 install/static/ipa.css        |   11 +++++++++++
 install/static/service.js     |    4 +++-
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/install/static/certificate.js b/install/static/certificate.js
index 5d4313ef16ae2afe29d721a0a27f0dc52288eac7..27ed56cc624517d7ea6026e16de72c1139b035f8 100755
--- a/install/static/certificate.js
+++ b/install/static/certificate.js
@@ -411,7 +411,9 @@ function certificate_status_widget(spec) {
 
         that.widget_create(container);
 
-        var table = $('<table/>').appendTo(container);
+        var table = $('<table/>', {
+            'class': 'certificate-status'
+        }).appendTo(container);
 
         var tr = $('<tr/>').appendTo(table);
 
@@ -432,12 +434,16 @@ function certificate_status_widget(spec) {
             'value': 'Get'
         }).appendTo(td);
 
+        td.append(' ');
+
         if (!that.is_selfsign()) {
             $('<input/>', {
                 'type': 'button',
                 'name': 'revoke',
                 'value': 'Revoke'
             }).appendTo(td);
+
+            td.append(' ');
         }
 
         $('<input/>', {
diff --git a/install/static/host.js b/install/static/host.js
index be96d79a962035153fd7d3dafb1b7c32cdcc013b..11f70730800672206652f43ed1e181418946bbc8 100644
--- a/install/static/host.js
+++ b/install/static/host.js
@@ -214,7 +214,9 @@ function host_provisioning_status_widget(spec) {
 
         that.widget_create(container);
 
-        var table = $('<table/>').appendTo(container);
+        var table = $('<table/>', {
+            'class': 'kerberos-key-status'
+        }).appendTo(container);
 
         var tr = $('<tr/>').appendTo(table);
 
@@ -255,12 +257,20 @@ function host_provisioning_status_widget(spec) {
 
         td = $('<td/>').appendTo(tr);
 
+        tr = $('<tr/>').appendTo(table);
+
+        td = $('<td/>').appendTo(tr);
+
+        td = $('<td/>').appendTo(tr);
+
         $('<input/>', {
             'type': 'text',
             'name': 'otp',
-            'size': 10
+            'class': 'otp'
         }).appendTo(td);
 
+        td = $('<td/>').appendTo(tr);
+
         $('<input/>', {
             'type': 'button',
             'name': 'enroll',
diff --git a/install/static/ipa.css b/install/static/ipa.css
index 38b68dd0572ab47ee4d99f71ab7010b0d0de943f..a63e60e810e2d7f976b4c57391fed5e87c81da90 100644
--- a/install/static/ipa.css
+++ b/install/static/ipa.css
@@ -215,6 +215,10 @@ dl.entryattrs input {
     min-width: 27.5em;
 }
 
+dl.entryattrs input.otp {
+    min-width: 15em;
+    width: 98%;
+}
 
 span.attrhint {
     font-size: 8pt;
@@ -589,6 +593,13 @@ a.action-button-disabled {
 
 .strikethrough { text-decoration: line-through; }
 
+table.certificate-status {
+    line-height: 2;
+}
+
+table.kerberos-key-status {
+    line-height: 2;
+}
 
 .status-icon {
     width: 0.5em;
diff --git a/install/static/service.js b/install/static/service.js
index 12387b3f134112252450025d6bc115057e8227b5..e2d68d788049ddac1f416b330b055e358ebaf1d6 100644
--- a/install/static/service.js
+++ b/install/static/service.js
@@ -266,7 +266,9 @@ function service_provisioning_status_widget(spec) {
 
         that.widget_create(container);
 
-        var table = $('<table/>').appendTo(container);
+        var table = $('<table/>', {
+            'class': 'kerberos-key-status'
+        }).appendTo(container);
 
         var tr = $('<tr/>').appendTo(table);
 
-- 
1.6.6.1