Sha256: d474d3073a5c30de6172c60740ad5fe196800159d167bbdd14c0b40699bb2bb6

Contents?: true

Size: 406 Bytes

Versions: 43

Compression:

Stored size: 406 Bytes

Contents

function removeCommas(string) {
  return string.replace(/,/g, "")
}

// Remove commas for integers and floats to fix issues with sorting in the stupidtable plugin
var stupidtableCustomSettings = {
  "int": function(a, b) {
    return parseInt(removeCommas(a), 10) - parseInt(removeCommas(b), 10);
  },
  "float": function(a, b) {
    return parseFloat(removeCommas(a)) - parseFloat(removeCommas(b));
  }
}

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
blazer-3.1.0 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-3.0.4 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer_xlsx-3.0.8 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer_xlsx-3.0.7 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer_xlsx-3.0.6 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer_xlsx-3.0.5 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-3.0.3 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-3.0.2 app/assets/javascripts/blazer/stupidtable-custom-settings.js
finery-3.0.3 app/assets/javascripts/blazer/stupidtable-custom-settings.js
finery-3.0.2 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-3.0.1 app/assets/javascripts/blazer/stupidtable-custom-settings.js
finery-3.0.1 app/assets/javascripts/blazer/stupidtable-custom-settings.js
finery-3.0.0 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-3.0.0 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.5 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.4 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.3 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.2 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.1 app/assets/javascripts/blazer/stupidtable-custom-settings.js
blazer-2.6.0 app/assets/javascripts/blazer/stupidtable-custom-settings.js