Koha/koha-tmpl
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
..
intranet-tmpl Bug 10792: fix sorting of funds table on acquisitions home page 2013-09-16 15:30:33 +00:00
opac-tmpl Bug 10320: (follow-up) remove stray merge conflict marker 2013-09-08 20:45:22 +00:00
favicon.ico Getting rid of pesky favicon.ico log message 2005-06-14 23:22:11 +00:00
index.html /koha-tmpl/ is now the documentroot for opac and intranet pages (remember koha-html is deprecated and should be removed very soon) 2003-03-18 14:17:56 +00:00
intranet.html fix for #290 2003-04-09 08:40:28 +00:00
opac.html fix for #290 2003-04-09 08:40:28 +00:00
templates.readme Added note detailing obsoletion of pathtotemplate() call 2003-06-11 20:14:12 +00:00