Bugzilla – Attachment 31855 Details for
Bug 12988
Update table footer with the visible rows - budgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12988: Update table footer with the visible rows - budgets
Bug-12988-Update-table-footer-with-the-visible-row.patch (text/plain), 4.98 KB, created by
Jonathan Druart
on 2014-09-24 15:23:25 UTC
(
hide
)
Description:
Bug 12988: Update table footer with the visible rows - budgets
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-09-24 15:23:25 UTC
Size:
4.98 KB
patch
obsolete
>From e531a9f7a92b2de0a208ff9300703eb542f56357 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 24 Sep 2014 17:16:48 +0200 >Subject: [PATCH] Bug 12988: Update table footer with the visible rows - > budgets > >On the budget list view, the total was not updated. >With this patch, the footer (totals) will be updated on filtering rows. > >Test plan: >To test with both CurrencyFormat pref values. >1/ Go on the budget list view >2/ Verify the totals are correct. >3/ Filter the table using the filter input and verify the totals are >updated with the rows shown >4/ Hide/Show inactive budgets and verify the totals are still corrects. >--- > .../prog/en/modules/admin/aqbudgets.tt | 31 +++++++++++++--------- > 1 file changed, 19 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index b0c4344..50566a0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -152,6 +152,8 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > //<![CDATA[ > // > $(document).ready(function() { >+ >+ > var oTable = $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, { > "fnDrawCallback": function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) >@@ -179,6 +181,10 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > } > } > }, >+ "footerCallback": function ( row, data, start, end, display ) { >+ var api = this.api(), data; >+ footer_column_sum( api, [ 4, 6, 8, 10 ], 2 ); >+ }, > "aoColumnDefs": [ > { "bVisible": false, "aTargets": [ 0, 1 ] }, > { "bSortable": false, "aTargets": ["_all"] } >@@ -213,6 +219,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > }); > $("#hide_inactive").click(); > [% END %] >+ oTable.fnAddFilters("filter", 750); > > $("#filterbutton").click(function() { > $("#fundfilters").slideToggle(0); >@@ -295,13 +302,13 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > <th></th> > <th></th> > <th colspan="2" style="text-align: left;" nowrap="nowrap">Period allocated [% IF ( budget_period_total ) %][% budget_period_total %][% END %] </th> >- <th nowrap="nowrap" class="data"> [% period_alloc_total %]</th> >+ <th class="data"></th> > <th></th> >- <th class="data">[% ordered_total %]</th> >+ <th class="data"></td> > <th></th> >- <th class="data">[% spent_total %]</th> >+ <th class="data"></th> > <th></th> >- <th class="data">[% available_total %]</th> >+ <th class="data"></th> > <th></th> > </tr> > </tfoot> >@@ -320,35 +327,35 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > [% IF budget.budget_parent_id %] > <span class="child_fund_amount">[% budget.budget_amount %]</span> > [% ELSE %] >- [% budget.budget_amount %] >+ <span class="total_amount">[% budget.budget_amount %]</span> > [% END %] > </td> > <td class="data"> > [% IF budget.budget_parent_id %] > <span class="child_fund_amount">[% budget.budget_ordered %]</span> > [% ELSE %] >- [% budget.budget_ordered %] >+ <span class="total_amount">[% budget.budget_ordered %]</span> > [% END %] > </td> > <td class="data"> > [% IF budget.budget_parent_id %] > <span class="child_fund_amount">[% budget.total_ordered %]</span> > [% ELSE %] >- [% budget.total_ordered %] >+ <span class="total_amount">[% budget.total_ordered %]</span> > [% END %] > </td> > <td class="data"> > [% IF budget.budget_parent_id %] > <span class="child_fund_amount">[% budget.budget_spent %]</span> > [% ELSE %] >- [% budget.budget_spent %] >+ <span class="total_amount">[% budget.budget_spent %]</span> > [% END %] > </td> > <td class="data"> > [% IF budget.budget_parent_id %] > <span class="child_fund_amount">[% budget.total_spent %]</span> > [% ELSE %] >- [% budget.total_spent %] >+ <span class="total_amount">[% budget.total_spent %]</span> > [% END %] > </td> > >@@ -364,11 +371,11 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > [% END %] > [% ELSE %] > [% IF (value > 0) %] >- <span style="color: green;"> >+ <span class="total_amount" style="color: green;"> > [% ELSIF (value < 0) %] >- <span style="color: red;"> >+ <span class="total_amount" style="color: red;"> > [% ELSE %] >- <span> >+ <span class="totalamount"> > [% END %] > [% END %] > [% text %] >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12988
:
31855
|
32016
|
32145
|
32346
|
32819