Monotone-Parent: 538aedd7d01174f61f329561b71c913f2c048a26

Monotone-Revision: d4724feea77a2bfe4a1315b1572ab4ae3ea3afc9

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-01-19T12:28:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2010-01-19 12:28:10 +00:00
1 parent 943b044622
commit 4639bf6b99
49 files changed
+616 -400

No files matched your search

+7 -4
View File
@@ -1891,17 +1891,20 @@ function onCalendarModify(event) {
var url = ApplicationBaseURL + calendarID + "/properties";
var windowID = sanitizeWindowName(calendarID + " properties");
var width = 310;
var height = 310;
var height = 260;
var isWebCalendar = false;
if (UserSettings['Calendar']
&& UserSettings['Calendar']['WebCalendars']) {
var webCalendars = UserSettings['Calendar']['WebCalendars'];
var realID = calendarID.substr (1, calendarID.length - 1);
if (webCalendars[realID])
if (webCalendars[realID]) {
isWebCalendar = true;
}
}
if (isWebCalendar || calendarID == "/personal")
height -= 25;
if (isWebCalendar)
height += 25;
else if (calendarID == "/personal")
height -= 25;
var properties = window.open(url, windowID,
"width="+width+",height="+height+",resizable=0");
+9 -1
View File
@@ -57,8 +57,16 @@ UL#userList
list-style-image: none; }
UL#userList LI
{ cursor: pointer;
{ clear: both;
cursor: pointer;
text-align: right;
padding-left: 3px; }
SPAN.userFullName
{ float: left; }
DIV#userSelectorButtons A.smallToolbarButton
{ float: left; }
LABEL.subscriptionArea
{ padding-right: 5px; }
+55 -5
View File
@@ -7,6 +7,8 @@ var AclEditor = {
userRightsWidth: null
};
var usersToSubscribe = [];
function addUser(userName, userID) {
var result = false;
if (!$(userID)) {
@@ -32,19 +34,49 @@ function setEventsOnUserNode(node) {
n.observe("selectstart", listRowMouseDownHandler);
n.observe("dblclick", onOpenUserRights);
n.observe("click", onRowClick);
var cbParents = n.childNodesWithTag("label");
if (cbParents && cbParents.length) {
var cbParent = $(cbParents[0]);
var checkbox = cbParent.childNodesWithTag("input")[0];
$(checkbox).observe("change", onSubscriptionChange);
}
}
function onSubscriptionChange(event) {
var li = this.parentNode.parentNode;
var username = li.getAttribute("id");
var idx = usersToSubscribe.indexOf(username);
if (this.checked) {
if (idx < 0)
usersToSubscribe.push(username);
} else {
if (idx > -1)
usersToSubscribe.splice(idx, 1);
}
}
function nodeForUser(userName, userId) {
var node = document.createElement("li");
var node = $(document.createElement("li"));
node.setAttribute("id", userId);
node.setAttribute("class", "");
setEventsOnUserNode(node);
var span = $(document.createElement("span"));
span.addClassName("userFullName");
var image = document.createElement("img");
image.setAttribute("src", ResourcesURL + "/abcard.gif");
span.appendChild(image);
span.appendChild(document.createTextNode(" " + userName));
node.appendChild(span);
node.appendChild(image);
node.appendChild(document.createTextNode(" " + userName));
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);
setEventsOnUserNode(node);
return node;
}
@@ -156,6 +188,24 @@ function onAclLoadHandler() {
AclEditor['userRightsHeight'] = window.opener.getUsersRightsWindowHeight();
AclEditor['userRightsWidth'] = window.opener.getUsersRightsWindowWidth();
Event.observe(window, "beforeunload", onAclCloseHandler);
}
function onAclCloseHandler(event) {
if (usersToSubscribe.length) {
var url = (URLForFolderID($("folderID").value)
+ "/subscribeUsers?uids=" + usersToSubscribe.join(","));
new Ajax.Request(url, {
asynchronous: false,
method: 'get',
onFailure: function(transport) {
log("Can't expunge current folder: " + transport.status);
}
});
}
return true;
}
document.observe("dom:loaded", onAclLoadHandler);