From 125bd09faf21411fafda01e76989b4856bbd267c Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 6 Aug 2010 10:01:44 -0400 Subject: The Javascript code for the new web UI Now with whitespace cleanup. --- install/static/group.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 install/static/group.js (limited to 'install/static/group.js') 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..."); + }); + + +} -- cgit