$('#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'));
});
$( "#errorPopup" ).bind({
popupafterclose: function(){
- self.unlockOptionButtons();
+ self.unlockButtons();
}
});
}
}, 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);
},
// 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){
}
this.addEventsForCallerListCheckboxes();
// lock buttons if unknown caller
- if(remoteParty) {
- this.unlockOptionButtons();
+ if (remoteParty) {
+ this.unlockButtons();
} else {
- this.lockButtons();
+ this.lockButtons('#callActionBtn, #smsActionBtn');
}
},
* @param numberOfEntries
*/
updateCallerHeaderNumberOfEntries: function Ui_updateCallerHeaderNumberOfEntries(numberOfEntries) {
- $('.infoContainer .numberOfEntries').html(numberOfEntries);
+ $('.infoContainer .numberOfEntries').html('' + numberOfEntries + ' ' + (numberOfEntries === 1 ? 'call' : 'calls'));
},
/**
});
},
- 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');
},