[xwiki-notifications] r5591 - in xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross: . css css/lightbox icons scripts scripts/lightbox

tmortagne (SVN) notifications at xwiki.org
Thu Nov 1 10:34:22 CET 2007


Author: tmortagne
Date: 2007-11-01 10:34:22 +0100 (Thu, 01 Nov 2007)
New Revision: 5591

Added:
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/addnewgroup.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adduorg.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/css/lightbox/
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/css/lightbox/lightbox.css
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deletegroupmember.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deleteuorg.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/edituser.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroupmembers.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroups.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusers.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusersandgroups.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/icons/ajax-loader.gif
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/registeruser.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/saverights.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/lightbox.js
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/uorgsuggest.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.css
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js
Modified:
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminglobalrights.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/admingroups.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminmodes.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminspacerights.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminusers.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editrights.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/global.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/javascript.vm
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/style.css
   xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/xwikivars.vm
Log:
XWIKI-1780: Improve rights management

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/addnewgroup.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/addnewgroup.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/addnewgroup.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,9 @@
+<div>
+<span>Create new group </span>
+<form method="post">
+<div>
+<input type="text" name="newgroup" value="" />
+<input type="submit" value="Create Group" onclick="new Ajax.Request('$xwiki.getURL("XWiki.__groupname__", "save", "template=XWiki.XWikiGroupTemplate")'.replace('__groupname__', this.form.newgroup.value), {asynchronous: false}); window.lb.lbSaveForm();" />
+</div>
+</form>
+</div>
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adduorg.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adduorg.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adduorg.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,30 @@
+$response.setContentType("application/x-json")
+#set($uorg = $request.get("uorg"))
+#set($fullname = $request.get("name"))
+
+#if($uorg == "user")
+  ## verify if the user is already in the group
+  #set($exists = "$!doc.getObject('XWiki.XWikiGroups', 'member', $fullname)")
+  #if($exists == "")
+    1
+    #set($obj = $doc.newObject("XWiki.XWikiGroups"))
+    $obj.set("member", $fullname)
+    #set($discard = $doc.save())
+  #else 0
+  #end
+  
+#else ## group add
+  #set($users = $xwiki.rightsmanager.getAllMembersNamesForGroup($fullname))
+  #set($nr = 0)
+  #foreach($user in $users)
+    #set($exists = "$!doc.getObject('XWiki.XWikiGroups', 'member', $user)")
+    #if($exists == "")
+       #set($nr = $nr + 1)
+       #set($obj = $doc.newObject("XWiki.XWikiGroups"))
+       $obj.set("member", $user)
+    #end
+  #end
+  #set($discard = $doc.save())
+## return the number
+  $nr
+#end
\ No newline at end of file

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminglobalrights.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminglobalrights.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminglobalrights.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -1,10 +1,96 @@
 #set($formname = "update")
 #set($saveaction = "save")
+#set($interface = "$!request.get('interface')")
+<div id="xwikieditcontent">
+## switch between the new and the old interface
+<select name="switchInterface" onchange="if(this.options[this.selectedIndex].value=='new') { location='?editor=globalrights&amp;space=${doc.space}&amp;interface=new';  } else if(this.options[this.selectedIndex].value=='stable') { location='?editor=globalrights&amp;space=${doc.space}&amp;interface=stable';  } ">
+<option value="choose" #if($interface == "") selected="selected" #end>Switch interface</option>
+<option value="new" #if($interface == "new") selected="selected" #end>New Interface</option>
+<option value="stable" #if($interface == "stable") selected="selected" #end>Stable Interface</option>
+</select>
+#if($interface == "new")
+#if($doc.fullName == "XWiki.XWikiPreferences")
+#if($request.editor == "globalrights")   
+#set($clsname = "XWiki.XWikiGlobalRights")
+#else                                    
+#set($clsname = "XWiki.XWikiRights")
+#end
+#elseif($doc.name == "WebPreferences")  
+#if($request.editor == "spacerights")
+#set($clsname = "XWiki.XWikiGlobalRights")
+#else
+#set($clsname = "XWiki.XWikiRights")  
+#end
+#end
+#set($url = "?xpage=getusersandgroups")
+<div id="wrapper" style="display: none;">
+<div id="ajax-loader">Loading...<br />
+  <img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..." title="Loading..." />
+</div>
+<table cellpadding="0" cellspacing="5" id="usersandgroupstable">
+<tr>
+    <td colspan="2">
+      <select name="uorg" style="width: 130px;">
+        <option value="groups" selected="selected">Groups</option>
+        <option value="users">Users</option>
+        </select>&nbsp;<span id="showLimits"></span>
+    </td>
+</tr>
+<tr><td valign="top" style="width:100%">
+      <table border="0" cellpadding="2" cellspacing="0" width="100%" class="display">
+       <thead class="theader">
+          <tr><td class="huorgname">Group or User</td>
+              <td class="rights">View</td>
+              <td class="rights">Comment</td>
+              <td class="rights">Edit</td>
+	      <td class="rights">Delete</td>
+              <td class="rights">Register</td>
+              <td class="rights">Admin</td>
+              ## if global rights and main wiki show programming right column
+              #set($hasPrgr = ($doc.fullName=='XWiki.XWikiPreferences' && $context.database=='xwiki'))
+              #if($hasPrgr)<td class="programmingr">Program</td> #end
+              <td class="huorgmanage" id="huorgmanage">Manage<img src="$xwiki.getSkinFile('icons/rights-manager/filter.png')" alt="Filters" title="Filters" /></td>
+          </tr>
+          <tr id="table-filters">
+              <td class="fuorgname">
+                <input name="name" type="text" />
+                <input name="progr" type="hidden" value="#if($hasPrgr) true #else false #end" />
+                <input name="admin" type="hidden" value="true" />
+                <input name="reg" type="hidden" value="true" />
+                <input type="hidden" name="clsname" value="$clsname" />
+              </td>
+              <td class="uorgwikiname">
+                #if($context.database != "xwiki") #set($mainwk = false) #else #set($mainwk = true) #end
+                #if(!$mainwk)
+                <select name="wiki">
+                  <option value="local" selected="selected">Local</option>
+                  <option value="global">Global</option>
+                  <option value="both">Both</option>
+                </select>
+                #else <input type="hidden" value="local" name="wiki" /> #end
+              </td>
+              <td colspan="5"></td>#if($hasPrgr)<td></td>#end<td></td>
+          </tr>
+       </thead>
+       <tbody id="display1"><tr><td>&nbsp;</td></tr></tbody>
+      </table></td>
+    <td valign="top">
+      <div id="scrollbar1" class="scrollbar"><div class="inscrollbar">&nbsp;</div></div>
+    </td>
+    <td id="buff"></td>
+</tr>
+</table>
+</div>
+<script type="text/javascript">
+   $('wrapper').style.display = "block";
+   var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "usersandgroupstable", displayUsersAndGroups, true); 
+   Event.observe($('huorgmanage'), 'click', showHideFilters(ta));
+</script>
+#else
 #set ($classname = "XWiki.XWikiGlobalRights")
 #set( $class = $xwiki.getDocument($classname).xWikiClass)
 #set( $redirect = "$xwiki.getRequestURL()&amp;editor=rights")
 <form id="update" method="post" action="$doc.getURL("save")" onsubmit="cancelCancelEdit()">
-<div id="xwikieditcontent">
 <div style="overflow:auto">
 <div>
 <div class="hidden">
@@ -32,6 +118,7 @@
   </table>
 </div> ## noname
 </div> ## overflow
-</div> ## xwikieditcontent
 <div class="bottombuttons">#template("adminactions.vm")</div>
-</form>
\ No newline at end of file
+</form>
+#end
+</div>
\ No newline at end of file

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/admingroups.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/admingroups.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/admingroups.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -1,7 +1,68 @@
 #set($formname = "update")
 #set($saveaction = "save")
+#set($interface = "$!request.get('interface')")
+<div id="xwikieditcontent">
+#set($url = "?xpage=getgroups")
+## switch between the new and the old interface
+<select name="switchInterface" onchange="if(this.options[this.selectedIndex].value=='new') { location='?editor=groups&amp;space=XWiki&amp;interface=new';  } else if(this.options[this.selectedIndex].value=='stable') { location='?editor=groups&amp;space=XWiki&amp;interface=stable';  } ">
+<option value="choose" #if($interface == "") selected="selected" #end>Switch interface</option>
+<option value="new" #if($interface == "new") selected="selected" #end>New Interface</option>
+<option value="stable" #if($interface == "stable") selected="selected" #end>Stable Interface</option>
+</select>
+#if($interface == "new")
+<div id="wrapper" style="display: none;">
+<div id="ajax-loader">Loading...<br />
+  <img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..." title="Loading..." />
+</div>
+<table cellpadding="0" cellspacing="5" id="groupstable">
+<tr><td colspan="2" id="showLimits"></td></tr>
+<tr><td valign="top" style="width:800px">
+      <table border="0" cellpadding="2" cellspacing="0" width="100%" class="display">
+      <thead class="theader">
+          <tr>
+                  <td class="hgroupname">Groupname</td>
+              <td class="groupmembers">Members</td>
+              <td class="hgroupmanage" id="hgroupmanage">Filter<img src="$xwiki.getSkinFile('icons/rights-manager/filter.png')" alt="Filters" title="Filters" /></td>
+          </tr>
+          <tr id="table-filters">
+              <td class="fgroupname" colspan="2"><input name="name" type="text" /></td>
+              <td class="gmanage">
+                #if($context.database != "xwiki") #set($mainwk = false) #else #set($mainwk = true) #end
+                #if(!$mainwk)
+                <select name="wiki">
+                  <option value="local" selected="selected">Local</option>
+                  <option value="global">Global</option>
+                  <option value="both">Both</option>
+                </select>
+                #else <input type="hidden" value="local" name="wiki" /> #end
+              </td>
+          </tr>
+      </thead>
+      <tbody id="display1"><tr><td>&nbsp;</td></tr></tbody>
+      </table></td>
+    <td valign="top">
+      <div id="scrollbar1" class="scrollbar"><div class="inscrollbar">&nbsp;</div></div>
+    </td>
+    <td id="buff"></td>
+</tr>
+<tr><td colspan="2"><div id="add-new-user" class="btn"><span class="btnTxt">Add New Group</span></div></td></tr>
+</table>
+<script type="text/javascript">
+        $('wrapper').style.display = "block";
+        var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "groupstable", displayGroups, true); 
+        Event.observe($('hgroupmanage'), 'click', showHideFilters(ta));
+        ##//Event.observe( $('add-new-user'), 'click', ta.createAddHandler(ta));
+        #set($url = $xwiki.getURL("XWiki.XWikiGroups", "view", "xpage=addnewgroup"))
+        #set($saveurl = $xwiki.getURL("XWiki.XWikiGroups", "view"))
+        #set($redirecturl = $doc.getURL())
+        Event.observe($('add-new-user'), "click", makeAddHandler("$url", "$saveurl", "$redirecturl"));
+</script>
+</div>
+#else
 <div class="layoutsubsection">
 <div style="overflow:auto">
 $xwiki.parseMessage("editgroupsredirect")
 </div>
 </div>
+#end
+</div>

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminmodes.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminmodes.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminmodes.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -5,14 +5,15 @@
 ##<h4 id="xwikieditorstitles">$msg.get("chooseeditor")</h4>
 <div class="floatcontainer">
 <ul class="xwikitabbar">
-<li id="xwikiadminprefs"#if($editor == "prefs") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiPreferences").getURL("admin", "editor=prefs&amp;global=1&amp;space=$space")">$msg.get("adminprefs")</a>
-</li><li id="xwikiadminspaceprefs"#if($editor == "spaceprefs") class="active"#end><a href="$xwiki.getDocument("${doc.web}.WebPreferences").getURL("admin", "editor=spaceprefs&amp;global=1&amp;space=$space")">$msg.get("adminspaceprefs")</a>
-</li><li id="xwikiadminglobalrights"#if($editor == "globalrights") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiPreferences").getURL("admin", "editor=globalrights&amp;global=1")">$msg.get("adminglobalrights")</a>
-</li><li id="xwikiadminspacerights"#if($editor == "spacerights") class="active"#end><a href="$xwiki.getDocument("${doc.web}.WebPreferences").getURL("admin", "editor=spacerights&amp;global=1&amp;space=$space")">$msg.get("adminspacerights")</a>
-</li><li id="xwikiadminusers"#if($editor == "users" || $editor == "groups") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiUsers").getURL("admin", "editor=users&amp;space=$space")">$msg.get("adminusersandgroups")</a>
+#if($hasGlobalAdmin)<li id="xwikiadminprefs"#if($editor == "prefs") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiPreferences").getURL("admin", "editor=prefs&amp;global=1&amp;space=$space")">$msg.get("adminprefs")</a>
+</li>#end<li id="xwikiadminspaceprefs"#if($editor == "spaceprefs") class="active"#end><a href="$xwiki.getDocument("${doc.web}.WebPreferences").getURL("admin", "editor=spaceprefs&amp;global=1&amp;space=$space")">$msg.get("adminspaceprefs")</a>
+</li>#if($hasGlobalAdmin)<li id="xwikiadminglobalrights"#if($editor == "globalrights") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiPreferences").getURL("admin", "editor=globalrights&amp;global=1")">$msg.get("adminglobalrights")</a>
+</li>#end<li id="xwikiadminspacerights"#if($editor == "spacerights") class="active"#end><a href="$xwiki.getDocument("${doc.web}.WebPreferences").getURL("admin", "editor=spacerights&amp;global=1&amp;space=$space")">$msg.get("adminspacerights")</a>
+</li>#if($hasGlobalAdmin)<li id="xwikiadminusers"#if($editor == "users") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiUsers").getURL("admin", "editor=users&amp;space=$space")">$msg.get("adminusers")</a>
+</li><li id="xwikiadmingroups"#if($editor == "groups") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiGroups").getURL("admin", "editor=groups&amp;space=$space")">$msg.get("admingroups")</a>
 </li><li id="xwikiadminexport"#if($editor == "export") class="active"#end><a href="$xwiki.getDocument("XWiki.Export").getURL("export", "editor=export&amp;space=$space")">$msg.get("adminexport")</a>
 </li><li id="xwikiadminimport"#if($editor == "import") class="active"#end><a href="$xwiki.getDocument("XWiki.Import").getURL("import", "editor=import&amp;space=$space")">$msg.get("adminimport")</a>
