mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 19:14:40 -04:00
Working on time tracker
This commit is contained in:
parent
d441977a35
commit
e37a3b7c73
@ -29,6 +29,12 @@
|
||||
border-color: #fff !important;
|
||||
}
|
||||
|
||||
.list-group-item.active .list-group-item-text,
|
||||
.list-group-item.active:focus .list-group-item-text,
|
||||
.list-group-item.active:hover .list-group-item-text {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
span.link {
|
||||
cursor:pointer;
|
||||
color:#337ab7;
|
||||
@ -214,11 +220,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<footer class="footer">
|
||||
<div style="padding-left: 16px; padding-top: 16px;">
|
||||
<div data-bind="text: statistics"></div>
|
||||
</div>
|
||||
</footer>
|
||||
-->
|
||||
|
||||
@include('tasks.time_tracker_knockout')
|
||||
|
||||
|
@ -172,7 +172,7 @@
|
||||
}
|
||||
|
||||
self.statistics = ko.computed(function() {
|
||||
return 'tst';
|
||||
return '';
|
||||
});
|
||||
|
||||
self.showArchive = ko.computed(function() {
|
||||
@ -303,6 +303,7 @@
|
||||
self.project = ko.observable();
|
||||
self.actionButtonVisible = ko.observable(false);
|
||||
self.created_at = ko.observable(moment().format('YYYY-MM-DD HH:mm:ss'));
|
||||
self.isStartEnabled = ko.observable(true);
|
||||
|
||||
self.mapping = {
|
||||
'client': {
|
||||
@ -363,6 +364,9 @@
|
||||
self.update(response);
|
||||
model.formChanged(false);
|
||||
}
|
||||
setTimeout(function() {
|
||||
self.isStartEnabled(true);
|
||||
}, 2000);
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -442,6 +446,11 @@
|
||||
}
|
||||
|
||||
self.onStartClick = function() {
|
||||
if (! self.isStartEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.isStartEnabled(false);
|
||||
if (self.isRunning()) {
|
||||
var data = 'is_running=0&';
|
||||
var time = self.lastTime();
|
||||
@ -487,6 +496,10 @@
|
||||
});
|
||||
|
||||
self.startClass = ko.computed(function() {
|
||||
if (! self.isStartEnabled()) {
|
||||
return 'disabled';
|
||||
}
|
||||
|
||||
return self.isRunning() ? 'btn-danger' : 'btn-success';
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user