summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-10-29 19:05:44 +0200
committerLauri Ojansivu <x@xet7.org>2019-10-29 19:05:44 +0200
commit7d6d3af54a2fc1fb68634725eb754b22f02fd430 (patch)
tree8703d32a5489dfce95e026bc535d6459c1743784 /client/lib
parent13a2bd6380ced34a828b9469e48786ed21fcb380 (diff)
downloadwekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.tar.gz
wekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.tar.bz2
wekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.zip
Add Features: allowing lists to be sorted by modifiedAt when not in draggable mode.
Bug Fix #2093: the broken should be prior to file attachment feature introduced, and tested export board is working. Thanks to whowillcare ! ( xet7 merged this pull request manually from https://github.com/wekan/wekan/pull/2756 ) Closes #2093
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/filter.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/lib/filter.js b/client/lib/filter.js
index 1ca3a280..9ddea65c 100644
--- a/client/lib/filter.js
+++ b/client/lib/filter.js
@@ -439,6 +439,14 @@ class AdvancedFilter {
const commands = this._filterToCommands();
return this._arrayToSelector(commands);
}
+ getRegexSelector() {
+ // generate a regex for filter list
+ this._dep.depend();
+ return new RegExp(
+ `^.*${this._filter.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}.*$`,
+ 'i',
+ );
+ }
}
// The global Filter object.
@@ -455,6 +463,7 @@ Filter = {
hideEmpty: new SetFilter(),
customFields: new SetFilter('_id'),
advanced: new AdvancedFilter(),
+ lists: new AdvancedFilter(), // we need the ability to filter list by name as well
_fields: ['labelIds', 'members', 'archive', 'hideEmpty', 'customFields'],
@@ -533,6 +542,7 @@ Filter = {
const filter = this[fieldName];
filter.reset();
});
+ this.lists.reset();
this.advanced.reset();
this.resetExceptions();
},