-</li></ul>
+</li>#end</ul>
 </div>
 ## </li><li id="xwikiadmingroups"#if($editor == "groups") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiGroups").getURL("admin", "editor=groups&amp;space=$space")">$msg.get("admingroups")</a>
 ## </li><li id="xwikiadminusers"#if($editor == "users") class="active"#end><a href="$xwiki.getDocument("XWiki.XWikiUsers").getURL("admin", "editor=users&amp;space=$space")">$msg.get("adminusers")</a>

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminspacerights.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminspacerights.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminspacerights.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -1,17 +1,107 @@
 #set($formname = "update")
 #set($saveaction = "save")
+#set($interface = "$!request.get('interface')")
+<div id="xwikieditcontent">
+## switch between the new and the old interface
+<select name="switchInterface" onchange="if(this.options[this.selectedIndex].value=='new') { location='?editor=spacerights&amp;space=${doc.space}&amp;interface=new';  } else if(this.options[this.selectedIndex].value=='stable') { location='?editor=spacerights&amp;space=${doc.space}&amp;interface=stable';  } ">
+<option value="choose" #if($interface == "") selected="selected" #end>Switch interface</option>
+<option value="new" #if($interface == "new") selected="selected" #end>New Interface</option>
+<option value="stable" #if($interface == "stable") selected="selected" #end>Stable Interface</option>
+</select>
+#if($interface == "new")
+#if($doc.fullName == "XWiki.XWikiPreferences")
+#if($request.editor == "globalrights")  
+#set($clsname = "XWiki.XWikiGlobalRights")
+#else #set($clsname = "XWiki.XWikiRights") #end
+#elseif($doc.name == "WebPreferences")  
+#if($request.editor == "spacerights") #set($clsname = "XWiki.XWikiGlobalRights")
+#else #set($clsname = "XWiki.XWikiRights") #end
+#end
+#set($url = "?xpage=getusersandgroups")
+<div id="wrapper" style="display: none;">
+<div id="ajax-loader">Loading...<br />
+  <img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..." title="Loading..." />
+</div>
+<div class="spaceName">
+<span class="editSpaceName">$msg.get("editrightsforspace"): <strong><em>$space</em></strong></span>
+<select name="space" style="width: 130px;" onchange="location='?editor=spacerights&amp;global=1&amp;interface=${interface}&amp;space='+this.value;">
+	<option value="" label="">---</option>
+	#foreach($spaceitem in $xwiki.spaces)
+	<option value="$spaceitem" label="$spaceitem">$spaceitem</option>
+	#end
+</select>
+</div>
+<table cellpadding="0" cellspacing="5" id="usersandgroupstable">
+<tr>
+	<td colspan="2">
+        <select name="uorg" style="width: 130px;">
+          <option value="groups" selected="selected">Groups</option>
+          <option value="users">Users</option>
+        </select>&nbsp;<span id="showLimits"></span>
+    </td>
+</tr>
+<tr><td valign="top" style="width:100%">
+      <table border="0" cellpadding="2" cellspacing="0" width="100%" class="display">
+       <thead class="theader">
+          <tr><td class="huorgname">Group or User</td>
+              <td class="rights">View</td>
+              <td class="rights">Comment</td>
+              <td class="rights">Edit</td>
+			  <td class="rights">Delete</td>
+              ## does not have register rights at space level <td class="rights">Register</td>
+              <td class="rights">Admin</td>
+              ## if global rights and main wiki show programming right column
+              #set($hasPrgr = ($doc.fullName=='XWiki.XWikiPreferences' && $context.database=='xwiki'))
+              #if($hasPrgr)<td class="programmingr">Program</td> #end
+              <td class="huorgmanage" id="huorgmanage">Manage<img src="$xwiki.getSkinFile('icons/rights-manager/filter.png')" alt="Filters" title="Filters" /></td>
+          </tr>
+          <tr id="table-filters">
+              <td class="fuorgname">
+                <input name="name" type="text" />
+	        	<input name="progr" type="hidden" value="#if($hasPrgr) true #else false #end" />
+                <input name="admin" type="hidden" value="true" />
+                <input name="reg" type="hidden" value="false" />
+                <input type="hidden" name="clsname" value="$clsname" />
+              </td>
+              <td class="uorgwikiname">
+                #if($context.database != "xwiki") #set($mainwk = false) #else #set($mainwk = true) #end
+                #if(!$mainwk)
+                <select name="wiki">
+                  <option value="local" selected="selected">Local</option>
+                  <option value="global">Global</option>
+                  <option value="both">Both</option>
+		</select>
+		#else <input type="hidden" value="local" name="wiki" /> #end
+              </td>
+              <td colspan="5"></td>
+          </tr>
+       </thead>
+       <tbody id="display1"><tr><td>&nbsp;</td></tr></tbody>
+      </table></td>
+    <td valign="top">
+      <div id="scrollbar1" class="scrollbar"><div class="inscrollbar">&nbsp;</div></div>
+    </td>
+    <td id="buff"></td>
+</tr>
+</table>
+</div>
+<script type="text/javascript">
+	$('wrapper').style.display = "block";
+	var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "usersandgroupstable", displayUsersAndGroups, true); 
+	Event.observe($('huorgmanage'), 'click', showHideFilters(ta));
+</script>
+#else
 #set ($classname = "XWiki.XWikiGlobalRights")
 #set( $class = $xwiki.getDocument($classname).xWikiClass)
 #set( $redirect = "$xwiki.getRequestURL()&amp;editor=rights")
 <form id="update" method="post" action="$doc.getURL("save")" onsubmit="cancelCancelEdit()">
-<div id="xwikieditcontent">
 <div class="hidden">
-<input type="hidden" name="xcontinue" value="$doc.getURL($context.action, "editor=spacerights&amp;global=1&amp;space=${doc.space}")"/>
+<input type="hidden" name="xcontinue" value="$doc.getURL($context.action, "editor=spacerights&amp;global=1&amp;space=${doc.space}&amp;interface=${interface}")"/>
 <input type="hidden" name="xredirect" value="$xwiki.getURL("${doc.space}.WebHome")"/>
 </div>
 <div id="xwikichangespace">
 <p>$msg.get("editrightsforspace"): $space</p>
-<p>$msg.get("changespace"): <select name="space" onchange="location='?editor=spacerights&amp;global=1&amp;space=' + this.value;">
+<p>$msg.get("changespace"): <select name="space" onchange="location='?editor=spacerights&amp;global=1&amp;space=' + this.value + '&amp;interface=${interface}';">
 <option value="" label="">---</option>
 #foreach($spaceitem in $xwiki.spaces)
 <option value="$spaceitem" label="$spaceitem">$spaceitem</option>
@@ -29,7 +119,7 @@
 #foreach ($obj in $doc.getObjects($class.name))
 #set($class = $obj.xWikiClass)
     <tr>
-##        <td align="center">$!{obj.number}</td>
+        ##<td align="center">$!{obj.number}</td>
         <td>$!doc.displayEdit($class.users,"${class.name}_${obj.number}_",$obj)</td>
         <td>$!doc.displayEdit($class.groups,"${class.name}_${obj.number}_",$obj)</td>
         <td>$!doc.displayEdit($class.levels,"${class.name}_${obj.number}_",$obj)</td>
@@ -39,6 +129,7 @@
 #end
   </table>
  </div> ## noname
-</div> ## xwikieditcontents
 <div class="bottombuttons">#template("adminactions.vm")</div>
 </form>
+#end
+</div> ##xwikieditcontent
\ No newline at end of file

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminusers.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminusers.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminusers.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -1,6 +1,67 @@
 #set($formname = "update")
 #set($saveaction = "save")
+#set($interface = "$!request.get('interface')")
 <div id="xwikieditcontent">
+## switch between the new and the old interface
+<select name="switchInterface" onchange="if(this.options[this.selectedIndex].value=='new') { location='?editor=users&amp;space=XWiki&amp;interface=new';  } else if(this.options[this.selectedIndex].value=='stable') { location='?editor=users&amp;space=XWiki&amp;interface=stable';  } ">
+<option value="choose" #if($interface == "") selected="selected" #end>Switch interface</option>
+<option value="new" #if($interface == "new") selected="selected" #end>New Interface</option>
+<option value="stable" #if($interface == "stable") selected="selected" #end>Stable Interface</option>
+</select>
+#if($interface == "new")
+#set($url = "?xpage=getusers")
+<div id="wrapper" style="display: none;">
+<div id="ajax-loader">Loading...<br /><img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..." title="Loading..." /></div>
+<table class="wrap" cellpadding="0" cellspacing="5" id="userstable">
+<tr><td colspan="2" id="showLimits"></td></tr>
+<tr><td valign="top" style="width:800px">
+      <table border="0" cellpadding="2" cellspacing="0" width="100%" class="display">
+       <thead class="theader">
+          <tr>
+              <td class="husername">Username</td>
+              <td class="hfirstname">First Name</td>
+              <td class="hlastname">Last Name</td>
+              <td class="hmanage" id="manage">Filter<img src="$xwiki.getSkinFile('icons/rights-manager/filter.png')" alt="Filters" title="Filters" /></td>
+         </tr>
+          <tr id="table-filters">
+              <td class="fusername"><input name="name" type="text" /></td>
+              <td class="ffirstname"><input name="first_name" type="text" /></td>
+              <td class="flastname"><input name="last_name" type="text" /></td>
+              <td class="manage">
+                #if($context.database != "xwiki") #set($mainwk = false) #else #set($mainwk = true) #end
+                #if(!$mainwk)
+                <select name="wiki">
+                  <option value="local" selected="selected">Local</option>
+                  <option value="global">Global</option>
+                  <option value="both">Both</option>
+		</select>
+		#else <input name="wiki" type="hidden" value="local" /> #end
+              </td>
+          </tr>
+       </thead>
+       <tbody id="display1"><tr><td colspan="5">&nbsp;</td></tr></tbody>
+      </table></td>
+    <td valign="top">
+      <div id="scrollbar1" class="scrollbar"><div class="inscrollbar">&nbsp;</div></div>
+    </td>
+    <td id="buff"></td>
+</tr>
+<tr><td colspan="2"><div id="add-new-user" class="btn"><span class="btnTxt">Add New User</span></div></td></tr>
+</table>
+
+<script type="text/javascript">
+	$('wrapper').style.display = "block";
+	var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "userstable", displayUsers, true); 
+	Event.observe($('manage'), "click", showHideFilters(ta));
+	##//Event.observe($('add-new-user'), "click", ta.createAddHandler(ta));
+        #set($url = $xwiki.getURL("XWiki.Register", "register", "xpage=registeruser"))
+        #set($saveurl = $xwiki.getURL("XWiki.Register", "register"))
+        #set($redirecturl = $doc.getURL())
+        Event.observe($('add-new-user'), "click", makeAddHandler("$url", "$saveurl", "$redirecturl"));
+</script>
+</div>
+#else
 <p>$xwiki.parseMessage("editusersredirect")</p>
 <p>$xwiki.parseMessage("editgroupsredirect")</p>
