Re: [Freeipa-devel] [PATCH] Hash Params Redux

2010-08-19 Thread Pavel Zůna

On 2010-08-18 22:59, Adam Young wrote:

The patch replaces the earlier Hash Params patch.  It fixs the build
issues, and fixes the group details page as well.



Git still reports white space errors, but that's hardly a show stopper.

ACK.

Pavel

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Hash Params Redux

2010-08-19 Thread Adam Young

On 08/19/2010 06:41 PM, Pavel Zůna wrote:

On 2010-08-18 22:59, Adam Young wrote:

The patch replaces the earlier Hash Params patch.  It fixs the build
issues, and fixes the group details page as well.



Git still reports white space errors, but that's hardly a show stopper.

ACK.

Pavel



Removed white space errors and pushed to master

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

[Freeipa-devel] [PATCH] Hash Params Redux

2010-08-18 Thread Adam Young
The patch replaces the earlier Hash Params patch.  It fixs the build 
issues, and fixes the group details page as well.


From 3cdb647946c49463ad8c4119ca64e514f59a0a51 Mon Sep 17 00:00:00 2001
From: Adam Young ayo...@redhat.com
Date: Wed, 18 Aug 2010 16:55:26 -0400
Subject: [PATCH 1/2] 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
---
 install/static/Makefile.am   |2 -
 install/static/details.js|   11 +++--
 install/static/group-details.inc |   32 --
 install/static/group.js  |   51 ++
 install/static/index.xhtml   |   39 +++--
 install/static/ipa.css   |   14 +++---
 install/static/ipa.js|   21 -
 install/static/navigation.js |   46 +---
 install/static/search.js |   86 +
 install/static/user-details.inc  |   27 
 install/static/user.js   |   55 +---
 11 files changed, 217 insertions(+), 167 deletions(-)
 delete mode 100644 install/static/group-details.inc
 delete mode 100644 install/static/user-details.inc

diff --git a/install/static/Makefile.am b/install/static/Makefile.am
index 7625871..8e1dc1b 100644
--- a/install/static/Makefile.am
+++ b/install/static/Makefile.am
@@ -11,7 +11,6 @@ app_DATA =  \
 	ipa.css\
 	jquery.js			\
 	group.js 			\
-	group-details.inc		\
 	host.js 			\
 	hostgroup.js 			\
 	index.xhtml 			\
@@ -23,7 +22,6 @@ app_DATA =  \
 	details.js 			\
 	user.js 			\
 	user-add.inc 			\
-	user-details.inc		\
 	ipalogo.png			\
 	gray-fade-line.png		\
 	Mainnav-background.png		\
diff --git a/install/static/details.js b/install/static/details.js
index d47cfe8..bdfafc0 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -39,7 +39,7 @@ var _ipa_load_on_fail_callback = null;
 
 var ipa_details_cache = null;
 
-function ipa_details_load(pkey, on_win, on_fail)
+function ipa_details_load(pkey, on_win, on_fail,sampleData)
 {
 if (!pkey)
 	return;
@@ -49,8 +49,7 @@ function ipa_details_load(pkey, on_win, on_fail)
 
 ipa_cmd(
 	'show', [pkey], {all: true}, _ipa_load_on_win, _ipa_load_on_fail,
-	_ipa_obj_name
-);
+	_ipa_obj_name, sampleData );
 }
 
 function _ipa_load_on_win(data, text_status, xhr)
@@ -171,7 +170,9 @@ function ipa_details_create(dls, container)
 
 for (var i = 0; i  dls.length; ++i) {
 	var d = dls[i];
-	ipa_generate_dl(container.children('hr').last(), d[0], d[1], d[2]);
+
+	ipa_generate_dl($('#detail-lists hr').last(), d[0], d[1], d[2]);
+//	ipa_generate_dl($(#detail-lists), d[0], d[1], d[2]);
 }
 }
 
@@ -188,7 +189,6 @@ function ipa_generate_dl(jobj, id, name, dts)
 jobj = jobj.next();
 jobj.after(_ipa_dl_template.replace('I', id));
 jobj = jobj.next();
-jobj.after('hr /');
 
 for (var i = 0; i  dts.length; ++i) {
 	var label = '';
@@ -203,6 +203,7 @@ function ipa_generate_dl(jobj, id, name, dts)
 	_ipa_dt_template.replace('T', dts[i][0]).replace('N', label)
 	);
 }
+jobj.after('hr /');
 }
 
 /* HTML templates for ipa_details_display() */
diff --git a/install/static/group-details.inc b/install/static/group-details.inc
deleted file mode 100644
index 445042b..000
--- a/install/static/group-details.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-script type=text/javascript
-  $(document).ready(function(){ 
-  load_object($('body'),'group');
-  });
-/script
-h1Managing group:/h1
-div id=buttons
-  a href=dummyimg id=butreset src=but-reset.png alt=Reset //a
-  a href=dummyimg id=butupdate src=but-update.png alt=Update //a
-/div
-ul id=viewtype
-  li id=viewcaptionView:/li
-  li
-img src=but-selected.png alt= /
-Personal Details
-  /li
-  li
-img src=but-unselected.png alt= /
-a href=memberof?pkey=${pkey}Memberships/a
-  /li
-/ul
-hr /
-
-h2 onclick=h2_on_click(this)#8722; Group Details/h2
-dl id=identity class=entryattrs
-  dt title=cnGroup Name:/dt
-  dt title=descriptionDescription:/dt
-  dt title=gidnumberGID/dt
-/dl
-hr /
-
-
diff --git a/install/static/group.js b/install/static/group.js
index eddb272..88fd13d 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){
+
+