diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-12-07 12:17:12 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-07 17:54:04 -0500 |
commit | deb94b150dc48d3af2a461e7d325f7c68cceefef (patch) | |
tree | c63fbb43db12a3c3b0de65e482af17ef17622bc6 /install/static/entity.js | |
parent | 9e5fdcb3a4af41282e72d314b65341d9aa209e23 (diff) | |
download | freeipa-deb94b150dc48d3af2a461e7d325f7c68cceefef.tar.gz freeipa-deb94b150dc48d3af2a461e7d325f7c68cceefef.tar.xz freeipa-deb94b150dc48d3af2a461e7d325f7c68cceefef.zip |
Navigation updates
The entity.default_facet has been removed, instead the first facet
registered to the entity will be considered as the default facet.
So, the 'setup' parameter has been removed from tab definitions
because it's no longer necessary. The ipa_details_only_setup() has
been removed as well.
An 'entity' parameter has been added to tab definitions to specify
which entity corresponds to a tab item. The tab label has been
changed to use entity label if available.
Some hard-coded labels have been removed. The unit tests have been
updated.
Diffstat (limited to 'install/static/entity.js')
-rw-r--r-- | install/static/entity.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/install/static/entity.js b/install/static/entity.js index 9372d917..340490ac 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -189,6 +189,10 @@ function ipa_entity(spec) { that.init = function() { + if (!that.label) { + that.label = IPA.metadata[that.name].label; + } + if (that.autogenerate_associations) { that.create_association_facets(); } @@ -332,12 +336,12 @@ function ipa_entity_set_facet_definition(entity_name, list) { } } -function ipa_details_only_setup(container){ - ipa_entity_setup.call(this, container, 'details'); -} - function ipa_current_facet(entity){ - return $.bbq.getState(entity.name + '-facet', true) || entity.default_facet || 'search'; + var facet_name = $.bbq.getState(entity.name + '-facet', true); + if (!facet_name && entity.facets.length) { + facet_name = entity.facets[0].name; + } + return facet_name; } function ipa_entity_setup(container) { |