Author: sdumitriu
Date: 2008-02-03 02:28:52 +0100 (Sun, 03 Feb 2008)
New Revision: 7281
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/addnewgroup.vm
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/admingroups.vm
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/usersandgroups.js
Log:
XWIKI-2030: In the user tab on the administration page the dialog box when
deleting a user should be modified
XWIKI-2039: Creating a group with the name of an existing page should generate
an error
Fixed (skin part).
Patch submitted by Evelina Slatineanu, applied without changes.
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/addnewgroup.vm
===================================================================
---
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/addnewgroup.vm
2008-02-03 01:27:40 UTC (rev 7280)
+++
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/addnewgroup.vm
2008-02-03 01:28:52 UTC (rev 7281)
@@ -1,9 +1,9 @@
<div id="addnewgroup">
-<span style="padding-left:13px;">Create new group </span>
-<form method="post">
+<span
style="padding-left:13px;">$msg.get("rightsmanager.createnewgroup")</span>
+<form method="post" onsubmit="return false;">
<div>
-<span style="padding-left:13px;"><input type="text" name="newgroup" value=""
/></span>
-<span class="buttonwrapper"><input class="button" 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();"
/></span>
+<span style="padding-left:13px;"><input type="text" name="newgroup" value=""
id="newgroupi" /></span>
+<span class="buttonwrapper"><input class="button" type="submit"
value="$msg.get("rightsmanager.creategroup")" onclick="new
Ajax.Request('$xwiki.getURL("XWiki.__groupname__", "save",
"template=XWiki.XWikiGroupTemplate")'.replace('__groupname__',
this.form.newgroup.value), { onFailure: function(transport) {
alert('$msg.get("rightsmanager.groupexist")'.replace('__name__',
$('newgroupi').value)); }, onSuccess: function(transport) {
window.lb.lbSaveForm(); } });" /></span>
<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>
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/admingroups.vm
===================================================================
---
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/admingroups.vm
2008-02-03 01:27:40 UTC (rev 7280)
+++
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/admingroups.vm
2008-02-03 01:28:52 UTC (rev 7281)
@@ -50,7 +50,7 @@
#set($addnewurl = $xwiki.getURL("XWiki.XWikiGroups", "view",
"xpage=addnewgroup"))
#set($saveurl = $xwiki.getURL("XWiki.XWikiGroups", "view"))
-#set($redirecturl = $doc.getURL("admin", "editor=groupd&space=XWiki"))
+#set($redirecturl = $doc.getURL("admin", "editor=groups&space=XWiki"))
<script type="text/javascript">
//<![CDATA[
Modified:
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/usersandgroups.js
===================================================================
---
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/usersandgroups.js
2008-02-03 01:27:40 UTC (rev 7280)
+++
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/usersandgroups.js
2008-02-03 01:28:52 UTC (rev 7281)
@@ -630,7 +630,7 @@
del.className = 'icon-manageg';
} else {
del.src = '$xwiki.getSkinFile("icons/rights-manager/clear.png")';
- Event.observe(del, 'click', deleteUserOrGroup(i, table, row.fullname));
+ Event.observe(del, 'click', deleteUserOrGroup(i, table, row.fullname,
"user"));
del.className = 'icon-manage';
}
del.title = '$msg.get("delete")';
@@ -686,7 +686,7 @@
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, row.fullname));
+ Event.observe(del, 'click', deleteUserOrGroup(i, table, row.fullname,
"group"));
del.className = 'icon-manage';
//edit user
@@ -812,18 +812,30 @@
//function to delete a user with ajax
-function deleteUserOrGroup(i, table, docname)
+function deleteUserOrGroup(i, table, docname, uorg)
{
return function() {
var url = "?xpage=deleteuorg&docname=" + docname;
- if (confirm('$msg.get("rightsmanager.confirmdeleteuserorgroup")')) {
- new Ajax.Request(url, {
- method: 'get',
- onSuccess: function(transport) {
- table.deleteRow(i);
- }
- });
+ if(uorg == "user") {
+ if
(confirm('$msg.get("rightsmanager.confirmdeleteuser")'.replace('__name__',
docname))) {
+ new Ajax.Request(url, {
+ method: 'get',
+ onSuccess: function(transport) {
+ table.deleteRow(i);
+ }
+ });
+ }
}
+ else {
+ if
(confirm('$msg.get("rightsmanager.confirmdeletegroup")'.replace('__name__',
docname))) {
+ new Ajax.Request(url, {
+ method: 'get',
+ onSuccess: function(transport) {
+ table.deleteRow(i);
+ }
+ });
+ }
+ }
}
}
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications