Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damien Armillon
API Toucan
Commits
294612a8
Commit
294612a8
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
Modal Fonctionnel
parent
36d4ef84
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
front/src/ModalSuppression.js
+11
-5
11 additions, 5 deletions
front/src/ModalSuppression.js
front/src/ToucanLine.js
+2
-2
2 additions, 2 deletions
front/src/ToucanLine.js
with
13 additions
and
7 deletions
front/src/ModalSuppression.js
+
11
−
5
View file @
294612a8
import
React
,
{
Component
}
from
'
react
'
import
{
Modal
,
Button
,
Image
,
Grid
}
from
'
semantic-ui-react
'
import
{
Modal
,
Button
,
Image
}
from
'
semantic-ui-react
'
class
ModalSupression
extends
Component
{
state
=
{
hihi
:
true
};
deleteToucan
(
id
)
{
fetch
(
`/toucan/delete/
${
id
}
`
,{
method
:
"
Post
"
})
.
then
(
this
.
props
.
closeModal
())
}
render
()
{
return
(
<
Modal
open
=
{
this
.
props
.
open
}
size
=
"
tiny
"
...
...
@@ -10,11 +16,11 @@ class ModalSupression extends Component {
>
<
Modal
.
Header
style
=
{{
textAlign
:
"
center
"
}}
>
Veux
tu
vraiment
supprimer
ce
Toucan
?
<
/Modal.Header
>
<
Modal
.
Content
>
<
Image
centered
src
=
{
`/toucan/img/
${
this
.
props
.
image
Id
}
`
}
size
=
"
medium
"
/>
<
Image
centered
src
=
{
`/toucan/img/
${
this
.
props
.
toucan
Id
}
`
}
size
=
"
medium
"
/>
<
/Modal.Content
>
<
Modal
.
Actions
style
=
{{
textAlign
:
"
center
"
}}
>
<
Button
negative
>
Supprimer
le
Toucan
<
/Button
>
<
Button
positive
>
Laisser
le
Toucan
là
où
il
est
<
/Button
>
<
Button
negative
onClick
=
{()
=>
this
.
deleteToucan
(
this
.
props
.
toucanId
)}
>
Supprimer
le
Toucan
<
/Button
>
<
Button
positive
onClick
=
{()
=>
this
.
props
.
closeModal
()}
>
Laisser
le
Toucan
là
où
il
est
<
/Button
>
<
/Modal.Actions
>
<
/Modal
>
)
...
...
This diff is collapsed.
Click to expand it.
front/src/ToucanLine.js
+
2
−
2
View file @
294612a8
import
React
,
{
Component
}
from
'
react
'
import
{
Table
,
Image
,
Button
,
Modal
}
from
'
semantic-ui-react
'
import
{
Table
,
Image
,
Button
}
from
'
semantic-ui-react
'
import
ModalSuppression
from
'
./ModalSuppression
'
class
ToucanLine
extends
Component
{
...
...
@@ -43,7 +43,7 @@ class ToucanLine extends Component {
<
Button
negative
icon
=
"
cancel
"
onClick
=
{()
=>
this
.
setState
({
isModalOpen
:
true
})}
/
>
<
ModalSuppression
open
=
{
this
.
state
.
isModalOpen
}
image
Id
=
{
this
.
props
.
toucan
[
"
_id
"
]}
toucan
Id
=
{
this
.
props
.
toucan
[
"
_id
"
]}
closeModal
=
{
this
.
closeModal
}
/
>
<
/Table.Cell
>
...
...
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