-</div> ## xwikieditcontent
\ No newline at end of file
+#end
+</div>

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/css/lightbox/lightbox.css
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/css/lightbox/lightbox.css	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/css/lightbox/lightbox.css	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,180 @@
+/* -------------------------------------------------------- */
+.rounded .top *, .rounded .bottom *, .roundedlight .top *,
+.roundedlight .bottom * {
+  display: block;
+  overflow: hidden;
+  border-color: #A9B6C3;
+  border-style: solid;
+  background: #EEF3F6 none repeat scroll 0% 50%;
+  height: 1px;
+  border-width: 0 1px;
+  _margin: 0;
+  _padding: 0;
+  _zoom: 1;
+  _line-height: 1px;
+  }
+.rounded, .rounded .top, .rounded .bottom {
+  _height: 16px ;
+}
+.roundedlight, .roundedlight .top, .roundedlight .bottom {
+  _height: 5px ;
+}
+.roundedlight .b1, .roundedlight .b1b { background: #A9B6C3 none repeat scroll 0% 50%; margin: 0 5px; border-width: 0; }
+.roundedlight .b2, .roundedlight .b2b { border-width: 0 2px; margin: 0 3px; }
+.roundedlight .b3, .roundedlight .b3b { margin: 0pt 2px; }
+.roundedlight .b4, .roundedlight .b4b { height: 2px; margin: 0 1px; }
+.rounded .b1, .rounded .b1b { border-width: 0; margin: 0 16px; background: #A9B6C3 none repeat scroll 0% 50%; }
+.rounded .b2, .rounded .b2b { border-width: 0 3px; margin: 0 13px; }
+.rounded .b3, .rounded .b3b { border-width: 0 2px; margin: 0 11px; }
+.rounded .b4, .rounded .b4b { border-width: 0 2px; margin: 0 9px; }
+.rounded .b5, .rounded .b5b { margin: 0 8px; }
+.rounded .b6, .rounded .b6b { margin: 0 7px; }
+.rounded .b7, .rounded .b7b { margin: 0 6px; }
+.rounded .b8, .rounded .b8b { margin: 0 5px; }
+.rounded .b9, .rounded .b9b { margin: 0 4px; }
+.rounded .b10, .rounded .b10b { height: 2px; margin: 0 3px; }
+.rounded .b11, .rounded .b11b { height: 2px; margin: 0 2px; }
+.rounded .b12, .rounded .b12b { height: 3px; margin: 0 1px; }
+
+#lb-bg {
+  background-color: #000;
+  height: 100%;
+  left: 0;
+  position: fixed;
+  _position:absolute;
+  top: 0;
+  width: 100%;
+  z-index: 100000;
+  filter: alpha(opacity=70);
+  -moz-opacity: 0.7;
+  -khtml-opacity: 0.7;
+  opacity: 0.7;
+  overflow: auto;
+}
+
+#lb input[type=text], #lb textarea {
+    cursor: text;
+}
+
+#lb button{
+    cursor: hand;
+}
+
+#lb-align {
+  min-height: 100%;
+  position: absolute;
+  width: 100%;
+  left: 0;
+  text-align: center;
+  vertical-align: middle;
+  z-index: 100002;
+}
+
+#lb {
+position: absolute;
+left: 50%;
+top:  50px;
+margin-left: -450px;
+z-index: 100005;
+width: 900px;
+
+}
+
+.lb-content {
+  background: #eef3f6;
+  border: 1px solid #A9B6C3;
+  border-width: 0 1px;
+  padding: 0px;
+  text-align: center;
+}
+
+#lb ul li {
+    _zoom:1;
+}
+#lb-top {}
+#lb-bottom {}
+.lb-squarred {
+  background: #eef3f6;
+  border: 1px solid #A9B6C3;
+}
+
+#lb-bottom .lb-squarred {
+  border-top-width: 0;
+}
+
+#lb-top .lb-squarred {
+  border-bottom-width: 0;
+}
+
+#lb-content h1, #lb-content h2, #lb-content h3 {
+  margin-top: 0;
+  padding-top: 0;
+}
+<!-- IE sucks -->
+<!-- roundedlight -->
+*+html #lb-top .roundedlight, * html #lb-top .roundedlight {
+  margin-top: -1em;
+}
+
+#lb-top .roundedlight {
+  _margin-bottom: -0.15em;
+  _margin-top: -0.9em;
+}
+
+* html #lb-bottom .roundedlight {
+  margin-top: -1em;
+}
+
+#lb-bottom .roundedlight {
+  _margin-top: -0.75em;
+}
+<!-- IE sucks -->
+<!-- rounded -->
+*+html #lb-top .rounded, * html #lb-top .rounded {
+  margin-top: -1em;
+}
+
+#lb-top .rounded {
+  _margin-bottom: 0em;/* avant 0.1  pour IE7 ?*/
+  _margin-top: 0em; /* avant 0.3  pour IE7 ?*/
+}
+
+/* *+html #lb-bottom .rounded, */
+* html #lb-bottom .rounded {
+  margin-top: 0em; /* avant -1em*/
+}
+
+#lb-bottom .rounded {
+  _margin-top: -0.2em;
+}
+
+*+html #lb-top .rounded .b1, * html #lb-top .rounded .b1, *+html
+#lb-top .roundedlight .b1, * html #lb-top .roundedlight .b1 {
+  margin-bottom: -0.15em;
+}
+
+*+html #lb-bottom .rounded .b12b, * html #lb-bottom .rounded .b12b,
+*+html #lb-bottom .roundedlight .b4b, * html #lb-bottom .roundedlight
+.b4b {
+  margin-bottom: -0.1em;
+}
+
+
+#lb .lb-content {
+padding: 0 18px;
+}
+
+.lb-content{
+  overflow: hidden;
+  text-align: left;
+}
+
+.lbClose {
+	position: absolute;
+	top: 20px;
+	right: 20px;
+	width: 30px;
+	cursor: pointer;
+	background-image: url("$xwiki.getSkinFile("icons/rights-manager/btnClose.png")");
+	background-repeat: no-repeat;
+}

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deletegroupmember.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deletegroupmember.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deletegroupmember.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,4 @@
+#set($fullname = $request.get("fullname"))
+#set($obj = $doc.getObject("XWiki.XWikiGroups", "member", $fullname))
+#set($discard = $doc.removeObject($obj))
+#set($discard = $doc.save())

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deleteuorg.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deleteuorg.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/deleteuorg.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,3 @@
+#set($docname = $request.get("docname"))
+#set($d = $xwiki.getDocument($docname))
+$d.delete()

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editrights.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editrights.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editrights.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -1,3 +1,89 @@
+#set($formname = "update")
+#set($saveaction = "save")
+#set($interface = "$!request.get('interface')")
+<div id="xwikieditcontent">## switch between the new and the old interface
+<select name="switchInterface" onchange="if(this.options[this.selectedIndex].value=='new') { location='?editor=rights&amp;interface=new';  } else if(this.options[this.selectedIndex].value=='stable') { location='?editor=rights&amp;interface=stable';  } ">
+<option value="choose" #if($interface == "") selected="selected" #end>Switch interface</option>
+<option value="new" #if($interface == "new") selected="selected" #end>New Interface</option>
+<option value="stable" #if($interface == "stable") selected="selected" #end>Stable Interface</option>
+</select>
+#if($interface == "new")
+#if($doc.fullName == "XWiki.XWikiPreferences")
+#if($request.editor == "globalrights")   
+#set($clsname = "XWiki.XWikiGlobalRights")
+#else                                    
+#set($clsname = "XWiki.XWikiRights")
+#end
+#elseif($doc.name == "WebPreferences")  
+#if($request.editor == "spacerights")
+#set($clsname = "XWiki.XWikiGlobalRights")
+#else
+#set($clsname = "XWiki.XWikiRights")  
+#end
+#end
+#set($url = "?xpage=getusersandgroups")
+<div id="wrapper" style="display: none;">
+<div id="ajax-loader">Loading...<br />
+  <img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..." title="Loading..." />
+</div>
+<table cellpadding="0" cellspacing="5" id="usersandgroupstable">
+<tr>
+    <td colspan="2">
+      <select name="uorg" style="width: 130px;">
+        <option value="groups" selected="selected">Groups</option>
+        <option value="users">Users</option>
+        </select>&nbsp;<span id="showLimits"></span>
+    </td>
+</tr>
+<tr><td valign="top" style="width:100%">
+      <table border="0" cellpadding="2" cellspacing="0" width="100%" class="display">
+       <thead class="theader">
+          <tr><td class="huorgname">Group or User</td>
+              <td class="rights">View</td>
+              <td class="rights">Comment</td>
+              <td class="rights">Edit</td>
+			  <td class="rights">Delete</td>
+              ## if global rights and main wiki show programming right column
+              #set($hasPrgr = ($doc.fullName=='XWiki.XWikiPreferences' && $context.database=='xwiki'))
+              #if($hasPrgr)<td class="programmingr">Program</td> #end
+              <td class="huorgmanage" id="huorgmanage">Manage<img src="$xwiki.getSkinFile('icons/rights-manager/filter.png')" alt="Filters" title="Filters" /></td>
+          </tr>
+          <tr id="table-filters">
+              <td class="fuorgname">
+                <input name="name" type="text" />
+	        <input name="progr" type="hidden" value="#if($hasPrgr) true #else false #end" />
+                <input name="admin" type="hidden" value="false" />
+                <input name="reg" type="hidden" value="false" />
+                <input type="hidden" name="clsname" value="$clsname" />
+              </td>
+              <td class="uorgwikiname">
+                #if($context.database != "xwiki") #set($mainwk = false) #else #set($mainwk = true) #end
+                #if(!$mainwk)
+                <select name="wiki">
+                  <option value="local" selected="selected">Local</option>
+                  <option value="global">Global</option>
+                  <option value="both">Both</option>
+		</select>
+		#else <input type="hidden" value="local" name="wiki" /> #end
+              </td>
+              <td colspan="4"></td>
+          </tr>
+       </thead>
+       <tbody id="display1"><tr><td>&nbsp;</td></tr></tbody>
+      </table></td>
+    <td valign="top">
+      <div id="scrollbar1" class="scrollbar"><div class="inscrollbar">&nbsp;</div></div>
+    </td>
+    <td id="buff"></td>
+</tr>
+</table>
+</div>
+<script type="text/javascript">
+	$('wrapper').style.display = "block";
+	var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "usersandgroupstable", displayUsersAndGroups, true); 
+	Event.observe($('huorgmanage'), 'click', showHideFilters(ta));
+</script>
+#else
 #if($request.xpage=="editrights")
 #if($request.global=="1")
 $response.sendRedirect($doc.getURL("admin", "editor=rights&global=1"))
@@ -15,7 +101,6 @@
 #set( $class = $xwiki.getDocument($classname).xWikiClass)
 #set( $redirect = "$xwiki.getRequestURL()&amp;editor=rights")
 <form id="update" method="post" action="$doc.getURL("save")" onsubmit="cancelCancelEdit()">
-<div id="xwikieditcontent" class="clear">
 <div class="hidden"><input type="hidden" name="xcontinue" value="$doc.getURL("edit", "editor=rights")"/></div>
 <div>
 #set ($first = 1)
@@ -38,7 +123,8 @@
 #end
   </table>
  </div> ## noname
-</div> ## xwikieditcontent
 <div class="bottombuttons">#template("editactions.vm")</div>
 </form>
