Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Round the search time and make sure the count is shown #2453
James Cole22f110df8da2
diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.phpindex 62d917de03..8e7bee00df 100644--- a/app/Http/Controllers/SearchController.php+++ b/app/Http/Controllers/SearchController.php@@ -89,7 +89,7 @@ class SearchController extends Controller$searcher->parseQuery($fullQuery);$searcher->setLimit((int)config('firefly.search_result_limit'));$groups = $searcher->searchTransactions();- $searchTime = $searcher->searchTime(); // in seconds+ $searchTime = round($searcher->searchTime(), 3); // in secondstry {$html = view('search.search', compact('groups','searchTime'))->render();diff --git a/public/v1/js/ff/list/groups.js b/public/v1/js/ff/list/groups.jsindex 805cbb4cf5..7a705a0fdc 100644--- a/public/v1/js/ff/list/groups.js+++ b/public/v1/js/ff/list/groups.js@@ -21,6 +21,9 @@var count = 0;$(document).ready(function () {+ updateListButtons();+});+function updateListButtons() {// top button to select all / deselect all:$('input[name="select-all"]').change(function () {if (this.checked) {@@ -46,9 +49,7 @@ $(document).ready(function () {countChecked();updateActionButtons();});---});+}/***diff --git a/public/v1/js/ff/search/index.js b/public/v1/js/ff/search/index.jsindex c178767735..1543325e8a 100644--- a/public/v1/js/ff/search/index.js+++ b/public/v1/js/ff/search/index.js@@ -42,17 +42,6 @@ function presentSearchResults(data) {$('.search_box').find('.overlay').remove();$('.search_results').html(data.html).show();- $('.select_all_single').unbind('change').change(function () {- countChecked();- });- // make sure select button works:- $('input[name="select_all"]').change(function () {- if (this.checked) {- checkAll();- countChecked();- } else {- uncheckAll();- countChecked();- }- });++ updateListButtons();}\ No newline at end of filediff --git a/resources/views/v1/list/groups.twig b/resources/views/v1/list/groups.twigindex 827b7ad4ed..2800fb70f2 100644--- a/resources/views/v1/list/groups.twig+++ b/resources/views/v1/list/groups.twig@@ -151,7 +151,7 @@ TODO: hide and show columns<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ 'actions'|_ }} <span class="caret"></span></button>- <ul class="dropdown-menu">+ <ul class="dropdown-menu dropdown-menu-right"><li><a href="#" class="mass-edit"><i class="fa fa-fw fa-pencil"></i> <span>{{ 'mass_edit'|_ }}</span></a></li><li><a href="#" class="bulk-edit"><i class="fa fa-fw fa-pencil-square-o"></i> <span>{{ 'bulk_edit'|_ }}</span></a></li><li><a href="#" class="mass-delete"><i class="fa fa-fw fa-trash"></i> <span>{{ 'mass_delete'|_ }}</span></a></li>diff --git a/resources/views/v1/search/index.twig b/resources/views/v1/search/index.twigindex 9f912eb3b5..692849ef48 100644--- a/resources/views/v1/search/index.twig+++ b/resources/views/v1/search/index.twig@@ -123,7 +123,8 @@var searchQuery = "{{ fullQuery|escape('js') }}";var searchUri = "{{ route('search.search') }}";</script>- <script type="text/javascript" src="v1/js/ff/search/index.js?v={{ FF_VERSION }}"></script>{# required for groups.twig #}<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}"></script>+ <script type="text/javascript" src="v1/js/ff/search/index.js?v={{ FF_VERSION }}"></script>+{% endblock %}diff --git a/resources/views/v1/search/search.twig b/resources/views/v1/search/search.twigindex 5234c64dce..2206add94d 100644--- a/resources/views/v1/search/search.twig+++ b/resources/views/v1/search/search.twig@@ -1,6 +1,6 @@<p><p class="search_count">- {{ trans('firefly.search_found_transactions', {count: transactions.count, time: searchTime}) }}+ {{ trans('firefly.search_found_transactions', {count: groups.count, time: searchTime}) }}</p>{% include 'list.groups' %}