Bugzilla – Attachment 32149 Details for
Bug 12989
Update table footer with the visible rows - acqui-home
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12989: Update table footer with the visible rows - acqui-home
Bug-12989-Update-table-footer-with-the-visible-row.patch (text/plain), 5.32 KB, created by
Jonathan Druart
on 2014-10-10 14:26:11 UTC
(
hide
)
Description:
Bug 12989: Update table footer with the visible rows - acqui-home
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-10-10 14:26:11 UTC
Size:
5.32 KB
patch
obsolete
>From ecfe0eabd1e5c41e59775d1449125bf65b4e2022 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 24 Sep 2014 17:23:42 +0200 >Subject: [PATCH] Bug 12989: Update table footer with the visible rows - > acqui-home > >Note that bug 12984 changes the view of this table. > >On the acqui-home page, the total was not updated. >With this patch, the footer (totals) will be updated on filtering rows. > >Test plan: >1/ Go on the acqui home page. >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/acqui/acqui-home.tt | 53 ++++++++++++++++------ > 1 file changed, 40 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index d5ca87f..f73ff27 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -14,11 +14,6 @@ dt_overwrite_html_sorting_localeCompare(); > > $(document).ready(function() { > >- var inactive = $(".b_inactive,.bu_active"); >- var active = $(".bu_inactive"); >- inactive.hide(); >- active.show(); >- > var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { > "fnDrawCallback": function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) >@@ -46,6 +41,10 @@ $(document).ready(function() { > } > } > }, >+ "footerCallback": function ( row, data, start, end, display ) { >+ var api = this.api(), data; >+ footer_column_sum( api, [ 6, 7, 8, 9 ] ); >+ }, > "aoColumnDefs": [ > { "bVisible": false, "aTargets": [ 0, 1 ] }, > { "bSortable": false, "aTargets": ["_all"] } >@@ -169,10 +168,10 @@ $(document).ready(function() { > <th></th> > <th></th> > <th colspan="4">Total</th> >- <th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active | $Price %]</span></th> >- <th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active | $Price %]</span></th> >- <th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active | $Price %]</span></th> >- <th class="data"><span class="bu_active">[% totavail %]</span><span class="bu_inactive" >[% totavail_active | $Price %]</span></th> >+ <th class="data"></th> >+ <th class="data"></th> >+ <th class="data"></th> >+ <th class="data"></th> > </tr> > </tfoot> > <tbody> >@@ -200,10 +199,38 @@ $(document).ready(function() { > [% END %] > </td> > <td>[% loop_budge.budget_branchname %]</td> >- <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.budget_amount | $Price %]</span></td> >- <td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered | $Price %]</a></span></td> >- <td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent | $Price %]</span></a></td> >- <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.budget_avail | $Price %]</td> >+ <td class="data"> >+ [% IF loop_budge.budget_parent_id %] >+ [% loop_budge.budget_amount | $Price %] >+ [% ELSE %] >+ <span class="total_amount">[% loop_budge.budget_amount | $Price %]</span> >+ [% END %] >+ </td> >+ <td class="data"> >+ <a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]"> >+ [% IF loop_budge.budget_parent_id %] >+ [% loop_budge.budget_ordered | $Price %] >+ [% ELSE %] >+ <span class="total_amount">[% loop_budge.budget_ordered | $Price %]</span> >+ [% END %] >+ </a> >+ </td> >+ <td class="data"> >+ <a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]"> >+ [% IF loop_budge.budget_parent_id %] >+ [% loop_budge.budget_spent | $Price %] >+ [% ELSE %] >+ <span class="total_amount">[% loop_budge.budget_spent | $Price %]</span> >+ [% END %] >+ </a> >+ </td> >+ <td class="data"> >+ [% IF loop_budge.budget_parent_id %] >+ [% loop_budge.budget_avail | $Price %] >+ [% ELSE %] >+ <span class="total_amount">[% loop_budge.budget_avail | $Price %]</span> >+ [% END %] >+ </td> > </tr> > [% END %] > </tbody> >-- >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 12989
:
31856
|
31977
|
32149
|
32150
|
32348
|
32349
|
32817
|
32818