summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-06-03 15:14:20 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-06-05 14:51:45 +0200
commitfae658f50566558ebdc579c4451e7307a041b4ee (patch)
tree98bcddcba4dd4ed37be8eeb3a8a147dcac6731ae
parente87c21ade2fada3786a0bf7d135238fd4e0dde2c (diff)
downloadfreeipa-fae658f50566558ebdc579c4451e7307a041b4ee.zip
freeipa-fae658f50566558ebdc579c4451e7307a041b4ee.tar.gz
freeipa-fae658f50566558ebdc579c4451e7307a041b4ee.tar.xz
Fix regression: missing facet tab group labels
Currently there is only empty space between facet tabs and facet title. It's a regression caused by recent refactoring. https://fedorahosted.org/freeipa/ticket/3688
-rw-r--r--install/ui/src/freeipa/entity.js23
-rw-r--r--install/ui/src/freeipa/facet.js2
2 files changed, 15 insertions, 10 deletions
diff --git a/install/ui/src/freeipa/entity.js b/install/ui/src/freeipa/entity.js
index 1896f90..22efd47 100644
--- a/install/ui/src/freeipa/entity.js
+++ b/install/ui/src/freeipa/entity.js
@@ -240,18 +240,23 @@ exp.entity_builder =IPA.entity_builder = function(entity) {
];
that.facet_group = function(spec) {
- spec.entity = entity;
- if (spec instanceof Object) {
- var factory = spec.$factory || IPA.facet_group;
- facet_group = factory(spec);
- } else {
- facet_group = IPA.facet_group({ name: spec });
- }
- if (facet_group.label == undefined) {
- facet_group.label = text.get('@i18n:facet_groups.'+facet_group.name);
+ if (typeof spec === 'string') {
+ spec = { name: spec };
}
+ var preop = function(spec) {
+
+ spec.entity = entity;
+ spec.label = spec.label || '@i18n:facet_groups.'+spec.name;
+ return spec;
+ };
+
+ var facet_group = builder.build('', spec, {}, {
+ $factory: IPA.facet_group,
+ $pre_ops: [preop]
+ });
+
entity.add_facet_group(facet_group);
return that;
diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js
index 80e8671..ad53b80 100644
--- a/install/ui/src/freeipa/facet.js
+++ b/install/ui/src/freeipa/facet.js
@@ -909,7 +909,7 @@ exp.facet_header = IPA.facet_header = function(spec) {
if (!data) return;
var result = data.result.result;
if (!that.facet.disable_facet_tabs) {
- var pkey = that.facet.pkey;
+ var pkey = that.facet.get_pkey();
var facet_groups = that.facet.entity.facet_groups.values;
for (var i=0; i<facet_groups.length; i++) {