Attributes require quotation marks: e.g. data-sort-key="3"
For the currency issue, and also an issue where only the front-end digits were used for vw-sort-numeric, edit
vault/resources/js/sorttable.js (requires starting from an uncompressed version of the file, which you can download in the Members area). Find:
Code:
var aa = a ? parseFloat(a[0].replace(/[^0-9.-]/g, '')) : 0;
Replace with:
Code:
var aa = a ? parseFloat(a.replace(/[^0-9.-]/g, '')) : 0;
Find:
Code:
var bb = b ? parseFloat(b[0].replace(/[^0-9.-]/g, '')) : 0;
Replace with:
Code:
var bb = b ? parseFloat(b.replace(/[^0-9.-]/g, '')) : 0;
(A similar issue exists for date sorting; fix not posted here)
Additionally, there is an issue where if the original order of the cells is very mixed up (such as D, A, C, B), they may not be sorted correctly on the first attempt (multiple attempts may eventually succeed). Find:
Code:
order.splice(j, 0, this);
Replace with:
Code:
order.splice(j + 1, 0, this);
After applying these two changes, data-sort-key works as expected for me.