autodividers: true,
//filter: true,
autodividersSelector: function ( li ) {
- console.log("autodividersSelector")
return $(li).find('.callDate').text() === new Date().toLocaleDateString()
? "Today" : $(li).find('.callDate').text();
}
}
}
}
- return name || number;
+ return name || number || 'Unknown';
},
/**
date = '',
elements = [],
len = entries.length,
- i;
+ i,
+ checkbox;
if (len) {
this.updateCallerHeader(entries[0], entries.length);
this.changeDetailsToRemoveState();
// check previous checked entries
this.checkedLogs.forEach(function(logUid){
- var checkbox = $('#forCallerList li.call[data-uid="' + logUid + '"]')
+ checkbox = $('#forCallerList li.call[data-uid="' + logUid + '"]')
.find(':checkbox');
- checkbox.attr('checked', true)
- .data('checkboxradio')
- .refresh();
if (checkbox.length > 0) {
+ checkbox.attr('checked', true)
+ .data('checkboxradio')
+ .refresh();
$('#deleteActionBtn').removeClass('ui-disabled');
}
});
+
+ // close popup if there are no checked checkboxes
+ if (!$("#forCallerList input:checked").length) {
+ if ($.mobile.popup.active) {
+ $.mobile.popup.active.close();
+ }
+ }
}
this.addEventsForCallerListCheckboxes();
// lock buttons if unknown caller