See ChangeLog.

Monotone-Parent: 7f20a4d6e701b0221b1fddc51f74c48737a88125
Monotone-Revision: b2fe7ce1dad859d390bcaf92ab86bfce416a3e91

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-07-06T19:44:44
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2011-07-06 19:44:44 +00:00
parent 3fc5bcd31e
commit 4a73f41d58
4 changed files with 91 additions and 19 deletions
+18 -10
View File
@@ -21,9 +21,6 @@ TD.referenceListCell
background: #CCDDEC;
text-align: left;}
TABLE#referenceList TD INPUT
{ width: 97%; }
DIV#referenceListWrapper
{ background: #CCDDEC;
overflow: auto;
@@ -40,12 +37,24 @@ TR.referenceListRow
{ background: #CCDDEC;
line-height: 2em; }
TD.referenceListCell
{ -moz-user-select: none; }
TD.referenceListCell,
TD.editing
{ background-repeat: no-repeat;
background-position: 4px 50%;
background-image: url('abcard.png');
text-align: left;
-moz-user-select: none; }
TD.referenceListCell SPAN,
TD.referenceListCell INPUT
{ margin-left: 3px; }
TD.editing INPUT
{ margin-left: 24px; }
TD.editing INPUT,
TABLE#referenceList TD INPUT
{ width: 90%; }
TR.notfound TD.referenceListCell
{ color: #f00 !important; }
DIV#windowButtons
{ position: fixed;
@@ -71,10 +80,9 @@ DIV#buttons
vertical-align: middle;
text-align: right; }
td {color: #535D6D;}
TD
{ color: #535D6D; }
DIV#listEditor
{ padding: 5px; }
TD.editing
{ text-align: left; }
+20 -8
View File
@@ -30,16 +30,16 @@ function endEditable(event, textField) {
cell.addClassName("referenceListCell");
textField.hide();
if (uid) {
var tmp = textField.value;
tmp = tmp.replace (/</, "&lt;");
tmp = tmp.replace (/>/, "&gt;");
var tmp = textField.value;
tmp = tmp.replace (/</, "&lt;");
tmp = tmp.replace (/>/, "&gt;");
if (!uid)
cell.up("TR").addClassName("notfound");
if (tmp)
textSpan.update(tmp);
}
else {
else
cell.up("TR").remove();
}
if (event)
Event.stop(event);
@@ -108,8 +108,20 @@ function serializeReferences(e) {
var uid = $(r[i]).readAttribute("uid");
if (uid)
cards.push(uid);
else {
var addresses = r[i].value.split(/[,;]/);
for (var j = 0; j < addresses.length; j++) {
var mailto = addresses[j].strip();
var email = extractEmailAddress(mailto);
var c_name = extractEmailName(mailto);
if (!email && !c_name)
c_name = mailto;
cards.push(email + '|' + c_name);
}
}
}
$("referencesValue").value = cards.join(",");
return true;
}