Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 3ec1162d authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

blocage temporaire de la variable audio_R (pour la lecture audio une fois réponse correcte

parent 63bd3c4b
......@@ -398,39 +398,39 @@ function eraseAll() {
}
// EXPORT PNG (use html2canvas.js et download.js)
var btnn = $('#div2png')
btnn.click(function() {
window.scrollTo(0,0)
// Formatage de la div textZone
var zone = document.getElementById('textZone')
document.getElementById(curseurPos).classList.remove('startPoint')
if (document.getElementById('g0')) document.getElementById('g0').innerHTML = ''
if (document.getElementById('gEnd')) document.getElementById('gEnd').innerHTML = ''
// Création d'une div temporaire d'export
var zoneExp = document.createElement('div')
zoneExp.innerHTML = zone.innerHTML
zoneExp.id = 'zoneExp'
zoneExp.classList.add('textZoneExp')
if (bgWhite) {
zoneExp.classList.add('textZoneExpWhite')
}
// var btnn = $('#div2png')
// btnn.click(function() {
// window.scrollTo(0,0)
// // Formatage de la div textZone
// var zone = document.getElementById('textZone')
// document.getElementById(curseurPos).classList.remove('startPoint')
// if (document.getElementById('g0')) document.getElementById('g0').innerHTML = ''
// if (document.getElementById('gEnd')) document.getElementById('gEnd').innerHTML = ''
// // Création d'une div temporaire d'export
// var zoneExp = document.createElement('div')
// zoneExp.innerHTML = zone.innerHTML
// zoneExp.id = 'zoneExp'
// zoneExp.classList.add('textZoneExp')
// if (bgWhite) {
// zoneExp.classList.add('textZoneExpWhite')
// }
// Conversion png
document.body.appendChild(zoneExp)
html2canvas(document.querySelector("#zoneExp")).then(canvas => {
var dataURL = canvas.toDataURL('image/png')
download(dataURL,'texte.png','image/png')
})
document.body.removeChild(zoneExp)
// Rétablissement formatage de textZone
document.getElementById(curseurPos).classList.add('startPoint')
if (document.getElementById('gEnd')) document.getElementById('gEnd').innerHTML = defgEndinner; else document.getElementById('textZone').innerHTML += defgEnd
if (document.getElementById('g0')) document.getElementById('g0').innerHTML = defg0inner; else document.getElementById('textZone').innerHTML = defg0 + document.getElementById('textZone').innerHTML
})
// // Conversion png
// document.body.appendChild(zoneExp)
// html2canvas(document.querySelector("#zoneExp")).then(canvas => {
// var dataURL = canvas.toDataURL('image/png')
// download(dataURL,'texte.png','image/png')
// })
// document.body.removeChild(zoneExp)
// // Rétablissement formatage de textZone
// document.getElementById(curseurPos).classList.add('startPoint')
// if (document.getElementById('gEnd')) document.getElementById('gEnd').innerHTML = defgEndinner; else document.getElementById('textZone').innerHTML += defgEnd
// if (document.getElementById('g0')) document.getElementById('g0').innerHTML = defg0inner; else document.getElementById('textZone').innerHTML = defg0 + document.getElementById('textZone').innerHTML
// })
//////////////// BACK GROUND WHITE ////////////////
......
......@@ -22,8 +22,9 @@
<script type="text/javascript" src="{% static 'languages/languages.js' %}"></script>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<script defer src="{% static 'js/html2canvas.min.js' %}"></script>
<script defer src="{% static 'js/download.js' %}"></script>
<!-- Pour la convertion en image -->
<!-- <script defer src="{% static 'js/html2canvas.min.js' %}"></script> -->
<!-- <script defer src="{% static 'js/download.js' %}"></script> -->
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light navbarPerso" style="flex-wrap: nowrap;">
......
......@@ -17,6 +17,7 @@
var images = JSON.parse("{{ serieContent.imageFin | escapejs }}");
var phono = JSON.parse("{{ serieContent.phonoFin | escapejs }}");
var audio_R = JSON.parse("{{ serieContent.audioFin | escapejs }}");
audio_R = 0;
var video = JSON.parse("{{ serieContent.videoDeb | escapejs }}");
var synthvoc = JSON.parse("{{ serieContent.syntheseVocale | escapejs }}");
var panneauPartiel = JSON.parse("{{ serieContent.panneauPartiel | escapejs }}")
......@@ -33,7 +34,7 @@
console.log("Mots:",mots);
console.log("ImageFin:",images);
console.log("PhonoFin:",phono);
console.log("AudioFin:",audio_R);
console.log("AudioFin:(blocked)",audio_R);
console.log("AudioDeb:",audioMode);
console.log("VideoDeb:",videoMode);
console.log("PanneauPartiel:",panneauPartiel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment