mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
49584d6efc
We now catch the hashchange event and use that to drive most of the site. To trigger page transitions, modify location.hash. Params start with # not ?. Removed user-group.inc. converted tabs to spaces trivial imlementation of add and details for netgroup and hostgroup lots of bug fixes based on routing problems and the refactorings.
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
function setupNetgroup(facet){
|
|
if (facet == "details"){
|
|
netgroupDetailsForm.setup();
|
|
}else if(facet == "add"){
|
|
netgroupBuilder.setup();
|
|
}else{
|
|
netgroupSearchForm.setup();
|
|
}
|
|
}
|
|
|
|
|
|
var netgroup_details_list =
|
|
[['identity', 'Netgroup Details', [
|
|
['cn', 'Netgroup Name'],
|
|
['description', 'Description'],
|
|
['nisdomainname', 'NIS Domain']]]];
|
|
|
|
|
|
var netgroupDetailsForm = new DetailsForm("netgroup",netgroup_details_list,"cn","sampledata/netgroupshow.json") ;
|
|
|
|
|
|
var netgroupAddProperties =
|
|
[{title: 'Netgroup Name', id: 'pkey', type: 'text'},
|
|
{title: 'Description', id: 'description', type: 'text'}];
|
|
|
|
|
|
function netgroupAddOptionsFunction (){
|
|
var options = {
|
|
name: $('#pkey').val(),
|
|
description: $('#description').val()
|
|
};
|
|
return options;
|
|
}
|
|
|
|
|
|
var netgroupBuilder = new EntityBuilder("netgroup",netgroupAddProperties,netgroupAddOptionsFunction);
|
|
|
|
|
|
var netgroupSearchColumns = [
|
|
{title:"Netgroup",column:"cn",render: function(current,cell){
|
|
renderPkeyColumn(netgroupDetailsForm, current,cell);
|
|
}},
|
|
{title:"Description", column:"description",render: renderSimpleColumn}];
|
|
|
|
var netgroupSearchForm =
|
|
new SearchForm("netgroup", "find", netgroupSearchColumns,"sampledata/netgrouplist.json");
|