The status formatter was modified to show enabled/disabled icon
before the status text.
The format classes were renamed to formatter to avoid confusion
with the format() method. A new parameter 'type' was added to the
formatter to determine the output type (e.g. text/html).
Ticket #1996
--
Endi S. Dewata
From e3eadbaa6f0d4eb2aeca4f47662152a9523fa4ef Mon Sep 17 00:00:00 2001
From: Endi Sukma Dewata edew...@redhat.com
Date: Tue, 31 Jan 2012 09:57:33 -0600
Subject: [PATCH] Added icons for status column.
The status formatter was modified to show enabled/disabled icon
before the status text.
The format classes were renamed to formatter to avoid confusion
with the format() method. A new parameter 'type' was added to the
formatter to determine the output type (e.g. text/html).
Ticket #1996
---
install/ui/dns.js |2 +-
install/ui/facet.js|2 +-
install/ui/hbac.js |2 +-
install/ui/hbactest.js | 12 ++--
install/ui/host.js |6 +++---
install/ui/ipa.css | 12
install/ui/rule.js |2 +-
install/ui/selinux.js |2 +-
install/ui/sudo.js |2 +-
install/ui/user.js |2 +-
install/ui/widget.js | 45 +
11 files changed, 61 insertions(+), 28 deletions(-)
diff --git a/install/ui/dns.js b/install/ui/dns.js
index 65c331f5b70b563655f7be9f2e3c59376c36788f..edd9274c671fe5f3b542502c27d9dbd5025da1fc 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -51,7 +51,7 @@ IPA.dns.zone_entity = function(spec) {
{
name: 'idnszoneactive',
label: IPA.messages.status.label,
-format: IPA.boolean_status_format()
+formatter: IPA.boolean_status_formatter()
}
]
}).
diff --git a/install/ui/facet.js b/install/ui/facet.js
index 150c3e8faad29381372c31358ea928db14c0be0c..6247ebde632a3467e6743a755bc8f250c97b03a0 100644
--- a/install/ui/facet.js
+++ b/install/ui/facet.js
@@ -628,7 +628,7 @@ IPA.table_facet = function(spec) {
var value = record[attribute];
var column = that.table.get_column(attribute);
-if (column.format) value = column.format.parse(value);
+if (column.formatter) value = column.formatter.parse(value);
that.table.set_row_enabled(tr, value);
};
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index bff2af30c82a7ad0cff77dcc024c6ca6144b4c78..6bd63d4ecb6a2f1071385a93f0e5edf792604792 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -44,7 +44,7 @@ IPA.hbac.rule_entity = function(spec) {
{
name: 'ipaenabledflag',
label: IPA.messages.status.label,
-format: IPA.boolean_status_format()
+formatter: IPA.boolean_status_formatter()
},
'description'
]
diff --git a/install/ui/hbactest.js b/install/ui/hbactest.js
index e9b02a14ca0670949f1a7faead70b44f262a3c37..0e77083cafcd6a61170bf347fe9c5e428366eae3 100644
--- a/install/ui/hbactest.js
+++ b/install/ui/hbactest.js
@@ -51,7 +51,7 @@ IPA.hbac.test_entity = function(spec) {
{
name: 'nsaccountlock',
label: IPA.messages.status.label,
-format: IPA.boolean_status_format({
+formatter: IPA.boolean_status_formatter({
invert_value: true
})
}
@@ -70,7 +70,7 @@ IPA.hbac.test_entity = function(spec) {
{
name: 'has_keytab',
label: IPA.messages.objects.host.enrolled,
-format: IPA.boolean_format()
+formatter: IPA.boolean_formatter()
}
]
}).
@@ -99,7 +99,7 @@ IPA.hbac.test_entity = function(spec) {
{
name: 'has_keytab',
label: IPA.messages.objects.host.enrolled,
-format: IPA.boolean_format()
+formatter: IPA.boolean_formatter()
}
]
}).
@@ -116,7 +116,7 @@ IPA.hbac.test_entity = function(spec) {
{
name: 'ipaenabledflag',
label: IPA.messages.status.label,
-format: IPA.boolean_status_format()
+formatter: IPA.boolean_status_formatter()
},
'description'
]
@@ -134,12 +134,12 @@ IPA.hbac.test_entity = function(spec) {
{
name: 'matched',
label: IPA.messages.objects.hbactest.matched,
-format: IPA.boolean_format()
+formatter: IPA.boolean_formatter()
},
{
name: 'ipaenabledflag',
label: