diff options
author | Adam Young <ayoung@redhat.com> | 2010-08-06 10:01:44 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-08-06 11:55:38 -0400 |
commit | 125bd09faf21411fafda01e76989b4856bbd267c (patch) | |
tree | b9e2ad70165154f95463f6a69dc5d62de5821f87 /install/static/group.js | |
parent | a63fd83e890ed4f2ec3f0cd0f96f0a329698796a (diff) | |
download | freeipa-125bd09faf21411fafda01e76989b4856bbd267c.tar.gz freeipa-125bd09faf21411fafda01e76989b4856bbd267c.tar.xz freeipa-125bd09faf21411fafda01e76989b4856bbd267c.zip |
The Javascript code for the new web UI
Now with whitespace cleanup.
Diffstat (limited to 'install/static/group.js')
-rw-r--r-- | install/static/group.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/install/static/group.js b/install/static/group.js new file mode 100644 index 00000000..e1aa701b --- /dev/null +++ b/install/static/group.js @@ -0,0 +1,41 @@ +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..."); + }); + + +} |