Monotone-Parent: 305e5198a69984fa19ae3d615ff25e6f48bed1bd
Monotone-Revision: 0985637e09049cecd9007ee944d3e752881b83ca Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-08-25T13:12:14 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
7162f4c237
commit
5a4386114d
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -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.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -162,3 +162,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -177,3 +177,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -161,3 +161,4 @@
|
|||
"Members" = "Members";
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
function whileDragging (itm, e) {
|
||||
|
@ -1178,7 +1174,12 @@ function dropSelectedContacts (action, toId) {
|
|||
var selectedFolders = $("contactFolders").getSelectedNodes();
|
||||
if (selectedFolders.length > 0) {
|
||||
var contactIds = $('contactsList').getSelectedRowsId();
|
||||
if (!containsVLF (contactIds)) {
|
||||
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
|
||||
|
@ -1188,7 +1189,6 @@ function dropSelectedContacts (action, toId) {
|
|||
triggerAjaxRequest(url, actionContactCallback, fromId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue