Fix contact autocompletion when UID is a digit
This commit is contained in:
parent
6cecca6c4f
commit
3bae2387d4
1
NEWS
1
NEWS
|
@ -17,6 +17,7 @@ Bug fixes
|
||||||
- fixed missing 'name part' in address for email messages in Active Sync
|
- fixed missing 'name part' in address for email messages in Active Sync
|
||||||
- fixed race condition when syncing huge amount of deleted messages over Active Sync
|
- fixed race condition when syncing huge amount of deleted messages over Active Sync
|
||||||
- fixed encoding of string as CSS identifier when the string starts with a digit
|
- fixed encoding of string as CSS identifier when the string starts with a digit
|
||||||
|
- fixed auto-completion popupmenu when UID is a digit
|
||||||
|
|
||||||
2.2.0 (2014-02-24)
|
2.2.0 (2014-02-24)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -167,10 +167,12 @@ var SOGoAutoCompletionInterface = {
|
||||||
for (var i = 0; i < data.contacts.length; i++) {
|
for (var i = 0; i < data.contacts.length; i++) {
|
||||||
var contact = data.contacts[i];
|
var contact = data.contacts[i];
|
||||||
var completeEmail = contact["c_cn"];
|
var completeEmail = contact["c_cn"];
|
||||||
|
var uid = "" + contact[this.uidField];
|
||||||
|
var c_name = "" + contact['c_name'];
|
||||||
if (contact["c_mail"])
|
if (contact["c_mail"])
|
||||||
completeEmail += " <" + contact["c_mail"] + ">";
|
completeEmail += " <" + contact["c_mail"] + ">";
|
||||||
var node = new Element('li', { 'address': completeEmail,
|
var node = new Element('li', { 'address': completeEmail,
|
||||||
'uid': contact[this.uidField] });
|
'uid': uid });
|
||||||
var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase());
|
var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase());
|
||||||
if (matchPosition > -1) {
|
if (matchPosition > -1) {
|
||||||
var matchBefore = completeEmail.substring(0, matchPosition);
|
var matchBefore = completeEmail.substring(0, matchPosition);
|
||||||
|
@ -184,7 +186,7 @@ var SOGoAutoCompletionInterface = {
|
||||||
node.appendChild(document.createTextNode(completeEmail));
|
node.appendChild(document.createTextNode(completeEmail));
|
||||||
}
|
}
|
||||||
list.appendChild(node);
|
list.appendChild(node);
|
||||||
if (contact['c_name'].endsWith (".vlf")) {
|
if (c_name.endsWith(".vlf")) {
|
||||||
// Keep track of list containers
|
// Keep track of list containers
|
||||||
node.writeAttribute("container", contact['container']);
|
node.writeAttribute("container", contact['container']);
|
||||||
}
|
}
|
||||||
|
@ -211,6 +213,7 @@ var SOGoAutoCompletionInterface = {
|
||||||
this.menu.setStyle({ top: top + "px",
|
this.menu.setStyle({ top: top + "px",
|
||||||
left: offset[0] + "px",
|
left: offset[0] + "px",
|
||||||
height: height,
|
height: height,
|
||||||
|
maxWidth: (window.width() - offset[0] - 12) + "px",
|
||||||
visibility: "visible" });
|
visibility: "visible" });
|
||||||
this.menu.scrollTop = 0;
|
this.menu.scrollTop = 0;
|
||||||
|
|
||||||
|
@ -225,8 +228,10 @@ var SOGoAutoCompletionInterface = {
|
||||||
if (data.contacts.length == 1) {
|
if (data.contacts.length == 1) {
|
||||||
// Single result
|
// Single result
|
||||||
var contact = data.contacts[0];
|
var contact = data.contacts[0];
|
||||||
input.writeAttribute("uid", contact[this.uidField]);
|
var uid = "" + contact[this.uidField];
|
||||||
if (contact['c_name'].endsWith(".vlf")) {
|
var c_name = "" + contact['c_name'];
|
||||||
|
input.writeAttribute("uid", uid);
|
||||||
|
if (c_name.endsWith(".vlf")) {
|
||||||
this.writeAttribute("container", contact['container']);
|
this.writeAttribute("container", contact['container']);
|
||||||
}
|
}
|
||||||
var completeEmail = contact["c_cn"];
|
var completeEmail = contact["c_cn"];
|
||||||
|
|
|
@ -251,6 +251,8 @@ DIV.contactSelector DIV.contactList
|
||||||
padding-bottom: .15em;
|
padding-bottom: .15em;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue