mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Round the search time and make sure the count is shown #2453
This commit is contained in:
@@ -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 seconds
|
||||
|
||||
try {
|
||||
$html = view('search.search', compact('groups','searchTime'))->render();
|
||||
|
7
public/v1/js/ff/list/groups.js
vendored
7
public/v1/js/ff/list/groups.js
vendored
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
15
public/v1/js/ff/search/index.js
vendored
15
public/v1/js/ff/search/index.js
vendored
@@ -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();
|
||||
}
|
@@ -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>
|
||||
|
@@ -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 %}
|
||||
|
@@ -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' %}
|
||||
|
Reference in New Issue
Block a user