freeipa/install/static/group.js
Adam Young 125bd09faf The Javascript code for the new web UI
Now with whitespace cleanup.
2010-08-06 11:55:38 -04:00

42 lines
980 B
JavaScript

function setupGroup(facet){
if (facet == "details"){
setupGroupDetails();
}else{
setupGroupSearch();
}
}
function setupGroupDetails(){
$('#search').css("visibility","hidden");
$('#content').css("visibility","visible");
$('#content').load("group-details.inc");
sampleData = "sampledata/groupshow.json";
}
function setupGroupSearch(){
var columns = [
{title:"Group Name", column:"cn",render: function(current,cell){
renderDetailColumn(current,cell,current[this.column],"group");
}},
{title:"GID", column:"gidnumber",render: renderSimpleColumn},
{title:"Description", column:"description",render: renderSimpleColumn}
];
var groupSearchForm = new SearchForm("group", "find", columns);
$("#query").unbind();
$("#query").click(function(){
sampleData = "sampledata/grouplist.json";
executeSearch(groupSearchForm);
});
$("#new").unbind();
$("#new").click( function() {
alert("New Group...");
});
}