[CallLog] updated CallLog sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Sat, 13 Jul 2013 11:40:06 +0000 (13:40 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Sat, 13 Jul 2013 11:40:06 +0000 (13:40 +0200)
Change-Id: I03c9e1d6bef23e3258b2c4d9c15fee367b991e96

index.html
js/app.ui.js

index da33ea7..409bed0 100644 (file)
@@ -15,6 +15,6 @@
        <link rel="stylesheet" type="text/css" href="./css/style.css"/>
 </head>
 <body>
-       <div data-role="page" data-footer-Exist="false" id="callView" ></div>
+       <div data-role="page" data-footer-Exist="false" id="callView"></div>
 </body>
 </html>
\ No newline at end of file
index 9706ef4..0b4b6db 100644 (file)
@@ -80,7 +80,7 @@ function Ui(contacts) {
                addEvents: function Ui_addEvents() {
                        var self = this;
 
-                       $(window).on('softkeyboardchange', function () {
+                       $(window).on('resize', function () {
                                $.mobile.activePage.page('refresh');
                        });
 
@@ -187,7 +187,9 @@ function Ui(contacts) {
 
                        document.addEventListener('tizenhwkey', function(e) {
                                if (e.keyName == "back") {
-                                       if ($.mobile.activePage.attr('id') === 'callView') {
+                                       if (self.removeMode === true) {
+                                               app.ui.changeDetailsToRemoveState(undefined, true);
+                                       } else if ($.mobile.activePage.attr('id') === 'callView') {
                                                        tizen.application.getCurrentApplication().exit();
                                        } else {
                                                history.back();
@@ -329,8 +331,15 @@ function Ui(contacts) {
                        this.scrollToBottom();
                },
 
-               changeDetailsToRemoveState: function Ui_changeDetailsToRemoveState(set) {
+               changeDetailsToRemoveState: function Ui_changeDetailsToRemoveState(set, clear) {
                        var counter = this.getCountSelectedLogEntries();
+                       if (clear === true) {
+                               counter = 0;
+                               $('#forCallerList').find(':checkbox').attr('checked', false)
+                                       .data('checkboxradio').refresh();
+                               $('.selectAllBox').find(':checkbox').attr('checked', false)
+                                       .data('checkboxradio').refresh();
+                       }
                        if (set !== undefined) {
                                this.removeMode = false;
                        } else if (counter === 0) {
@@ -340,7 +349,8 @@ function Ui(contacts) {
                        if (counter === 0) {
                                if (this.removeMode) {
                                        $('#historyForCallerView .toRemove').removeClass('hidden');
-                                       $('#historyForCallerView .selectAllBox').removeClass('hidden');
+                                       $('#historyForCallerView .selectAllBox')
+                                               .removeClass('hidden');
                                } else {
                                        $('#historyForCallerView .toRemove').addClass('hidden');
                                        $('#historyForCallerView .selectAllBox').addClass('hidden');