From af26018c0d469ecf4dc6a4edeae026087afc979f Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 6 Nov 2013 14:44:55 +0100 Subject: Status widgets icons https://fedorahosted.org/freeipa/ticket/3904 --- install/ui/src/freeipa/certificate.js | 74 ++++++++++++++--------------------- install/ui/src/freeipa/host.js | 72 ++++++++++++++++------------------ install/ui/src/freeipa/service.js | 32 +++++++-------- 3 files changed, 78 insertions(+), 100 deletions(-) (limited to 'install/ui/src') diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js index 5da1de81..bd9f7459 100755 --- a/install/ui/src/freeipa/certificate.js +++ b/install/ui/src/freeipa/certificate.js @@ -823,60 +823,44 @@ IPA.cert.status_widget = function(spec) { that.widget_create(container); - that.status_valid = $('
', { - name: 'certificate-valid', - style: 'display: none;' - }).appendTo(container); - - $('', { - src: 'images/check-icon.png', - style: 'float: left;', - 'class': 'status-icon' - }).appendTo(that.status_valid); - - var content_div = $('
', { - style: 'float: left;' - }).appendTo(that.status_valid); + that.status_valid = that.create_status('certificate-valid', + text.get('@i18n:objects.cert.valid'), + 'fa fa-check'); + that.status_valid.appendTo(container); - content_div.append(''+text.get('@i18n:objects.cert.valid')+''); + that.status_revoked = that.create_status('certificate-revoked', + text.get('@i18n:objects.cert.revoked'), + 'fa fa-warning'); + that.status_revoked.appendTo(container); - that.status_revoked = $('
', { - name: 'certificate-revoked', - style: 'display: none;' - }).appendTo(container); - - $('', { - src: 'images/caution-icon.png', - style: 'float: left;', - 'class': 'status-icon' + that.revocation_reason = $('', { + 'name': 'revocation_reason' }).appendTo(that.status_revoked); - content_div = $('
', { - style: 'float: left;' - }).appendTo(that.status_revoked); + that.status_missing = that.create_status('certificate-missing', + text.get('@i18n:objects.cert.missing'), + 'fa fa-warning'); + that.status_missing.appendTo(container); + }; - content_div.append(''+text.get('@i18n:objects.cert.revoked')+''); - content_div.append(' '); - that.revocation_reason = $('', { - 'name': 'revocation_reason' - }).appendTo(content_div); + that.create_status = function(name, text, icon) { - that.status_missing = $('
', { - name: 'certificate-missing', + var container = $('
', { + name: name, style: 'display: none;' + }); + + var status = $('