Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
57b6eed9
Verified
Commit
57b6eed9
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
BUG: fix for [webui#170](
https://gitlab.com/caosdb/caosdb-webui/-/issues/170
)
parent
0455ea7f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!70
BUG: fix for [webui#170](https://gitlab.com/caosdb/caosdb-webui/-/issues/170)
Pipeline
#21726
passed
3 years ago
Stage: linting
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
src/core/js/ext_autocomplete.js
+1
-1
1 addition, 1 deletion
src/core/js/ext_autocomplete.js
test/core/js/modules/ext_autocomplete.js.js
+20
-0
20 additions, 0 deletions
test/core/js/modules/ext_autocomplete.js.js
with
24 additions
and
1 deletion
CHANGELOG.md
+
3
−
0
View file @
57b6eed9
...
@@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Fixed
*
[
webui#170
](
https://gitlab.com/caosdb/caosdb-webui/-/issues/170
)
Autocompletion for "IS REFERENCED BY" leads to query syntax error
### Security
### Security
### Documentation
### Documentation
...
...
This diff is collapsed.
Click to expand it.
src/core/js/ext_autocomplete.js
+
1
−
1
View file @
57b6eed9
...
@@ -159,7 +159,7 @@ var ext_autocomplete = new function () {
...
@@ -159,7 +159,7 @@ var ext_autocomplete = new function () {
var
end
=
origJQElement
[
0
].
value
.
slice
(
cursorpos
);
var
end
=
origJQElement
[
0
].
value
.
slice
(
cursorpos
);
var
result
=
resultsFromServer
.
map
(
x
=>
{
var
result
=
resultsFromServer
.
map
(
x
=>
{
var
x_quoted
=
x
;
var
x_quoted
=
x
;
if
(
x
.
indexOf
(
"
"
)
>
-
1
)
{
if
(
ext_autocomplete
.
CQL_WORDS
.
indexOf
(
x
)
==
-
1
&&
x
.
indexOf
(
"
"
)
>
-
1
)
{
if
(
x
.
indexOf
(
"
\"
"
)
>
-
1
)
{
if
(
x
.
indexOf
(
"
\"
"
)
>
-
1
)
{
x_quoted
=
`'
${
x
}
'`
;
x_quoted
=
`'
${
x
}
'`
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
test/core/js/modules/ext_autocomplete.js.js
+
20
−
0
View file @
57b6eed9
...
@@ -88,6 +88,26 @@ QUnit.test("searchPost", async function(assert) {
...
@@ -88,6 +88,26 @@ QUnit.test("searchPost", async function(assert) {
assert
.
propEqual
(
result
,
expected
);
assert
.
propEqual
(
result
,
expected
);
});
});
QUnit
.
test
(
"
searchPost webui#170
"
,
async
function
(
assert
)
{
// https://gitlab.com/caosdb/caosdb-webui/-/issues/170
// Autocompletion for "IS REFERENCED BY" leads to query syntax error
const
resultsFromServer
=
[
"
REFERENCED BY
"
];
const
origJQElement
=
[{
selectionEnd
:
24
,
value
:
"
FIND Event WHICH IS REFE
"
,
}];
const
expected
=
[
{
"
html
"
:
"
REFERENCED BY
"
,
"
text
"
:
"
FIND Event WHICH IS REFERENCED BY
"
},
];
const
result
=
ext_autocomplete
.
searchPost
(
resultsFromServer
,
origJQElement
);
assert
.
propEqual
(
result
,
expected
);
});
QUnit
.
test
(
"
class
"
,
function
(
assert
)
{
QUnit
.
test
(
"
class
"
,
function
(
assert
)
{
assert
.
ok
(
ext_autocomplete
.
switch_on_completion
,
"
toggle available
"
);
assert
.
ok
(
ext_autocomplete
.
switch_on_completion
,
"
toggle available
"
);
assert
.
ok
(
ext_autocomplete
.
switch_on_completion
()
,
"
toggle runs
"
);
assert
.
ok
(
ext_autocomplete
.
switch_on_completion
()
,
"
toggle runs
"
);
...
...
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