[ContactsExchanger] updated ContactsExchanger sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 20 Aug 2013 13:22:09 +0000 (15:22 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 20 Aug 2013 13:22:09 +0000 (15:22 +0200)
Change-Id: I862899f232f9be7294f80122f2148e3b94675163

js/app.ui.js

index f4716a0..c7ee8fa 100644 (file)
@@ -171,15 +171,17 @@ App.Ui = null;
                 * @returns {string}
                 */
                getCommentHtml: function ui_getCommentHtml(data) {
+                       var def_name = $('<p class="comment" id="comment-name">')
+                               .text(data.caller).html();
                        return '<div id="comment">'
                                + '<p class="comment">Your default contact</p>'
-                               + '<p class="comment" id="comment-name">'
-                               + data.caller + '</p>'
+                               + def_name
                                + '<p class="comment" id="comment-phone">'
                                + data.phoneNumber + '</p>'
                                + '</div>';
                },
 
+               
                /**
                 * Change Contact button action
                 * @event
@@ -357,12 +359,13 @@ App.Ui = null;
                 * @returns {string}
                 */
                getContactsListElement: function ui_getContactsListElement(contact) {
-                       var html =
+                       var caller = $('<span class="ui-li-text-sub">')
+                                       .text(contact.caller).html(),
+                               phoneNumber = contact.phoneNumber,
+                               html =
                                        '<li class="ui-li-multiline">'
-                                       + '<a href="#">' + contact.caller
-                                       + '<span class="ui-li-text-sub">' +
-                                       contact.phoneNumber
-                                       + '</span>'
+                                       + '<a href="#">' + caller
+                                       + '<span class="ui-li-text-sub">' + phoneNumber + '</span>'
                                        + '</a>'
                                        + '</li>';
                        return html;