Author: tmortagne
Date: 2007-11-02 18:23:07 +0100 (Fri, 02 Nov 2007)
New Revision: 5615
Added:
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editgroup.vm
Modified:
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/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/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/edituser.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/registeruser.vm
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/usersandgroups.css
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js
Log:
XWIKI-1780: Improve rights management
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/addnewgroup.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -1,9 +1,11 @@
-<div>
+<div id="addnewgroup">
<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();" />
+<br />
+<span class="buttonwrapper"><input class="button" type="submit"
name="formactioncancel" value="$msg.get("cancel")" onclick="
window.lb.lbHide(); window.lb.lbClearData(); return false;"/></span>
</div>
</form>
</div>
\ 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-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminglobalrights.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -5,13 +5,13 @@
#set($interface = $xwiki.rightsmanager.defaultUi)
#end
<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&space=${doc.space}&interface=new'; }
else if(this.options[this.selectedIndex].value=='stable') {
location='?editor=globalrights&space=${doc.space}&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")
+ ## switch between the new and the old interface
+ <select name="switchInterface" onchange="if(this.value=='new') {
location='?editor=globalrights&space=${doc.space}&interface=new'; }
else if(this.value=='stable') {
location='?editor=globalrights&space=${doc.space}&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") ## new interface
#if($doc.fullName == "XWiki.XWikiPreferences")
#if($request.editor == "globalrights")
#set($clsname = "XWiki.XWikiGlobalRights")
@@ -23,10 +23,8 @@
#set($clsname = "XWiki.XWikiGlobalRights")
#else
#set($clsname = "XWiki.XWikiRights")
-#end
-#end
+#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>
@@ -36,7 +34,7 @@
<select name="uorg" style="width: 130px;">
<option value="groups" selected="selected">Groups</option>
<option value="users">Users</option>
- </select> <span id="showLimits"></span>
+ </select> <span id="showLimits"></span>
</td>
</tr>
<tr><td valign="top" style="width:100%">
@@ -51,7 +49,7 @@
<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
+ #if($hasPrgr)<td class="rights">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">
@@ -83,13 +81,11 @@
<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
+#else ## stable interface
#set ($classname = "XWiki.XWikiGlobalRights")
#set( $class = $xwiki.getDocument($classname).xWikiClass)
#set( $redirect = "$xwiki.getRequestURL()&editor=rights")
@@ -110,7 +106,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>
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-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/admingroups.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -5,15 +5,14 @@
#set($interface = $xwiki.rightsmanager.defaultUi)
#end
<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&space=XWiki&interface=new'; } else
if(this.options[this.selectedIndex].value=='stable') {
location='?editor=groups&space=XWiki&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;">
+ #set($url = "?xpage=getgroups")
+ ## switch between the new and the old interface
+ <select name="switchInterface" onchange="if(this.value=='new') {
location='?editor=groups&space=XWiki&interface=new'; } else
if(this.value=='stable') {
location='?editor=groups&space=XWiki&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") ## new interface
<div id="ajax-loader">Loading...<br />
<img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..."
title="Loading..." />
</div>
@@ -23,7 +22,7 @@
<table border="0" cellpadding="2" cellspacing="0" width="100%"
class="display">
<thead class="theader">
<tr>
- <td class="hgroupname">Groupname</td>
+ <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>
@@ -48,10 +47,9 @@
</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>
+<tr><td colspan="2"><div id="add-new-user"
class="btn">$msg.get("rightsmanager.addnewgroup")</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));
@@ -60,12 +58,11 @@
#set($redirecturl = $doc.getURL())
Event.observe($('add-new-user'), "click", makeAddHandler("$url",
"$saveurl", "$redirecturl"));
</script>
-</div>
-#else
+#else ## stable interface
<div class="layoutsubsection">
<div style="overflow:auto">
$xwiki.parseMessage("editgroupsredirect")
</div>
</div>
#end
-</div>
+</div> ## xwikieditcontent
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-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminspacerights.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -5,13 +5,13 @@
#set($interface = $xwiki.rightsmanager.defaultUi)
#end
<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&space=${doc.space}&interface=new'; }
else if(this.options[this.selectedIndex].value=='stable') {
location='?editor=spacerights&space=${doc.space}&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")
+ ## switch between the new and the old interface
+ <select name="switchInterface" onchange="if(this.value=='new') {
location='?editor=spacerights&space=${doc.space}&interface=new'; }
else if(this.value=='stable') {
location='?editor=spacerights&space=${doc.space}&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") ## new interface
#if($doc.fullName == "XWiki.XWikiPreferences")
#if($request.editor == "globalrights")
#set($clsname = "XWiki.XWikiGlobalRights")
@@ -21,17 +21,18 @@
#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&global=1&interface=${interface}&space='+this.value;">
+<select name="space" style="width: 130px;"
onchange="location='?editor=spaceright&global=1&space='+this.value+'&interface=${interface}';">
<option value="" label="">---</option>
- #foreach($spaceitem in $xwiki.spaces)
- <option value="$spaceitem" label="$spaceitem">$spaceitem</option>
+ #foreach($spaceitem in $xwiki.spaces) ## display only the spaces where
has admin rights
+ #if($xwiki.hasAccessLevel("admin", $context.user,
"${spaceitem}.WebPreferences"))
+ <option value="$spaceitem" label="$spaceitem">$spaceitem</option>
#end
+ #end
</select>
</div>
<table cellpadding="0" cellspacing="5" id="usersandgroupstable">
@@ -50,12 +51,12 @@
<td class="rights">View</td>
<td class="rights">Comment</td>
<td class="rights">Edit</td>
- <td class="rights">Delete</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
+ #if($hasPrgr)<td class="rights">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">
@@ -87,13 +88,11 @@
<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
+#else ## stable interface
#set ($classname = "XWiki.XWikiGlobalRights")
#set( $class = $xwiki.getDocument($classname).xWikiClass)
#set( $redirect = "$xwiki.getRequestURL()&editor=rights")
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-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/adminusers.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -5,28 +5,29 @@
#set($interface = $xwiki.rightsmanager.defaultUi)
#end
<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&space=XWiki&interface=new'; } else
if(this.options[this.selectedIndex].value=='stable') {
location='?editor=users&space=XWiki&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>
+## switch between the new and the stable interface
+<select name="switchInterface" onchange="if(this.value=='new') {
location='?editor=users&space=XWiki&interface=new'; } else
if(this.value=='stable') {
location='?editor=users&space=XWiki&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>
+#if($interface == "new") ## new interface
+ #set($url = "?xpage=getusers")
+ <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">
+ </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>
@@ -39,7 +40,7 @@
<option value="both">Both</option>
</select>
#else <input name="wiki" type="hidden" value="local" /> #end
- </td>
+ </td>
</tr>
</thead>
<tbody id="display1"><tr><td colspan="5"> </td></tr></tbody>
@@ -48,12 +49,10 @@
<div id="scrollbar1" class="scrollbar"><div
class="inscrollbar"> </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";
+ </tr>
+ <tr><td colspan="2"><div id="add-new-user"
class="btn">$msg.get("rightsmanager.addnewuser")</div></td></tr>
+ </table>
+ <script type="text/javascript">
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));
@@ -61,10 +60,9 @@
#set($saveurl = $xwiki.getURL("XWiki.Register", "register"))
#set($redirecturl = $doc.getURL())
Event.observe($('add-new-user'), "click", makeAddHandler("$url",
"$saveurl", "$redirecturl"));
-</script>
-</div>
-#else
+ </script>
+#else ## stable interface
<p>$xwiki.parseMessage("editusersredirect")</p>
<p>$xwiki.parseMessage("editgroupsredirect")</p>
#end
-</div>
+</div> ## end of xwikieditcontent
Added:
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editgroup.vm
===================================================================
---
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editgroup.vm
(rev 0)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editgroup.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -0,0 +1,123 @@
+##check to see if the XWiki.XWkiGroupSheet exists
+#if($xwiki.getDocument("XWiki.XWikiGroupSheet").isNew())
+<div id="groupwrap">
+<div id="ajax-loader">Loading...<br />
+ <img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="Loading..."
title="Loading..." />
+</div>
+<table id="memberstable">
+<tr><td colspan="2" id="showLimits"></td></tr>
+<tr><td>
+ <table class="display">
+ <thead class="theader">
+ <tr>
+ <td class="membername">Member</td>
+ <td id="hgroupmanage">Manage</td>
+ </tr>
+ </thead>
+ <tbody id="display1"><tr><td> </td></tr></tbody>
+ </table></td>
+ <td valign="top">
+ <div id="scrollbar1" class="scrollbar"><div
class="inscrollbar"> </div></div>
+ </td>
+ <td id="buff"></td>
+</tr>
+</table>
+#if($context.action == "inline")
+ <div id="addNewMember">
+ <table cellpadding="5" cellspacing="5">
+ <tr>
+ <td><strong>Add a new user </strong></td>
+ <td>
+ <select name="wiki" onchange="changeWiki(this);">
+ <option value="local" selected="selected">Local</option>
+ <option value="global">Global</option>
+ </select>
+ </td>
+ <td>
+ <input id="userSuggest" type="text" size="30" name="newMember"
autocomplete="off" onfocus="createSuggest(this, 'user');"/>
+ </td>
+ <td>
+ <input type="button" id="addNewUser" class="button"
value="$msg.get('add')" onclick="addNewMember('user',
$('userSuggest').value);"/>
+ </td>
+ </tr>
+ <tr>
+ <td><strong>Add a new group </strong></td>
+ <td>
+ <select name="wiki" onchange="changeWiki(this);">
+ <option value="local" selected="selected">Local</option>
+ <option value="global">Global</option>
+ </select>
+ </td>
+ <td>
+ <input id="groupSuggest" type="text" size="30" name="newMember"
autocomplete="off" onfocus="createSuggest(this, 'group');"/>
+ </td>
+ <td>
+ <input type="button" id="addNewGroup" class="button"
value="$msg.get('add')" onclick="addNewMember('group',
$('groupSuggest').value);"/>
+ </td>
+ </tr>
+ <tr><td colspan="3" id="errMsg"></td></tr>
+</table>
+<span class="buttonwrapper"><input class="button" type="submit"
name="formactioncancel" value="$msg.get("cancel")" onclick="
window.lb.lbHide(); window.lb.lbClearData(); return false;"/></span>
+</div>
+#end
+</div>
+
+#set($url = $doc.getURL("view", "xpage=getgroupmembers"))
+<script type="text/javascript">
+ tabl = new ASSTable("$url", 15, "display1", "scrollbar1", "memberstable",
displayMembers, true);
+
+ //create new ajax suggest
+ suggesturl = "$doc.getURL()" + "?xpage=uorgsuggest" + "&" +
"classname=XWiki.XWikiUsers" + "&" + "wiki=local";
+
+ //create a new suggest depending on the wiki, user or group and matching
string params
+ createSuggest = function(input, uorg)
+ {
+ if(suggesturl.indexOf("&" + "uorg=") > 0) suggesturl =
suggesturl.substring(0, suggesturl.indexOf("&" + "uorg="));
+ if(uorg == "user")
+ suggesturl += "&" + "uorg=user" + "&";
+ else
+ suggesturl += "&" + "uorg=group" + "&";
+
+ //clear the errors
+ $('errMsg').innerHTML = "";
+ return new ajaxSuggest(input, { script: suggesturl, varname:'input' } );
+ }
+
+ addNewMember = function(uorg, name)
+ {
+ //url = adduorg
+ if(name)
+ {
+ var url = "$doc.getURL("view")" + "?xpage=adduorg" + "&" +
"uorg=" + uorg + "&" + "name=" + name;
+ new Ajax.Request(url,
+ {
+ method: 'get',
+ onSuccess: function(transport) {
+ $('userSuggest').value = "";
+ $('groupSuggest').value = "";
+
+ var nr = parseInt(transport.responseText);
+ if(nr == 0) $('errMsg').innerHTML =
"$msg.get("duplicateuser")";
+ else {
+ var end = window.tabl.totalRows + nr;
+ var start = end - window.tabl.limit;
+ if(start < 1) start = 1;
+ window.tabl.showRows(start, end);
+ }
+ }
+ });
+ }
+ }
+
+ changeWiki = function(obj)
+ {
+ if(suggesturl.indexOf("&" + "wiki=") >= 0)
+ suggesturl = suggesturl.substring(0, suggesturl.indexOf("&" +
"wiki="));
+ suggesturl += "&" + "wiki=" + trim(obj.options[obj.selectedIndex].value);
+ // clear errors messages
+ $('errMsg').innerHTML = "";
+ }
+</script>
+#else
+$xwiki.renderText($xwiki.getDocument("XWiki.XWikiGroupSheet").getContent(),
$doc)
+#end
\ No newline at end of file
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-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/editrights.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -5,7 +5,7 @@
#set($interface = $xwiki.rightsmanager.defaultUi)
#end
<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&interface=new'; } else
if(this.options[this.selectedIndex].value=='stable') {
location='?editor=rights&interface=stable'; } ">
+<select name="switchInterface" onchange="if(this.value=='new') {
location='?editor=rights&interface=new'; } else if(this.value=='stable') {
location='?editor=rights&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>
@@ -25,7 +25,6 @@
#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>
@@ -48,7 +47,7 @@
<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
+ #if($hasPrgr)<td class="rights">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">
@@ -80,9 +79,7 @@
<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>
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/edituser.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -17,6 +17,6 @@
</div>
#end
</form>
-<span class="buttonwrapper">
-<input class="button" type="submit" name="formactionsave"
value="$msg.get("save")" onclick=" window.lb.lbSaveForm();"/></span>
+<span class="buttonwrapper"><input class="button" type="submit"
name="formactionsave" value="$msg.get("save")" onclick="
window.lb.lbSaveForm();"/></span>
+<span class="buttonwrapper"><input class="button" type="submit"
name="formactioncancel" value="$msg.get("cancel")" onclick="
window.lb.lbHide(); window.lb.lbClearData(); return false;"/></span>
</div>
\ No newline at end of file
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getgroups.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -4,7 +4,7 @@
#set( $off = $offset - 1 )
#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
-#set( $rm = $xwiki.rightsmanager )
+#set( $rm = $xwiki.rightsmanager.groupsApi )
#### get all the request parameters which are filters
#set( $params = $request.getParameterMap() )
@@ -43,14 +43,14 @@
#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 ) )
+ #set( $countUsers = $rm.countAllMatchedLocalGroups( $filterMap ) )
#elseif( $value == "global" )
#set( $users = $rm.getAllMatchedGlobalGroups( $filterMap, $limit, $off,
$orderList ) )
- #set( $countUsers = $rm.groupsApi.countAllMatchedGlobalGroups( $filterMap ) )
+ #set( $countUsers = $rm.countAllMatchedGlobalGroups( $filterMap ) )
#else
## get both local and global users
#set( $users = $rm.getAllMatchedGroups( $filterMap, $limit, $off, $orderList
) )
- #set( $countUsers = $rm.groupsApi.countAllMatchedGroups( $filterMap ) )
+ #set( $countUsers = $rm.countAllMatchedGroups( $filterMap ) )
#end
#set( $wikiname = $request.get("wiki") )
@@ -69,7 +69,7 @@
"members" :
"$xwiki.getDocument($user.fullName).getObjects("XWiki.XWikiGroups").size()",
"userurl" : "$xwiki.getURL($user.fullName)",
"usersaveurl" : "$user.getURL('save')",
- "userinlineurl" : "$user.getURL("inline", "xpage=plain")",
+ "userinlineurl" : "$user.getURL("inline", "xpage=editgroup")",
"docurl" : "$xwiki.getURL("XWiki.XWikiGroups", "admin",
"editor=groups&space=XWiki")"
}
#end
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusers.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -4,7 +4,7 @@
#set( $off = $offset - 1 )
#set( $limit = $xwiki.parseInt( $request.get( "limit" ) ) )
-#set( $rm = $xwiki.rightsmanager )
+#set( $rm = $xwiki.rightsmanager.usersApi )
#### get all the request parameters which are filters
#set( $params = $request.getParameterMap() )
@@ -44,14 +44,14 @@
#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 ) )
+ #set( $countUsers = $rm.countAllMatchedLocalUsers( $filterMap ) )
#elseif( $value == "global" )
#set( $users = $rm.getAllMatchedGlobalUsers( $filterMap, $limit, $off,
$orderList ) )
- #set( $countUsers = $rm.usersApi.countAllMatchedGlobalUsers( $filterMap ) )
+ #set( $countUsers = $rm.countAllMatchedGlobalUsers( $filterMap ) )
#else
## get both local and global users
#set( $users = $rm.getAllMatchedUsers( $filterMap, $limit, $off, $orderList
) )
- #set( $countUsers = $rm.usersApi.countAllMatchedUsers( $filterMap ) )
+ #set( $countUsers = $rm.countAllMatchedUsers( $filterMap ) )
#end
#set( $wikiname = $request.get("wiki") )
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/getusersandgroups.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -54,27 +54,27 @@
#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( $users = $rm.usersApi.getAllMatchedLocalUsers( $filterMap, $limit,
$off, $orderList ) )
#set( $countUsers = $rm.usersApi.countAllMatchedLocalUsers( $filterMap ) )
#else
- #set( $users = $rm.getAllMatchedLocalGroups( $filterMap, $limit, $off,
$orderList ) )
+ #set( $users = $rm.groupsApi.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( $users = $rm.usersApi.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
) )
+ #set( $users = $rm.usersApi.getAllMatchedGlobalGroups( $filterMap, $limit,
$off, $orderList ) )
+ #set( $countUsers = $rm.usersApi.countAllMatchedGlobalGroups( $filterMap )
)
#end
#else
## get both local and global users
#if($uorg == "users")
- #set( $users = $rm.getAllMatchedUsers( $filterMap, $limit, $off,
$orderList ) )
+ #set( $users = $rm.usersApi.getAllMatchedUsers( $filterMap, $limit, $off,
$orderList ) )
#set( $countUsers = $rm.usersApi.countAllMatchedUsers( $filterMap ) )
#else
- #set( $users = $rm.getAllMatchedGroups( $filterMap, $limit, $off,
$orderList ) )
+ #set( $users = $rm.groupsApi.getAllMatchedGroups( $filterMap, $limit,
$off, $orderList ) )
#set( $countUsers = $rm.groupsApi.countAllMatchedGroups( $filterMap ) )
#end
#end
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/registeruser.vm
2007-11-02 17:23:07 UTC (rev 5615)
@@ -57,6 +57,7 @@
<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>
+ <span class="buttonwrapper"><input class="button" type="submit"
name="formactioncancel" value="$msg.get("cancel")" onclick="
window.lb.lbHide(); window.lb.lbClearData(); return false;"/></span>
</div>
</form>
#end
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/scripts/lightbox/lightbox.js
2007-11-02 17:23:07 UTC (rev 5615)
@@ -115,7 +115,7 @@
getWaiting: function() {
- return '<div style="padding: 30px;"><img
src="$xwiki.getSkinFile(\'loading.gif\')"/></div>';
+ return '<div style="padding: 30px;"><img
src="$xwiki.getSkinFile(\'icons/ajax-loader.gif\')"/></div>';
},
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.css
2007-11-02 17:23:07 UTC (rev 5615)
@@ -182,6 +182,15 @@
text-align: center;
}
+.membername {
+ width: 89%;
+}
+
+.memberstable {
+ width: 100%;
+}
+
+
/* users css */
.localusername, .globalusername {
@@ -231,6 +240,8 @@
padding-left: 10px;
}
+
+
/***************************************/
#groupwrap {
@@ -320,16 +331,17 @@
.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;
+ height: 24px;
width: 130px;
+ font-size: 12px;
+ color: #fff;
+ font-weight: bold;
+ padding: 0px;
+ margin: 0px;
}
-.btnTxt {
- font-weight: bold;
- color: #FFF;
- font-size: 12px;
-}
+#addnewgroup {
+ padding: 20px;
+}
\ No newline at end of file
Modified:
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
2007-11-02 17:17:21 UTC (rev 5614)
+++
xwiki-platform/web/branches/xwiki-web-1.1/standard/src/main/webapp/skins/albatross/usersandgroups.js
2007-11-02 17:23:07 UTC (rev 5615)
@@ -1038,7 +1038,7 @@
return function()
{
var url = "?xpage=deleteuorg&docname=" + docname;
- if(confirm('$msg.get("confirmdeleteuserorgroup")')) {
+ if(confirm('$msg.get("rightsmanager.confirmdeleteuserorgroup")')) {
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
@@ -1055,7 +1055,7 @@
return function()
{
var url = docurl + "?xpage=deletegroupmember&fullname=" + docname;
- if(confirm('$msg.get("confirmdeleteuserorgroup")')) {
+ if(confirm('$msg.get("rightsmanager.confirmdeletemember")')) {
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications