Koha/koha-tmpl/intranet-tmpl/prog/en/js
Galen Charlton 2e3c821564 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.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:30:33 +00:00
..
pages Bug 9882 - Use DataTables on batch modifications pages 2013-03-30 20:33:52 -04:00
acq.js Bug 7598: [Follow-up] make strings in acquisitions JavaScript translatable 2013-07-19 12:53:11 +00:00
additem.js Bug 10576: make strings in additem.js accessible to translation 2013-07-22 15:40:21 +00:00
ajax.js Bug 2774 - Path to theme is hard-coded in many places 2013-07-18 16:49:18 +00:00
background-job-progressbar.js Bug 9113: fix handling of certain characters by item batch modification tool 2013-07-05 15:35:25 +00:00
basket.js Bug 9757: Make staff client list contents view more like search results 2013-06-26 09:04:04 -07:00
cataloging.js Bug 10543: fix false warnings from checks of mandatory item fields 2013-07-30 14:43:41 +00:00
datatables.js Bug 10792: fix sorting of funds table on acquisitions home page 2013-09-16 15:30:33 +00:00
jquery.jeditable.mini.js Bug 7977: Adding jEditable minified version 2012-05-24 14:14:00 +02:00
localcovers.js Bug 8264 - local cover images not working in IE8 [ prog ] 2013-05-01 06:16:38 -04:00
members.js Bug 9783 - can hit submit twice when adding patrons 2013-03-27 22:58:17 -04:00
prevent_submit.js Bug 10310: Followup Prevent submitting form with enter does not work with IE 2013-05-23 07:32:50 -07:00
staff-global.js Bug 9424: Move JavaScript out of header include 2013-05-28 07:46:19 -07:00
xmlControlfield.js Bug 10592: fix MARC21 006/008 cataloging plugins 2013-07-22 14:00:23 +00:00