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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-webui
Commits
59ba2599
Commit
59ba2599
authored
9 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Lazy-load dropdown options
parent
c3274509
No related branches found
No related tags found
2 merge requests
!142
REL: Release 0.15.0
,
!141
F lazy edit mode dropdowns
Pipeline
#55517
failed
9 months ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/js/edit_mode.js
+19
-1
19 additions, 1 deletion
src/core/js/edit_mode.js
with
19 additions
and
1 deletion
src/core/js/edit_mode.js
+
19
−
1
View file @
59ba2599
...
@@ -1389,6 +1389,24 @@ var edit_mode = new function () {
...
@@ -1389,6 +1389,24 @@ var edit_mode = new function () {
// create inputs
// create inputs
if
(
property
.
reference
&&
(
"
${BUILD_EDIT_MODE_LAZY_DROPDOWN_LOADING}
"
==
"
ENABLED
"
))
{
// Only add button to load reference options lazily.
const
editValueButton
=
$
(
`<button title="Edit this property" class="btn btn-link caosdb-update-entity-button-caosdb-f-list-item-button"><i class="bi-pencil"/></button>`
);
$
(
editValueButton
).
click
(()
=>
edit_mode
.
_addPropertyEditInputs
(
property
,
editfield
));
$
(
editfield
).
append
(
editValueButton
);
// Trash button can exist without having to load all options
edit_mode
.
add_property_trash_button
(
$
(
element
).
find
(
"
.caosdb-property-edit
"
)[
0
],
element
);
}
else
{
edit_mode
.
_addPropertyEditInputs
(
property
,
editfield
);
}
}
/**
* Add input elements for value, units, list toggling, and
* deletion to a property row.
*/
this
.
_addPropertyEditInputs
(
property
,
editfield
)
{
var
inputs
=
edit_mode
.
create_value_inputs
(
property
);
var
inputs
=
edit_mode
.
create_value_inputs
(
property
);
editfield
.
children
().
remove
();
editfield
.
children
().
remove
();
editfield
.
append
(
inputs
);
editfield
.
append
(
inputs
);
...
...
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