1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 07:56:23 +00:00

Show contact names instead of numbers

This commit is contained in:
Loic Blot 2014-10-05 09:01:47 +00:00
parent 71d6ed693b
commit 922a5bf853

View File

@ -124,7 +124,16 @@ function changeSelectedConversation(item) {
var peerListBuf = "";
$.each(jsondata['phonelist'], function(id, val) {
peerListBuf += '<li><a href="#" mailbox-navigation="' + val + '">' + val + '</a></li>';
var fn, peerLabel;
if (typeof jsondata['contacts'][val] == 'undefined') {
fn = '';
peerLabel = val;
}
else {
fn = jsondata['contacts'][val];
peerLabel = fn;
}
peerListBuf += '<li><a href="#" mailbox-navigation="' + val + '">' + peerLabel + '</a></li>';
});
$('#app-mailbox-peers ul').html(peerListBuf);