Use fixed font when displaying certificate.

The textareas used to display certificates were modified to use
fixed font.

Ticket #2017
This commit is contained in:
Endi Sukma Dewata 2012-01-31 11:31:22 -06:00 committed by Petr Voborník
parent 0c4500738b
commit 77f0e9aba5
2 changed files with 16 additions and 10 deletions

View File

@ -173,7 +173,7 @@ IPA.cert.download_dialog = function(spec) {
var that = IPA.dialog(spec); var that = IPA.dialog(spec);
that.width = spec.width || 500; that.width = spec.width || 500;
that.height = spec.height || 400; that.height = spec.height || 380;
that.add_pem_delimiters = typeof spec.add_pem_delimiters == 'undefined' ? true : spec.add_pem_delimiters; that.add_pem_delimiters = typeof spec.add_pem_delimiters == 'undefined' ? true : spec.add_pem_delimiters;
that.certificate = spec.certificate || ''; that.certificate = spec.certificate || '';
@ -188,8 +188,8 @@ IPA.cert.download_dialog = function(spec) {
that.create = function() { that.create = function() {
var textarea = $('<textarea/>', { var textarea = $('<textarea/>', {
readonly: 'yes', 'class': 'certificate',
style: 'width: 100%; height: 275px;' readonly: 'yes'
}).appendTo(that.container); }).appendTo(that.container);
var certificate = that.certificate; var certificate = that.certificate;
@ -438,7 +438,7 @@ IPA.cert.request_dialog = function(spec) {
var that = IPA.dialog(spec); var that = IPA.dialog(spec);
that.width = spec.width || 600; that.width = spec.width || 600;
that.height = spec.height || 450; that.height = spec.height || 480;
that.message = spec.message; that.message = spec.message;
that.request = spec.request; that.request = spec.request;
@ -470,7 +470,7 @@ IPA.cert.request_dialog = function(spec) {
that.container.append(that.message); that.container.append(that.message);
that.textarea = $('<textarea/>', { that.textarea = $('<textarea/>', {
style: 'width: 100%; height: 225px;' 'class': 'certificate'
}).appendTo(that.container); }).appendTo(that.container);
}; };
@ -732,16 +732,16 @@ IPA.cert.status_widget = function(spec) {
}; };
function set_status(status, revocation_reason) { function set_status(status, revocation_reason) {
that.status_valid.css('display', status == IPA.cert.CERTIFICATE_STATUS_VALID ? 'inline' : 'none'); that.status_valid.css('display', status == IPA.cert.CERTIFICATE_STATUS_VALID ? '' : 'none');
that.status_missing.css('display', status == IPA.cert.CERTIFICATE_STATUS_MISSING ? 'inline' : 'none'); that.status_missing.css('display', status == IPA.cert.CERTIFICATE_STATUS_MISSING ? '' : 'none');
if (!that.is_selfsign()) { if (!that.is_selfsign()) {
that.status_revoked.css('display', status == IPA.cert.CERTIFICATE_STATUS_REVOKED ? 'inline' : 'none'); that.status_revoked.css('display', status == IPA.cert.CERTIFICATE_STATUS_REVOKED ? '' : 'none');
that.revoke_button.css('display', status == IPA.cert.CERTIFICATE_STATUS_VALID ? 'inline' : 'none'); that.revoke_button.css('display', status == IPA.cert.CERTIFICATE_STATUS_VALID ? '' : 'none');
var reason = IPA.cert.CRL_REASON[revocation_reason]; var reason = IPA.cert.CRL_REASON[revocation_reason];
that.revocation_reason.html(revocation_reason === undefined || reason === null ? '' : IPA.messages.objects.cert[reason]); that.revocation_reason.html(revocation_reason === undefined || reason === null ? '' : IPA.messages.objects.cert[reason]);
that.restore_button.css('display', reason == 'certificate_hold' ? 'inline' : 'none'); that.restore_button.css('display', reason == 'certificate_hold' ? '' : 'none');
} }
} }

View File

@ -1058,6 +1058,12 @@ span.main-separator{
.strikethrough { text-decoration: line-through; } .strikethrough { text-decoration: line-through; }
textarea.certificate {
font-family: "Courier New";
width: 100%;
height: 250px;
}
table.certificate-status { table.certificate-status {
line-height: 2; line-height: 2;
} }