mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 22:14:33 -04:00
Working on the time tracker
This commit is contained in:
parent
68bbd9b14e
commit
33ea69474c
@ -1107,7 +1107,25 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
self.actionButtonVisible = ko.computed(function() {
|
self.actionButtonVisible = ko.computed(function() {
|
||||||
return self.isHovered() && ! self.isEmpty();
|
if (! model.selectedTask()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (! self.isHovered()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var times = model.selectedTask().time_log();
|
||||||
|
var count = 0;
|
||||||
|
for (var i=0; i<times.length; i++) {
|
||||||
|
var timeLog = times[i];
|
||||||
|
if (timeLog.isEmpty()) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count > 1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ! self.isEmpty() && times.length > 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
self.onMouseOver = function() {
|
self.onMouseOver = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user