Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-25 20:09:23 +03:00
parent f7c8518cd0
commit e1581cfc94
2 changed files with 14 additions and 19 deletions

View File

@ -205,7 +205,7 @@
<!-- Task List -->
<div id="taskList" class="list-group col-sm-5 col-sm-pull-7" data-bind="foreach: filteredTasks" style="display:none">
<a href="#" data-bind="click: $parent.selectTask, event: { mouseover: showActionButton, mouseout: hideActionButton }, css: listItemState"
class="list-group-item" stylex="white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
class="list-group-item">
<div class="pull-right" style="text-align:right;">
<div data-bind="visible: actionButtonVisible()"
data-bindx="style : { visibility : actionButtonVisible() ? '' : 'hidden' }">
@ -216,19 +216,21 @@
</button>
</div>
</div>
<div class="pull-right" style="text-align:right">
<div class="pull-right" style="text-align:right; padding-left: 16px;">
<div data-bind="text: totalDuration, style: { fontWeight: isRunning() ? 'bold' : '' }"></div>
<div data-bind="text: age, style: { fontWeight: isRunning() ? 'bold' : '' }" style="padding-top: 2px"></div>
</div>
<h4 class="list-group-item-heading">
<span data-bind="text: description.truncated, style: { fontWeight: isRunning() ? 'bold' : '' }"></span>&nbsp;
</h4>
<p class="list-group-item-text">
<span class="link" data-bind="text: clientName, click: $parent.viewClient, clickBubble: false"></span>
<span data-bind="visible: clientName &amp;&amp; projectName"> | </span>
<span class="link" data-bind="text: projectName, click: $parent.viewProject, clickBubble: false"></span>
&nbsp;
</p>
<div style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
<h4 class="list-group-item-heading">
<span data-bind="text: description, style: { fontWeight: isRunning() ? 'bold' : '' }"></span>&nbsp;
</h4>
<p class="list-group-item-text">
<span class="link" data-bind="text: clientName, click: $parent.viewClient, clickBubble: false"></span>
<span data-bind="visible: clientName &amp;&amp; projectName"> | </span>
<span class="link" data-bind="text: projectName, click: $parent.viewProject, clickBubble: false"></span>
&nbsp;
</p>
</div>
</a>
</div>

View File

@ -252,7 +252,7 @@
self.placeholder = ko.computed(function() {
if (self.selectedTask()) {
if (self.selectedTask().description()) {
return self.selectedTask().description.truncated();
return self.selectedTask().description();
} else {
return "{{ trans('texts.no_description') }}"
}
@ -632,13 +632,6 @@
return self.isRunning() ? 'glyphicon glyphicon-stop' : 'glyphicon glyphicon-play';
});
self.description.truncated = ko.computed(function() {
if (! self.description()) {
return '';
}
return truncate(self.description(), self.actionButtonVisible() ? 35 : 60);
});
self.setClient = function(client) {
self.client(client);
self.client_id(client.public_id());