Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ELC_elections
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
Container Registry
Model registry
Operate
Environments
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
Show more breadcrumbs
gestion-des-assemblees
ELC_elections
Merge requests
!64
Resolve "Add button"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add button"
68-add-button
into
master
Overview
0
Commits
4
Pipelines
1
Changes
1
Merged
Alexis POYEN
requested to merge
68-add-button
into
master
4 years ago
Overview
0
Commits
4
Pipelines
1
Changes
1
Expand
Closes
#68 (closed)
0
0
Merge request reports
Viewing commit
23e4eae3
Prev
Next
Show latest version
1 file
+
13
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
23e4eae3
Feat : round add button
· 23e4eae3
Alexis POYEN
authored
4 years ago
web/components/management/rounds-card.js
+
13
−
9
Options
@@ -31,11 +31,6 @@ class Round {
<p class="card-header-title">
Tours
</p>
<button id="round-new" class="button is-success">
<span class="icon is-small">
<i class="fas fa-plus"></i>
</span>
</button>
</header>
<div class="card-content">
<div id="round-list" class="content">Liste des tours</div>
@@ -48,9 +43,6 @@ class Round {
handleDom
()
{
let
roundHandler
=
this
;
document
.
getElementById
(
`round-new`
).
addEventListener
(
"
click
"
,
function
()
{
roundHandler
.
newRound
();
});
document
.
getElementById
(
`round-modal-close`
)
@@ -142,9 +134,17 @@ class Round {
}
async
displayRounds
()
{
document
.
getElementById
(
"
round-list
"
).
innerHTML
=
/* HTML */
`<button
id="round-new"
class="button large-button is-success"
>
<span class="icon is-small">
<i class="fas fa-plus"></i>
</span>
</button>`
;
let
rounds
=
await
this
.
RoundModel
.
getRounds
();
const
markup
=
rounds
.
map
((
round
)
=>
this
.
roundTemplate
(
round
)).
join
(
""
);
document
.
getElementById
(
"
round-list
"
).
innerHTML
=
markup
;
document
.
getElementById
(
"
round-list
"
).
innerHTML
+
=
markup
;
let
roundHandler
=
this
;
rounds
.
map
(
async
(
round
)
=>
{
@@ -171,6 +171,10 @@ class Round {
roundHandler
.
activateRound
(
round
);
});
});
document
.
getElementById
(
`round-new`
).
addEventListener
(
"
click
"
,
()
=>
{
this
.
newRound
();
});
}
roundTemplate
(
round
)
{
Loading