See ChangeLog.

Monotone-Parent: 6cab0a382f42089e9c8aa95c4ce8740cabe5cd1c
Monotone-Revision: 8a9a97e74ab23c27d73459976c2caa29e59adf64

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-10-14T20:43:01
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2011-10-14 20:43:01 +00:00
parent eff16d0f66
commit 94439ee94d
2 changed files with 20 additions and 6 deletions

View File

@ -6,6 +6,10 @@
2011-10-14 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/UIxMailToSelection.js
(addressFieldChanged): we now split on commas only if no email
address is detected.
* UI/WebServerResources/SOGoMailDataSource.js (load): associated a
unique id to the source using the url and its parameters.

View File

@ -145,7 +145,13 @@ function addressFieldLostFocus(event) {
}
function addressFieldChanged(event) {
var addresses = this.value.split(/[,;]/);
// We first split by semi-colon and then by comma only if there's no
// email address detected.
// Examples:
// "dude, buddy dude@domain.com; bro" => "dude, buddy <dude@domain.com>" + "bro"
// "dude, buddy, bro <bro@domain.com>" => "dude, buddy, bro <bro@domain.com>"
// "dude, buddy, bro" => "dude" + "buddy" + "bro"
var addresses = this.value.split(';');
if (addresses.length > 0) {
var first = true;
for (var i = 0; i < addresses.length; i++) {
@ -171,12 +177,16 @@ function addressFieldChanged(event) {
}
}
if (phrase.length > 0) {
if (first) {
this.value = phrase.join(' ');
first = false;
words = phrase.join(' ').split(',');
for (var j = 0; j < words.length; j++) {
word = words[j];
if (first) {
this.value = word;
first = false;
}
else
fancyAddRow(word, $(this).up("tr").down("select").value);
}
else
fancyAddRow(phrase.join(' '), $(this).up("tr").down("select").value);
phrase = new Array();
}