mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-28 06:35:26 +00:00
Monotone-Parent: c0e690042905295d3b7946d9d917fcf8e91982ef
Monotone-Revision: f8b29d68c36441f92d7ffe8056a95fd25a2fd409 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-17T22:29:51 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -180,6 +180,8 @@
|
||||
"Print..." = "Print...";
|
||||
"Delete Message" = "Delete Message";
|
||||
|
||||
"This Folder" = "This Folder";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "None";
|
||||
"Important" = "Important";
|
||||
@@ -214,3 +216,8 @@
|
||||
|
||||
"You need to choose a non-virtual folder!" = "You need to choose a non-virtual folder!";
|
||||
"You need to choose a root subfolder!" = "You need to choose a root subfolder!";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Moving a message into its own folder is impossible!";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "Copying a message into its own folder is impossible!";
|
||||
|
||||
@@ -181,6 +181,8 @@
|
||||
"Print..." = "Imprimer...";
|
||||
"Delete Message" = "Supprimer le message";
|
||||
|
||||
"This Folder" = "Ce dossier-ci";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "Aucune";
|
||||
"Important" = "Important";
|
||||
@@ -215,3 +217,8 @@
|
||||
|
||||
"You need to choose a non-virtual folder!" = "Vous devez choisir un dossier non-virtuel.";
|
||||
"You need to choose a root subfolder!" = "Vous devez choisir un sous-dossier de la racine.";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Le déplacement d'un message dans son propre dossier est impossible.";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "La copie d'un message dans son propre dossier est impossible.";
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
"Print..." = "Drucken...";
|
||||
"Delete Message" = "Lõschen";
|
||||
|
||||
"This Folder" = "This Folder";
|
||||
|
||||
/* Label popup menu */
|
||||
"None" = "Aucune";
|
||||
"Important" = "Important";
|
||||
@@ -198,3 +200,8 @@
|
||||
|
||||
"You need to choose a non-virtual folder!" = "You need to choose a non-virtual folder!";
|
||||
"You need to choose a root subfolder!" = "You need to choose a root subfolder!";
|
||||
|
||||
"Moving a message into its own folder is impossible!"
|
||||
= "Moving a message into its own folder is impossible!";
|
||||
"Copying a message into its own folder is impossible!"
|
||||
= "Copying a message into its own folder is impossible!";
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
NSString *destinationFolder;
|
||||
id response;
|
||||
|
||||
destinationFolder = [[context request] formValueForKey: @"tofolder"];
|
||||
destinationFolder = [[context request] formValueForKey: @"folder"];
|
||||
if ([destinationFolder length] > 0)
|
||||
{
|
||||
response = [[self clientObject] moveToFolderNamed: destinationFolder
|
||||
@@ -119,6 +119,26 @@
|
||||
return response;
|
||||
}
|
||||
|
||||
- (id) copyAction
|
||||
{
|
||||
NSString *destinationFolder;
|
||||
id response;
|
||||
|
||||
destinationFolder = [[context request] formValueForKey: @"folder"];
|
||||
if ([destinationFolder length] > 0)
|
||||
{
|
||||
response = [[self clientObject] copyToFolderNamed: destinationFolder
|
||||
inContext: context];
|
||||
if (!response)
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
response = [NSException exceptionWithHTTPStatus: 500 /* Server Error */
|
||||
reason: @"No destination folder given"];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/* active message */
|
||||
|
||||
- (id) markMessageUnreadAction
|
||||
|
||||
@@ -210,6 +210,11 @@
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "move";
|
||||
};
|
||||
copy = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "copy";
|
||||
};
|
||||
trash = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
|
||||
@@ -24,14 +24,7 @@ var MailerUIdTreeExtension = {
|
||||
},
|
||||
_addFolder: function (parent, folder) {
|
||||
var thisCounter = this.elementCounter;
|
||||
var fullName = "";
|
||||
var currentFolder = folder;
|
||||
while (currentFolder.parentFolder) {
|
||||
fullName = "/folder" + currentFolder.name + fullName;
|
||||
currentFolder = currentFolder.parentFolder;
|
||||
}
|
||||
fullName = "/" + currentFolder.name + fullName;
|
||||
this._addFolderNode(parent, folder.name, fullName, folder.type);
|
||||
this._addFolderNode(parent, folder.name, folder.fullName(), folder.type);
|
||||
for (var i = 0; i < folder.children.length; i++)
|
||||
this._addFolder(thisCounter, folder.children[i]);
|
||||
},
|
||||
|
||||
@@ -11,6 +11,8 @@ var currentMailboxType = "";
|
||||
var usersRightsWindowHeight = 320;
|
||||
var usersRightsWindowWidth = 400;
|
||||
|
||||
var pageContent;
|
||||
|
||||
/* mail list */
|
||||
|
||||
function openMessageWindow(msguid, url) {
|
||||
@@ -330,12 +332,34 @@ function onMailboxTreeItemClick(event) {
|
||||
Event.stop(event);
|
||||
}
|
||||
|
||||
function onMailboxMenuMove() {
|
||||
window.alert("unimplemented");
|
||||
function _onMailboxMenuAction(menuEntry, error, actionName) {
|
||||
var targetMailbox = menuEntry.mailbox.fullName();
|
||||
|
||||
if (targetMailbox == currentMailbox)
|
||||
window.alert(labels[error]);
|
||||
else {
|
||||
var message;
|
||||
if (document.menuTarget instanceof HTMLDivElement)
|
||||
message = currentMessages[currentMailbox];
|
||||
else
|
||||
message = document.menuTarget.getAttribute("id").substr(4);
|
||||
|
||||
var urlstr = (URLForFolderID(currentMailbox) + "/" + message
|
||||
+ "/" + actionName + "?folder=" + targetMailbox);
|
||||
triggerAjaxRequest(urlstr, folderRefreshCallback, currentMailbox);
|
||||
}
|
||||
}
|
||||
|
||||
function onMailboxMenuCopy() {
|
||||
window.alert("unimplemented");
|
||||
function onMailboxMenuMove(event) {
|
||||
_onMailboxMenuAction(this,
|
||||
"Moving a message into its own folder is impossible!",
|
||||
"move");
|
||||
}
|
||||
|
||||
function onMailboxMenuCopy(event) {
|
||||
_onMailboxMenuAction(this,
|
||||
"Copying a message into its own folder is impossible!",
|
||||
"copy");
|
||||
}
|
||||
|
||||
function refreshMailbox() {
|
||||
@@ -1141,13 +1165,13 @@ function generateMenuForMailbox(mailbox, prefix, callback) {
|
||||
menuDIV.setAttribute("id", prefix + "Submenu");
|
||||
var menu = document.createElement("ul");
|
||||
menuDIV.appendChild(menu);
|
||||
document.body.appendChild(menuDIV);
|
||||
pageContent.appendChild(menuDIV);
|
||||
|
||||
var callbacks = new Array();
|
||||
if (mailbox.type != "account") {
|
||||
var newNode = document.createElement("li");
|
||||
newNode.mailbox = mailbox;
|
||||
newNode.appendChild(document.createTextNode("coucou"));
|
||||
newNode.appendChild(document.createTextNode(labels["This Folder"]));
|
||||
menu.appendChild(newNode);
|
||||
menu.appendChild(document.createElement("li"));
|
||||
callbacks.push(callback);
|
||||
@@ -1186,14 +1210,15 @@ function updateMailboxMenus() {
|
||||
menuDIV.parentNode.removeChild(menuDIV);
|
||||
|
||||
menuDIV = document.createElement("div");
|
||||
document.body.appendChild(menuDIV);
|
||||
pageContent = $("pageContent");
|
||||
pageContent.appendChild(menuDIV);
|
||||
|
||||
var menu = document.createElement("ul");
|
||||
menuDIV.appendChild(menu);
|
||||
|
||||
$(menuDIV).addClassName("menu");
|
||||
menuDIV.setAttribute("id", menuId);
|
||||
|
||||
|
||||
var submenuIds = new Array();
|
||||
for (var i = 0; i < mailAccounts.length; i++) {
|
||||
var menuEntry = mailboxMenuNode("account", mailAccounts[i]);
|
||||
@@ -1441,6 +1466,18 @@ Mailbox.prototype.dump = function(indent) {
|
||||
}
|
||||
}
|
||||
|
||||
Mailbox.prototype.fullName = function() {
|
||||
var fullName = "";
|
||||
|
||||
var currentFolder = this;
|
||||
while (currentFolder.parentFolder) {
|
||||
fullName = "/folder" + currentFolder.name + fullName;
|
||||
currentFolder = currentFolder.parentFolder;
|
||||
}
|
||||
|
||||
return "/" + currentFolder.name + fullName;
|
||||
}
|
||||
|
||||
Mailbox.prototype.findMailboxByName = function(name) {
|
||||
var mailbox = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user