Added a case insensitive sort to the filters

Hoping to come up with a better syntax for this
print-window-tiddler
Jeremy Ruston 2012-06-14 11:35:54 +01:00
rodzic 513fa6f756
commit acad64a933
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -141,6 +141,15 @@ exports.operators = {
return "this.sortTiddlers(subResults,\"" + $tw.utils.stringify(operator.operand) + "\"," + desc + ");";
}
},
"sort-case-sensitive": {
selector: function(operator) {
throw "Cannot use sort operator at the start of a filter operation";
},
filter: function(operator) {
var desc = operator.prefix === "!" ? "true" : "false";
return "this.sortTiddlers(subResults,\"" + $tw.utils.stringify(operator.operand) + "\"," + desc + ",true);";
}
},
"limit": {
selector: function(operator) {
throw "Cannot use limit operator at the start of a filter operation";