changed suffix syntax to prefix

This commit is contained in:
KungD
2012-08-28 21:21:58 +02:00
parent b9e5c1e69e
commit 8fafad1208
2 changed files with 5 additions and 5 deletions

View File

@@ -46,15 +46,15 @@ $(document).ready(function() {
equal(col.last(), a, "a should be last");
equal(col.length, 4);
// tests with string comparator
col.comparator = "label+"; // suffix "+" means ascending sort
col.comparator = "+label"; // prefix "+" means ascending sort
col.sort();
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");
col.comparator = "label-"; // suffix "-" means descending sort
col.comparator = "-label"; // prefix "-" means descending sort
col.sort();
equal(col.first(), d, "d should be first");
equal(col.last(), a, "a should be last");
col.comparator = "label"; // default to ascending
col.comparator = "label"; // no prefix defaults to ascending
col.sort();
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");