appControl,
null,
function () {
- app.ui.unlockOptionButtons();
},
function (e) {
- console.error('App_makeCall: CALL service failure', e);
- self.ui.showErrorPopup('Call service is unavailable');
- app.ui.unlockOptionButtons();
+ console.error('Call to ' + phoneNumber + ' failed. Call service is unavailable.', e);
+ self.ui.showErrorPopup('Call failed. Call service is unavailable.');
},
{
onsuccess: function () {
- app.ui.unlockOptionButtons();
},
- onfailure: function (er) {
- console.error('Error during call to ' + phoneNumber, er);
- app.ui.unlockOptionButtons();
+ onfailure: function (e) {
+ console.log('App_makeCall: Call to ' + phoneNumber + ' failed. Call service was busy.', e);
+ self.ui.showErrorPopup('Call failed. Call service was busy.');
}
}
);
});
$('#smsActionBtn').on('tap', function (event) {
- event.preventDefault();
- event.stopPropagation();
- if ($(this).data('activated')) {
- return false;
- }
-
- self.lockOptionButtons();
self.hideCheckboxes();
app.sendSms($('#forCallerList').data('remoteParty'));
});
$('#callActionBtn').on("tap", function (event) {
- event.preventDefault();
- event.stopPropagation();
- if ($(this).data('activated')) {
- return false;
- }
-
- self.lockOptionButtons();
self.hideCheckboxes();
app.makeCall($('#forCallerList').data('remoteParty'));
-
- return false;
});
$('#deleteActionBtn').on('click', function () {
self.onVisibilityChange();
},
- lockOptionButtons: function () {
- $('#callActionBtn, #smsActionBtn').data('activated', true);
- },
-
- unlockOptionButtons: function () {
- setTimeout(function () {
- $('#callActionBtn, #smsActionBtn').data('activated', false);
- }, 2000);
- },
-
addEventsForCallerListCheckboxes: function Ui_addEventsForCallerListCheckboxes() {
var self = this;
$('#forCallerList :checkbox').on('change', function (event) {