summaryrefslogtreecommitdiffstats
path: root/install/ui/search.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-04-07 16:14:58 -0500
committerEndi Sukma Dewata <edewata@people01.fedoraproject.org>2011-04-11 16:03:37 +0000
commit689fd30b522c1bb77bb6e087bdfca940553fe495 (patch)
tree7a95153df1983c3384e4f0a3957723da5d73fad8 /install/ui/search.js
parentf0f83a862eee908c308c25561a18f8b1e218c081 (diff)
downloadfreeipa-689fd30b522c1bb77bb6e087bdfca940553fe495.tar.gz
freeipa-689fd30b522c1bb77bb6e087bdfca940553fe495.tar.xz
freeipa-689fd30b522c1bb77bb6e087bdfca940553fe495.zip
Refactored builder interface.
The IPA.entity_builder has been modified to take a 'factory' parameter in custom facet's and custom dialog's spec. The IPA.dialog has been modified to take an array of fields in the spec. The IPA.search_facet has been modified to take an array of columns in the spec.
Diffstat (limited to 'install/ui/search.js')
-rw-r--r--install/ui/search.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/install/ui/search.js b/install/ui/search.js
index bd2c0f166..ad74b812a 100644
--- a/install/ui/search.js
+++ b/install/ui/search.js
@@ -410,6 +410,16 @@ IPA.search_facet = function(spec) {
that.search_facet_create_content = that.create_content;
that.search_facet_setup = that.setup;
+ var columns = spec.columns || [];
+ for (var i=0; i<columns.length; i++) {
+ var column = columns[i];
+ if (column instanceof Object) {
+ var factory = column.factory || IPA.column;
+ that.add_column(factory(column));
+ } else {
+ that.create_column({ name: column });
+ }
+ }
return that;
};