1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-27 15:26:55 +03:00
parent 239a7ee788
commit d105d2eb8d
2 changed files with 6 additions and 5 deletions

View File

@ -188,7 +188,7 @@ class CreateTestData extends Command
{ {
$data = [ $data = [
'client_id' => $client->id, 'client_id' => $client->id,
'name' => $this->faker->sentence(10), 'name' => $this->faker->sentence(3),
]; ];
$project = $this->projectRepo->save($data); $project = $this->projectRepo->save($data);

View File

@ -128,7 +128,7 @@
<div class="navbar-collapse" style="padding-top:12px; padding-bottom:12px;"> <div class="navbar-collapse" style="padding-top:12px; padding-bottom:12px;">
<!-- Navbar Buttons --> <!-- Navbar Buttons -->
<ul class="nav navbar-right" style="margin-right:0px; padding-left:12px; float:right;"> <ul class="nav navbar-right" style="margin-right:0px; padding-left:12px; float:right; display: none;">
<span id="clock" data-bind="text: selectedTask().duration, visible: selectedTask" class="hidden-xs" <span id="clock" data-bind="text: selectedTask().duration, visible: selectedTask" class="hidden-xs"
style="font-size:28px; color:white; padding-right:12px; vertical-align:middle; display:none;"></span> style="font-size:28px; color:white; padding-right:12px; vertical-align:middle; display:none;"></span>
<button type='button' data-bind="click: onStartClick, css: startClass" class="btn btn-lg"> <button type='button' data-bind="click: onStartClick, css: startClass" class="btn btn-lg">
@ -429,13 +429,14 @@
$clientSelect.trigger('change'); $clientSelect.trigger('change');
window.model = new ViewModel(); window.model = new ViewModel();
var taskModels = [];
for (var i=0; i<tasks.length; i++) { for (var i=0; i<tasks.length; i++) {
var task = tasks[i]; var task = tasks[i];
var taskModel = new TaskModel(task); var taskModel = new TaskModel(task);
model.addTask(taskModel); taskModels.push(taskModel);
} }
ko.utils.arrayPushAll(model.tasks, taskModels);
ko.applyBindings(model); ko.applyBindings(model);
model.formChanged(false);
model.refreshTitle(); model.refreshTitle();
model.tock(); model.tock();
@ -449,7 +450,7 @@
} }
} }
$('#taskList').show(); $('#taskList, .navbar-right').show();
$('.archive-dropdown:not(.dropdown-toggle)').click(function() { $('.archive-dropdown:not(.dropdown-toggle)').click(function() {
model.onArchiveClick(); model.onArchiveClick();