summaryrefslogtreecommitdiffstats
path: root/install/static/group.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-08-19 20:48:21 -0400
committerAdam Young <ayoung@redhat.com>2010-08-19 20:49:14 -0400
commit12ee9365a7a08c7a45887b98f17a44c64d7eb5f0 (patch)
tree838143295e68b8c8e334272a12e682708b427032 /install/static/group.js
parent9a160275351c5763209346466a331b06546ac0e0 (diff)
downloadfreeipa.git-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.gz
freeipa.git-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.xz
freeipa.git-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.zip
Changes the URL parsing from standard HTML params ( starting with ?)
to hash params ( starting with # ). User Details are now part of index.xhtml, ao one more .inc file has been removed. Updated commit to catch a few things that had been left out, including sampledata handling and updateing Makefile.am
Diffstat (limited to 'install/static/group.js')
-rw-r--r--install/static/group.js51
1 files changed, 41 insertions, 10 deletions
diff --git a/install/static/group.js b/install/static/group.js
index eddb272c..beb10879 100644
--- a/install/static/group.js
+++ b/install/static/group.js
@@ -68,29 +68,60 @@ function setupAddGroup(){
}
-function setupGroupDetails(){
+var group_details_list =
+ [['identity', 'Group Details', [
+ ['cn', 'Group Name'],
+ ['description', 'Description'],
+ ['gidnumber', 'Group ID']]]];
- $('#search').css("visibility","hidden");
- $('#content').css("visibility","visible");
- $('#content').load("group-details.inc");
- sampleData = "sampledata/groupshow.json";
+function setupGroupDetails(group){
+
+ window.location.hash="#tab=user&facet=details&pkey="+group;
+
+ //re initialize global parse of parameters
+ qs = ipa_parse_qs();
+
+ //TODO make this work for more than just user details
+ user_details_lists;
+
+ showDetails();
+
+ ipa_details_init('group');
+ ipa_details_create(group_details_list, $('#details'));
+ ipa_details_load(qs['pkey'], on_win, null, "sampledata/groupshow.json");
+ $('h1').text('Managing group: ' + group);
}
+
+
+function renderGroupDetails(group)
+{
+
+}
+
+
+function renderGroupDetailColumn(current,cell){
+
+ $("<a/>",{
+ href:"#tab=group&facet=details&pkey="+current.cn,
+ html: ""+ current[this.column],
+ click: function(){ setupGroupDetails(current.cn)},
+ }).appendTo(cell);
+}
+
+
function setupGroupSearch(){
var columns = [
- {title:"Group Name", column:"cn",render: function(current,cell){
- renderDetailColumn(current,cell,current[this.column],"group");
- }},
+ {title:"Group Name", column:"cn",render: renderGroupDetailColumn},
{title:"GID", column:"gidnumber",render: renderSimpleColumn},
{title:"Description", column:"description",render: renderSimpleColumn}
];
- var groupSearchForm = new SearchForm("group", "find", columns);
+ var groupSearchForm = new SearchForm("group", "find", columns,"sampledata/grouplist.json");
$("#query").unbind();
$("#query").click(function(){
- sampleData = "sampledata/grouplist.json";
executeSearch(groupSearchForm);
});
$("#new").unbind();