Monotone-Parent: 305e5198a69984fa19ae3d615ff25e6f48bed1bd

Monotone-Revision: 0985637e09049cecd9007ee944d3e752881b83ca

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-08-25T13:12:14
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
C Robert 2009-08-25 13:12:14 +00:00
parent 7162f4c237
commit 5a4386114d
15 changed files with 59 additions and 29 deletions

View File

@ -1,3 +1,8 @@
2009-08-25 Cyril Robert <crobert@inverse.ca>
* SoObjects/Contacts/SOGoContactGCSList.m (copyToFolder): Implementation to
support copying lists.
2009-08-24 Cyril Robert <crobert@inverse.ca>
* UI/MailerUI/UIxMailMainFrame.m: Refactoring + added vLists support.

View File

@ -61,6 +61,25 @@
return list;
}
- (NSException *) copyToFolder: (SOGoGCSFolder *) newFolder
{
NGVList *newList;
NSString *newUID;
SOGoContactGCSList *newGList;
// Change the contact UID
newUID = [self globallyUniqueObjectId];
newList = [self vList];
[newList setUid: newUID];
newGList = [[self class] objectWithName:
[NSString stringWithFormat: @"%@.vlf", newUID]
inContainer: newFolder];
return [newGList saveContentString: [newList versitString]];
}
/* DAV */
- (NSString *) davContentType

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Membres";
"Contacts" = "Contacts";
"Add" = "Ajouter";
"Lists can't be moved or copied." = "Les listes ne peuvent pas être déplacées ou copiées.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -162,3 +162,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -177,3 +177,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -161,3 +161,4 @@
"Members" = "Members";
"Contacts" = "Contacts";
"Add" = "Add";
"Lists can't be moved or copied." = "Lists can't be moved or copied.";

View File

@ -183,11 +183,6 @@
protectedBy = "Access Contents Information";
pageName = "UIxListView";
};
delete = {
protectedBy = "Delete Objects";
pageName = "UIxListView";
actionName = "delete";
};
edit = {
protectedBy = "Access Contents Information";
pageName = "UIxListEditor";

View File

@ -221,6 +221,14 @@ function _onContactMenuAction(folderItem, action, refresh) {
return row.getAttribute("id");
});
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (labels["Lists can't be moved or copied."]);
return false;
}
}
var url = ApplicationBaseURL + selectedFolderId + "/" + action
+ "?folder=" + folderId + "&uid="
+ contactIds.join("&uid=");
@ -1123,16 +1131,6 @@ function currentFolderIsRemote () {
return rc;
}
function containsVLF (ids) {
var rc = false;
for (var i=0; i < ids.length; i++)
if (ids[i].match ("\.vlf$") == ".vlf")
rc = true;
return rc;
}
function startDragging (itm, e) {
var target = Event.element(e);
if (target.up().up().tagName != "TBODY")
@ -1142,12 +1140,10 @@ function startDragging (itm, e) {
var contacts = $('contactsList').getSelectedRowsId();
var count = contacts.length;
if (!containsVLF (contacts)) {
handle.show();
handle.update (count);
if (e.shiftKey || currentFolderIsRemote ())
handle.addClassName ("copy");
}
handle.show();
handle.update (count);
if (e.shiftKey || currentFolderIsRemote ())
handle.addClassName ("copy");
}
function whileDragging (itm, e) {
@ -1178,16 +1174,20 @@ function dropSelectedContacts (action, toId) {
var selectedFolders = $("contactFolders").getSelectedNodes();
if (selectedFolders.length > 0) {
var contactIds = $('contactsList').getSelectedRowsId();
if (!containsVLF (contactIds)) {
var fromId = $(selectedFolders[0]).id;
if (!currentFolderIsRemote () || action != "move") {
var url = ApplicationBaseURL + fromId + "/" + action
+ "?folder=" + toId + "&uid="
+ contactIds.join("&uid=");
triggerAjaxRequest(url, actionContactCallback, fromId);
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (labels["Lists can't be moved or copied."]);
return false;
}
}
var fromId = $(selectedFolders[0]).id;
if (!currentFolderIsRemote () || action != "move") {
var url = ApplicationBaseURL + fromId + "/" + action
+ "?folder=" + toId + "&uid="
+ contactIds.join("&uid=");
triggerAjaxRequest(url, actionContactCallback, fromId);
}
}
}