[CallLog] updated CallLog sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 17 Sep 2013 09:26:19 +0000 (11:26 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Tue, 17 Sep 2013 09:26:19 +0000 (11:26 +0200)
Change-Id: I77e3a48c66a820cdd54dadd732d8c707064fdb4d

js/app.ui.js

index 8befbe9..f183466 100644 (file)
@@ -91,8 +91,6 @@ function Ui(contacts) {
                                $.mobile.activePage.page('refresh');
                        });
 
-                       $('#callView').on('tap', '.ui-btn-back', app.exit.bind(app));
-
                        $('#callView').on('pagebeforeshow', function () {
                                app.showCallHistory();
                        });
@@ -100,12 +98,6 @@ function Ui(contacts) {
                        //original code, do not remove until web-ui release; N_SE-48946
                        //$(".ui-scrollview-view").listview();
 
-                       $('#historyForCallerView').on('tap', '.ui-btn-back', function (event) {
-                               event.preventDefault();
-                               event.stopPropagation();
-                               $.mobile.changePage('#callView');
-                       });
-
                        $('#historyForCallerView').on('pagebeforeshow', function () {
                                self.hideCheckboxes();
                                $('#historyForCallerView .ui-content.ui-scrollview-clip .ui-scrollview-view')
@@ -154,7 +146,7 @@ function Ui(contacts) {
                                $.mobile.changePage('#historyForCallerView');
                        });
 
-                       $('#smsActionBtn').on('tap', function (event) {
+                       $('#smsActionBtn').on('click', function (event) {
                                event.stopPropagation();
                                event.preventDefault();
                                self.lockButtons();
@@ -162,7 +154,7 @@ function Ui(contacts) {
                                app.sendSms($('#forCallerList').data('remoteParty'));
                        });
 
-                       $('#callActionBtn').on("tap", function (event) {
+                       $('#callActionBtn').on("click", function (event) {
                                self.lockButtons();
                                self.hideCheckboxes();
                                app.makeCall($('#forCallerList').data('remoteParty'));
@@ -172,7 +164,7 @@ function Ui(contacts) {
                                self.changeDetailsToRemoveState();
                        });
 
-                       $('.selectAllBox').on('tap', 'li', function () {
+                       $('.selectAllBox').on('click', 'li', function () {
                                var checkbox = $(this).find(':checkbox');
                                if (self.removeMode === true) {
                                        if (checkbox.attr('checked')) {
@@ -192,7 +184,7 @@ function Ui(contacts) {
                                .on('click', '#popupCancelActionBtn', this.closePopup.bind(this))
                                .on('click', '#popupSubmitActionBtn', this.deleteCheckedLogs.bind(this));
 
-                       $('#errorPopup').on('tap', '#errorPopupOkBtn', this.closeErrorPopup);
+                       $('#errorPopup').on('click', '#errorPopupOkBtn', this.closeErrorPopup);
 
                        $( "#errorPopup" ).bind({
                                popupafterclose: function(){
@@ -206,7 +198,7 @@ function Ui(contacts) {
                                }
                        });
 
-                       document.addEventListener('tizenhwkey', function(e) {
+                       window.addEventListener('tizenhwkey', function(e) {
                                if (e.keyName == "back") {
                                        if ($.mobile.popup.active) {
                                                $.mobile.popup.active.close();
@@ -252,9 +244,9 @@ function Ui(contacts) {
 
                        numChecked = $('#forCallerList input:checked').length;
                        if (this.removeMode && numChecked === 0 && !deleteButton.hasClass('ui-disabled')) {
-                               deleteButton.addClass('ui-disabled');
+                               deleteButton.addClass('ui-disabled').attr('tabIndex', '-1').blur();
                        } else if (deleteButton.hasClass('ui-disabled')) {
-                               deleteButton.removeClass('ui-disabled');
+                               deleteButton.removeClass('ui-disabled').attr('tabIndex', '0');
                        }
                },
 
@@ -379,9 +371,9 @@ function Ui(contacts) {
                        }
 
                        if (this.removeMode && numChecked === 0) {
-                               $('#deleteActionBtn').addClass('ui-disabled');
+                               $('#deleteActionBtn').addClass('ui-disabled').attr('tabIndex', '-1').blur();
                        } else if (!this.removeMode) {
-                               $('#deleteActionBtn').removeClass('ui-disabled');
+                               $('#deleteActionBtn').removeClass('ui-disabled').attr('tabIndex', '0');
                                this.selectAllDetailsEach();
                        }
 
@@ -639,7 +631,7 @@ function Ui(contacts) {
                                                checkbox.attr('checked', true)
                                                        .data('checkboxradio')
                                                        .refresh();
-                                               $('#deleteActionBtn').removeClass('ui-disabled');
+                                               $('#deleteActionBtn').removeClass('ui-disabled').attr('tabIndex', '0');
                                        }
                                });
 
@@ -761,17 +753,17 @@ function Ui(contacts) {
                                } else {
                                        self.loadContacts(app.updateCallLists.bind(app));
                                        $('#callActionBtn, #smsActionBtn')
-                                               .removeClass('ui-disabled');
+                                               .removeClass('ui-disabled').attr('tabIndex', '0');
                                }
                        });
                },
 
                lockButtons: function () {
-                       $('#callActionBtn, #smsActionBtn').addClass('ui-disabled');
+                       $('#callActionBtn, #smsActionBtn').addClass('ui-disabled').attr('tabIndex', '-1').blur();
                },
 
                unlockOptionButtons : function Ui_unlockOptionButtons(){
-                       $('#callActionBtn, #smsActionBtn').removeClass('ui-disabled');
+                       $('#callActionBtn, #smsActionBtn').removeClass('ui-disabled').attr('tabIndex', '0');
                },
 
                /**