Sha256: 328e50207a180a08f14e8d64f092b655ba1ca1ec23449aeafb6b8440cd615602

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 Bytes

Contents

$.tablesorter.addParser({ 
  // set a unique id
  id: 'scinot', 
  is: function(s) { 
    return /^\s*[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?\s*$/.test(s); 
  }, 
  format: function(s) { 
    return $.tablesorter.formatFloat(s);
  }, 
  type: 'numeric' 
});

$.tablesorter.addParser({ 
  // set a unique id
  id: 'anchor_text', 
  is: function(s) { 
    return /<\/a>/.test(s); 
  }, 
  format: function(s) { 
    var text = $(s).find('a').text();
    return text;
  }, 
  type: 'text' 
});

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rbbt-rest-1.1.4 share/views/public/js/_fix_tablesorter_science.js
rbbt-rest-1.1.3 share/views/public/js/_fix_tablesorter_science.js
rbbt-rest-1.1.2 share/views/public/js/_fix_tablesorter_science.js
rbbt-rest-1.1.0 share/views/public/js/_fix_tablesorter_science.js
rbbt-views-2.0.2 share/views/js/fix_tablesorter_scientific.js
rbbt-views-2.0.1 share/views/js/fix_tablesorter_scientific.js
rbbt-views-2.0.0 share/views/js/fix_tablesorter_scientific.js