Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #1944
James Cole0f83582fede7
diff --git a/public/v1/js/ff/search/index.js b/public/v1/js/ff/search/index.jsindex 70615ae476..c7ccc645ef 100644--- a/public/v1/js/ff/search/index.js+++ b/public/v1/js/ff/search/index.js@@ -47,4 +47,14 @@ function presentSearchResults(data) {$('.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();+ }+ });}\ No newline at end of filediff --git a/public/v1/js/ff/transactions/list.js b/public/v1/js/ff/transactions/list.jsindex bed2fceeb5..46bb3639ef 100644--- a/public/v1/js/ff/transactions/list.js+++ b/public/v1/js/ff/transactions/list.js@@ -153,6 +153,7 @@ function countChecked() {*/function checkAll() {"use strict";+ console.log('Now in CheckAll((');$('.select_all_single').prop('checked', true);}@@ -207,6 +208,7 @@ function stopMassSelect() {*/function startMassSelect() {"use strict";+ console.log('Now in startMassSelect()');// show "select all" box in table header.$('.select_boxes').show();diff --git a/resources/views/v1/partials/transaction-row.twig b/resources/views/v1/partials/transaction-row.twigindex cc7101a1f6..223bb6eb07 100644--- a/resources/views/v1/partials/transaction-row.twig+++ b/resources/views/v1/partials/transaction-row.twig@@ -71,8 +71,8 @@</td>{% endif %}- <td class="hidden-xs pull-right">- <div class="btn-group btn-group-xs">+ <td class="hidden-xs">+ <div class="btn-group btn-group-xs pull-right">{% if sorting %}<a href="#" class="handle btn btn-default"><i class="fa fa-fw fa-arrows-v"></i></a>{% endif %}<div class="btn-group btn-group-xs">diff --git a/resources/views/v1/search/search.twig b/resources/views/v1/search/search.twigindex bfda384977..f325bb9666 100644--- a/resources/views/v1/search/search.twig+++ b/resources/views/v1/search/search.twig@@ -1,76 +1,106 @@<table class="table table-hover table-condensed"><thead><tr class="ignore">- <th class="hidden-xs" colspan="2"> </th>+ {# hidden row for checkboxes #}+ <th class="hidden-xs select_boxes" style="display: none;"><input name="select_all" class="select_all" type="checkbox"/></th>++ {# header for icon #}+ <th class="hidden-xs"></th><th>{{ trans('list.description') }}</th>- <th>{{ trans('list.amount') }}</th>- <th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th>- <th class="hidden-xs">{{ trans('list.from') }}</th>- <th class="hidden-xs">{{ trans('list.to') }}</th>+ <th style="text-align:right;">{{ trans('list.amount') }}</th>+ <th class="hidden-xs hidden-sm">{{ trans('list.date') }}</th>+ <th class="hidden-xs hidden-sm hidden-md">{{ trans('list.from') }}</th>+ <th class="hidden-xs hidden-sm hidden-md">{{ trans('list.to') }}</th><th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th><th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>- <th class="hidden-xs"><i class="fa fa-fw fa-rotate-right" title="{{ trans('list.bill') }}"></i></th>+ <th class="hidden-xs"><i class="fa fa-fw fa-calendar-o" title="{{ trans('list.bill') }}"></i></th>+ {# visible row for edit/delete buttons #}+ <th class="hidden-xs no_select_boxes"> </th></tr></thead><tbody>{% for transaction in transactions %}- <tr>- <td class="hidden-xs">+ <tr data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}" data-transaction-id="{{ transaction.id }}">+ {# select buttons #}+ <td class="hidden-xs select_boxes" style="display: none;"><div class="select_single" style="display:none;">- <input name="select_all_single[]" class="select_all_single" value="{{ transaction.journal_id }}" type="checkbox"/>+ <input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"+ type="checkbox"/></div>-- <div class="btn-group btn-group-xs edit_buttons edit_tr_buttons">- <a href="{{ route('transactions.edit',transaction.journal_id) }}" class="btn btn-xs btn-default"><i- class="fa fa-fw fa-pencil"></i></a>- <a href="{{ route('transactions.delete',transaction.journal_id) }}" class="btn btn-xs btn-danger"><i- class="fa fa-fw fa-trash-o"></i></a></div></td>+ {# icon #}<td class="hidden-xs">{{ transaction|transactionIcon }}</td>++ {# description #}<td>- <a href="{{ route('transactions.show',transaction.journal_id) }}">+ {# is reconciled? #}+ {{ transaction|transactionReconciled }}- {% if transaction.transaction_description|length > 0 %}- {{ transaction.transaction_description }} ({{ transaction.description }})- {% else %}- {{ transaction.description }}- {% endif %}+ <a href="{{ route('transactions.show',transaction.journal_id) }}">+ {{ transaction|transactionDescription }}</a>+ {# is a split journal #}{{ transaction|transactionIsSplit }}- {% if transaction.transactionJournal.attachments|length > 0 %}- <i class="fa fa-paperclip"- title="{{ Lang.choice('firefly.nr_of_attachments', journal.attachments|length, {count: journal.attachments|length}) }}"></i>- {% endif %}- </td>- <td style="text-align: right;">- <span style="margin-right:5px;">- {{ transaction|transactionAmount }}- </span>+ {# count attachments #}+ {{ transaction|transactionHasAtt }}+</td>++ {# amount #}+ <td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>++ {# date #}<td class="hidden-sm hidden-xs">{{ transaction.date.formatLocalized(monthAndDayFormat) }}</td>- <td class="hidden-xs">+ {# source #}+ <td class="hidden-xs hidden-sm hidden-md">{{ transaction|transactionSourceAccount }}</td>- <td class="hidden-xs">+ {# dest #}+ <td class="hidden-xs hidden-sm hidden-md">{{ transaction|transactionDestinationAccount }}</td>++ {# budget, if opted to show. #}<td class="hidden-xs">{{ transaction|transactionBudgets }}</td>++ {# category, if opted to show. #}<td class="hidden-xs">{{ transaction|transactionCategories }}</td>++ {# bill, if opted to show#}<td class="hidden-xs">{% if transaction.bill_id %}<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>{% endif %}</td>++ <td class="hidden-xs">+ <div class="btn-group btn-group-xs pull-right">+ {% if sorting %}<a href="#" class="handle btn btn-default"><i class="fa fa-fw fa-arrows-v"></i></a>{% endif %}++ <div class="btn-group btn-group-xs">+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ {{ 'actions'|_ }} <span class="caret"></span></button>+ <ul class="dropdown-menu dropdown-menu-right" role="menu">+ <li><a href="{{ route('transactions.edit',transaction.journal_id) }}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a></li>+ <li><a href="{{ route('transactions.delete',transaction.journal_id) }}"><i class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>+ <li role="separator" class="divider"></li>+ <li><a href="{{ route('transactions.clone',transaction.journal_id) }}"><i class="fa fa-copy fa-fw"></i> {{ 'clone'|_ }}</a></li>+ <li><a href="{{ route('transactions.split.edit',transaction.journal_id) }}"><i class="fa fa-unsorted fa-fw"></i> {{ 'split'|_ }}</a>+ </li>+ </ul>+ </div>+ </div>+ </td></tr>{% endfor %}</tbody>