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
32edcf23
Commit
32edcf23
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-quotes-googly-search
parents
0c07155d
732d4b0d
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!84
Release 0.9
,
!80
F quotes googly search
Pipeline
#29423
failed
2 years ago
Stage: linting
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
src/core/js/edit_mode.js
+27
-24
27 additions, 24 deletions
src/core/js/edit_mode.js
test/core/js/modules/edit_mode.js.js
+1
-1
1 addition, 1 deletion
test/core/js/modules/edit_mode.js.js
with
29 additions
and
25 deletions
CHANGELOG.md
+
1
−
0
View file @
32edcf23
...
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
down or arrow up.
down or arrow up.
*
[
#182
](
https://gitlab.com/caosdb/caosdb-webui/-/issues/182
)
- Quotes breake
*
[
#182
](
https://gitlab.com/caosdb/caosdb-webui/-/issues/182
)
- Quotes breake
"googly" search
"googly" search
*
Hidden boolean select in edit mode.
### Security
### Security
...
...
This diff is collapsed.
Click to expand it.
src/core/js/edit_mode.js
+
27
−
24
View file @
32edcf23
...
@@ -986,30 +986,33 @@ var edit_mode = new function () {
...
@@ -986,30 +986,33 @@ var edit_mode = new function () {
result
=
"
<input type='number' step='any' value='
"
+
property
.
value
+
"
'></input>
"
;
result
=
"
<input type='number' step='any' value='
"
+
property
.
value
+
"
'></input>
"
;
}
else
if
(
property
.
datatype
==
"
INTEGER
"
)
{
}
else
if
(
property
.
datatype
==
"
INTEGER
"
)
{
result
=
"
<input type='number' value='
"
+
property
.
value
+
"
'></input>
"
;
result
=
"
<input type='number' value='
"
+
property
.
value
+
"
'></input>
"
;
}
else
if
(
property
.
datatype
==
"
BOOLEAN
"
)
{
}
else
if
(
property
.
datatype
==
"
BOOLEAN
"
||
property
.
datatype
==
"
FILE
"
||
property
.
reference
)
{
result
=
$
(
`<select class="selectpicker form-control caosdb-list-
${
property
.
datatype
}
"><option value=""></option><option>FALSE</option><option>TRUE</option></select>`
);
result
=
$
(
'
<div/>
'
);
if
(
property
.
value
)
{
var
css
=
{
result
.
val
(
property
.
value
);
"
min-height
"
:
"
38px
"
,
}
"
width
"
:
"
80%
"
,
}
else
if
(
property
.
reference
||
property
.
datatype
==
"
FILE
"
)
{
"
display
"
:
"
inline-block
"
,
result
=
$
(
'
<div/>
'
);
};
var
css
=
{
result
.
css
(
css
);
"
min-height
"
:
"
38px
"
,
"
width
"
:
"
80%
"
,
"
display
"
:
"
inline-block
"
,
};
result
.
css
(
css
);
result
.
append
(
`<select style="display: none"><option selected>
${
property
.
value
}
</option></select>`
);
result
.
append
(
createWaitingNotification
(
property
.
value
));
const
select
=
$
(
'
<select data-container="body" data-virtual-scroll="100" data-window-padding="15" data-live-search="true" class="selectpicker form-control caosdb-list-
'
+
property
.
datatype
+
'
" data-resolved="false"><option value=""></option></select>
'
);
options
.
then
((
_options
)
=>
{
edit_mode
.
fill_reference_drop_down
(
select
[
0
],
_options
,
property
.
value
);
result
.
empty
();
result
.
append
(
select
);
edit_mode
.
_init_select
(
select
);
});
if
(
property
.
datatype
==
"
BOOLEAN
"
)
{
const
select
=
$
(
`<select data-container="body" class="selectpicker form-control caosdb-list-
${
property
.
datatype
}
"><option value=""></option><option>FALSE</option><option>TRUE</option></select>`
);
if
(
property
.
value
)
{
select
.
val
(
property
.
value
);
}
result
.
append
(
select
);
}
else
{
// references and files
result
.
append
(
`<select style="display: none"><option selected>
${
property
.
value
}
</option></select>`
);
result
.
append
(
createWaitingNotification
(
property
.
value
));
const
select
=
$
(
'
<select data-container="body" data-virtual-scroll="100" data-window-padding="15" data-live-search="true" class="selectpicker form-control caosdb-list-
'
+
property
.
datatype
+
'
" data-resolved="false"><option value=""></option></select>
'
);
options
.
then
((
_options
)
=>
{
edit_mode
.
fill_reference_drop_down
(
select
[
0
],
_options
,
property
.
value
);
result
.
empty
();
result
.
append
(
select
);
edit_mode
.
_init_select
(
select
);
});
}
}
else
{
}
else
{
throw
(
"
Unsupported data type: `
"
+
property
.
datatype
+
"
`. Please issue a feature request.
"
);
throw
(
"
Unsupported data type: `
"
+
property
.
datatype
+
"
`. Please issue a feature request.
"
);
}
}
...
@@ -2094,4 +2097,4 @@ var edit_mode = new function () {
...
@@ -2094,4 +2097,4 @@ var edit_mode = new function () {
*/
*/
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
edit_mode
.
init
();
edit_mode
.
init
();
});
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test/core/js/modules/edit_mode.js.js
+
1
−
1
View file @
32edcf23
...
@@ -821,7 +821,7 @@ QUnit.test("_toggle_list_property", async function (assert) {
...
@@ -821,7 +821,7 @@ QUnit.test("_toggle_list_property", async function (assert) {
var
val
=
$
(
single_input
).
val
();
var
val
=
$
(
single_input
).
val
();
if
(
dt
==
"
DATETIME
"
)
{
if
(
dt
==
"
DATETIME
"
)
{
val
=
$
(
single_input
).
find
(
"
[type='date']
"
).
val
()
+
"
T
"
+
$
(
single_input
).
find
(
"
[type='time']
"
).
val
();
val
=
$
(
single_input
).
find
(
"
[type='date']
"
).
val
()
+
"
T
"
+
$
(
single_input
).
find
(
"
[type='time']
"
).
val
();
}
else
if
([
"
Person
"
,
"
FILE
"
,
"
REFERENCE
"
].
indexOf
(
dt
)
>
-
1
)
{
}
else
if
([
"
BOOLEAN
"
,
"
Person
"
,
"
FILE
"
,
"
REFERENCE
"
].
indexOf
(
dt
)
>
-
1
)
{
val
=
$
(
single_input
).
find
(
"
select
"
).
val
();
val
=
$
(
single_input
).
find
(
"
select
"
).
val
();
}
}
assert
.
equal
(
val
,
data
[
`LIST<
${
dt
}
>`
],
`single
${
dt
}
input has correct value`
);
assert
.
equal
(
val
,
data
[
`LIST<
${
dt
}
>`
],
`single
${
dt
}
input has correct value`
);
...
...
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