diff --git a/js/filters.js b/js/filters.js index 13358a1..e3227cd 100644 --- a/js/filters.js +++ b/js/filters.js @@ -37,6 +37,11 @@ monetaFilters.filter('taskfilter', function ($filter) { return S(task.name).latinise().toLowerCase().contains(title); } + function match_command(task, command) + { + return S(task.command).latinise().toLowerCase().contains(command); + } + function xor(a,b) { return ( a || b ) && !( a && b ); @@ -74,6 +79,12 @@ monetaFilters.filter('taskfilter', function ($filter) { if (xor(negate, !match_title(task, item))) return; } + else if (item.lastIndexOf('command:', 0) === 0) + { + item = item.substr(8); + if (xor(negate, !match_command(task, item))) + return; + } else if (item.lastIndexOf('enabled:', 0) === 0) { item = item.substr(8);