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