-#end
\ No newline at end of file
+#end
+#end
+</div>

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/edituser.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/edituser.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/edituser.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,22 @@
+<div>
+<form name="edituser" method="post">
+#set($force = $!request.get("force"))
+#if (($doc.getLocked()==true)&&(!$force))
+<div>
+$msg.get("doclockedby") $xwiki.getLocalUserName($doc.getLockingUser()).
+<br />
+<a href="$doc.getURL("inline", "$!request.getQueryString()&force=1")">$msg.get("forcelock")</a>
+</div>
+#else
+<div class="clear">
+#foreach($class in $doc.xWikiClasses)
+#set( $nb = $doc.getObjectNumbers("${class.name}"))
+<input type="hidden" name="${class.name}_nb" value="$nb" />
+#end
+$cdoc.getRenderedContent()
+</div>
+#end
+</form>
+<span class="buttonwrapper">
+<input class="button" type="submit" name="formactionsave" value="$msg.get("save")" onclick=" window.lb.lbSaveForm();"/></span>
+</div>
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroupmembers.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroupmembers.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroupmembers.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,24 @@
+$response.setContentType("application/x-json")
+#set( $offset = $xwiki.parseInt( $request.get( "offset" ) ) )
+## offset starts from 0 in velocity and 1 in javascript
+#set( $off = $offset - 1 )
+#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
+
+#set( $rm = $xwiki.rightsmanager )
+#set( $countm  = $rm.countAllMembersNamesForGroup($doc.fullName))
+#set( $members = $rm.getAllMembersNamesForGroup($doc.fullName, $limit, $off))
+
+{
+"totalrows": $countm,
+"returnedrows": #if($countm < $limit) $countm #else $limit #end,
+"offset": $offset,
+"rows": [
+#foreach( $m in $members )
+    #if( $velocityCount > 1 ) , #end
+   {
+    "fullname"     : "$m",
+    "memberurl"    : "$xwiki.getURL($m)",
+    "docurl"       : "$doc.getURL()"
+   }
+#end
+]}
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroups.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroups.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroups.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,78 @@
+$response.setContentType("application/x-json")
+#set( $offset = $xwiki.parseInt( $request.get( "offset" ) ) )
+## offset starts from 0 in velocity and 1 in javascript
+#set( $off = $offset - 1 )
+#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
+
+#set( $rm = $xwiki.rightsmanager )
+
+#### get all the request parameters which are filters
+#set( $params = $request.getParameterMap() )
+#set( $keys = $params.keySet() )
+#set( $defaultKeys = ["xpage", "offset", "limit", "wiki"] )
+#set( $docProps = ["fullName", "name"] )
+#set( $filterMap = $xwiki.hashMap )
+#set( $orderList = $xwiki.arrayList )
+#foreach( $key in $keys )
+  #if(! $defaultKeys.contains( $key ) )
+     ## build the filters map
+     #foreach( $i in $params.get( $key ) ) #set( $value = $i ) #end
+     #if( $docProps.contains( $key )) 
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( null ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr))
+        #set( $discard = $orderList.add( "$key" ))
+     #else
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( "StringProperty" ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr))
+		#set( $arr2 = $xwiki.arrayList )
+        #set( $discard = $arr2.add( "$key" ) )
+        #set( $discard = $arr2.add( "StringProperty" ) )
+        #set( $discard = $orderList.add( $arr2 ))
+     #end
+  #end
+#end
+
+#if($orderList.size() == 0)
+#set($disc = $orderList.add("name")) ## initially fiter by "name" !!!
+#end
+
+#foreach( $i in $params.get( "wiki" ) ) #set( $value = $i ) #end
+#if( $value == "local" )
+  #set( $users = $rm.getAllMatchedLocalGroups( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.groupsApi.countAllMatchedLocalGroups( $filterMap ) )
+#elseif( $value == "global" )
+  #set( $users = $rm.getAllMatchedGlobalGroups( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.groupsApi.countAllMatchedGlobalGroups( $filterMap ) )
+#else
+  ## get both local and global users
+  #set( $users = $rm.getAllMatchedGroups( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.groupsApi.countAllMatchedGroups( $filterMap ) )
+#end
+
+#set( $wikiname = $request.get("wiki") )
+### json starts
+{
+"totalrows": $countUsers,
+"returnedrows": #if($countUsers < $limit) $countUsers #else $limit #end,
+"offset": $offset,
+"wikiname" : "$wikiname",
+"rows": [
+#foreach( $user in $users )
+   #set( $grs = $xwiki.rightsmanager.getAllGroupsForUser( $user.fullName ) )
+   #if( $velocityCount > 1 ) , #end
+   {"username"      : "$user.name", 
+    "fullname"      : "$user.fullName",
+    "members"       : "$xwiki.getDocument($user.fullName).getObjects("XWiki.XWikiGroups").size()", 
+    "userurl"       : "$xwiki.getURL($user.fullName)",
+    "usersaveurl"   : "$user.getURL('save')",
+    "userinlineurl" : "$user.getURL("inline", "xpage=plain")",
+    "docurl"        : "$xwiki.getURL("XWiki.XWikiGroups", "admin", "editor=groups&space=XWiki")"
+  }
+#end
+]}
+### end of json
+

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusers.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusers.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusers.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,80 @@
+$response.setContentType("application/x-json")
+#set( $offset = $xwiki.parseInt( $request.get( "offset" ) ) )
+## offset starts from 0 in velocity and 1 in javascript
+#set( $off = $offset - 1 )
+#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
+
+#set( $rm = $xwiki.rightsmanager )
+
+#### get all the request parameters which are filters
+#set( $params = $request.getParameterMap() )
+#set( $keys = $params.keySet() )
+#set( $defaultKeys = ["xpage", "offset", "limit", "wiki"] )
+#set( $docProps = ["fullName", "name"] )
+#set( $filterMap = $xwiki.hashMap )
+#set( $orderList = $xwiki.arrayList )
+
+#foreach( $key in $keys )
+  #if(! $defaultKeys.contains( $key ) )
+     ## build the filters map
+     #foreach( $i in $params.get( $key ) ) #set( $value = $i ) #end
+     #if( $docProps.contains( $key )) 
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( null ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr))
+        #set( $discard = $orderList.add( "$key" ))
+     #else
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( "StringProperty" ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr ))
+		#set( $arr2 = $xwiki.arrayList )
+        #set( $discard = $arr2.add( "$key" ) )
+        #set( $discard = $arr2.add( "StringProperty" ) )
+        #set( $discard = $orderList.add( $arr2 ))
+     #end
+  #end
+#end
+
+#if($orderList.size() == 0)
+#set($disc = $orderList.add("name")) ## initially fiter by "name" !!!
+#end
+
+#foreach( $i in $params.get( "wiki" ) ) #set( $value = $i ) #end
+#if( $value == "local" )
+  #set( $users = $rm.getAllMatchedLocalUsers( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.usersApi.countAllMatchedLocalUsers( $filterMap ) )
+#elseif( $value == "global" )
+  #set( $users = $rm.getAllMatchedGlobalUsers( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.usersApi.countAllMatchedGlobalUsers( $filterMap ) )
+#else  
+  ## get both local and global users
+  #set( $users = $rm.getAllMatchedUsers( $filterMap, $limit, $off, $orderList ) )
+  #set( $countUsers = $rm.usersApi.countAllMatchedUsers( $filterMap ) )
+#end
+
+#set( $wikiname = $request.get("wiki") )
+### json starts
+{ 
+"totalrows": $countUsers,
+"returnedrows": #if($countUsers < $limit) $countUsers #else $limit #end,
+"offset": $offset,
+"wikiname" : "$wikiname",
+"rows": [
+#foreach( $user in $users )
+   #if( $velocityCount > 1 ) , #end
+   {"username"      : "$user.name", 
+    "fullname"      : "$user.fullName",
+    "firstname"     : "$user.getObject('XWiki.XWikiUsers').get('first_name')", 
+    "lastname"      : "$user.getObject('XWiki.XWikiUsers').get('last_name')",
+    "userurl"       : "$xwiki.getURL($user.fullName)",
+    "usersaveurl"   : "$user.getURL("save")",
+    "userinlineurl" : "$user.getURL("inline", "xpage=edituser")",
+    "docurl"        : "$xwiki.getURL("XWiki.XWikiUsers", "admin", "editor=users&space=XWiki")"
+  }
+#end
+]}
+
+### end of json
+

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusersandgroups.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusersandgroups.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusersandgroups.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,124 @@
+$response.setContentType("application/x-json")
+#set( $offset = $xwiki.parseInt( $request.get( "offset" ) ) )
+## offset starts from 0 in velocity and 1 in javascript
+#set( $off = $offset - 1 )
+#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
+
+#set( $rm = $xwiki.rightsmanager )
+
+#### get all the request parameters which are filters
+#set( $params = $request.getParameterMap() )
+#set( $keys = $params.keySet() )
+#set( $defaultKeys = ["xpage", "offset", "limit", "wiki", "reg", "admin", "progr", "uorg", "clsname", "space"] )
+#set( $docProps = ["fullName", "name"] )
+#set( $filterMap = $xwiki.hashMap )
+#set( $orderList = $xwiki.arrayList )
+
+#foreach( $key in $keys )
+  #if(! $defaultKeys.contains( $key ) )
+     ## build the filters map
+     #foreach( $i in $params.get( $key ) ) #set( $value = $i ) #end
+     #if( $docProps.contains( $key )) 
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( null ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr))
+        #set( $discard = $orderList.add( "$key" ))
+     #else
+        #set( $arr = $xwiki.arrayList )
+        #set( $discard = $arr.add( "StringProperty" ) ) ## this may be variable...
+        #set( $discard = $arr.add( "$value" ) )
+        #set( $discard = $filterMap.put("$key", $arr))
+		#set( $arr2 = $xwiki.arrayList )
+        #set( $discard = $arr2.add( "$key" ) )
+        #set( $discard = $arr2.add( "StringProperty" ) )
+        #set( $discard = $orderList.add( $arr2 ))
+     #end 
+  #elseif( $key == "uorg" )
+     #foreach( $i in $params.get( $key ) ) #set( $uorg = $i ) #end
+  #elseif( $key == "admin" )
+     #foreach( $i in $params.get( $key ) ) #set( $a = $i ) #end
+  #elseif( $key == "progr" )
+     #foreach( $i in $params.get( $key ) ) #set( $p = $i ) #end
+  #elseif( $key == "reg" )
+     #foreach( $i in $params.get( $key ) ) #set( $r = $i ) #end
+  #elseif( $key == "clsname" )
+     #foreach( $i in $params.get( $key ) ) #set( $clsname = $i ) #end
+  #end
+#end
+
+#if($orderList.size() == 0)
+#set($disc = $orderList.add("name")) ## initially fiter by "name" !!!
+#end
+
+#foreach( $i in $params.get( "wiki" ) ) #set( $value = $i ) #end
+#if( $value == "local" )
+  #if($uorg == "users")
+    #set( $users = $rm.getAllMatchedLocalUsers( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.usersApi.countAllMatchedLocalUsers( $filterMap ) )
+  #else
+    #set( $users = $rm.getAllMatchedLocalGroups( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.groupsApi.countAllMatchedLocalGroups( $filterMap ) )
+  #end
+#elseif( $value == "global" )
+  #if($uorg == "users")
+    #set( $users = $rm.getAllMatchedGlobalUsers( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.usersApi.countAllMatchedGlobalUsers( $filterMap ) )
+  #else
+    #set( $users = $rm.getAllMatchedGlobalGroups( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.groupsApi.countAllMatchedGlobalGroups( $filterMap ) )
+  #end
+#else  
+  ## get both local and global users
+  #if($uorg == "users")
+    #set( $users = $rm.getAllMatchedUsers( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.usersApi.countAllMatchedUsers( $filterMap ) )
+  #else
+    #set( $users = $rm.getAllMatchedGroups( $filterMap, $limit, $off, $orderList ) )
+    #set( $countUsers = $rm.groupsApi.countAllMatchedGroups( $filterMap ) )
+  #end
+#end
+
+#set( $wikiname = $request.get("wiki") )
+#set( $clsname = $request.get("clsname") )
+
+### json starts
+{ 
+"totalrows": $countUsers,
+"returnedrows": #if($countUsers < $limit) $countUsers #else $limit #end,
+"offset"   : $offset,
+"admin"    : $a,
+"progr"    : $p,
+"reg"      : $r,
+"wikiname" : "$wikiname",
+"clsname"  : "$clsname",
+"uorg"     : "$uorg",
+"rows": [
+#foreach( $user in $users )
+   #set($allows = "")
+   #set($denys = "")
+   #if( $velocityCount > 1 ) , #end
+   ## get the rights for that user or group
+   #foreach($obj in $doc.getObjects($clsname)) ## XWiki.XWikiGlobalRights or XWiki.XWikiRights
+    #set($pers = $obj.getProperty($uorg).getValue())
+    #set($fullnamecomma = $user.fullName + ",")
+    #if($pers.matches("^(.*,)?${user.fullName}(,.*)?$"))
+      #if($obj.getProperty('allow').getValue() == 1)
+        #set($allows = $obj.getProperty('levels').getValue())
+      #else
+        #set($denys = $obj.getProperty('levels').getValue())
+      #end
+    #end
+  #end
+   {"username"   : "$user.name", 
+    "fullname"   : "$user.fullName",
+    "wikiname"   : "$user.getWiki()", 
+    "userurl"    : "$xwiki.getURL($user.fullName)",
+    "allows"     : "$!allows",
+    "denys"      : "$!denys"
+  }
+#end
+]}
+
+### end of json
+

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/global.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/global.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/global.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -51,8 +51,10 @@
 #set($regurl = $xwiki.getURL("XWiki.Register", "register"))
       <a class="glink" href="$!regurl" id="headerregister">$!msg.get("register")</a>#sep()
 #end
-#if($hasadmin)
+#if($xwiki.hasAccessLevel("admin", $context.user, "XWiki.XWikiPreferences"))
       <a class="glink" href="$!xwiki.getURL("XWiki.XWikiPreferences","admin")" id="headeradmin">$!msg.get("admin")</a> #sep()
+#elseif($xwiki.hasAccessLevel("admin", $context.user, "${doc.space}.WebPreferences"))
+      <a class="glink" href="$!xwiki.getURL("${doc.space}.WebPreferences", "admin")" id="headeradmin">$!msg.get("admin")</a> #sep()
 #end
 #if($xwiki.isMultiLingual())
   <span class="glink" id="headerlanguages">

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/icons/ajax-loader.gif
===================================================================
(Binary files differ)


Property changes on: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/icons/ajax-loader.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/javascript.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/javascript.vm	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/javascript.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -7,6 +7,9 @@
 <script type="text/javascript" src="$xwiki.getSkinFile("chwScripts.js")"></script>
 <script type="text/javascript" src="$xwiki.getSkinFile("scripts/table/tablefilterNsort.js", true)"></script>
 <script type="text/javascript" src="$xwiki.getSkinFile("fullscreenEdit.js", true)"></script>
