freeipa/install/static/netgroup.js
Adam Young 49584d6efc hashchange
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.
2010-08-26 13:15:00 -04:00

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");