Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
technobel.sf
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mathieu
technobel.sf
Commits
aeea9cb7
Commit
aeea9cb7
authored
May 16, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
un bouton qui affichera le form pour ajouter un auteur
parent
70fc37de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
src/TechnoBundle/Resources/views/Ajax/Owner/mainDisplay.html.twig
...noBundle/Resources/views/Ajax/Owner/mainDisplay.html.twig
+20
-1
web/css/style.css
web/css/style.css
+4
-0
No files found.
src/TechnoBundle/Resources/views/Ajax/Owner/mainDisplay.html.twig
View file @
aeea9cb7
...
...
@@ -5,7 +5,16 @@
{%
endblock
%}
{%
block
sidebar
%}
ici la sidebar qui contiendra un autre fragment ajax
<h3>
Créer
</h3>
<a
href=
"javascript: void(0);"
class=
"btn btn-create"
>
<i
class=
"fas fa-plus fa-fw"
></i>
Nouvel auteur
</a>
<div
class=
"hidden"
style=
"margin-top: 1em;"
>
</div>
{%
endblock
%}
...
...
@@ -94,5 +103,15 @@
// dans la console JS, recharger la fonction suivante pour voir apparaitre le debug Ajax de Symfony
reloadTableOwner
();
let
createBtns
=
document
.
querySelectorAll
(
'
.btn-create
'
);
// ou for (let currentBtn of createBtns)
createBtns
.
forEach
(
function
(
currentBtn
){
// 'e' veut dire 'event'
currentBtn
.
addEventListener
(
'
click
'
,
function
(
e
){
});
});
</script>
{%
endblock
%}
web/css/style.css
View file @
aeea9cb7
...
...
@@ -274,3 +274,7 @@ form label.required:after {
content
:
" * "
;
color
:
darkred
;
}
.hidden
{
display
:
none
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment