diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-12-01 14:51:39 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-02 12:14:07 -0500 |
commit | c0eb2b60c85dd686c96693e1a512986ba5b4306e (patch) | |
tree | a43a9cd445c0f14f6b30f7048fc93b5420dcebea /install/static/entity.js | |
parent | 620c085ebf96ba93a83c249e874060d669edbf28 (diff) | |
download | freeipa-c0eb2b60c85dd686c96693e1a512986ba5b4306e.tar.gz freeipa-c0eb2b60c85dd686c96693e1a512986ba5b4306e.tar.xz freeipa-c0eb2b60c85dd686c96693e1a512986ba5b4306e.zip |
Multicolumn enrollment dialog
The enrollment dialog has been modified to use scrollable tables that
supports multiple columns to display the search results and selected
entries. The columns are specified by calling create_adder_column()
on the association facet. By default the tables will use only one
column which is to display the primary keys.
The following enrollment dialogs have been modified to use multiple
columns:
- Group's member_user
- Service's managedby_host
- HBAC Service Group's member_hbacsvc
- SUDO Command Group's member_sudocmd
The ipa_association_table_widget's add() and remove() have been moved
into ipa_association_facet so they can be customized by facet's
subclass. The ipa_table's add_row() has been renamed to add_record().
Some old code has been removed from ipa_facet_create_action_panel().
The code was used to generate association links from a single facet.
It's no longer needed because now each association has its own facet.
The test data has been updated. The IPA.nested_tabs() has been fixed
to return the entity itself if IPA.tab_set is not defined. This is
needed to pass unit test.
Diffstat (limited to 'install/static/entity.js')
-rw-r--r-- | install/static/entity.js | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/install/static/entity.js b/install/static/entity.js index 9b62ce37..6e2b501b 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -377,6 +377,11 @@ IPA.nested_tabs = function(entity_name){ var siblings = []; + if (!IPA.tab_set) { + siblings.push(entity_name); + return siblings; + } + for (var top_tab_index = 0; top_tab_index < IPA.tab_set.length; top_tab_index += 1){ @@ -479,20 +484,7 @@ function ipa_facet_create_action_panel(container) { for (var i=1; i<entity.facets.length; i++) { other_facet = entity.facets[i]; other_facet_name = other_facet.name; - - if (other_facet.label) { - ul.append(build_link(other_facet,other_facet.label)); - } else { // For now empty label indicates an association facet - var attribute_members = IPA.metadata[entity_name].attribute_members; - for (var attribute_member in attribute_members) { - var other_entities = attribute_members[attribute_member]; - for (var j = 0; j < other_entities.length; j++) { - var other_entity = other_entities[j]; - var label = IPA.metadata[other_entity].label; - ul.append(build_link(other_facet,label,other_entity)); - } - } - } + ul.append(build_link(other_facet,other_facet.label)); } }else{ $('<li/>', { @@ -507,7 +499,7 @@ function ipa_facet_create_action_panel(container) { return false; } }).appendTo(ul); - } + } } /*When we land on the search page, disable all facets that require a pkey until one is selected*/ |