this.config = new Config();
this.model = new Model();
this.model.registerChangeListener(this.updateCallLists.bind(this));
-
this.ui = new Ui();
+ this.updateCallLists();
return this;
},
* Updates call history and caller detailed history lists
*/
updateCallLists: function App_updateCallLists() {
+ // workaround - time zone update
+ tizen.time.getCurrentDateTime().toLocalTimezone();
// workaround;
setTimeout(this.showHistoryForCaller(this.lastViewedCaller), 500);
this.showCallHistory();
function (e) {
console.error('Message launch error: ', e);
self.ui.showErrorPopup('Message service is unavailable');
- app.ui.unlockOptionButtons();
},
{
onsuccess: function () {
onfailure: function (er) {
console.error('Message service launch error: ', er);
self.ui.showErrorPopup('Message service is unavailable');
- app.ui.unlockOptionButtons();
}
}
);
});
$('#smsActionBtn').on('tap', function (event) {
+ event.stopPropagation();
+ event.preventDefault();
self.lockButtons();
self.hideCheckboxes();
app.sendSms($('#forCallerList').data('remoteParty'));
$('#errorPopup').on('tap', '#errorPopupOkBtn', this.closeErrorPopup);
+ $( "#errorPopup" ).bind({
+ popupafterclose: function(){
+ self.unlockOptionButtons();
+ }
+ });
+
$(window).keyup(function(e){
if (e.which === 13) {
$('input:focus').blur();
contactsFoundCB = function (contacts) {
this.contactsLoaded = contacts;
- callback();
+ if (callback instanceof Function) {
+ callback();
+ }
};
errorCB = function (error) {
}
});
} else {
+ self.loadContacts(app.updateCallLists.bind(app));
$('#callActionBtn, #smsActionBtn')
.removeClass('ui-disabled');
}
$('#callActionBtn, #smsActionBtn').addClass('ui-disabled');
},
+ unlockOptionButtons : function Ui_unlockOptionButtons(){
+ $('#callActionBtn, #smsActionBtn').removeClass('ui-disabled');
+ },
+
/**
* WORKAROUND;
* Patch for UI, bad refresh scrollView