Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pédagogies Multimodales
PhonoDrop
Commits
43ad8d4a
Commit
43ad8d4a
authored
Apr 28, 2021
by
Sylvain Coulange
🌼
Browse files
ajout espace en mandarin + debug switch v2 auto
parent
0c9f175c
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
43ad8d4a
...
...
@@ -40,7 +40,7 @@
</div>
<div
class=
"parametres-center"
>
<div
class=
"form-check form-switch fs-4 mx-2"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"switchv2"
checked
onclick=
"switchv2()"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"switchv2"
onclick=
"switchv2()"
>
<label
class=
"form-check-label"
for=
"switchv2"
>
version 2
</label>
</div>
...
...
@@ -324,6 +324,12 @@
</div>
</td>
</tr>
<tr>
<td></td>
<td>
<button
type=
"button"
class=
"btn-espace"
onclick=
"space()"
>
Espace
</button>
</td>
</tr>
</table>
</div>
<div
class=
"tab-pane fade show active"
id=
"nav-aide"
role=
"tabpanel"
aria-labelledby=
"nav-aide-tab"
>
...
...
public/scripts/script.js
View file @
43ad8d4a
...
...
@@ -9,9 +9,10 @@ function logg(texte) {
}
var
version2
=
false
function
switchv2
(){
version2
=
!
version2
if
(
version2
){
if
(
version2
){
// passage à v2
console
.
log
(
"
Affichage version 2
"
)
document
.
getElementById
(
'
switchv2
'
).
checked
=
true
document
.
getElementById
(
'
ecritoire
'
).
style
.
display
=
"
none
"
...
...
@@ -20,7 +21,7 @@ function switchv2(){
document
.
getElementById
(
'
eraseAll
'
).
style
.
display
=
"
none
"
document
.
getElementById
(
'
multidraggable
'
).
style
.
display
=
"
block
"
document
.
getElementById
(
'
panierv2
'
).
style
.
display
=
"
block
"
}
else
{
}
else
{
// passage à v1
console
.
log
(
"
Affichage version 1
"
)
document
.
getElementById
(
'
switchv2
'
).
checked
=
false
document
.
getElementById
(
'
ecritoire
'
).
style
.
display
=
"
block
"
...
...
@@ -31,8 +32,6 @@ function switchv2(){
document
.
getElementById
(
'
panierv2
'
).
style
.
display
=
"
none
"
}
}
// Passer à la v2 par défaut
switchv2
()
/////////////////////////////////////////////////
//////////// RÉCUPÉRATION DE LA PAGE ////////////
...
...
@@ -82,11 +81,9 @@ if (pageId != "0") {
dateCreation
=
data
.
dateCreation
;
page
=
data
.
page
;
if
(
'
pagev2
'
in
data
)
{
if
(
data
.
pagev2
.
length
>
0
)
{
document
.
getElementById
(
'
multidraggable
'
).
innerHTML
=
initToolDiv
+
data
.
pagev2
switchv2
()
}
if
(
'
pagev2on
'
in
data
)
{
document
.
getElementById
(
'
multidraggable
'
).
innerHTML
=
initToolDiv
+
data
.
pagev2
switchv2
()
}
loadPage
();
...
...
@@ -94,6 +91,8 @@ if (pageId != "0") {
).
fail
(
loadPage
());
}
else
{
loadPage
()
// Passer à la v2 par défaut
switchv2
()
}
function
loadPage
()
{
...
...
@@ -468,7 +467,8 @@ async function save2url(){
dateCreation
:
dateCreation
,
dateModif
:
dateTime
,
page
:
casesFull
,
pagev2
:
pagev2content
pagev2
:
pagev2content
,
pagev2on
:
document
.
getElementById
(
'
switchv2
'
).
checked
}
// Paramètres d'envoi
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment