[CallLog] updated CallLog sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 15 Oct 2013 09:22:18 +0000 (11:22 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 15 Oct 2013 09:22:18 +0000 (11:22 +0200)
Change-Id: I89b69ca2a5c653a559b536dee0857d6d28d01154

js/app.js
js/app.ui.js

index e58ca9d..cc76d56 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -59,6 +59,7 @@ var App = null;
                 * Updates call history and caller detailed history lists
                 */
                updateCallLists: function App_updateCallLists() {
+                       this.ui.updateCheckboxes();
                        // workaround - time zone update
                        tizen.time.getCurrentDateTime().toLocalTimezone();
                        // workaround;
index 575ee52..893548e 100644 (file)
@@ -748,14 +748,7 @@ function Ui(contacts) {
                        var self = this;
                        document.addEventListener('webkitvisibilitychange', function () {
                                if (document.webkitVisibilityState === 'hidden') {
-                                       self.checkedLogs = [];
-                                       $('#forCallerList li.call').each(function () {
-                                               if ($(this).find('form label')
-                                                       .hasClass('ui-checkbox-on')) {
-                                                       var checkedEntry = $(this).data('entries')[0];
-                                                       self.checkedLogs.push(checkedEntry.uid);
-                                               }
-                                       });
+                                       self.updateCheckboxes();
                                } else {
                                        self.loadContacts(app.updateCallLists.bind(app));
                                        $('#callActionBtn, #smsActionBtn')
@@ -764,6 +757,16 @@ function Ui(contacts) {
                        });
                },
 
+               updateCheckboxes: function Ui_updateCheckboxes () {
+                       var checkedLogs = this.checkedLogs = [];
+                       $('#forCallerList li.call').each(function () {
+                               if ($(this).find('form label').hasClass('ui-checkbox-on')) {
+                                       var checkedEntry = $(this).data('entries')[0];
+                                       checkedLogs.push(checkedEntry.uid);
+                               }
+                       });
+               },
+
                lockButtons: function Ui_lockButtons(buttons) {
                        $(buttons).addClass('ui-disabled').attr('tabIndex', '-1').blur();
                },