Fixed a bug on dialing from recent history 11/29511/1
authorJimmy Huang <jimmy.huang@intel.com>
Tue, 28 Oct 2014 20:20:28 +0000 (13:20 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Tue, 28 Oct 2014 20:25:02 +0000 (13:25 -0700)
Fixed a bug where if user clicks on the recently dialed
history from the carousel, and the entry was not in the
contacts list, then it will not dial since it couldn't
find the right contact.  This patch will create a fake
contact object for any known entries.  Also fixed a typo.

Change-Id: Ia623264e74c0337ff4c5be9bad84eb3887232bcb
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
js/callhistorycarousel.js
js/main.js
packaging/modello-phone.changes

index 9306bb9..211cba0 100644 (file)
@@ -199,8 +199,17 @@ Carousel.prototype.createSwipeItem = function(callHistoryEntry, index) {
                carouselItem.data("contact", contact);
                carouselItem.click(function() {
                        self.swipe.trigger("slideTo", [ $(this), -1 ]);
-                       var hystoryEntry = $(this).data("callhistory");
+                       var historyEntry = $(this).data("callhistory");
                        var contactEntry = $(this).data("contact");
+                       if (!contactEntry) {
+                               contactEntry = {
+                                       name : {
+                                               displayName : historyEntry.remoteParties[0].personId,
+                                               firstName : "",
+                                               lastName : ""
+                                       }
+                               };
+                       }
                        var contact = {
                                name : {
                                        displayName : contactEntry.name.displayName,
@@ -209,7 +218,7 @@ Carousel.prototype.createSwipeItem = function(callHistoryEntry, index) {
                                },
                                photoURI : contactEntry.photoURI,
                                phoneNumbers : [ {
-                                       number : hystoryEntry.remoteParties[0].personId
+                                       number : historyEntry.remoteParties[0].personId
                                } ]
 
                        };
index 9ee0db7..45ebadf 100644 (file)
@@ -55,7 +55,7 @@ var telInput;
 var bootstrap;
 
 /**
-* Instance of class Carousel, this class provides methods to operate with hystory carousel.
+* Instance of class Carousel, this class provides methods to operate with history carousel.
 * * {{#crossLink "Carousel"}}{{/crossLink}}
 *
 * @property callHistoryCarousel {Object}
index e3970e8..32f8b8e 100644 (file)
@@ -1,3 +1,6 @@
+* Tue Oct 28 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/3.0.m14.3/ivi/20141018.100013-2-g71c6c96
+- Fixed a bug on dialing from recent history
+
 * Mon Oct 20 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/3.0.m14.3/ivi/20141018.100013-1-gce6f884
 - Fixed a bug where alpha filter is not working in contacts