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.
This commit is contained in:
Endi S. Dewata
2011-04-07 16:14:58 -05:00
committed by Endi Sukma Dewata
parent f0f83a862e
commit 689fd30b52
9 changed files with 103 additions and 68 deletions

View File

@@ -27,15 +27,15 @@ IPA.entity_factories.service = function() {
return IPA.entity_builder().
entity('service').
facet(
IPA.search_facet().
column({name: 'krbprincipalname'}).
dialog(
IPA.service_add_dialog({
name: 'add',
title: IPA.messages.objects.service.add,
width: '450px'
}))).
search_facet({
columns: [ 'krbprincipalname' ]
}).
dialog({
factory: IPA.service_add_dialog,
name: 'add',
title: IPA.messages.objects.service.add,
width: '450px'
}).
details_facet({sections:[
{
name: 'details',
@@ -69,11 +69,12 @@ IPA.entity_factories.service = function() {
label: IPA.messages.objects.service.status
}]
}]}).
facet(IPA.service_managedby_host_facet({
name: 'managedby_host',
add_method: 'add_host',
remove_method: 'remove_host'
})).
facet({
factory: IPA.service_managedby_host_facet,
name: 'managedby_host',
add_method: 'add_host',
remove_method: 'remove_host'
}).
standard_association_facets().
build();
};