+<script type="text/javascript" src="$xwiki.getSkinFile("usersandgroups.js", true)"></script>
+<script type="text/javascript" src="$xwiki.getSkinFile("suggest/ajaxSuggest.js")"></script>
+<script type="text/javascript" src="$xwiki.getSkinFile("scripts/lightbox/lightbox.js")"></script>
 
 #if(($context.action=="inline")||($context.action=="edit") || ($context.action=="admin"))
 <script type="text/javascript">

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/registeruser.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/registeruser.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/registeruser.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,66 @@
+<div class = "lbcontent">
+#if(!$xwiki.hasAccessLevel("view","XWiki.Registration")||$xwiki.getDocument("XWiki.Registration").isNew())
+  <h1>$msg.get("Registration")</h1>
+#if(!$reg||$reg<0 )
+    <p>$msg.get("registerwelcome")</p>
+#end
+#if($reg && $reg<=0)
+#if($reg==-2)
+#error("$msg.get('passwordmismatch').")
+#elseif($reg==-3)
+#error("$msg.get('useralreadyexists').")
+#elseif($reg==-4)
+#error("$msg.get('invalidusername').")
+#elseif($reg==-8)
+#error("$msg.get('useralreadyexists').")
+#else
+#error("$msg.get('registerfailed') ($msg.get('registerfailedcode') $reg).")
+#end
+#elseif($reg)
+#set($xwname = "XWiki.${request.xwikiname}")
+#info("$xwiki.getUserName($xwname) ($request.xwikiname): $msg.get('registersuccessful').")
+#end
+#if(!$reg||$reg<0 )
+    <form id="register" name="register" action="" method="post">
+      <div>
+        <input type="hidden" name="template" value="XWiki.XWikiUserTemplate" />
+        <input type="hidden" name="register" value="1"/>
+#set( $class = $xwiki.getClass("XWiki.XWikiUsers"))
+#set( $obj = $class.newObject() )
+#set( $serverobj = $class.newObject() )
+#set( $ok = $doc.use("XWiki.XWikiUsers"))
+#if($request.register_first_name)
+          $doc.set("first_name", $request.register_first_name)
+#end
+#if($request.register_last_name)
+          $doc.set("last_name", $request.register_last_name)
+#end
+        <dl>
+#set($prop = $class.first_name)
+          <dt>$msg.get("firstname"):</dt>
+          <dd>$doc.displayEdit($prop, "register_",  $obj)</dd>
+
+#set($prop = $class.last_name)
+          <dt>$msg.get("lastname"):</dt>
+          <dd>$doc.displayEdit($prop, "register_",  $obj)</dd>
+          <dt>$msg.get("loginid"):</dt>
+          <dd><input name="xwikiname" type="text" size="20" onfocus=" prepareName(document.forms.register);" /></dd>
+
+#set($prop = $class.password)
+          <dt>$msg.get("password"):</dt>
+          <dd>$doc.displayEdit($prop, "register_",  $obj)</dd>
+          <dt>$msg.get("passwordrepeat"):</dt>
+          <dd>$doc.displayEdit($prop, "register2_",  $obj)</dd>
+
+#set($prop = $class.email)
+          <dt>$msg.get("email"):</dt>
+          <dd>$doc.displayEdit($prop, "register_",  $obj)</dd>
+        </dl>
+        <span class="buttonwrapper"><input class="button" type="submit" name="formactionsave" value="$msg.get("save")" onclick=" window.lb.lbSaveForm();"/></span>
+      </div>
+    </form>
+#end
+#else
+  $xwiki.getDocument("XWiki.Registration").getTranslatedDocument().getRenderedContent()
+#end
+</div>
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/saverights.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/saverights.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/saverights.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,46 @@
+#set($fullname = $request.get("fullname"))
+#set($uorg = $request.get("uorg"))
+#set($allows = "$!request.get('allows')")
+#set($denys = "$!request.get('denys')")
+#set($clsname = $request.get("clsname"))
+## found the user or group
+#set($founda = false)
+#set($foundd = false)
+
+#foreach($obj in $doc.getObjects($clsname)) ## XWiki.XWikiGlobalRights or XWiki.XWikiRights
+  #set($pers = $obj.getProperty($uorg).getValue())
+  ## TO DO: regular expression
+  #if($pers.matches("${fullname},?"))
+    #if($obj.getProperty('allow').getValue() == 1)
+        #set($founda = true) ## found allows -> set the new levels 
+        #if($allows != "") $obj.set('levels', $allows)
+	#else $doc.removeObject($obj) #end
+    #else
+        #set($foundd = true)## found denys -> set the new levels
+        #if($denys != "") $obj.set('levels', $denys)
+	#else $doc.removeObject($obj) #end
+    #end
+  #elseif($pers.matches("^(.*,)?${fullname}(,.*)?$"))
+    #set($pers = $pers.replaceAll("^${fullname}(,|$)", ""))
+    #set($pers = $pers.replaceAll("(^|,)${fullname}(,|$)", "$2"))
+    $obj.set($uorg, $pers)
+  #end
+#end
+
+#if(($founda == false) && ($allows != ""))
+## could not find the rule -> create one
+#set($obj = $doc.newObject($clsname))
+## set the new rules
+$obj.set($uorg, $fullname)
+$obj.set('levels', $allows)
+$obj.set('allow', '1')
+#end
+#if(($foundd == false) && ($denys != ""))
+## could not find the rule -> create one
+#set($obj = $doc.newObject($clsname))
+## set the new rules
+$obj.set($uorg, $fullname)
+$obj.set('levels', $denys)
+$obj.set('allow', '0')
+#end
+#set($discard = $doc.save())
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/lightbox.js
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/lightbox.js	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/lightbox.js	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,225 @@
+Lightbox = Class.create();
+
+Lightbox.prototype =  {	
+	initialize: function(formUrl, saveUrl, redirectUrl) {
+  		this.formUrl = formUrl;
+  		this.saveUrl = saveUrl;
+                this.redirectUrl = redirectUrl;
+  		this.formData = "";
+  		this.loadedForms = new Object();
+  		this.lbinit();
+  		this.lbShow();
+  		this.lbLoadForm(formUrl);
+	},
+
+	lbShow: function() {
+  		this.lbLoading();
+  		toggleClass($('lb-bg'), 'hidden');
+  		toggleClass($('lb-align'), 'hidden');
+  		$('lb-bg').style.height = (document.body.offsetHeight + 35)+"px";
+	},
+
+	lbHide: function() {
+  		toggleClass($('lb-bg'), 'hidden');
+  		toggleClass($('lb-align'), 'hidden');
+	},
+
+	lbLoading: function() {
+  		if(this.currentUrl) {
+    			this.loadedForms[this.currentUrl] = $('lb-content').firstChild.cloneNode(true);
+  		}
+  		$('lb-content').innerHTML = this.getWaiting();
+	},
+
+	lbLoadForm: function(url) {
+  		this.currentUrl = url;
+  		if(this.loadedForms[url]) {
+    			var c = $('lb-content');
+   			$('lb-content').innerHTML = "";
+    			$('lb-content').appendChild(this.loadedForms[url]);
+    			this.form = c.getElementsByTagName('form')[0];
+    			var scripts = c.getElementsByTagName("script");
+    			for(var i = 0; i < scripts.length; ++i) {
+      				eval(scripts[i].text);
+    			}
+  		} else {
+    			new Ajax.Request(url, {onSuccess: this.lbFormDataLoaded.bind(this)});
+  		}
+	},
+
+
+	lbFormDataLoaded: function(transport) {
+  		var c = $('lb-content');
+  		c.innerHTML = "<div>" + transport.responseText + "</div>";
+  		this.form = c.getElementsByTagName('form')[0];
+		var scripts = c.getElementsByTagName("script");
+  		for(var i = 0; i < scripts.length; ++i) {
+    			eval(scripts[i].text);
+  		}
+  		$('lb-bg').style.height = (document.body.offsetHeight + 35)+"px";
+	},
+
+	lbSaveForm: function() {
+  		Form.disable(this.form);
+  		this.lbSaveSync(this.saveUrl);
+  		this.lbHide();
+  		window.location = this.redirectUrl;
+	},
+
+
+	lbNext: function(nextUrl) {
+  		this.lbSaveData();
+  		this.lbLoading();
+  		this.lbLoadForm(nextUrl);
+	},
+
+
+	lbSaveData: function() {
+  		this.formData += "&" + Form.serialize(this.form);
+  		this.formData = this.formData.replace("_segmentChief=&", "=&");
+  		this.formData = this.formData.replace("_periodicity=&", "=&");
+	},
+
+
+	lbSave: function(url) {
+  		this.lbSaveData();
+  		new Ajax.Request(url + "?ajax=1", {parameters: this.formData, onSuccess: this.lbSaveDone.bind(this)});
+	},
+
+
+	lbSaveSync: function(url) {
+  		this.lbSaveData();
+  		new Ajax.Request(url + "?ajax=1", {parameters: this.formData, asynchronous: false});
+	},
+
+
+	lbSaveDone: function(transport) {
+  		this.lbHide();
+	},
+	
+	lbClearData: function() {
+  		this.formData = "";
+	},
+
+
+	lbClose: function() {
+  		this.lbHide();
+  		window.location = this.redirectUrl;
+	},
+
+
+	lbSetNext: function(nextURL) {
+  		this.nextURL = nextURL;
+	},
+
+
+
+	getWaiting: function() {
+  		return '<div style="padding: 30px;"><img src="$xwiki.getSkinFile(\'loading.gif\')"/></div>';
+	},
+
+
+	lbcustominit: function(lbbgcolor, lbbordercolor, lbfontcolor, lbtype) {
+		if (!$('lb')) {
+       		var lbcontent = this.insertlbcontent(lbbgcolor, lbbordercolor, lbfontcolor, lbtype);
+       		new Insertion.Top('body', lbcontent);
+		}
+	},
+
+	lbinit: function() {
+		return this.lbcustominit("#FFF", "#FFF", "#000", "rounded");
+	},
+
+
+	insertlbcontent: function(lbbgcolor, lbbordercolor, lbfontcolor, lbtype) {
+    		var str = '<div id="lb-bg" class="hidden"></div>' + 
+              		'<div id="lb-align" class="hidden">' + 
+              		'<div id="lb">' +
+              		'<div id="lb-top"><span id="lb-close">' +
+              		'<div class="lbClose" onclick="window.lb.lbHide(); window.lb.lbClearData(); return false;" title="Cancel and close">&nbsp;</div>' +
+              		'</span>';
+              
+    		if(lbtype == "lightrounded") str += this.roundedlighttop(lbbgcolor, lbbordercolor);
+    		else if(lbtype == "rounded") str += this.roundedtop(lbbgcolor, lbbordercolor);
+    		else str += '<div class="lb-squarred" style="backgrounddee:' + lbbgcolor + '; border-color:' + lbbordercolor + '"></div></div>';
+    
+    		str += '</div><div class="lb-content" style="background:' +  lbbgcolor + '; border-color:' + lbbordercolor + '; color:' + lbfontcolor + '" id="lb-content">Lightbox Content</div>';
+    
+    		if(lbtype == "lightrounded") str += this.roundedlightbottom(lbbgcolor, lbbordercolor);
+   		    else if(lbtype == "rounded") str += this.roundedbottom(lbbgcolor, lbbordercolor);
+    		else str += '<div class="lb-squarred" style="background:' + lbbgcolor +'; border-color:' + lbbordercolor + '"></div></div></div></div>';
+    		return str;
+	},
+
+        roundedlightbottom:  function(bgcolor, bordercolor) {
+		var str = '<div class="roundedlight"><b class="top">' + 
+              		'<b class="b4b" style="background:' + bordercolor + ';"></b>' +
+              		'<b class="b3b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b3b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b1b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b></b> </div>';
+    		return str;
+	},
+
+
+	roundedlightbottom: function(bgcolor) {
+		return this.roundedlightbottom(bgcolor, "");
+	},
+
+
+	roundedlightbottom: function(bgcolor, bordercolor) {
+		return this.roundedlightbottom(bgcolor, bordercolor);
+	},
+
+	roundedbottom: function(bgcolor, bordercolor) {
+		var str = '<div class="rounded">' +
+              		'<b class="bottom">' +
+              		'<b class="b12b" style="background:' + bordercolor +';"></b>' +
+              		'<b class="b11b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b10b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b9b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b8b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b7b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b6b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b5b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b4b" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b3b" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b2b" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b1b" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'</b></div>';
+    		return str;
+	},
+
+	roundedlighttop: function(bgcolor, bordercolor) {
+		var str = '<div class="roundedlight"><b class="top">' + 
+	          	'<b class="b1" style="background:' + bordercolor + ';"></b>' +
+	          	'<b class="b2" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+	          	'<b class="b3" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+	          	'<b class="b4" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b></b> </div>';
+    		return str;
+	},
+
+	roundedtop: function(bgcolor, bordercolor) {
+    		var str = '<div class="rounded">' +
+              		'<b class="top">' +
+              		'<b class="b1" style="background:' + bordercolor +';"></b>' +
+              		'<b class="b2" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b3" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b4" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b5" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b6" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b7" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+              		'<b class="b8" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b9" style="background:' + bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b10" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b11" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'<b class="b12" style="background:'+ bgcolor + '; border-color:' + bordercolor + ';"></b>' +
+					'</b></div>';
+    		return str;
+	},
+
+
+	lightboxlink: function(linktext, lbcontent)	{
+		var str = '<a href="#" onclick="javascript:$(\'lb-content\').innerHTML =' + lbcontent +'; toggleClass($(\'lb-bg\'), \'hidden\'); toggleClass($(\'lb-align\'), \'hidden\');">' + linktext + '</a>';
+		return str;
+	}
+};

