Skip to content
GitLab
Menu
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
wikicolor
Commits
be0a5206
Commit
be0a5206
authored
May 08, 2020
by
Sylvain Coulange
Browse files
ajout bouton pour voir le log de toutes les modifications du dictionnaire
parent
294343bb
Changes
5
Hide whitespace changes
Inline
Side-by-side
static/scripts/editDico.js
View file @
be0a5206
...
...
@@ -219,13 +219,41 @@ var span = document.getElementsByClassName("close")[0];
// Fonction pour ouvrir le PopUp
function
getLogOfEntr
(
entr
)
{
document
.
getElementById
(
'
popLogH2
'
).
innerHTML
=
'
Entrée : <i>"
'
+
entr
+
'
"</i>
'
;
var
logContent
=
'
<ul>
'
;
document
.
getElementById
(
'
modalBody
'
).
innerHTML
=
''
;
var
newh2
=
document
.
createElement
(
'
h2
'
);
newh2
.
innerHTML
=
'
Entrée : <i>"
'
+
entr
+
'
"</i>
'
;
document
.
getElementById
(
'
modalBody
'
).
appendChild
(
newh2
);
var
newlogContent
=
document
.
createElement
(
'
div
'
);
var
newul
=
document
.
createElement
(
'
ul
'
);
for
(
i
in
logDic
[
entr
])
{
logContent
+=
'
<li>
'
+
logDic
[
entr
][
i
].
date
+
'
:
'
+
logDic
[
entr
][
i
].
oldTransList
+
'
→
'
+
logDic
[
entr
][
i
].
newTransList
+
'
(
'
+
logDic
[
entr
][
i
].
Type
+
'
)</li>
'
;
var
newli
=
document
.
createElement
(
'
li
'
);
newli
.
innerHTML
=
logDic
[
entr
][
i
].
date
+
'
:
'
+
logDic
[
entr
][
i
].
oldTransList
+
'
→
'
+
logDic
[
entr
][
i
].
newTransList
+
'
(
'
+
logDic
[
entr
][
i
].
Type
+
'
)
'
;
newul
.
appendChild
(
newli
);
}
newlogContent
.
appendChild
(
newul
);
document
.
getElementById
(
'
modalBody
'
).
appendChild
(
newlogContent
);
modal
.
style
.
display
=
"
block
"
;
}
// Fonction pour ouvrir le PopUp
function
getLogOfAll
()
{
document
.
getElementById
(
'
modalBody
'
).
innerHTML
=
''
;
for
(
entr
in
logDic
)
{
var
newh2
=
document
.
createElement
(
'
h2
'
);
newh2
.
innerHTML
=
'
Entrée : <i>"
'
+
entr
+
'
"</i>
'
;
document
.
getElementById
(
'
modalBody
'
).
appendChild
(
newh2
);
var
newlogContent
=
document
.
createElement
(
'
div
'
);
var
newul
=
document
.
createElement
(
'
ul
'
);
for
(
i
in
logDic
[
entr
])
{
var
newli
=
document
.
createElement
(
'
li
'
);
newli
.
innerHTML
=
logDic
[
entr
][
i
].
date
+
'
:
'
+
logDic
[
entr
][
i
].
oldTransList
+
'
→
'
+
logDic
[
entr
][
i
].
newTransList
+
'
(
'
+
logDic
[
entr
][
i
].
Type
+
'
)
'
;
newul
.
appendChild
(
newli
);
}
newlogContent
.
appendChild
(
newul
);
document
.
getElementById
(
'
modalBody
'
).
appendChild
(
newlogContent
);
}
logContent
+=
'
</ul>
'
;
document
.
getElementById
(
'
popLogInner
'
).
innerHTML
=
logContent
;
modal
.
style
.
display
=
"
block
"
;
}
...
...
static/scripts/main.js
View file @
be0a5206
$
(
document
).
ready
(
function
(){
var
txtarea
=
document
.
getElementById
(
"
inText
"
);
txtarea
.
selectionEnd
=
txtarea
.
innerHTML
.
length
;
txtarea
.
focus
();
});
var
tokens
=
document
.
getElementsByClassName
(
"
tokens
"
);
var
i
;
for
(
i
=
0
;
i
<
tokens
.
length
;
i
++
)
{
...
...
static/styles/popup.css
View file @
be0a5206
...
...
@@ -8,7 +8,7 @@
top
:
0
;
width
:
100%
;
/* Full width */
height
:
100%
;
/* Full height */
overflow
:
auto
;
/* Enable scroll if needed */
overflow
:
auto
;
background-color
:
rgb
(
0
,
0
,
0
);
/* Fallback color */
background-color
:
rgba
(
0
,
0
,
0
,
0.4
);
/* Black w/ opacity */
}
...
...
@@ -123,6 +123,20 @@
/* POP LOG */
.modal2
{
display
:
none
;
/* Hidden by default */
position
:
fixed
;
z-index
:
1
;
/* Sit on top */
padding-top
:
100px
;
/* Location of the box */
left
:
0
;
top
:
0
;
width
:
100%
;
/* Full width */
height
:
100%
;
/* Full height */
overflow
:
scroll
;
background-color
:
rgb
(
0
,
0
,
0
);
/* Fallback color */
background-color
:
rgba
(
0
,
0
,
0
,
0.4
);
/* Black w/ opacity */
}
.modal-content2
{
position
:
relative
;
background-color
:
#fefefe
;
...
...
@@ -142,10 +156,6 @@
.modal-header2
h2
{
font-size
:
1.5em
;
}
#popLogH2
{
font-size
:
20pt
;
}
.modal-footer2
{
padding
:
2px
16px
;
...
...
templates/coloriseur.html
View file @
be0a5206
...
...
@@ -28,7 +28,7 @@
<input
type=
"hidden"
id=
"defaultBg"
name=
"defaultBg"
value=
"{{ data.defaultBg }}"
/>
</div>
<h2>
Entrer du texte à coloriser :
</h2>
<textarea
name=
"inText"
>
{{ data.text }}
</textarea><br/>
<textarea
name=
"inText"
id=
"inText"
>
{{ data.text }}
</textarea><br/>
<input
type=
"submit"
value=
"Coloriser"
/>
<button
formaction=
"/app/0"
>
Effacer
</button>
</form>
...
...
templates/editDico.html
View file @
be0a5206
...
...
@@ -78,18 +78,20 @@
<button
formaction=
"/app/"
>
Retour au coloriseur
</button>
</form>
</div>
<br>
<a
style=
"cursor:pointer"
onclick=
"getLogOfAll()"
>
Historique complet des modifications du dictionnaire
</a>
<!-- Fenêtre d'historique des modifications -->
<div
id=
"myModal"
class=
"modal"
>
<div
id=
"myModal"
class=
"modal
2
"
>
<!-- Modal content -->
<div
class=
"modal-content2"
>
<div
class=
"modal-header2"
>
<span
class=
"close"
>
×
</span>
<h2>
Historique des modifications
</h2>
</div>
<div
class=
"modal-body"
>
<h2
id=
"popLogH2"
></h2>
<div
id=
"popLogInner"
></div>
<div
id=
"modalBody"
class=
"modal-body"
>
<h2
id=
"popLogH2"
class=
"popLogH2"
></h2>
<div
id=
"popLogInner"
class=
"popLogInner"
></div>
</div>
<div
class=
"modal-footer2"
>
<h3>
WikiColor
</h3>
...
...
Write
Preview
Supports
Markdown
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