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:
parent
62aaaa08c3
commit
402a50c0b8
@ -188,7 +188,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Task List -->
|
||||
<div class="list-group col-sm-5 col-sm-pull-7" data-bind="foreach: filteredTasks">
|
||||
<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;">
|
||||
<div class="pull-right" style="text-align:right;">
|
||||
@ -355,8 +355,10 @@
|
||||
var taskModel = new TaskModel(task);
|
||||
model.addTask(taskModel);
|
||||
}
|
||||
|
||||
ko.applyBindings(model);
|
||||
model.tock();
|
||||
$('#taskList').show();
|
||||
|
||||
$('.archive-dropdown:not(.dropdown-toggle)').click(function() {
|
||||
model.onArchiveClick();
|
||||
|
@ -174,13 +174,7 @@
|
||||
self.selectedTask(task);
|
||||
self.addTask(task);
|
||||
self.filter('');
|
||||
if (! task.client()) {
|
||||
$('.client-select input.form-control').focus();
|
||||
} else if (! task.project()) {
|
||||
$('.project-select input.form-control').focus();
|
||||
} else {
|
||||
$('#description').focus();
|
||||
}
|
||||
task.focus();
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,8 +307,11 @@
|
||||
self.selectedTask(task);
|
||||
//self.filter('');
|
||||
|
||||
if (task && ! task.project()) {
|
||||
$('select#client_id').trigger('change');
|
||||
if (task) {
|
||||
task.focus();
|
||||
if (! task.project()) {
|
||||
$('select#client_id').trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
self.formChanged(false);
|
||||
@ -384,6 +381,16 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
self.focus = function() {
|
||||
if (! self.client()) {
|
||||
$('.client-select input.form-control').focus();
|
||||
} else if (! self.project()) {
|
||||
$('.project-select input.form-control').focus();
|
||||
} else {
|
||||
$('#description').focus();
|
||||
}
|
||||
}
|
||||
|
||||
self.save = function(data, isSelected) {
|
||||
if (self.isValid() !== true) {
|
||||
toastr.error("{{ trans('texts.error_refresh_page') }}");
|
||||
|
Loading…
Reference in New Issue
Block a user