mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 11:55:24 +00:00
Monotone-Parent: aac9836bd4e13254359c01d70b0151a7f9045aff
Monotone-Revision: 055c6c35ac3904cb01f393842e5fef9041d23588 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-01-20T16:28:56 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
2010-01-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxAclEditor.js (saveAcls): removed
|
||||
method.
|
||||
(nodeForUser): don't add a checkbox if "canSubscribeUsers" is
|
||||
false.
|
||||
|
||||
* UI/Common/UIxAclEditor.m (-canSubscribeUsers): new accessor that
|
||||
returns whether the clientObject has the required method to
|
||||
subscribe users.
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m (-itemTimeFormatTexts): the
|
||||
default time format is not taken from the domain defaults rather
|
||||
than the user locale.
|
||||
|
||||
@@ -159,6 +159,12 @@
|
||||
return [self _displayNameForUID: currentUser];
|
||||
}
|
||||
|
||||
- (BOOL) canSubscribeUsers
|
||||
{
|
||||
return [[self clientObject]
|
||||
respondsToSelector: @selector (subscribeUser:reallyDo:)];
|
||||
}
|
||||
|
||||
- (BOOL) currentUserIsSubscribed
|
||||
{
|
||||
SOGoGCSFolder *folder;
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
const:toolbar="SOGoAclOwner.toolbar"
|
||||
const:popup="YES">
|
||||
|
||||
<script type="text/javascript"
|
||||
><var:if condition="canSubscribeUsers">
|
||||
var canSubscribeUsers = true;
|
||||
</var:if
|
||||
><var:if condition="canSubscribeUsers" const:negate="YES">
|
||||
var canSubscribeUsers = false;
|
||||
</var:if
|
||||
></script>
|
||||
|
||||
<form id="aclForm" const:href="saveAcls">
|
||||
<div class="acls">
|
||||
<div id="userSelectorHeader">
|
||||
@@ -39,12 +48,15 @@
|
||||
><li var:id="currentUser">
|
||||
<span class="userFullName"><img rsrc:src="abcard.gif"/>
|
||||
<var:string value="currentUserDisplayName"
|
||||
/></span
|
||||
/></span>
|
||||
<var:if condition="canSubscribeUsers"
|
||||
><label class="subscriptionArea"><input type="checkbox"
|
||||
var:checked="currentUserIsSubscribed"
|
||||
var:disabled="currentUserIsSubscribed"
|
||||
/><var:string label:value="Subscribe User"/></label
|
||||
></li></var:foreach>
|
||||
var:checked="currentUserIsSubscribed"
|
||||
var:disabled="currentUserIsSubscribed"
|
||||
/><var:string label:value="Subscribe User"/></label
|
||||
></var:if
|
||||
></li>
|
||||
</var:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,14 +59,15 @@ UL#userList
|
||||
UL#userList LI
|
||||
{ clear: both;
|
||||
cursor: pointer;
|
||||
height: 2em;
|
||||
text-align: right;
|
||||
padding-left: 3px; }
|
||||
|
||||
SPAN.userFullName
|
||||
{ float: left; }
|
||||
|
||||
DIV#userSelectorButtons A.smallToolbarButton
|
||||
{ float: left; }
|
||||
|
||||
SPAN.userFullName
|
||||
{ float: left; }
|
||||
|
||||
LABEL.subscriptionArea
|
||||
{ padding-right: 5px; }
|
||||
|
||||
@@ -68,30 +68,21 @@ function nodeForUser(userName, userId) {
|
||||
span.appendChild(document.createTextNode(" " + userName));
|
||||
node.appendChild(span);
|
||||
|
||||
var label = $(document.createElement("label"));
|
||||
label.addClassName("class", "subscriptionArea");
|
||||
var cb = document.createElement("input");
|
||||
cb.type = "checkbox";
|
||||
label.appendChild(cb);
|
||||
label.appendChild(document.createTextNode(getLabel("Subscribe User")));
|
||||
node.appendChild(label);
|
||||
if (canSubscribeUsers) {
|
||||
var label = $(document.createElement("label"));
|
||||
label.addClassName("subscriptionArea");
|
||||
var cb = document.createElement("input");
|
||||
cb.type = "checkbox";
|
||||
label.appendChild(cb);
|
||||
label.appendChild(document.createTextNode(getLabel("Subscribe User")));
|
||||
node.appendChild(label);
|
||||
}
|
||||
|
||||
setEventsOnUserNode(node);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function saveAcls() {
|
||||
var uidList = new Array();
|
||||
var users = $("userList").childNodesWithTag("li");
|
||||
for (var i = 0; i < users.length; i++)
|
||||
uidList.push(users[i].getAttribute("id"));
|
||||
$("userUIDS").value = uidList.join(",");
|
||||
$("aclForm").submit();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onUserAdd(event) {
|
||||
openUserFolderSelector(null, "user");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user