From 9405e1a9db11294a11efa24a7a3c36ea76a42f31 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 4 Nov 2011 20:43:39 -0500 Subject: Added paging on search facet. The search facet has been modified to support paging on most entities using the --pkey-only option to get the primary keys and a batch command to get the complete records. Paging on DNS records is not supported because a record may appear as multiple rows. The following entities do not have --pkey-only option: Automount Key, Self-Service Permissions, Delegation. The search and association facet have been refactored to reuse the common code from the table facet base class. Ticket #981 --- install/ui/search.js | 131 ++++++++++++++++++--------------------------------- 1 file changed, 45 insertions(+), 86 deletions(-) (limited to 'install/ui/search.js') diff --git a/install/ui/search.js b/install/ui/search.js index a8f897ab..493edb7f 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -38,66 +38,27 @@ IPA.search_facet = function(spec) { var that = IPA.table_facet(spec); - that.search_all = spec.search_all || false; - that.selectable = spec.selectable; - function get_values() { return that.table.get_selected_values(); } that.get_values = spec.get_values || get_values; - function initialize_table_columns(){ + var init = function() { + that.managed_entity = IPA.get_entity(that.managed_entity_name); - var entity = that.managed_entity; - - that.table = IPA.table_widget({ - 'class': 'content-table', - name: 'search', - label: entity.metadata.label, - entity: entity, - search_all: that.search_all, - scrollable: true, - selectable: that.selectable - }); var columns = that.columns.values; for (var i=0; i