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

Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-18 07:29:37 +03:00
parent 2b697319dc
commit 3ca9071154

View File

@ -92,11 +92,16 @@
<!-- Task List -->
<div class="list-group col-sm-5 col-sm-pull-7" data-bind="foreach: filteredTasks">
<a href="#" data-bind="click: $parent.selectTask, hasFocus: $data == $parent.selectedTask()"
<a href="#" data-bind="click: $parent.selectTask, hasFocus: $data == $parent.selectedTask(), event: { mouseover: showActionButton, mouseout: hideActionButton }"
class="list-group-item list-group-item-type1">
<span class="pull-right">
<span data-bind="text: duration"></span>
<span data-bind="visible: actionButtonVisible()" data-bindx="style : { visibility : actionButtonVisible() ? '' : 'hidden' }">
&nbsp;&nbsp;
<button type='button' class="btn btn-sm btn-success" style="padding-left:0px">
<span class="glyphicon glyphicon-play"></span>
</button>
</span>
</span>
<h4 class="list-group-item-heading" data-bind="text: description"></h4>
<p class="list-group-item-text">
@ -243,6 +248,7 @@
self.time_log = ko.observableArray();
self.client = false;
self.project = false;
self.actionButtonVisible = ko.observable(false);
self.mapping = {
'client': {
@ -266,6 +272,14 @@
}
}
self.showActionButton = function() {
self.actionButtonVisible(true);
}
self.hideActionButton = function() {
self.actionButtonVisible(false);
}
self.addTime = function(time) {
self.time_log.push(time);
}