Bugzilla – Attachment 20859 Details for
Bug 10792
Amounts in funds table on acquisitions home page not sorting correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 10792: fix sorting of funds table on acquisitions home page
SIGNED-OFF-Bug-10792-fix-sorting-of-funds-table-on.patch (text/plain), 3.37 KB, created by
Katrin Fischer
on 2013-09-07 19:12:25 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 10792: fix sorting of funds table on acquisitions home page
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-09-07 19:12:25 UTC
Size:
3.37 KB
patch
obsolete
>From f46ef40b92eca27a0d146195b4a9ad10de684598 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Thu, 5 Sep 2013 16:23:28 +0000 >Subject: [PATCH] [SIGNED OFF] Bug 10792: fix sorting of funds table on > acquisitions home page > >This patch introduces a DataTables sorting plugin, title-numeric, >for sorting cells based on a decimal number embedded in a span title >attribute. This allows currency amounts to be formatted properly >for display without having to writing a sorting plugin that's >super-smart about removing the formatting, particularly for locales >that use a comma as the decimal mark. > >The sorter plugin can be used like this: > >- In the DataTables config: > >"aoColumns": [ > { "sType": "title-numeric" }, >] > >- In the table data > ><td><span title="[% decimal_number_that_JS_parseFloat_accepts %]"> > [% formatted currency %] ></span></td> > >To test: > >[1] Ensure that there is at least one active budget and at least > one inactive one. >[2] Go to the acquisitions home page. Note that changing the sort order > on the amount, ordered, spent, or avail columns results in incorrect > sorting that is either ASCII-betical or which ignores any component > of large numbers that occur after the thousands separator. >[3] Apply the patch. >[4] Verify that the sorting now works correctly and that no JavaScript > errors appear in the JS debug console of your choice. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Sorting now works correctly, for active and inactive funds. >Passes all tests and QA script. >--- > .../prog/en/modules/acqui/acqui-home.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 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 db7192f..4fabffe 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 >@@ -177,10 +177,10 @@ $(document).ready(function() { > [% END %] > </td> > <td>[% loop_budge.budget_branchname %]</td> >- <td class="data">[% loop_budge.budget_amount %]</td> >- <td class="data"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td> >- <td class="data"><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td> >- <td class="data">[% loop_budge.budget_avail %]</td> >+ <td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.formatted_budget_amount %]</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.formatted_budget_ordered %]</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.formatted_budget_spent %]</span></a></td> >+ <td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td> > </tr> > [% END %] > [% END %] >-- >1.7.9.5
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 10792
:
20674
|
20805
|
20839
|
20855
|
20858
|
20859
|
21046