From c03d5a95c69fe9c7d331e9f817b20127d04ed84f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 25 Sep 2017 14:06:21 +0300 Subject: [PATCH] Working on time tracker --- resources/views/partials/entity_combobox.blade.php | 1 - resources/views/tasks/time_tracker.blade.php | 1 - resources/views/tasks/time_tracker_knockout.blade.php | 10 ++++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/views/partials/entity_combobox.blade.php b/resources/views/partials/entity_combobox.blade.php index 85a8dd3ea9..67cd397388 100644 --- a/resources/views/partials/entity_combobox.blade.php +++ b/resources/views/partials/entity_combobox.blade.php @@ -2,7 +2,6 @@ var {{ $entityType }}Name = ''; ${{ $entityType }}Select.combobox({ highlighter: function (item) { - console.log(item); if (item.indexOf("{{ trans("texts.create_{$entityType}") }}") == 0) { {{ $entityType }}Name = this.query; return "{{ trans("texts.create_{$entityType}") }}: " + this.query; diff --git a/resources/views/tasks/time_tracker.blade.php b/resources/views/tasks/time_tracker.blade.php index 6b08a31cb2..ae173996fc 100644 --- a/resources/views/tasks/time_tracker.blade.php +++ b/resources/views/tasks/time_tracker.blade.php @@ -276,7 +276,6 @@ if (clientId && ! forceClear) { var list = projectsForClientMap.hasOwnProperty(clientId) ? projectsForClientMap[clientId] : []; - console.log('client list: ' + clientId); } else { var list = projects; } diff --git a/resources/views/tasks/time_tracker_knockout.blade.php b/resources/views/tasks/time_tracker_knockout.blade.php index 74161f4fb2..8851cb30b7 100644 --- a/resources/views/tasks/time_tracker_knockout.blade.php +++ b/resources/views/tasks/time_tracker_knockout.blade.php @@ -84,7 +84,7 @@ sweetConfirm(function() { var task = self.selectedTask(); if (task.isNew()) { - self.selectedTask(false); + self.selectTask(false); self.removeTask(task); $('.search').focus(); } else { @@ -97,11 +97,11 @@ } self.onFilterFocus = function(data) { - self.selectedTask(false); + self.selectTask(false); } self.onFilterChanged = function(data) { - self.selectedTask(false); + self.selectTask(false); self.selectedClient(false); self.selectedProject(false); } @@ -302,7 +302,9 @@ if (task == self.selectedTask()) { task = false; - $('.search').focus(); + if (! $('#search').is(':focus')) { + $('#search').focus(); + } } // if a client is selected the project list will be filtered