1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Sort task times #430

This commit is contained in:
Hillel Coren 2015-09-18 09:59:04 +03:00
parent c8adfee437
commit dfd1ae502f

View File

@ -299,6 +299,12 @@
self.refresh = function() {
var hasEmpty = false;
var lastTime = 0;
self.time_log.sort(function(left, right) {
if (left.isEmpty() || right.isEmpty()) {
return -1;
}
return left.startTime() - right.startTime();
});
for (var i=0; i<self.time_log().length; i++) {
var timeLog = self.time_log()[i];
var startValid = true;