Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Toolkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Web Component Framework
Toolkit
Commits
0c871285
Commit
0c871285
authored
5 years ago
by
Bekerle, Patrizio
Committed by
Reiter, Christoph
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add refresh button WIP
parent
d5afb32f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/person-select/src/vpu-person-select.js
+39
-2
39 additions, 2 deletions
packages/person-select/src/vpu-person-select.js
with
39 additions
and
2 deletions
packages/person-select/src/vpu-person-select.js
+
39
−
2
View file @
0c871285
...
@@ -63,6 +63,16 @@ class PersonSelect extends VPULitElementJQuery {
...
@@ -63,6 +63,16 @@ class PersonSelect extends VPULitElementJQuery {
},
500
);
},
500
);
});
});
that
.
$
(
'
#reload-button
'
).
click
(()
=>
{
// fire a change event
that
.
dispatchEvent
(
new
CustomEvent
(
'
change
'
,
{
detail
:
{
value
:
that
.
value
,
},
bubbles
:
true
}));
});
// try an init when user-interface is loaded
// try an init when user-interface is loaded
that
.
initJSONLD
();
that
.
initJSONLD
();
});
});
...
@@ -252,6 +262,12 @@ class PersonSelect extends VPULitElementJQuery {
...
@@ -252,6 +262,12 @@ class PersonSelect extends VPULitElementJQuery {
return
css
`
return
css
`
${
commonStyles
.
getThemeCSS
()}
${
commonStyles
.
getThemeCSS
()}
${
commonStyles
.
getGeneralCSS
()}
${
commonStyles
.
getGeneralCSS
()}
${
commonStyles
.
getButtonCSS
()}
${
commonStyles
.
getFormAddonsCSS
()}
.select2-control.control {
width: 100%;
}
.select2-dropdown {
.select2-dropdown {
border-radius: var(--vpu-border-radius);
border-radius: var(--vpu-border-radius);
...
@@ -264,6 +280,20 @@ class PersonSelect extends VPULitElementJQuery {
...
@@ -264,6 +280,20 @@ class PersonSelect extends VPULitElementJQuery {
.select2-container--default .select2-selection--single .select2-selection__rendered {
.select2-container--default .select2-selection--single .select2-selection__rendered {
color: inherit;
color: inherit;
}
}
.field .button.control {
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #aaa;
-moz-border-radius-topright: var(--vpu-border-radius);
-moz-border-radius-bottomright: var(--vpu-border-radius);
line-height: 100%;
}
.field .button.control vpu-icon {
top: 0;
}
`
;
`
;
}
}
...
@@ -279,8 +309,15 @@ class PersonSelect extends VPULitElementJQuery {
...
@@ -279,8 +309,15 @@ class PersonSelect extends VPULitElementJQuery {
</style>
</style>
<div class="select">
<div class="select">
<!-- https://select2.org-->
<div class="field has-addons">
<select id="
${
this
.
selectId
}
" name="person" class="select" ?disabled=
${
!
this
.
active
}
>
${
!
this
.
active
?
html
`<option value="" disabled selected>
${
i18n
.
t
(
'
person-select.login-required
'
)}
</option>`
:
''
}
</select>
<div class="select2-control control">
<!-- https://select2.org-->
<select id="
${
this
.
selectId
}
" name="person" class="select" ?disabled=
${
!
this
.
active
}
>
${
!
this
.
active
?
html
`<option value="" disabled selected>
${
i18n
.
t
(
'
person-select.login-required
'
)}
</option>`
:
''
}
</select>
</div>
<a class="control button" id="reload-button" style="display: none">
<vpu-icon name="reload"></vpu-icon>
</a>
</div>
<div id="person-select-dropdown"></div>
<div id="person-select-dropdown"></div>
</div>
</div>
`
;
`
;
...
...
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