Modified: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/style.css
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/style.css	2007-11-01 09:32:13 UTC (rev 5590)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/style.css	2007-11-01 09:34:22 UTC (rev 5591)
@@ -25,6 +25,12 @@
 /* Styles for custom hand written <table> tables */
 @import "css/table/table.css";
 
+ at import "usersandgroups.css";
+
+ at import "css/lightbox/lightbox.css";
+
+ at import "suggest/ajaxSuggest.css";
+
 .rightmenu a {
 	margin-right: 2px;
 	font-size: 100%;

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/uorgsuggest.vm
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/uorgsuggest.vm	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/uorgsuggest.vm	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,40 @@
+$response.setContentType("text/xml")
+<?xml version="1.0" encoding="UTF-8"?>
+<results>
+#set($input = $request.get("input").toLowerCase())
+#set($indx = $input.indexOf("."))
+#set($next = $indx + 1)
+#if($indx > 0) #set($input = $input.substring($next)) #end #### only if use name
+#set($uorg = $request.get("uorg"))
+#set($wiki = $request.get("wiki"))
+
+#set( $filterMap = $xwiki.hashMap )
+#set( $arr = $xwiki.arrayList )
+#set( $discard = $arr.add( null ) ) 
+#set( $discard = $arr.add( "$input" ) )
+#set( $discard = $filterMap.put("name", $arr))
+
+#if($uorg == "user")
+   #if($wiki == "local")
+	  #set($allUsers = $xwiki.rightsmanager.getAllMatchedLocalUsersNames($filterMap))
+	#else
+		#set($allUsers = $xwiki.rightsmanager.getAllMatchedGlobalUsersNames($filterMap))
+	#end
+	#if($allUsers.size() > 0)
+		#foreach($user in $allUsers)
+			<rs id="" info="">$user</rs>
+		#end
+	#end
+	#else ## groups
+	   #if($wiki == "local")
+			#set($allUsers = $xwiki.rightsmanager.getAllMatchedLocalGroupsNames($filterMap))
+		#else
+		   #set($allUsers = $xwiki.rightsmanager.getAllMatchedGlobalGroupsNames($filterMap))
+		#end
+		#if($allUsers.size() > 0)
+		#foreach($user in $allUsers)
+			<rs id="" info="">$user</rs>
+		#end
+	#end
+#end
+</results>
\ No newline at end of file

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.css
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.css	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.css	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,335 @@
+/* USERS SCROLLING SYSTEM */
+
+div.scrollbar {
+    overflow: auto;
+    height: 250px;
+    margin:0px;
+    padding:0px;
+    width: 25px;
+    left: -10px;
+    _left: -5px;
+    position: relative;
+}
+
+div.inscrollbar {
+    width:1px;
+    margin:0px;
+    padding:0px;
+    height:3000px;
+}
+
+.display {
+    border-collapse: collapse;
+    border: 1px solid #d4dee8;
+}
+
+.display td {
+    border: 1px solid #d4dee8;
+}
+
+#usersandgroupstable {
+   width: 100%;
+   height: 100%;
+}
+
+
+.theader {
+   background-color: #1f66ab;
+   color: #fff;
+   font-weight: bold;
+}
+
+#showLimits {
+   font-size: 12px;
+   font-weight: bold;
+   padding-left: 10px;
+   padding-right: 20px;
+}
+
+.spaceName {
+	text-align: center;
+	font-size: 12px;
+    font-weight: bold;
+    padding-top: 6px;
+    padding-bottom: 5px;
+}
+
+.editSpaceName {
+	padding-right: 10px;
+}
+
+#table-filters {
+    /*display: none;*/
+    background-color: #d4dee8;
+}
+
+.icon-manage {
+   cursor: pointer;
+   padding-left: 5px;
+   padding-right: 5px;
+}
+
+#ajax-loader {
+   margin: 0px;
+   padding: 0px;
+   position: absolute;
+   top: 50%;
+   left: 35%;
+   z-index: 1000000000;
+   display: none;
+   width: 220px;
+   background-color: #fff;
+   border: 1px solid #999;
+   font-size: 11px;
+   padding: 8px;
+   text-indent: 5px;
+}
+
+/* rights classes */
+
+.gname, .uname {
+   width: 20%;
+   background-repeat: no-repeat;
+   background-position: 2% 50%;
+   padding-left: 20px;
+}
+
+.gname {
+   background-image: url("$xwiki.getSkinFile("icons/rights-manager/group.png")");
+  
+}
+
+.uname {
+   background-image: url("$xwiki.getSkinFile("icons/rights-manager/user.png")");
+}
+
+
+.huorgname {
+   padding-left: 10px;
+}
+
+.fuorgname {
+   text-align: center;
+}
+
+.uorgwikiname {
+   width: 10%;
+   text-align: center;
+   padding: 0px;
+   margin: 0px;
+}
+
+
+.huorgmanage {
+  cursor: pointer;
+  width: 12%;
+  padding-left: 10px;
+}
+
+.uorgmanage {
+  width: 12%;
+  text-align: center;
+}
+
+.rights {
+  text-align: center;
+}
+
+
+/* groups css */
+
+.localgroupname, .globalgroupname {
+   width: 40%;
+   background-repeat: no-repeat;
+   background-position: 2% 50%;
+   padding-left: 25px;
+}
+
+.localgroupname {
+	 background-image: url("$xwiki.getSkinFile("icons/rights-manager/group.png")");
+}
+
+.globalgroupname {
+	 background-image: url("$xwiki.getSkinFile("icons/rights-manager/group.png")");
+}
+
+.hgroupname {
+   width: 40%;
+   padding-left: 10px;
+}
+
+.fgroupname {
+  padding-left: 25px;
+}
+
+.gmanage {
+	text-align: center;
+}
+
+.groupmembers {
+   padding-left: 10px;
+}
+
+.hgroupmanage {
+   cursor: pointer;
+   width: 12%;
+   padding-left: 10px;
+}
+
+
+.groupmanage {
+   width: 12%;
+   text-align: center;
+}
+
+/* users css */
+
+.localusername, .globalusername {
+   width: 19%;
+   background-repeat: no-repeat;
+   background-position: 2% 50%;
+   padding-left: 25px;
+}
+
+.localusername {
+	 background-image: url("$xwiki.getSkinFile("icons/rights-manager/user.png")");
+}
+
+.globalusername {
+	 background-image: url("$xwiki.getSkinFile("icons/rights-manager/user.png")");
+}
+
+.husername {
+  width: 19%;
+  padding-left: 10px;
+}
+
+.fusername, .ffirstname, .flastname {
+   width: 19%;
+   text-align: center;
+}
+
+.firstname {
+   width: 19%;
+}
+
+.hfirstname, .hlastname {
+   padding-left: 10px;
+}
+
+.lastname {
+  width: 19%;
+}
+
+.manage {
+   width: 11%;
+   text-align: center;
+}
+
+.hmanage {
+  cursor: pointer;
+  padding-left: 10px;
+}
+
+/***************************************/
+
+#groupwrap {
+	width: 100%;
+   position: relative;
+	left: 3%;
+   margin-bottom: 30px;
+}
+
+#grouptitle {
+	font-size: 16px;
+   font-weight: bold;
+	padding-bottom: 20px;
+	margin-top: 20px;
+   text-align: left;
+}
+
+#groupmembers {
+   border-collapse: collapse;
+   border: 1px solid #d4dee8;
+}
+
+#groupmembers td {
+   border: 1px solid #d4dee8;
+}
+
+.userName {
+	background-image: url("$xwiki.getSkinFile("icons/rights-manager/user.png")");
+   background-repeat: no-repeat;
+   background-position: 2% 50%;
+   padding-left: 25px;
+}
+
+.groupName {
+	background-image: url("$xwiki.getSkinFile("icons/rights-manager/group.png")");
+   background-repeat: no-repeat;
+   background-position: 2% 50%;
+   padding-left: 25px;
+}
+
+.del {
+	text-align: center;
+}
+
+.icon-del {
+	margin-left: 10px;
+   margin-right: 10px;
+	cursor: pointer;
+}
+
+
+.pg-normal {
+	color: #000;
+	font-weight: bold;
+	text-decoration: none;
+	cursor: pointer;
+}
+
+.pg-selected {
+	color: blue;
+	font-weight: bold;
+	text-decoration: underline;
+	cursor: pointer;
+}
+
+#pageNavPosition {
+	margin-top: 6px;
+   text-align: left;
+}
+
+#addNewMember {
+	margin-top: 15px;
+	margin-bottom: 10px;
+   text-align: left;
+}
+
+.sortHeader {
+   background-color: #1f66ab !important;
+   color: #fff !important;
+}
+
+#errMsg {
+	font-weight: bold;
+   color: red;
+}
+
+.btn {
+  background-image: url("$xwiki.getSkinFile("icons/rights-manager/but1.png")");
+  background-repeat: no-repeat;
+  height: 24px;
+  margin-top: 10px;
+  margin-bottom: 5px;
+  cursor: pointer;
+  text-align: center;
+  width: 130px;
+}
+
+.btnTxt {
+	font-weight: bold;
+	color: #FFF;
+	font-size: 12px;
+}

