1
0
Fork 0

ajout interaction sur la page marks

This commit is contained in:
unknown 2020-11-23 10:28:36 +01:00
parent a00bf323da
commit 1c8e8c493e
4 changed files with 44 additions and 26 deletions

View file

@ -0,0 +1,11 @@
function setVisible(targetId) {
document.getElementById("notvisible").id = "visible";
}
function setNotVisible(targetId) {
document.getElementById(targetId).id = "notvisible";
}
function marksformChange(targetId) {
document.getElementById("marksform").style.display = "block";
}

View file

@ -387,4 +387,10 @@ div#visible + div
font-size: 22px font-size: 22px
padding: 15px padding: 15px
cursor: pointer cursor: pointer
margin-bottom: 50px margin-bottom: 50px
#notvisible
display: none
#marksform
display: none

View file

@ -2,7 +2,7 @@ extends ../template/navbar
block content block content
if student === true if student === true
div(class="marksdetails" id="visibl") div(class="marksdetails" id="notvisible" onclick="setNotVisible(this.getAttribute('id'))")
table table
tr tr
th(colspan="2") Details th(colspan="2") Details
@ -22,24 +22,24 @@ block content
th(colspan="2") Maths th(colspan="2") Maths
tbody tbody
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -50,17 +50,17 @@ block content
th(colspan="2") TP SE th(colspan="2") TP SE
tbody tbody
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -71,17 +71,17 @@ block content
th(colspan="2") PHP th(colspan="2") PHP
tbody tbody
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -92,17 +92,17 @@ block content
th(colspan="2") Anglais th(colspan="2") Anglais
tbody tbody
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td td(onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -111,11 +111,11 @@ block content
div(class="col s12 m10 offset-m1 marksgroup") div(class="col s12 m10 offset-m1 marksgroup")
h3 Selectionnez un groupe h3 Selectionnez un groupe
div(id="flexgroup") div(id="flexgroup")
p G1S1 p(onclick="marksformChange(this.getAttribute('id'))") G1S1
p G2S2 p(onclick="marksformChange(this.getAttribute('id'))") G2S2
p G3S3 p(onclick="marksformChange(this.getAttribute('id'))") G3S3
form form(id="marksform")
table(id="markstable") table(id="markstable")
thead thead
tr tr

View file

@ -7,8 +7,8 @@ html
link(rel="stylesheet", href="/stylesheets/style.css") link(rel="stylesheet", href="/stylesheets/style.css")
script(src="/socket.io/socket.io.js") script(src="/socket.io/socket.io.js")
body body
- var student = true - var student = false
- var teacher = false - var teacher = true
- var admin = false - var admin = false
div(class="row" id="page") div(class="row" id="page")
div(class="col s2" id="panel") div(class="col s2" id="panel")
@ -16,4 +16,5 @@ html
div(class="col s10" id="main") div(class="col s10" id="main")
block content block content
script(src="/javascripts/main.js") script(src="/javascripts/main.js")
script(src="/javascripts/marks.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js") script(src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js")