Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab Maintenance 28.03.2025 | 20:00 - 23:00 MEZ
Show more breadcrumbs
xrm
basic
Commits
9b240391
Commit
9b240391
authored
4 years ago
by
Benjamin Ulrich
Committed by
Sebastian Listl
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Projekt: Entwicklung - Neon][TicketNr.: 1057726][Roles: Filter funktioniert nicht]
parent
7c6bd179
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entity/Role_entity/recordcontainers/jdito/contentProcess.js
+26
-0
26 additions, 0 deletions
entity/Role_entity/recordcontainers/jdito/contentProcess.js
with
26 additions
and
0 deletions
entity/Role_entity/recordcontainers/jdito/contentProcess.js
+
26
−
0
View file @
9b240391
import
(
"
JditoFilter_lib
"
);
import
(
"
Util_lib
"
);
import
(
"
system.translate
"
);
import
(
"
system.vars
"
);
...
...
@@ -39,6 +40,31 @@ if (selectedRole != null) {
});
}
var
filter
=
vars
.
get
(
"
$local.filter
"
);
//TODO: this is a workaround that filters the records manually, it should be possible to filter the users with a tools.* method
var
filterFields
=
[
"
UID
"
,
"
ROLENAME
"
,
"
ROLETITLE
"
,
"
ROLETYPE
"
,
"
ROLEDESCRIPTION
"
,
"
USERCOUNT
"
,
"
IS_ASSIGNABLE
"
];
var
filterFns
=
{
"
$$$LOOKUPFIELD$$$
"
:
function
(
pRecordValue
,
pFilterValue
,
pOperator
,
pRow
)
{
if
(
pOperator
==
"
CONTAINS
"
)
{
pRow
=
[
pRow
[
1
],
pRow
[
3
],
pRow
[
4
],
pRow
[
5
]];
var
filterValues
=
pFilterValue
.
split
(
"
"
).
filter
(
function
(
val
)
{
return
val
.
trim
();});
return
filterValues
.
every
(
function
(
filterValue
)
{
return
pRow
.
some
(
function
(
fieldValue
)
{
return
(
new
RegExp
(
filterValue
,
"
i
"
)).
test
(
fieldValue
);
});
});
}
return
false
;
}
};
res
=
JditoFilterUtils
.
filterRecords
(
filterFields
,
res
,
filter
.
filter
,
filterFns
);
var
order
=
vars
.
get
(
"
$local.order
"
);
var
columnOrder
=
{
"
ROLENAME.value
"
:
1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment