[CallLog] updated CallLog sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Fri, 20 Sep 2013 11:19:41 +0000 (13:19 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Fri, 20 Sep 2013 11:19:41 +0000 (13:19 +0200)
Change-Id: I976208c934bd20b5d35c37ae4f924241e65aa2de

css/style.css
js/app.helpers.js
js/app.ui.js
templates/callerHistory.tpl

index 3305d3d..4c1346b 100644 (file)
@@ -138,6 +138,10 @@ li.ui-screen-hidden{
        clear: right;
 }
 
+.contact .number .numberOfEntries {
+       font-size: 16px;
+}
+
 .contact .infoContainer {
        width: 100%;
        height: 66px;
index 7bb1869..868f551 100644 (file)
@@ -53,7 +53,8 @@ function Helpers() {
                                apHours = hours % 12 < 10 ? '0' + hours % 12 : hours % 12;
 
                                return apHours.toString().replace("00", "12") + ':' +
-                                       dateObj.getMinutes() + (hours > 11 ? ' PM' : ' AM');
+                                       (dateObj.getMinutes() < 10 ? "0" + dateObj.getMinutes() :
+                                       dateObj.getMinutes()) + (hours > 11 ? ' PM' : ' AM');
                        }
 
                        return dateObj.toTimeString().substring(0, 5);
index 89e9d20..e53b8b0 100644 (file)
@@ -149,13 +149,13 @@ function Ui(contacts) {
                        $('#smsActionBtn').on('click', function (event) {
                                event.stopPropagation();
                                event.preventDefault();
-                               self.lockButtons();
+                               self.lockButtons('#smsActionBtn');
                                self.hideCheckboxes();
                                app.sendSms($('#forCallerList').data('remoteParty'));
                        });
 
                        $('#callActionBtn').on("click", function (event) {
-                               self.lockButtons();
+                               self.lockButtons('#callActionBtn');
                                self.hideCheckboxes();
                                app.makeCall($('#forCallerList').data('remoteParty'));
                        });
@@ -188,7 +188,7 @@ function Ui(contacts) {
 
                        $( "#errorPopup" ).bind({
                                popupafterclose: function(){
-                                       self.unlockOptionButtons();
+                                       self.unlockButtons();
                                }
                        });
 
@@ -496,16 +496,6 @@ function Ui(contacts) {
                                }
                        }, 0);
 
-                       /* workaround for registering call during working app in removeMode */
-                       if (this.removeMode) {
-                               if ($('#selectAllDetails').attr('checked')){
-                                       this.selectAll();
-                               }
-                               $('.toRemove, .selectAllBox', $('#historyForCallerView'))
-                                       .removeClass('hidden');
-                               $('#forCallerList .toRemove').show()
-                       }
-
                        setTimeout(this.helpers.scrollTo.bind(this, calllogListContent, calllogListContentPos), 10);
                },
 
@@ -634,6 +624,7 @@ function Ui(contacts) {
                        // change to remove mode if it was active before registering call
                        if (this.removeMode) {
                                this.removeMode = !this.removeMode;
+                               this.setSelectAllDetails();
                                this.changeDetailsToRemoveState();
                                // check previous checked entries
                                this.checkedLogs.forEach(function(logUid){
@@ -657,10 +648,10 @@ function Ui(contacts) {
                        }
                        this.addEventsForCallerListCheckboxes();
                        // lock buttons if unknown caller
-                       if(remoteParty) {
-                               this.unlockOptionButtons();
+                       if (remoteParty) {
+                               this.unlockButtons();
                        } else {
-                               this.lockButtons();
+                               this.lockButtons('#callActionBtn, #smsActionBtn');
                        }
                },
 
@@ -677,7 +668,7 @@ function Ui(contacts) {
                 * @param numberOfEntries
                 */
                updateCallerHeaderNumberOfEntries: function Ui_updateCallerHeaderNumberOfEntries(numberOfEntries) {
-                       $('.infoContainer .numberOfEntries').html(numberOfEntries);
+                       $('.infoContainer .numberOfEntries').html('' + numberOfEntries + ' ' + (numberOfEntries === 1 ? 'call' : 'calls'));
                },
 
                /**
@@ -771,11 +762,11 @@ function Ui(contacts) {
                        });
                },
 
-               lockButtons: function () {
-                       $('#callActionBtn, #smsActionBtn').addClass('ui-disabled').attr('tabIndex', '-1').blur();
+               lockButtons: function Ui_lockButtons(buttons) {
+                       $(buttons).addClass('ui-disabled').attr('tabIndex', '-1').blur();
                },
 
-               unlockOptionButtons : function Ui_unlockOptionButtons(){
+               unlockButtons: function Ui_unlockButtons(){
                        $('#callActionBtn, #smsActionBtn').removeClass('ui-disabled').attr('tabIndex', '0');
                },
 
index c5df242..f936220 100644 (file)
@@ -5,7 +5,7 @@
                                <div class="infoContainer">
                                        <div class="photo"></div>
                                        <div class="name"></div>
-                                       <div class="number"><span class="accountId"></span>(<span class="numberOfEntries"></span>)</div>
+                                       <div class="number"><span class="accountId"></span><span class="numberOfEntries"></span></div>
                                </div>
                                <div class="options">
                                        <a href="javascript:void(0)" data-role="button" class="actionButton" id="callActionBtn" data-inline="true">Call</a>