Added: xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js
===================================================================
--- xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js	                        (rev 0)
+++ xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js	2007-11-01 09:34:22 UTC (rev 5591)
@@ -0,0 +1,1108 @@
+/* the class representing the table in wich we will get the users through ajax - made by Cristian Vrabie;
+  it can use other html elements than table, with a function (passed as getHandler) to display the content;   */
+var ASSTable = Class.create();
+
+ASSTable.prototype = {
+
+  initialize: function( url, limit, domNode, scrollNode, filterNode, getHandler, hasFilters )
+  {
+    this.domNode = $( domNode );
+    this.scroller = new ASSScroller( this, scrollNode );
+    if(hasFilters)
+    this.filter = new ASSFilter( this, filterNode );
+    this.hasFilters = hasFilters;
+    this.filters = "";
+    this.getHandler = getHandler;
+    this.totalRows = -1;
+    this.fetchedRows = new Array();
+    this.limit = limit;
+    this.getUrl = url;
+    this.lastoffset = 1;
+
+        //show initial rows
+    this.showRows( 1, limit );
+  },
+
+  getRows: function( offset, limit, doffset, dlimit )
+  {
+    var url =  this.getUrl + '&offset='+offset+'&limit='+limit;
+
+    if( this.hasFilters )
+    {
+      this.filters = this.filter.getFilters();
+      if(this.filters != "" && this.filters != undefined) 
+      url += this.filters;	
+    }
+
+    var pivot = this;
+
+    $('ajax-loader').style.display = "block";
+
+    new Ajax.Request(url,
+    {
+      method: 'get',
+      onComplete: function( transport ) {
+        $('ajax-loader').style.display = "none";
+      },
+
+      onSuccess: function( transport ) {
+        $('ajax-loader').style.display = "none";
+        var res = eval( '(' + transport.responseText + ')');
+        if(res.totalrows <= res.returnedrows)
+        pivot.scroller.domNode.style.display = "none";
+        else
+          pivot.scroller.domNode.style.display = "block";
+        pivot.updateFetchedRows( res );
+        pivot.displayRows( doffset, dlimit );
+      }
+    });
+  },
+    
+  updateFetchedRows: function( json )
+  {
+    this.json = json;
+    this.totalRows = json.totalrows;
+    for( var i = json.offset; i < json.offset+json.returnedrows; i++)
+    this.fetchedRows[i] = json.rows[i-json.offset];
+  },
+    
+  clearDisplay: function()
+  {
+    var object = this.domNode;
+    while (object.hasChildNodes())
+    {
+      object.removeChild(object.firstChild);
+    }
+  },
+    
+  displayRows: function( offset, limit ) { 
+
+    var f = offset + limit;
+    if(f > this.totalRows) f = this.totalRows;
+    var off = (this.totalRows > 0 ) ? offset : 0;
+    $('showLimits').innerHTML = "Displaying rows from " + off + " to " + f + " out of " + this.totalRows;
+
+    this.clearDisplay();
+
+    for( var i = offset; i < (offset + limit); i++)
+    {           
+      var elem = this.getHandler( this.fetchedRows[i], i, this );
+      this.domNode.appendChild( elem );
+    }
+
+    var raport = this.totalRows / limit;
+    var outheight = this.domNode.parentNode.offsetHeight; 
+    var inheight = Math.round(outheight * raport);
+      
+    this.scroller.domNode.style.height = outheight + "px";
+    this.scroller.domNode.firstChild.style.height = inheight + "px";
+  },
+
+  showRows: function( offset, limit )
+  {
+    this.lastoffset = offset;
+    var buff  = 'request to display rows '+offset+' to '+(offset+limit)+' <br />\n';
+
+        //if no rows fetched get all we need
+    if( this.totalRows == -1 )
+    {
+      this.getRows( offset, limit, offset, limit );
+      buff += 'table is empty so we get all rows';
+      return buff;
+    }
+            
+        //make a range of required rows
+    var min = -1;
+    var max = -1;
+
+    for( var i = offset; i < (offset+limit); i++ )
+    if( this.fetchedRows[i] == undefined )
+    {
+      if(min == -1)  min = i;
+      max = i;
+    }
+        
+        //if we don't need any new row
+    if(min == -1)
+    {
+      buff += 'no need to get new rows <br />\n';
+      this.displayRows( offset, limit );
+    }
+        //we need get new rows
+    else
+    {
+      buff += 'we need to get rows '+min+' to '+(max+1)+' <br />\n';
+      this.getRows( min, max - min + 1, offset, limit );
+    }
+    return buff;        
+  },
+
+  deleteAndShiftRows: function(indx)
+  {
+    for(i in this.fetchedRows)
+    {
+      if(i >= indx) 
+      this.fetchedRows[i] = this.fetchedRows[''+(parseInt(i)+1)];
+    }
+  },
+
+  debugFetchedRows: function()
+  {
+    var buf = '';
+    for(i in this.fetchedRows)
+    if( this.fetchedRows[i] != undefined )
+    buf += i+' ';
+    return buf;
+  }, 
+
+
+  deleteRow: function( indx )
+  { 
+    this.deleteAndShiftRows(indx);
+
+                //compute new refresh offset
+    var newoffset = this.lastoffset;
+    if(indx > this.totalRows - this.limit - 1)
+    newoffset -= 1;
+    if(newoffset <= 0)
+    newoffset = 1;
+    this.totalRows -= 1;
+    this.showRows(newoffset, this.limit);
+    this.scroller.refreshScrollbar();
+  },
+
+  compareStrings: function( s1, s2 )
+  {
+
+    s1 = s1.toLowerCase();
+    s2 = s2.toLowerCase();
+    var l1 = s1.length;
+    var l2 = s2.length;
+    var lower = (l1<l2)?l1:l2;
+
+    for(i=0;i<lower;i++){
+      if(s1.charAt(i)==s2.charAt(i))
+      continue;
+      else if(s1.charAt(i)<s2.charAt(i))
+      return -1;
+      else
+        return 1;
+    }
+    return 0;
+  },
+
+  searchAddPosition: function( start, end, fullname )
+  {
+    if(start>=end)
+    return start;
+
+    var pos = Math.floor((start+end)/2);
+    var comp = this.compareStrings(fullname,this.fetchedRows[pos].username);
+    if( comp == 0 )
+    return pos+1;
+    else if(comp==-1)
+    return this.searchAddPosition(start,pos-1,fullname);
+    else
+      return this.searchAddPosition(pos+1,end,fullname);
+  },
+
+  getMax: function()
+  {
+    var max = 0;
+    for(i in this.fetchedRows){
+      var ii = parseInt(i);
+      if(ii>max)
+      max = ii;
+    }
+    return max;
+  },
+
+  shiftRight: function( poz, max )
+  {
+    if(max==null)
+    max = this.getMax();
+    for(i=max; i>=poz; i-=1)
+    this.fetchedRows[i+1] = this.fetchedRows[i];
+  },
+
+  addRow: function( fullname )
+  {
+    var max = this.getMax();
+    /*
+     * for now, the lightbox does a refresh but it is possible to add without refreshing
+    var pos = this.searchAddPosition(0, max, fullname);
+    this.shiftRight(pos, max);
+    this.fetchedRows[pos] = eval( jsonul userului introdus );
+    var rest = 0;
+    var s = pos - round(this.limit / 2);
+    if(s < 1 ) { s = 1; rest = this.limit / 2 - pos; }
+    var e = pos + this.limit / 2 + rest;
+    if(e > this.totalRows) e = this.totalRows;
+    this.showRows(s, e);
+    */
+  },
+
+  createAddHandler: function(pivot)
+  {
+    return function(){
+      pivot.addRow("ca");
+    }
+  }
+}
+
+////////////////////////////////////////////////////////////////////////
+/* the class representing the dynamic scroller */
+ASSScroller = Class.create();
+
+ASSScroller.prototype = {
+
+  initialize: function( table, domNode )
+  {
+    this.table = table; 
+    this.domNode = $(domNode);
+    this.advanceRTG = 1;
+    this.timer = null; 
+    this.linkEvent();
+  },
+    
+  linkEvent: function()
+  {
+    Event.observe( this.domNode, 'scroll', this.makeScrollHandler( this ) );
+  },
+    
+  makeScrollHandler: function( pivot )
+  {
+    return function()
+    {
+      pivot.onscroll();
+    }
+  },
+    
+  computeScroll: function( )
+  {
+    var h = $('scrollbar1').scrollHeight - 100;
+    var y = $('scrollbar1').scrollTop;
+    var p = y / h;
+
+    if(this.table.totalRows == -1)
+    var rtg = 1;
+    else
+      var rtg = Math.round(this.table.totalRows*p); 
+            
+            
+    if( (rtg + this.table.limit) > this.table.totalRows )
+    rtg = this.table.totalRows - this.table.limit + 1;
+            
+    if( rtg < 1 ) rtg = 1;
+            
+    return rtg;
+  },
+    
+  applyscroll: function( )
+  {
+    this.table.showRows( this.advanceRTG, this.table.limit );
+    this.timer = null;
+  },
+    
+    //closure
+  makeTimeoutHandler: function( pivot )
+  {
+    return function()
+    {
+      pivot.applyscroll();
+    }
+  },
+    
+  onscroll: function()
+  {
+    this.advanceRTG = this.computeScroll(); 
+                
+    if( this.timer == null )
+    this.timer = setTimeout( this.makeTimeoutHandler( this ), 800 );
+    else
+    {
+      //////
+    }
+  },
+
+  refreshScrollbar: function( )
+  { 
+    var raport = this.table.totalRows / this.table.limit;
+    var outheight = this.table.domNode.parentNode.offsetHeight; 
+    var inheight = Math.round(outheight * raport);
+      
+    this.domNode.style.height = outheight + "px";
+    this.domNode.firstChild.style.height = inheight + "px";
+  }
+    
+}
+
+////////////////////////////////////////////////////////////////////////
+/* the class that deals with the filtering in a table */
+
+ASSFilter = Class.create();
+
+ASSFilter.prototype = {
+  initialize: function( table, filterNode)
+  {
+    this.table = table;
+    this.filterNode = $(filterNode);
+    this.filters = new Object();
+        
+    this.linkEvents();
+  },
+    
+  makeRefreshHandler: function( pivot )
+  {
+    return function()
+    {
+      pivot.refreshContent();
+    }
+  },
+    
+  linkEvents : function()
+  {
+    var inputs = this.filterNode.getElementsByTagName('input');
+    var selects = this.filterNode.getElementsByTagName('select');
+        
+    for(var i = 0; i < inputs.length; i++)
+    Event.observe(inputs[i], 'keyup', this.makeRefreshHandler(this));
+            
+    for(var i = 0; i < selects.length; i++)
+    Event.observe(selects[i], 'change', this.makeRefreshHandler(this));
+  },
+    
+    
+  getFilters : function()
+  {
+    var inputs = this.filterNode.getElementsByTagName('input');
+    for(var i = 0; i < inputs.length; i++) 
+    {
+      var key = inputs[i].name;
+      this.filters[key] = trim(inputs[i].value);
+    }
+
+    var selects = this.filterNode.getElementsByTagName('select');
+    for(var i = 0; i < selects.length; i++)
+    {
+      this.filters[selects[i].name] = trim(selects[i].options[selects[i].selectedIndex].value);
+    }
+      
+    var filterString = "";
+    for(key in this.filters)
+    if(key != "extend" && this.filters[key] != "") filterString += '&' + key + '=' + this.filters[key];
+                
+    return filterString;
+  },
+    
+  refreshContent : function()
+  {
+    this.table.filters = this.getFilters();
+        
+    this.table.totalRows = -1;
+    this.table.fetchedRows = new Array();
+    this.table.showRows(1, this.table.limit);
+  }
+    
+}
+
+/* the class that deals with the filtering in a table */
+/* this represent a triple state checkbox */
+
+MSCheckbox = Class.create();
+
+MSCheckbox.prototype = {
+
+  initialize: function( domNode, childId,  defaultState )
+  {
+    this.domNode = $(domNode);
+    this.childId = childId;
+    this.defaultState = defaultState;
+    this.state = defaultState;
+    this.states = [0,1,2]; // 0 = none; 1 = allow, 2 == deny
+    this.nrstates = this.states.length;
+    this.images = ["$xwiki.getSkinFile("icons/rights-manager/none.png")","$xwiki.getSkinFile("icons/rights-manager/allow.png")","$xwiki.getSkinFile("icons/rights-manager/deny1.png")"];
+    this.labels = ['','',''];
+        // buttons with actions upon checkboxes
+    this.buttons = new Array();
+
+    this.draw(this.state);
+    this.attachEvents();
+  },
+
+  draw: function(state)
+  {
+                //remove image
+    if(this.domNode.childNodes.length > 0) 
+    this.domNode.removeChild( this.domNode.firstChild );
+                //remove label
+    if(this.domNode.childNodes.length > 0)
+    this.domNode.removeChild( this.domNode.lastChild );
+                //add new image
+    var img = document.createElement('img');
+    img.src = this.images[ state ];
+    img.id = this.childId;
+    this.domNode.appendChild( img );
+                //add label
+    if( this.labels[ state ] != '')
+    {
+      var la = document.createElement('span');
+      la.appendChild( document.createTextNode(this.labels[state]));
+      this.domNode.appendChild( la );
+    }
+  },
+
+  next: function()
+  {
+    this.state = (this.state + 1) % this.nrstates;
+    this.draw(this.state);
+  },
+
+  back: function()
+  {
+    this.draw(this.prevState);
+  },
+
+  createClickHandler: function( pivot )
+  {
+    return function()
+    {
+      pivot.next();
+      for(var i = 0; i < pivot.buttons.length; i++)
+      pivot.buttons[i].notifyChange();
+    }
+  },
+
+  equalize: function()
+  {
+    this.defaultState = this.state;
+    this.notifyButtons();
+  },
+
+  notifyButtons : function()
+  {
+    for(var i = 0; i < this.buttons.length; i++)
+    this.buttons[i].notifyChange();
+  },
+
+  attachEvents: function()
+  {
+    Event.observe( this.domNode, 'click', this.createClickHandler(this));
+  },
+  
+  attachButton : function(b)
+  {
+    this.buttons.push(b);
+  }
+}
+
+////////////////////////////////////////////////////////////////////////
+/* class that represents an 'action' button    */
+MButton = Class.create();
+
+MButton.prototype = {
+  initialize : function() {
+    //
+  },
+
+  init: function(domNode, type, table, indx, checkboxes)
+  {
+    this.domNode = $(domNode);
+    this.type = type;
+    this.table = table;
+    this.indx = indx;
+    this.checkboxes = checkboxes;
+
+    this.draw(); 
+    this.attachCheckboxes();
+    this.attachHandler();
+  },
+    
+  attachHandler : function()
+  {
+    Event.observe(this.domNode.firstChild, 'click', this.createHandler(this));
+  },
+
+  attachCheckboxes : function()
+  {
+    for(var i = 0; i < this.checkboxes.length; i++) 
+    this.checkboxes[i].attachButton(this); 
+  },
+
+  checkEqual : function()
+  {
+    for(var i = 0; i < this.checkboxes.length; i++)
+    if(this.checkboxes[i].state != this.checkboxes[i].defaultState)
+    return false;
+    return true;
+  },
+
+  checkClear : function()
+  {
+    for(var i = 0; i < this.checkboxes.length; i++)
+    if(this.checkboxes[i].state != 0)
+    return false;
+    return true;
+  }
+}
+
+
+MSaveButton = Class.create();
+
+MSaveButton.prototype = Object.extend(new MButton(), {
+
+  initialize : function(domNode, table, indx, checkboxes)
+  {
+    this.ready = false;
+    this.init(domNode, 'save', table, indx, checkboxes);
+  },
+
+  draw : function()
+  {
+    var img = document.createElement('img');
+    img.src = '$xwiki.getSkinFile("icons/rights-manager/saveg.png")';
+    img.alt = "";
+    img.className = "icon-manage";
+    this.domNode.appendChild(img);
+  },
+    
+  createHandler : function(pivot)
+  {
+    return function()
+    {  
+      if(pivot.ready)
+      {
+        var allows = "";
+        var denys = "";
+        var j = 0, k = 0;
+        for(var i = 0; i < pivot.checkboxes.length; i++)
+        {
+          if(pivot.checkboxes[i].state == 1)
+          {
+            if(j > 0)  allows += ",";
+            allows += pivot.checkboxes[i].childId.substring(0, pivot.checkboxes[i].childId.indexOf('_'));
+            j++; 
+          }
+      
+          else if(pivot.checkboxes[i].state == 2)
+          {
+            if(k > 0) denys += ",";
+            denys += pivot.checkboxes[i].childId.substring(0, pivot.checkboxes[i].childId.indexOf('_'));
+            k++;
+          }      
+        }
+
+        var url = "?xpage=saverights";
+        url += "&fullname=" + pivot.table.fetchedRows[pivot.indx].fullname + "&clsname=" + pivot.table.json.clsname + "&uorg=" + pivot.table.json.uorg + "&allows=" + allows + "&denys=" + denys;
+
+        new Ajax.Request(url,
+        {
+          method: 'get',
+          onSuccess: function()
+          {
+            pivot.table.fetchedRows[pivot.indx].allows = allows;
+            pivot.table.fetchedRows[pivot.indx].denys = denys;
+            for(var i = 0; i < pivot.checkboxes.length; i++)
+            pivot.checkboxes[i].equalize();
+          }
+        }); 
+      }
+    }
+  },
+
+  notifyChange : function()
+  {
+    if(! this.checkEqual())
+    {
+      this.ready = true;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/save.png")';
+                //icon-manage-enabled
+    }
+    else
+    {
+      this.ready = false;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/saveg.png")';
+                //icon-manage-disabled
+    }
+  }
+});
+
+
+MRevertButton = Class.create();
+
+MRevertButton.prototype = Object.extend(new MButton(), {
+
+  initialize : function(domNode, table, indx, checkboxes)
+  {
+    this.ready = false;
+    this.init(domNode, 'revert', table, indx, checkboxes);
+  },
+
+  draw : function()
+  {
+    var img = document.createElement('img');
+    img.src = '$xwiki.getSkinFile("icons/rights-manager/revertg.png")';
+    img.alt = "";
+    img.className = "icon-manage";
+    this.domNode.appendChild(img);
+  },
+    
+  createHandler : function(pivot)
+  {
+    return function()
+    {  
+      if(pivot.ready)
+      {
+        for(var i = 0; i < pivot.checkboxes.length; i++)
+        {
+          pivot.checkboxes[i].state = pivot.checkboxes[i].defaultState;
+          pivot.checkboxes[i].draw(pivot.checkboxes[i].state);
+          pivot.checkboxes[i].notifyButtons();
+        }
+      }
+    }
+  },
+
+  notifyChange : function()
+  {
+    if(! this.checkEqual())
+    {
+      this.ready = true;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/revert.png")';
+                //icon-manage-enabled
+    }
+    else
+    {
+      this.ready = false;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/revertg.png")';
+                //icon-manage-disabled
+    }
+  }
+});
+
+
+MClearButton = Class.create();
+
+MClearButton.prototype = Object.extend(new MButton(), {
+
+  initialize : function(domNode, table, indx, checkboxes)
+  {
+    this.ready = true;
+    this.init(domNode, 'clear', table, indx, checkboxes);
+    this.notifyChange(); // verify if all checkboxes are clear to disable the clear button
+  },
+
+  draw : function()
+  {
+    var img = document.createElement('img');
+    img.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
+    img.alt = "";
+    img.className = "icon-manage";
+    this.domNode.appendChild(img);
+  },
+    
+  createHandler : function(pivot)
+  {
+    return function()
+    {  
+      if(pivot.ready)
+      {
+        for(var i = 0; i < pivot.checkboxes.length; i++)
+        {
+          pivot.checkboxes[i].state = 0;
+          pivot.checkboxes[i].draw(pivot.checkboxes[i].state);
+        }
+        pivot.checkboxes[pivot.checkboxes.length - 1].notifyButtons();
+      }
+    }
+  },
+
+  notifyChange : function()
+  {
+    if(this.checkClear())
+    {
+      this.ready = false;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/clearg.png")';
+                //icon-manage-disabled
+    }
+    else
+    {
+      this.ready = true;
+      this.domNode.firstChild.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
+                //icon-manage-disabled
+    }
+  }
+});
+
+
+/** user list element creator **/
+function displayUsers( row, i, table)
+{
+  var userurl = row.userurl;
+  var usersaveurl = row.usersaveurl;
+  var userinlineurl = row.userinlineurl;
+  var fullname = row.fullname;
+  var wikiname = table.json.wikiname;
+  var docurl = row.docurl;
+                
+  var tr = document.createElement('tr'); 
+  if(i % 2 == 0)
+  tr.className = "even";
+  else
+    tr.className = "odd";
+        
+  var username = document.createElement('td');
+  if(wikiname == "local")
+  {
+    var a = document.createElement('a');
+    a.href = userurl;
+    a.appendChild( document.createTextNode( row.username ) );
+    username.appendChild( a );
+    username.className = "localusername";
+  }
+  else
+  {
+    username.appendChild( document.createTextNode( row.username ) );
+    username.className = "globalusername";
+  }
+  tr.appendChild(username);
+            
+  var firstname = document.createElement('td');
+  firstname.appendChild(document.createTextNode(row.firstname) );
+  firstname.className = "firstname";
+  tr.appendChild(firstname);
+          
+  var lastname = document.createElement('td');
+  lastname.appendChild(document.createTextNode(row.lastname) );
+  lastname.className = "lastname";
+  tr.appendChild(lastname);
+            
+  var manage = document.createElement('td');
+  manage.className = "manage";
+  if(wikiname == "local")
+  {
+                //edit user
+    var edit = document.createElement('img');
+    edit.src = '$xwiki.getSkinFile("icons/rights-manager/edit.png")';
+    edit.title = '$msg.get("edit")';
+    Event.observe(edit, 'click', editUserOrGroup(userinlineurl, usersaveurl, docurl));
+    edit.className = 'icon-manage';
+    manage.appendChild(edit);
+
+      //delete group
+    var del = document.createElement('img');
+    del.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
+    del.title = '$msg.get("delete")';
+    Event.observe(del, 'click', deleteUserOrGroup(i, table, fullname));
+    del.className = 'icon-manage';
+    manage.appendChild(del);
+  }
+  tr.appendChild(manage);
+  return tr;
+}
+
+/** group list element creator **/
+function displayGroups( row, i, table)
+{
+  var userurl = row.userurl;
+  var userinlineurl = row.userinlineurl;
+  var usersaveurl = row.usersaveurl;
+  var fullname = row.fullname;
+  var wikiname = table.json.wikiname;
+  var docurl = row.docurl;            
+  var tr = document.createElement('tr'); 
+  
+  if(i % 2 == 0) tr.className = "even";
+  else tr.className = "odd";
+        
+  var username = document.createElement('td');
+  if(wikiname == "local")
+  {
+    var a = document.createElement('a');
+    a.href = userurl;
+    a.appendChild( document.createTextNode( row.username ) );
+    username.appendChild( a );
+    username.className = "localgroupname";
+  }
+  else
+  {
+    username.appendChild( document.createTextNode( row.username ) );
+    username.className = "globalgroupname";
+  }
+  tr.appendChild(username);
+  
+  var members = document.createElement('td');
+  if(wikiname == "local")
+  members.appendChild(document.createTextNode(row.members));
+  else
+    members.appendChild(document.createTextNode("-"));
+  members.className = "groupmembers";
+  tr.appendChild(members);
+                        
+  var manage = document.createElement('td');
+  manage.className = "groupmanage";
+
+  if(wikiname == "local")
+  {
+                //delete group
+    var del = document.createElement('img');
+    del.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
+    del.title = '$msg.get("delete")';
+    Event.observe(del, 'click', deleteUserOrGroup(i, table, fullname));
+    del.className = 'icon-manage';
+
+                //edit user
+    var edit = document.createElement('img');
+    edit.src = '$xwiki.getSkinFile("icons/rights-manager/edit.png")';
+    edit.title = '$msg.get("edit")';
+    Event.observe(edit, 'click', editUserOrGroup(userinlineurl, usersaveurl, docurl));
+    edit.className = 'icon-manage';
+
+    manage.appendChild(edit);
+    manage.appendChild(del);
+  }
+
+  tr.appendChild(manage);
+     
+  return tr;
+}
+
+/** group members list element creator **/
+function displayMembers( row, i, table )
+{
+  var tr = document.createElement('tr');
+  if(i % 2 == 0) tr.className = "even";
+  else tr.className = "odd";
+        
+  var membername = document.createElement("td");
+  membername.className = "membername";
+  var a = document.createElement("a");
+  a.href = row.memberurl;
+  a.appendChild(document.createTextNode(row.fullname));
+  membername.appendChild(a);
+        
+  var membermanage = document.createElement("td");
+  membermanage.className = "manage";
+  var del = document.createElement('img');
+  del.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
+  del.title = '$msg.get("delete")';
+  Event.observe(del, 'click', deleteMember(i, table, row.fullname, row.docurl));
+  del.className = 'icon-manage';
+  membermanage.appendChild(del);
+
+  tr.appendChild(membername);
+  tr.appendChild(membermanage);
+  
+  return tr;
+}
+
+
+/** user and groups list element creator **/
+function displayUsersAndGroups( row, i, table )
+{ 
+  var userurl = row.userurl;
+  var uorg = table.json.uorg;
+  var allows = row.allows;
+  var denys = row.denys;
+  var objs = new Array(); //array with checkboxes objects
+  var tr = document.createElement('tr');
+ 
+  if(i % 2 == 0) tr.className = "even";
+  else tr.className = "odd";
+  
+  var username = document.createElement('td');
+  if(table.json.wikiname == "local")
+  {
+    var a = document.createElement('a');
+    a.href = userurl;
+    a.appendChild( document.createTextNode( row.username ) );
+    username.appendChild( a );
+    if(uorg == "users") username.className = "localusername";
+    else username.className = "globalusername";
+  }
+  else
+  {
+    username.appendChild( document.createTextNode( row.username ) );
+    if(uorg == "users") username.className = "globalusername";
+    else className = "localusername";
+  }
+  tr.appendChild(username);
+
+  var view = document.createElement('td');
+  view.className = "rights";
+  var r = 0;
+  if(allows.indexOf("view") >= 0) r = 1;
+  else if(denys.indexOf("view") >= 0) r = 2;
+  var chbx1 = new MSCheckbox(view, "view_"+i, r);
+  tr.appendChild(view);
+  objs.push(chbx1);
+        
+  var comment = document.createElement('td');
+  comment.className = "rights";
+  r = 0;
+  if(allows.indexOf("comment") >= 0) r = 1;
+  else if(denys.indexOf("comment") >= 0) r = 2;
+  var chbx2 = new MSCheckbox(comment, "comment_"+i, r);
+  tr.appendChild(comment);
+  objs.push(chbx2);
+        
+  var edit = document.createElement('td');
+  edit.className = "rights";
+  r = 0;
+  if(allows.indexOf("edit") >= 0) r = 1;
+  else if(denys.indexOf("edit") >= 0) r = 2;
+  var chbx3 = new MSCheckbox(edit, "edit_"+i, r);
+  tr.appendChild(edit);
+  objs.push(chbx3);
+        
+  var del = document.createElement('td');
+  del.className = "rights";
+  r = 0;
+  if(allows.indexOf("delete") >= 0)  r = 1;
+  else if(denys.indexOf("delete") >= 0) r = 2;
+  var chbx4 = new MSCheckbox(del, "delete_"+i, r);
+  tr.appendChild(del);
+  objs.push(chbx4);
+        
+  if(table.json.reg == true)
+  {
+    var register = document.createElement('td');
+    register.className = "rights";
+    r = 0;
+    if(allows.indexOf("register") >= 0)  r = 1;
+    else if(denys.indexOf("register") >= 0) r = 2;
+    var chbx5 = new MSCheckbox(register, "register_"+i, r);
+    tr.appendChild(register);
+    objs.push(chbx5);
+  }
+        
+  if(table.json.admin == true)
+  {
+    var admin = document.createElement('td');
+    admin.className = "rights";
+    r = 0;
+    if(allows.indexOf("admin") >= 0) r = 1;
+    else if(denys.indexOf("admin") >= 0) r = 2;
+    var chbx6 = new MSCheckbox(admin, "admin_"+i, r);
+    tr.appendChild(admin);
+    objs.push(chbx6);
+  }
+        
+  if(table.json.progr == true)
+  {
+    var progr = document.createElement('td');
+    progr.className = "rights";
+    r = 0;
+    if(allows.indexOf("programming") >= 0) r = 1;
+    else if(denys.indexOf("programming") >= 0) r = 2;
+    var chbx7 = new MSCheckbox(progr, "programming_"+i, r);
+    tr.appendChild(progr);
+    objs.push(chbx7);
+  }
+        
+  var manage = document.createElement('td');
+  manage.clas