See ChangeLog
Monotone-Parent: 4753dc596b8d9070a66d1d6b4dbe88e746c19a81 Monotone-Revision: 398e2de6f331504256a7ec906263ca190e2008af Monotone-Author: crobert@inverse.ca Monotone-Date: 2008-10-02T15:00:13 Monotone-Branch: ca.inverse.sogo
26
ChangeLog
@@ -1,3 +1,29 @@
|
||||
2008-10-02 Cyril Robert <crobert@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m
|
||||
Modified zip command acces path, defaults to /usr/bin/zip,
|
||||
overwritable by sogo defaults
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartViewer.m
|
||||
Added - (NSString *) mimeImageUrl to get an icon path for attachments
|
||||
|
||||
* UI/MailerUI/UIxMailListView.m
|
||||
Added:
|
||||
- (NSArray *) columnsDisplayOrder
|
||||
Returns the current columns order, either from sogo defaults or user defaults.
|
||||
- (NSDictionary *) columnsMetaData
|
||||
Returns an array of metadata (id, class) for columns header.
|
||||
|
||||
* UI/MailerUI/UIxMailMainFrame.m
|
||||
Added - (NSString *) defaultColumnsOrder to get the order from a js call.
|
||||
|
||||
Summary:
|
||||
* Columns in UIxMailListView can now be changed
|
||||
* "Priority" column is smaller
|
||||
* Path to zip command now configurable
|
||||
* Fixed a js bug (loadImagesButton is null)
|
||||
* Attachments now have an icon according to their mimetype
|
||||
|
||||
2008-10-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoCalendarComponent.m
|
||||
|
||||
@@ -322,7 +322,7 @@ static NSString *spoolFolder = nil;
|
||||
{
|
||||
NSException *error;
|
||||
NSFileManager *fm;
|
||||
NSString *spoolPath, *fileName;
|
||||
NSString *spoolPath, *fileName, *zipPath;
|
||||
NSDictionary *msgs;
|
||||
NSArray *messages;
|
||||
NSData *content, *zipContent;
|
||||
@@ -337,9 +337,13 @@ static NSString *spoolFolder = nil;
|
||||
reason: @"spoolFolderPath doesn't exist"];
|
||||
return (WOResponse *)error;
|
||||
}
|
||||
|
||||
zipPath = [[NSUserDefaults standardUserDefaults] stringForKey: @"SOGoZipPath"];
|
||||
if (![zipPath length])
|
||||
zipPath = [NSString stringWithString: @"/usr/bin/zip"];
|
||||
|
||||
fm = [NSFileManager defaultManager];
|
||||
if ( ![fm fileExistsAtPath: @"/usr/bin/zip"] ) {
|
||||
if ( ![fm fileExistsAtPath: zipPath] ) {
|
||||
error = [NSException exceptionWithHTTPStatus: 500
|
||||
reason: @"zip not available"];
|
||||
return (WOResponse *)error;
|
||||
@@ -347,7 +351,7 @@ static NSString *spoolFolder = nil;
|
||||
|
||||
zipTask = [[NSTask alloc] init];
|
||||
[zipTask setCurrentDirectoryPath: spoolPath];
|
||||
[zipTask setLaunchPath: @"/usr/bin/zip"];
|
||||
[zipTask setLaunchPath: zipPath];
|
||||
|
||||
zipTaskArguments = [NSMutableArray arrayWithObjects: nil];
|
||||
[zipTaskArguments addObject: @"SavedMessages.zip"];
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#import "UI/MailerUI/WOContext+UIxMailer.h"
|
||||
#import "UIxMailRenderingContext.h"
|
||||
#import "UIxMailSizeFormatter.h"
|
||||
#import "UI/SOGoUI/UIxComponent.h"
|
||||
|
||||
#import "UIxMailPartViewer.h"
|
||||
|
||||
@@ -364,4 +365,29 @@
|
||||
return url;
|
||||
}
|
||||
|
||||
- (NSString *) mimeImageUrl
|
||||
{
|
||||
NSString *mimeImageFile, *mimeImageUrl;
|
||||
|
||||
mimeImageFile = [NSString stringWithFormat: @"mime-%@-%@.png",
|
||||
[bodyInfo objectForKey: @"type"],
|
||||
[bodyInfo objectForKey: @"subtype"]];
|
||||
|
||||
mimeImageUrl = [self urlForResourceFilename: mimeImageFile];
|
||||
|
||||
if ( [mimeImageUrl length] == 0 )
|
||||
{
|
||||
mimeImageFile = [NSString stringWithFormat: @"mime-%@.png",
|
||||
[bodyInfo objectForKey: @"type"]];
|
||||
mimeImageUrl = [self urlForResourceFilename: mimeImageFile];
|
||||
}
|
||||
|
||||
if ( [mimeImageUrl length] == 0 )
|
||||
{
|
||||
mimeImageUrl = [self urlForResourceFilename: @"mime-unknown.png"];
|
||||
}
|
||||
|
||||
return mimeImageUrl;
|
||||
}
|
||||
|
||||
@end /* UIxMailPartViewer */
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#import "UIxMailListView.h"
|
||||
|
||||
@@ -667,6 +668,67 @@
|
||||
return [labels componentsJoinedByString: @" "];
|
||||
}
|
||||
|
||||
- (NSArray *) columnsDisplayOrder
|
||||
{
|
||||
NSMutableArray *columnsDisplayOrder;
|
||||
NSMutableDictionary *columnsMetaData;
|
||||
NSArray *userDefinedOrder;
|
||||
SOGoUserDefaults *ud;
|
||||
int i;
|
||||
|
||||
ud = [[context activeUser] userSettings];
|
||||
userDefinedOrder = [NSArray arrayWithArray: [ud arrayForKey: @"SOGoMailListViewColumnsOrder"]];
|
||||
if ( [userDefinedOrder count] == 0 ) {
|
||||
userDefinedOrder = [[NSUserDefaults standardUserDefaults] arrayForKey: @"SOGoMailListViewColumnsOrder"];
|
||||
}
|
||||
|
||||
columnsMetaData = [self columnsMetaData];
|
||||
columnsDisplayOrder = [NSMutableArray array];
|
||||
|
||||
for(i = 0; i < [userDefinedOrder count]; i += 1)
|
||||
{
|
||||
[columnsDisplayOrder addObject:
|
||||
[columnsMetaData objectForKey:
|
||||
[userDefinedOrder objectAtIndex: i]]];
|
||||
}
|
||||
|
||||
return columnsDisplayOrder;
|
||||
}
|
||||
|
||||
- (NSDictionary *) columnsMetaData
|
||||
{
|
||||
NSMutableDictionary *columnsMetaData;
|
||||
NSArray *tmpColumns, *tmpKeys;
|
||||
columnsMetaData = [NSMutableDictionary dictionaryWithCapacity:8];
|
||||
|
||||
tmpKeys = [NSArray arrayWithObjects: @"headerClass", @"headerId", @"value", nil];
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell sortableTableHeader", @"subjectHeader", @"Subject", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Subject"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell messageFlagColumn", @"invisibleHeader", @"Invisible", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Invisible"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell messageFlagColumn", @"attachmentHeader", @"Attachment", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Attachment"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell", @"messageFlagHeader", @"Unread", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Unread"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell sortableTableHeader", @"toHeader", @"To", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"To"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell sortableTableHeader", @"fromHeader", @"From", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"From"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell sortableTableHeader", @"dateHeader", @"Date", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Date"];
|
||||
|
||||
tmpColumns = [NSArray arrayWithObjects: @"tbtv_headercell", @"priorityHeader", @"Priority", nil];
|
||||
[columnsMetaData setObject: [NSDictionary dictionaryWithObjects: tmpColumns forKeys: tmpKeys] forKey: @"Priority"];
|
||||
|
||||
return columnsMetaData;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/* UIxMailListView */
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGCards/NGVCard.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
@@ -78,6 +79,17 @@
|
||||
return [accountNames jsonRepresentation];
|
||||
}
|
||||
|
||||
- (NSString *) defaultColumnsOrder
|
||||
{
|
||||
NSArray *defaultColumnsOrder;
|
||||
NSUserDefaults *sud;
|
||||
|
||||
sud = [NSUserDefaults standardUserDefaults];
|
||||
defaultColumnsOrder = [NSArray arrayWithArray: [sud arrayForKey: @"SOGoMailListViewColumnsOrder"]];
|
||||
|
||||
return [defaultColumnsOrder jsonRepresentation];
|
||||
}
|
||||
|
||||
- (NSString *) quotaSupport
|
||||
{
|
||||
NSEnumerator *accountNames;
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
<a var:href="pathToAttachment"
|
||||
var:title="filenameForDisplay"
|
||||
const:absolute="YES"
|
||||
><var:string value="filenameForDisplay" /></a>
|
||||
><img var:src="mimeImageUrl" />
|
||||
</a>
|
||||
<div class="linked_attachment_meta">
|
||||
<var:string label:value="Type" />:
|
||||
<var:string value="bodyInfo.type" /> /
|
||||
<var:string value="bodyInfo.subtype" />,
|
||||
|
||||
<var:string label:value="Size" />:
|
||||
<var:string value="bodyInfo.size" formatter="sizeFormatter" />
|
||||
<var:string value="filenameForDisplay"
|
||||
/> (<var:string value="bodyInfo.size" formatter="sizeFormatter" />)
|
||||
</div>
|
||||
|
||||
<!-- debug
|
||||
|
||||
@@ -8,27 +8,28 @@
|
||||
xmlns:label="OGo:label">
|
||||
<thead>
|
||||
<tr class="tableview"
|
||||
><td class="tbtv_headercell messageFlagColumn">
|
||||
<img rsrc:src="invisible.png" label:title="Unread" width="100%" height="100%" /></td
|
||||
><td class="tbtv_headercell messageFlagColumn">
|
||||
<img rsrc:src="title_attachment_14x14.png" label:title="Attachment" width="14"
|
||||
height="14"/></td
|
||||
><td class="tbtv_headercell sortableTableHeader" id="subjectHeader"
|
||||
><var:string label:value="Subject"/></td
|
||||
><var:if condition="showToAddress"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="toHeader"
|
||||
><var:string label:value="To"/></td></var:if
|
||||
><var:if condition="showToAddress" const:negate="YES"
|
||||
><td class="tbtv_headercell sortableTableHeader" id="fromHeader"
|
||||
><var:string label:value="From"/></td
|
||||
></var:if
|
||||
><td class="tbtv_headercell" id="messageFlagHeader"
|
||||
><img rsrc:src="title_read_14x14.png" label:title="Flagged" /></td
|
||||
><td class="tbtv_headercell sortableTableHeader" id="dateHeader"
|
||||
><var:string label:value="Date"/></td
|
||||
><td class="tbtv_headercell" id="priorityHeader"
|
||||
><var:string label:value="Priority"/></td
|
||||
></tr>
|
||||
><var:foreach list="columnsDisplayOrder" item="currentColumn">
|
||||
<td var:class="currentColumn.headerClass" var:id="currentColumn.headerId">
|
||||
<var:if condition="currentColumn.value" const:value="Invisible">
|
||||
<img rsrc:src="invisible.png" width="100%" height="100%" label:title="void" />
|
||||
</var:if>
|
||||
<var:if condition="currentColumn.value" const:value="Attachment">
|
||||
<img rsrc:src="title_attachment_14x14.png" var:title="currentColumn.value" width="14"
|
||||
height="14"/>
|
||||
</var:if>
|
||||
<var:if condition="currentColumn.value" const:value="Unread">
|
||||
<img rsrc:src="title_read_14x14.png" var:title="currentColumn.value" />
|
||||
</var:if>
|
||||
<var:if condition="currentColumn.value" const:value="Invisible" const:negate="YES">
|
||||
<var:if condition="currentColumn.value" const:value="Attachment" const:negate="YES">
|
||||
<var:if condition="currentColumn.value" const:value="Unread" const:negate="YES">
|
||||
<var:string var:value="currentColumn.value" />
|
||||
</var:if>
|
||||
</var:if>
|
||||
</var:if>
|
||||
</td>
|
||||
</var:foreach>
|
||||
</tr>
|
||||
<tr class="tableview"
|
||||
><td colspan="7" class="tbtv_navcell"
|
||||
><var:if condition="hasPrevious">
|
||||
@@ -61,61 +62,69 @@
|
||||
>
|
||||
</thead>
|
||||
<tbody>
|
||||
<var:foreach list="messages" item="message"
|
||||
><tr var:class="messageRowStyleClass" var:id="msgRowID" var:labels="msgLabels"
|
||||
><td class="messageFlagColumn"><var:entity name="nbsp"/></td
|
||||
><td class="messageFlagColumn"
|
||||
><var:if condition="hasMessageAttachment"
|
||||
><img rsrc:src="title_attachment_14x14.png"
|
||||
/></var:if
|
||||
></td
|
||||
><td
|
||||
var:class="messageSubjectCellStyleClass"
|
||||
var:id="msgDivID"
|
||||
><var:string value="messageSubject"
|
||||
/></td
|
||||
|
||||
><td class="messageAddressColumn"
|
||||
><var:if condition="showToAddress" const:negate="YES"
|
||||
><var:string value="message.envelope.from"
|
||||
formatter="context.mailEnvelopeAddressFormatter"
|
||||
/></var:if
|
||||
><var:if condition="showToAddress"
|
||||
><var:string value="message.envelope.to"
|
||||
formatter="context.mailEnvelopeAddressFormatter"
|
||||
/></var:if
|
||||
></td
|
||||
|
||||
><td class="messageFlagColumn"
|
||||
><var:if condition="isMessageRead"
|
||||
><img rsrc:src="icon_read.gif"
|
||||
class="mailerReadIcon"
|
||||
label:title="Mark Unread"
|
||||
label:title-markread="Mark Read"
|
||||
label:title-markunread="Mark Unread"
|
||||
var:id="msgIconReadImgID"
|
||||
/></var:if
|
||||
><var:if condition="isMessageRead" const:negate="YES"
|
||||
><img rsrc:src="icon_unread.gif"
|
||||
class="mailerUnreadIcon"
|
||||
label:title="Mark Read"
|
||||
label:title-markread="Mark Read"
|
||||
label:title-markunread="Mark Unread"
|
||||
var:id="msgIconUnreadImgID"
|
||||
/></var:if
|
||||
></td
|
||||
|
||||
><td class="messageDateColumn"
|
||||
><var:string value="messageDate"
|
||||
/><entity name="nbsp"
|
||||
/></td
|
||||
|
||||
><td class="messagePriorityColumn"
|
||||
><var:string value="messagePriority"
|
||||
/><entity name="nbsp"
|
||||
/></td
|
||||
|
||||
></tr>
|
||||
</var:foreach>
|
||||
<var:foreach list="messages" item="message">
|
||||
<tr var:class="messageRowStyleClass" var:id="msgRowID" var:labels="msgLabels"
|
||||
><var:foreach list="columnsDisplayOrder" item="currentColumn"
|
||||
><var:if condition="currentColumn.value" const:value="Invisible"
|
||||
><td class="messageFlagColumn"><var:entity name="nbsp"
|
||||
/></td
|
||||
></var:if>
|
||||
<var:if condition="currentColumn.value" const:value="Attachment"
|
||||
><td class="messageFlagColumn"
|
||||
><var:if condition="hasMessageAttachment"
|
||||
><img rsrc:src="title_attachment_14x14.png"
|
||||
/></var:if
|
||||
></td
|
||||
></var:if
|
||||
><var:if condition="currentColumn.value" const:value="Subject"
|
||||
><td var:class="messageSubjectCellStyleClass" var:id="msgDivID"
|
||||
><var:string value="messageSubject"
|
||||
/></td
|
||||
></var:if
|
||||
><var:if condition="currentColumn.value" const:value="From"
|
||||
><td class="messageAddressColumn"
|
||||
><var:if condition="showToAddress" const:negate="YES"
|
||||
><var:string value="message.envelope.from" formatter="context.mailEnvelopeAddressFormatter"
|
||||
/></var:if
|
||||
><var:if condition="showToAddress"
|
||||
><var:string value="message.envelope.to" formatter="context.mailEnvelopeAddressFormatter"
|
||||
/></var:if
|
||||
></td
|
||||
></var:if
|
||||
><var:if condition="currentColumn.value" const:value="Unread"
|
||||
><td class="messageFlagColumn"
|
||||
><var:if condition="isMessageRead"
|
||||
><img rsrc:src="icon_read.gif"
|
||||
class="mailerReadIcon"
|
||||
label:title="Mark Unread"
|
||||
label:title-markread="Mark Read"
|
||||
label:title-markunread="Mark Unread"
|
||||
var:id="msgIconReadImgID"
|
||||
/></var:if
|
||||
><var:if condition="isMessageRead" const:negate="YES"
|
||||
><img rsrc:src="icon_unread.gif"
|
||||
class="mailerUnreadIcon"
|
||||
label:title="Mark Read"
|
||||
label:title-markread="Mark Read"
|
||||
label:title-markunread="Mark Unread"
|
||||
var:id="msgIconUnreadImgID"
|
||||
/></var:if
|
||||
></td
|
||||
></var:if
|
||||
><var:if condition="currentColumn.value" const:value="Date"
|
||||
><td class="messageDateColumn"
|
||||
><var:string value="messageDate"
|
||||
/><entity name="nbsp"
|
||||
/></td
|
||||
></var:if
|
||||
><var:if condition="currentColumn.value" const:value="Priority"
|
||||
><td class="messagePriorityColumn"
|
||||
><var:string value="messagePriority"
|
||||
/><entity name="nbsp"
|
||||
/></td
|
||||
></var:if>
|
||||
</var:foreach>
|
||||
</tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
const:jsFiles="dtree.js,MailerUI+dTree.js">
|
||||
<script type="text/javascript">
|
||||
var textMailAccounts = '<var:string value="mailAccounts" const:escapeHTML="NO"/>';
|
||||
var textDefaultColumnsOrder = '<var:string value="defaultColumnsOrder" const:escapeHTML="NO"/>';
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<var:if condition="horizontalDragHandleStyle">
|
||||
|
||||
@@ -501,7 +501,15 @@ TD.attachment_uplabel
|
||||
/* attachment link viewer */
|
||||
|
||||
DIV.linked_attachment_frame
|
||||
{ border: 0px; }
|
||||
{
|
||||
border: 0px;
|
||||
display: inline;
|
||||
float: left;
|
||||
margin: 0px;
|
||||
margin-top: 10px;
|
||||
padding: 5px;
|
||||
/*background: #F0F0F0;*/
|
||||
}
|
||||
|
||||
DIV.linked_attachment_body
|
||||
{ border: 0px; }
|
||||
@@ -587,19 +595,25 @@ TABLE#messageList TD.tbtv_subject_headercell,
|
||||
TABLE#messageList TD.mailer_unreadmailsubject,
|
||||
TABLE#messageList TD.mailer_readmailsubject
|
||||
{ /*width: 40%;*/
|
||||
min-width: 40%; }
|
||||
min-width: 35%; }
|
||||
|
||||
TD#fromHeader,
|
||||
TABLE#messageList TD.tbtv_from_headercell,
|
||||
TABLE#messageList TD.messageAddressColumn
|
||||
{ /*width: 35%;*/
|
||||
min-width: 35%;
|
||||
min-width: 30%;
|
||||
overflow: hidden; }
|
||||
|
||||
TD#dateHeader,
|
||||
TABLE#messageList TD.tbtv_date_headercell
|
||||
{ /*width: 25%;*/
|
||||
overflow: hidden; }
|
||||
|
||||
TD#priorityHeader,
|
||||
TABLE#messageList TD.tbtv_priority_headercell
|
||||
{ /*width: 25%;*/
|
||||
width: 10%;
|
||||
overflow: hidden; }
|
||||
|
||||
TABLE#messageList TR._selected TD
|
||||
{
|
||||
|
||||
@@ -10,6 +10,14 @@ if (typeof textMailAccounts != 'undefined') {
|
||||
else
|
||||
mailAccounts = new Array();
|
||||
}
|
||||
|
||||
var defaultColumnsOrder;
|
||||
if (typeof textDefaultColumnsOrder != 'undefined') {
|
||||
if (textDefaultColumnsOrder.length > 0)
|
||||
defaultColumnsOrder = textDefaultColumnsOrder.evalJSON(true);
|
||||
else
|
||||
defaultColumnsOrder = new Array();
|
||||
}
|
||||
|
||||
var Mailer = {
|
||||
currentMailbox: null,
|
||||
@@ -280,6 +288,9 @@ function deleteSelectedMessagesCallback(http) {
|
||||
nextRow.selectElement();
|
||||
loadMessage(Mailer.currentMessages[Mailer.currentMailbox]);
|
||||
}
|
||||
else {
|
||||
div.innerHTML = "";
|
||||
}
|
||||
refreshCurrentFolder();
|
||||
}
|
||||
}
|
||||
@@ -291,17 +302,32 @@ function deleteSelectedMessagesCallback(http) {
|
||||
|
||||
function moveMessages(rowIds, folder) {
|
||||
var failCount = 0;
|
||||
|
||||
|
||||
if ( rowIds.length > 0 ) {
|
||||
var uids = new Array();
|
||||
var paths = new Array();
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var uid = rowIds[i];
|
||||
var path = Mailer.currentMailbox + "/" + uid;
|
||||
rows[i].hide();
|
||||
uids.push(uid);
|
||||
paths.push(path);
|
||||
}
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/moveMessages";
|
||||
var parameters = "uid=" + uids.join(",");
|
||||
var data = { "id": uids, "mailbox": Mailer.currentMailbox, "path": paths, "toFolder": folder };
|
||||
triggerAjaxRequest(url, deleteSelectedMessagesCallback, data, parameters,
|
||||
{ "Content-type": "application/x-www-form-urlencoded" });
|
||||
}
|
||||
/*
|
||||
for (var i = 0; i < rowIds.length; i++) {
|
||||
var url, http;
|
||||
|
||||
/* send AJAX request (synchronously) */
|
||||
|
||||
var messageId = encodeURI(Mailer.currentMailbox) + "/" + rowIds[i];
|
||||
url = (ApplicationBaseURL + messageId
|
||||
+ "/move?tofolder=" + encodeURIComponent(folder));
|
||||
http = createHTTPClient();
|
||||
http.open("GET", url, false /* not async */);
|
||||
http.open("GET", url, false);
|
||||
http.send("");
|
||||
if (http.status == 200) {
|
||||
var row = $("row_" + rowIds[i]);
|
||||
@@ -313,20 +339,20 @@ function moveMessages(rowIds, folder) {
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = null;
|
||||
}
|
||||
}
|
||||
else /* request failed */
|
||||
else
|
||||
failCount++;
|
||||
|
||||
/* remove from page */
|
||||
|
||||
/* line-through would be nicer, but hiding is OK too */
|
||||
}
|
||||
|
||||
if (failCount > 0)
|
||||
alert("Could not move " + failCount + " messages!");
|
||||
|
||||
*/
|
||||
return failCount;
|
||||
}
|
||||
|
||||
function moveMessagesCallback(http) {
|
||||
alert("messages are teh moved");
|
||||
}
|
||||
|
||||
function onMenuDeleteMessage(event) {
|
||||
deleteSelectedMessages();
|
||||
preventDefault(event);
|
||||
@@ -761,6 +787,10 @@ function configureLoadImagesButton() {
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
var displayLoadImages = $("displayLoadImages");
|
||||
|
||||
if (typeof(loadImagesButton) == "undefined" ||
|
||||
loadImagesButton == null ) {
|
||||
return;
|
||||
}
|
||||
if (typeof(displayLoadImages) == "undefined" ||
|
||||
displayLoadImages == null ||
|
||||
displayLoadImages.value == 0) {
|
||||
@@ -1230,13 +1260,25 @@ function configureMessageListBodyEvents(table) {
|
||||
//row.dndGhost = messageListGhost;
|
||||
//row.dndDataForType = messageListData;
|
||||
//document.DNDManager.registerSource(row);
|
||||
|
||||
// Correspondances index <> nom de la colonne
|
||||
// 0 => Invisible
|
||||
// 1 => Attachment
|
||||
// 2 => Subject
|
||||
// 3 => From
|
||||
// 4 => Unread
|
||||
// 5 => Date
|
||||
// 6 => Priority
|
||||
var columnsOrder = userSettings["SOGoMailListViewColumnsOrder"];
|
||||
if ( typeof(columnsOrder) == "undefined" ) {
|
||||
columnsOrder = defaultColumnsOrder;
|
||||
}
|
||||
for (var j = 0; j < row.cells.length; j++) {
|
||||
var cell = $(row.cells[j]);
|
||||
var cellType = columnsOrder[j];
|
||||
cell.observe("mousedown", listRowMouseDownHandler);
|
||||
if (j == 2 || j == 3 || j == 5)
|
||||
if (cellType == "Subject" || cellType == "From" || cellType == "Date")
|
||||
cell.observe("dblclick", onMessageDoubleClick.bindAsEventListener(cell));
|
||||
else if (j == 4) {
|
||||
else if (cellType == "Unread") {
|
||||
var img = $(cell.childNodesWithTag("img")[0]);
|
||||
img.observe("click", mailListMarkMessage.bindAsEventListener(img));
|
||||
}
|
||||
|
||||
BIN
UI/WebServerResources/mime-application-certificate.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
UI/WebServerResources/mime-application-magicpoint.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
UI/WebServerResources/mime-application-msword.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-ogg.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
UI/WebServerResources/mime-application-pdf.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-postscript.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-rtf.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-vnd.lotus-1-2-3.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-vnd.ms-excel.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-vnd.ms-powerpoint.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
BIN
UI/WebServerResources/mime-application-vnd.rn-realmedia-vbr.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
UI/WebServerResources/mime-application-vnd.rn-realmedia.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
UI/WebServerResources/mime-application-vnd.stardivision.calc.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-vnd.sun.xml.calc.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-vnd.sun.xml.draw.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
UI/WebServerResources/mime-application-vnd.sun.xml.impress.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
UI/WebServerResources/mime-application-vnd.sun.xml.writer.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-wordperfect.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-7z-compressed.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-abiword.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-applix-spreadsheet.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-applix-word.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-archive.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-arj.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-bzip-compressed-tar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-bzip.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-cd-image.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
UI/WebServerResources/mime-application-x-compress.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-compressed-tar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-cpio-compressed.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-cpio.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-deb.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-dvi.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-executable.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
UI/WebServerResources/mime-application-x-font-afm.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-font-bdf.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-font-linux-psf.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-font-pcf.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-font-sunos-news.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-font-ttf.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-application-x-gnumeric.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-gzip.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-gzpostscript.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-jar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-killustrator.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
UI/WebServerResources/mime-application-x-kpresenter.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
UI/WebServerResources/mime-application-x-kspread.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-kword.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-lha.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-lhz.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-lzma-compressed-tar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-lzma.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-ms-dos-executable.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
UI/WebServerResources/mime-application-x-perl.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
UI/WebServerResources/mime-application-x-php.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
UI/WebServerResources/mime-application-x-python-bytecode.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
UI/WebServerResources/mime-application-x-rar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-rpm.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-scribus.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-x-shellscript.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
UI/WebServerResources/mime-application-x-shockwave-flash.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
UI/WebServerResources/mime-application-x-stuffit.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-tar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-tarz.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-application-x-tex.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-application-xhtml+xml.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
UI/WebServerResources/mime-application-zip.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-ascii.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
UI/WebServerResources/mime-audio-x-generic.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
UI/WebServerResources/mime-audio.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
UI/WebServerResources/mime-binary.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
UI/WebServerResources/mime-contents2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
UI/WebServerResources/mime-deb.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-document.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
UI/WebServerResources/mime-empty.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
UI/WebServerResources/mime-exec.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
UI/WebServerResources/mime-folder_tar.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/WebServerResources/mime-font-x-generic.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-font.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-font_bitmap.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
UI/WebServerResources/mime-font_truetype.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |