[CallLog] updated CallLog sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Mon, 15 Jul 2013 12:35:03 +0000 (14:35 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Mon, 15 Jul 2013 12:35:03 +0000 (14:35 +0200)
Change-Id: I07e955be4b6e94aeda57dcc9414a0ae1ee721416

js/app.ui.js

index 0b4b6db..5ca6143 100644 (file)
@@ -144,11 +144,13 @@ function Ui(contacts) {
                        });
 
                        $('#smsActionBtn').on('tap', function (event) {
+                               self.lockButtons();
                                self.hideCheckboxes();
                                app.sendSms($('#forCallerList').data('remoteParty'));
                        });
 
                        $('#callActionBtn').on("tap", function (event) {
+                               self.lockButtons();
                                self.hideCheckboxes();
                                app.makeCall($('#forCallerList').data('remoteParty'));
                        });
@@ -679,15 +681,23 @@ function Ui(contacts) {
                        document.addEventListener('webkitvisibilitychange', function () {
                                if (document.webkitVisibilityState === 'hidden') {
                                        $('#forCallerList li.call').each(function () {
-                                               if ($(this).find('form label').hasClass('ui-checkbox-on')) {
+                                               if ($(this).find('form label')
+                                                       .hasClass('ui-checkbox-on')) {
                                                        var checkedEntry = $(this).data('entries')[0];
                                                        self.checkedLogs.push(checkedEntry.uid);
                                                }
                                        });
+                               } else {
+                                       $('#callActionBtn, #smsActionBtn')
+                                               .removeClass('ui-disabled');
                                }
                        });
                },
 
+               lockButtons: function () {
+                       $('#callActionBtn, #smsActionBtn').addClass('ui-disabled');
+               },
+
                /**
                 * WORKAROUND;
                 * Patch for UI, bad refresh scrollView