2007-09-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView
+ -contactSearchAction]): only return the records which have an
+ email set.
+
* SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject
-trashInContext:_ctx]): no longer expunge the mailbox after
marking a message deleted.
- fixed a bug where a false positive happening whenever a wrong user login was
given during an indirect bind;
- deleting a message no longer expunges its parent folder;
+- fixed search in message content;
- countless bugfixes;
0.9.0-20070824
while (userEntry)
{
uid = [userEntry objectForKey: @"c_uid"];
- returnContact = [compactContacts objectForKey: uid];
- if (!returnContact)
+ if ([uid length])
{
- returnContact = [NSMutableDictionary dictionary];
- [returnContact setObject: uid forKey: @"c_uid"];
- [compactContacts setObject: returnContact forKey: uid];
- }
- if (![[returnContact objectForKey: @"c_name"] length])
- [returnContact setObject: [userEntry objectForKey: @"c_name"]
- forKey: @"c_name"];
- if (![[returnContact objectForKey: @"cn"] length])
- [returnContact setObject: [userEntry objectForKey: @"c_cn"]
- forKey: @"cn"];
- emails = [returnContact objectForKey: @"emails"];
- if (!emails)
- {
- emails = [NSMutableArray array];
- [returnContact setObject: emails forKey: @"emails"];
+ returnContact = [compactContacts objectForKey: uid];
+ if (!returnContact)
+ {
+ returnContact = [NSMutableDictionary dictionary];
+ [returnContact setObject: uid forKey: @"c_uid"];
+ [compactContacts setObject: returnContact forKey: uid];
+ }
+ if (![[returnContact objectForKey: @"c_name"] length])
+ [returnContact setObject: [userEntry objectForKey: @"c_name"]
+ forKey: @"c_name"];
+ if (![[returnContact objectForKey: @"cn"] length])
+ [returnContact setObject: [userEntry objectForKey: @"c_cn"]
+ forKey: @"cn"];
+ emails = [returnContact objectForKey: @"emails"];
+ if (!emails)
+ {
+ emails = [NSMutableArray array];
+ [returnContact setObject: emails forKey: @"emails"];
+ }
+ email = [userEntry objectForKey: @"mail"];
+ if (email && ![emails containsObject: email])
+ [emails addObject: email];
+ email = [userEntry objectForKey: @"mozillaSecondEmail"];
+ if (email && ![emails containsObject: email])
+ [emails addObject: email];
+ email = [userEntry objectForKey: @"xmozillasecondemail"];
+ if (email && ![emails containsObject: email])
+ [emails addObject: email];
}
- email = [userEntry objectForKey: @"mail"];
- if (email && ![emails containsObject: email])
- [emails addObject: email];
- email = [userEntry objectForKey: @"mozillaSecondEmail"];
- if (email && ![emails containsObject: email])
- [emails addObject: email];
- email = [userEntry objectForKey: @"xmozillasecondemail"];
- if (email && ![emails containsObject: email])
- [emails addObject: email];
userEntry = [contacts nextObject];
}
{
WOResponse *response;
NSEnumerator *contacts;
- NSString *responseString;
+ NSString *responseString, *email;
NSDictionary *contact;
response = [context response];
if ([results count] > 0)
{
+ [response setStatus: 200];
contacts = [results objectEnumerator];
contact = [contacts nextObject];
if (contact)
{
- responseString = [NSString stringWithFormat: @"%@:%@:%@",
- [contact objectForKey: @"c_uid"],
- [contact objectForKey: @"cn"],
- [contact objectForKey: @"c_email"]];
- [response setStatus: 200];
+ email = [contact objectForKey: @"c_email"];
+ if ([email length])
+ {
+ responseString = [NSString stringWithFormat: @"%@:%@:%@",
+ [contact objectForKey: @"c_uid"],
+ [contact objectForKey: @"cn"],
+ email];
// [response setHeader: @"text/plain; charset=iso-8859-1"
// forKey: @"Content-Type"];
- [response appendContentString: responseString];
+ [response appendContentString: responseString];
+ }
// contact = [contacts nextObject];
}
}
flags = [[self message] valueForKey:@"flags"];
return [flags containsObject:@"seen"];
}
+
- (NSString *) messageUidString
{
return [[[self message] valueForKey:@"uid"] stringValue];
- (void) _setQualifierForCriteria: (NSString *) criteria
andValue: (NSString *) value
{
- NSMutableString *newQString;
-
[qualifier release];
- newQString = [NSMutableString stringWithString: @"(NOT flags doesContain: deleted)"];
- if ([value length] > 0)
- {
- if ([criteria isEqualToString: @"subject"])
- [newQString appendFormat: @" AND (subject doesContain: %@)", value];
- else if ([criteria isEqualToString: @"sender"])
- [newQString appendFormat: @" AND (sender doesContain: %@)", value];
- else if ([criteria isEqualToString: @"subject_or_sender"])
- [newQString appendFormat: @" AND ((sender doesContain: %@)"
- @" OR (from doesContain: %@))",
- value, value];
- else if ([criteria isEqualToString: @"to_or_cc"])
- [newQString appendFormat: @" AND ((to doesContain: %@)"
- @" OR (cc doesContain: %@))",
- value, value];
- else if ([criteria isEqualToString: @"entire_message"])
- [newQString appendFormat: @" AND (message doesContain: %@)", value];
- }
- qualifier = [EOQualifier qualifierWithQualifierFormat: newQString];
+ if ([criteria isEqualToString: @"subject"])
+ qualifier = [EOQualifier qualifierWithQualifierFormat:
+ @"(subject doesContain: %@)",
+ value];
+ else if ([criteria isEqualToString: @"sender"])
+ qualifier = [EOQualifier qualifierWithQualifierFormat:
+ @"(sender doesContain: %@)", value];
+ else if ([criteria isEqualToString: @"subject_or_sender"])
+ qualifier = [EOQualifier qualifierWithQualifierFormat:
+ @"((sender doesContain: %@)"
+ @" OR (from doesContain: %@))",
+ value, value];
+ else if ([criteria isEqualToString: @"to_or_cc"])
+ qualifier = [EOQualifier qualifierWithQualifierFormat:
+ @"((to doesContain: %@)"
+ @" OR (cc doesContain: %@))",
+ value, value];
+ else if ([criteria isEqualToString: @"entire_message"])
+ qualifier = [EOQualifier qualifierWithQualifierFormat:
+ @"(body doesContain: %@)", value];
+ else
+ qualifier = nil;
[qualifier retain];
}
specificMessage = [request formValueForKey: @"pageforuid"];
searchCriteria = [request formValueForKey: @"search"];
searchValue = [request formValueForKey: @"value"];
- [self _setQualifierForCriteria: searchCriteria
- andValue: searchValue];
+ if ([searchValue length])
+ [self _setQualifierForCriteria: searchCriteria
+ andValue: searchValue];
firstMessageNumber
= ((specificMessage)
"Close" = "Close";
/* tabs */
-"Out of Office" = "Out of Office";
-"Date and Time" = "Date and Time";
+"General" = "General";
"Calendar Options" = "Calendar Options";
"Mail Options" = "Mail Options";
"Password" = "Password";
"Close" = "Fermer";
/* tabs */
-"Out of Office" = "Absence du bureau";
-"Date and Time" = "Date et heure";
+"General" = "Général";
"Calendar Options" = "Calendrier";
"Mail Options" = "Courrier";
"Password" = "Mot de passe";
"Close" = "Schließen";
/* tabs */
-"Out of Office" = "Abwesenheit";
-"Date and Time" = "Datum und Zeit";
+"General" = "Allgemein";
"Calendar Options" = "Kalender";
"Mail Options" = "E-Mail";
"Password" = "Passwort";
var:contactid="currentContact.c_uid"
onclick="return onContactRowClick(event, this);"
ondblclick="return onContactRowDblClick(event, this);"
+ onmousedown="return false;"
+ onselectstart="return false;"
oncontextmenu="return onContactContextMenu(event, this);">
<td><img rsrc:src="abcard.gif"
/><var:string value="currentContact.displayName" const:escapeHTML="YES" /></td>
class="textField"
var:value="subject"
/></span></div>
+ <!-- separator line --><hr/>
</div>
- <!-- separator line -->
<textarea name="text" rows="30" var:value="text" />
<!-- img rsrc:src="tbird_073_compose.png" alt="screenshot" / -->
</form>
<form id="mainForm" var:href="ownPath">
<div class="tabsContainer" id="preferencesTabs">
<ul>
- <li target="outOfOfficeView"><var:string
- label:value="Out of Office"/></li>
- <li target="dateTimeView"><var:string
- label:value="Date and Time"/></li>
+ <li target="generalView"><var:string
+ label:value="General"/></li>
<li target="calendarOptionsView"><var:string
label:value="Calendar Options"/></li>
<li target="mailOptionsView"><var:string
<li target="passwordView"><var:string label:value="Password"/></li>
</var:if>
</ul>
- <div id="outOfOfficeView" class="tab">
- <label><input
- const:name="inTheOffice" type="radio" const:value="YES"
- var:selection="inTheOffice"/>
- <var:string label:value="I'm currently in the office"/></label><br/>
- <label><input
- const:name="inTheOffice" type="radio" const:value="NO"
- var:selection="inTheOffice"/>
- <var:string label:value="I'm currently out of the office"/></label><br/>
- <br/>
- <div id="outOfOfficeMessage">
- <label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
- <textarea const:name="autoReplyText" var:value="autoReplyText"/>
- </label>
- </div>
- </div>
- <div id="dateTimeView" class="tab">
+ <div id="generalView" class="tab">
<label><var:string label:value="Current Time Zone :"/>
<var:popup list="timeZonesList" item="item"
string="item" selection="userTimeZone" /></label><br/>
<label><var:string label:value="Forward messages:"/>
<var:popup list="messageForwardingList" item="item"
string="itemMessageForwardingText" selection="userMessageForwarding"/></label><br/>
+ <label><input
+ const:name="inTheOffice" type="radio" const:value="YES"
+ var:selection="inTheOffice"/>
+ <var:string label:value="I'm currently in the office"/></label><br/>
+ <label><input
+ const:name="inTheOffice" type="radio" const:value="NO"
+ var:selection="inTheOffice"/>
+ <var:string label:value="I'm currently out of the office"/></label><br/>
+ <br/>
+ <div id="outOfOfficeMessage">
+ <label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
+ <textarea const:name="autoReplyText" var:value="autoReplyText"/>
+ </label>
+ </div>
</div>
<var:if condition="shouldDisplayPasswordChange">
<div id="passwordView" class="tab">
function onLoginCallback(http) {
if (http.readyState == 4) {
- if (http.status == 204) {
+ if (isHttpStatus204(http.status)) {
window.location.href = ApplicationBaseURL + $("userName").value;
}
}
/* CSS for compose panel */
-div#compose_panel div table {
- padding: 2px;
-}
+div#compose_panel div table
+{ padding: 2px; }
TABLE#compose_table, TABLE#compose_table DIV
-{
- width: 100%;
-}
+{ width: 100%; }
TABLE#compose_label
-{
- text-align: right;
-}
+{ text-align: right; }
DIV#addressList
-{ height: 8em;
- margin-bottom: .25em;
+{ clear: left;
+ height: 8em;
+ overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
-DIV.addressListElement
-{ margin: 0px;
- padding: 0px; }
-
SPAN.headerField
{ line-height: 1.8em;
- width: 7em;
- text-align: right; }
+ float: left;
+ clear: left;
+ text-align: right;
+ min-width: 7em;
+ padding-left: 0.5em; }
SPAN.headerInput INPUT
-{ width: 50%;
- padding-left: 24px;
+{ padding-left: 24px; /* offset text input */
+ padding-right: 4px;
background-image: url('/SOGo.woa/WebServerResources/abcard.gif');
background-repeat: no-repeat;
background-position: 2px center; }
-DIV#subjectRow
-{ margin-left: 9em; }
-
DIV#subjectRow INPUT
{ background-image: none;
- width: 50%;
- padding-left: .5em; }
+ padding-left: 4px; /* offset text input */
+ padding-right: 4px; }
div#compose_internetmarker
{ padding: 8px;
border-style: solid; }
div#headerArea
-{ border-top: 1px solid #fff;
- border-bottom: 1px solid #848284; }
+{ border-top: 1px solid #fff; }
div#attachmentsArea
{ display: none;
padding-left: 5px;
border-left: 1px solid #888; }
+hr
+{ background-color: #848284;
+ border: 0;
+ clear: both;
+ color: #848284;
+ float: left;
+ height: 1px;
+ margin: 0px;
+ padding: 0px;
+ width: 100%; }
+
input.currentAttachment
{ position: absolute;
top: 1em;
{ cursor: default;
margin: 0px;
padding: 0px;
- width: 100%;
- height: 10em;
+ height: 9em;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
border-top: 2px solid #222;
left: 0em;
right: 0em;
bottom: 0em;
- top: 17em;
+ top: 13em;
width: 100%; }
function clickedEditorAttach(sender) {
var area = $("attachmentsArea");
- area.setStyle({ display: "block" });
-
+
+ if (!area.style.display) {
+ area.setStyle({ display: "block" });
+ onWindowResize(null);
+ }
+
var inputs = area.getElementsByTagName("input");
var attachmentName = "attachment" + inputs.length;
var newAttachment = createElement("input", attachmentName,
function onWindowResize(event) {
var textarea = document.pageform.text;
var windowheight = (typeof self.innerHeight == "number" ? self.innerHeight : document.body.clientHeight);
- var textareaoffset = textarea.offsetTop;
var rowheight = (Element.getHeight(textarea) / textarea.rows);
+ var headerarea = $("headerArea");
+
+ // Set textarea position
+ textarea.setStyle({ 'top': (headerarea.getHeight() + headerarea.offsetTop) + 'px' });
+ var textareaoffset = textarea.offsetTop;
+
+ // Resize the textarea (message content)
textarea.rows = Math.round((windowheight - textareaoffset) / rowheight);
- log ("onWindowResize new number of rows = " + textarea.rows);
+
+ var attachmentsarea = $("attachmentsArea");
+ var attachmentswidth = 0;
+ if (attachmentsarea.style.display)
+ attachmentswidth = attachmentsarea.getWidth();
+ var windowwidth = (typeof self.innerWidth == "number" ? self.innerWidth : document.body.clientWidth);
+ var subjectfield = $(document).getElementsByClassName('headerField', $('subjectRow'))[0];
+ var subjectinput = $(document).getElementsByClassName('textField', $('subjectRow'))[0];
+
+ // Resize subject field
+ subjectinput.setStyle({ width: (windowwidth
+ - $(subjectfield).getWidth()
+ - attachmentswidth
+ - 4 - 30
+ ) + 'px' });
+
+ // Resize address fields
+ var addresslist = $('addressList');
+ var firstselect = document.getElementsByClassName('headerField', addresslist)[0];
+ var inputwidth = windowwidth - $(firstselect).getWidth() - attachmentswidth - 24 - 30;
+ var addresses = document.getElementsByClassName('textField', addresslist);
+ for (var i = 0; i < addresses.length; i++) {
+ addresses[i].setStyle({ width: inputwidth + 'px' });
+ }
}
function onMailEditorClose(event) {
input.select();
input.setAttribute('autocomplete', 'on');
}
-// this.adjustInlineAttachmentListHeight(this);
}
function addressFieldGotFocus(sender) {
var idx;
idx = this.getIndexFromIdentifier(sender.id);
- if ((lastIndex == idx) || (idx == 0)) return;
+ if (lastIndex == idx) return;
this.removeLastEditedRowIfEmpty();
+ onWindowResize(null);
return false;
}
addressList = $("addressList");
senderRow = $("row_" + idx);
addressList.removeChild(senderRow);
- this.adjustInlineAttachmentListHeight(this);
}
function findAddressWithIndex(idx) {
return false;
}
-function adjustInlineAttachmentListHeight(sender) {
- var e;
-
- e = $('attachmentsArea');
- if (e.style.display != 'none') {
- /* need to lower left size first, because left auto-adjusts to right! */
- xHeight('compose_attachments_list', 10);
-
- var leftHeight, rightHeaderHeight;
- leftHeight = xHeight('compose_leftside');
- rightHeaderHeight = xHeight('compose_attachments_header');
- xHeight('compose_attachments_list',
- (leftHeight - rightHeaderHeight) - 16);
- }
-}
-
/* addressbook helpers */
right: .5em;
bottom: .5em; }
-DIV#dateTimeFormat,
-DIV#passwordView
-{ text-align: right; }
-
-DIV#outOfOfficeView
+DIV#general
{ padding-top: 2em;
padding-left: 2em;
padding-right: 5em; }
-DIV#outOfOfficeView LABEL
+DIV#general LABEL
{ text-align: left;
margin-left: 0px;
white-space: normal; }
-DIV#outOfOfficeView TEXTAREA
-{ width: 30em;
- margin: 0px;
+DIV#mailOptionsView TEXTAREA
+{ width: 420px;
height: 4em; }
-DIV#dateTimeView
-{ padding-top: 3em;
- padding-left: 1em;
- padding-right: 2em; }
-
DIV#passwordView
{ padding-top: 3em;
padding-right: 10em; }
DIV, TEXTAREA, INPUT, SELECT
{ font-family: inherit;
+ font-size: 8pt;
font-size: inherit; }
TEXTAREA, INPUT.textField
-moz-border-left-colors: #9c9a94 #000 transparent; }
INPUT.textField
-{ line-height: 2em;
- vertical-align: middle; }
+{ vertical-align: middle; }
DIV#toolbar
{ left: 0px;
-moz-border-top-colors: #000 #9c9a94 transparent;
-moz-border-left-colors: #000 #9c9a94 transparent;
font-family: monospace;
- font-size: 12pt;
+ font-size: 9pt;
padding: .25em;
background-color: #fff;
overflow-y: scroll;
function preventDefault(event) {
if (event.preventDefault)
event.preventDefault(); // W3C DOM
-
- event.returnValue = false; // IE
+ else
+ event.returnValue = false; // IE
}
function resetSelection(win) {
var logConsole = logWindow.document.getElementById("logConsole");
if (logConsole) {
logConsole.highlighted = !logConsole.highlighted;
+ if (message == '\c') {
+ logConsole.innerHTML = "";
+ return;
+ }
var logMessage = message.replace("<", "<", "g");
logMessage = logMessage.replace(" ", " ", "g");
logMessage = logMessage.replace("\r\n", "<br />\n", "g");
function onPreferencesClick(event) {
var urlstr = UserFolderURL + "preferences";
- var w = window.open(urlstr, "User Preferences",
+ var w = window.open(urlstr, "_blank",
"width=430,height=250,resizable=0,scrollbars=0");
w.opener = window;
w.focus();