Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-27 23:15:42 +03:00
parent d105d2eb8d
commit 2244b04eb7
3 changed files with 66 additions and 30 deletions

View File

@ -2464,6 +2464,10 @@ $LANG = array(
'download_iphone_app' => 'Download the iPhone app', 'download_iphone_app' => 'Download the iPhone app',
'download_android_app' => 'Download the Android app', 'download_android_app' => 'Download the Android app',
'time_tracker_mobile_help' => 'Double tap a task to select it', 'time_tracker_mobile_help' => 'Double tap a task to select it',
'stopped' => 'Stopped',
'ascending' => 'Ascending',
'descending' => 'Descending',
'direction' => 'Direction',
); );

View File

@ -218,7 +218,38 @@
</div> </div>
<!-- Task List --> <!-- Task List -->
<div id="taskList" class="list-group col-sm-5 col-sm-pull-7" data-bind="foreach: filteredTasks" style="display:none"> <div id="taskList" class="list-group col-sm-5 col-sm-pull-7" style="display:none">
<div id="filterPanel" style="margin-bottom:0px;padding-top:20px;padding-bottom:0px;padding-left:10px;displayx:none;">
<div class="panel panel-default">
<div class="panel-body">
<div class="row" xstyle="padding-bottom:22px;">
<div class="col-md-12">
{!! Former::select('entity_state')
->addOption(trans('texts.all'), 'all')
->addOption(trans('texts.stopped'), 'stopped')
->addOption(trans('texts.running'), 'running') !!}
</div>
</div>
<div class="row">
<div class="col-md-6" style="padding-top:24px;">
{!! Former::select('sort_by')
->addOption(trans('texts.date'), 'date')
->addOption(trans('texts.duration'), 'duration')
->addOption(trans('texts.client'), 'client')
->addOption(trans('texts.project'), 'project')
->addOption(trans('texts.description'), 'description') !!}
</div>
<div class="col-md-6" style="padding-top:24px;">
{!! Former::select('direction')
->addOption(trans('texts.ascending'), 'asc')
->addOption(trans('texts.descending'), 'desc') !!}
</div>
</div>
</div>
</div>
</div>
<div data-bind="foreach: filteredTasks">
<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"> class="list-group-item">
<div class="pull-right" style="text-align:right;"> <div class="pull-right" style="text-align:right;">
@ -248,6 +279,7 @@
</div> </div>
</a> </a>
</div> </div>
</div>
</div> </div>
</div> </div>
@ -386,6 +418,7 @@
if (projectId == '-1') { if (projectId == '-1') {
$('input[name=project_name]').val(projectName); $('input[name=project_name]').val(projectName);
//var project = new ProjectModel(); //var project = new ProjectModel();
//project.name = projectName;
//model.selectedTask().project = project; //model.selectedTask().project = project;
//model.selectedTask().project_id(projectId); //model.selectedTask().project_id(projectId);
} else if (projectId) { } else if (projectId) {

View File

@ -28,7 +28,7 @@
} }
self.onFilterClick = function(event) { self.onFilterClick = function(event) {
console.log('filter clicked...'); $('#filterPanel').toggle();
} }
self.onRefreshClick = function() { self.onRefreshClick = function() {
@ -369,7 +369,6 @@
refreshProjectList(true); refreshProjectList(true);
self.selectedTask(task); self.selectedTask(task);
//self.filter('');
if (task) { if (task) {
task.focus(); task.focus();