Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
scripta
eScriptorium
Commits
f6382625
Commit
f6382625
authored
Sep 08, 2020
by
Robin Tissot
Browse files
Fixes pagination leaving empty lines behind.
parent
d5e8a73b
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/apps/core/static/js/edit/components/diplo_line.js
View file @
f6382625
...
...
@@ -20,7 +20,10 @@ var diploLine = LineBase.extend({
}.
bind
(
this
));
},
beforeDestroy
()
{
this
.
getEl
().
remove
();
let
el
=
this
.
getEl
();
if
(
el
!=
null
)
{
el
.
remove
();
}
},
watch
:
{
/* 'line.order': function(n,o) {
...
...
app/apps/core/static/js/edit/components/diplo_panel.js
View file @
f6382625
...
...
@@ -8,6 +8,14 @@ var DiploPanel = BasePanel.extend({
components
:
{
'
diploline
'
:
diploLine
,
},
watch
:
{
'
part.loaded
'
:
function
(
isLoaded
,
wasLoaded
)
{
if
(
!
isLoaded
)
{
// changed page probably
this
.
empty
();
}
}
},
created
()
{
// vue.js quirck, have to dinamically create the event handler
// call save every 10 seconds after last change
...
...
@@ -35,6 +43,11 @@ var DiploPanel = BasePanel.extend({
this
.
saveNotif
=
this
.
$el
.
querySelector
(
'
.tools #save-notif
'
);
},
methods
:
{
empty
()
{
while
(
this
.
editor
.
hasChildNodes
())
{
this
.
editor
.
removeChild
(
this
.
editor
.
lastChild
);
}
},
toggleSort
()
{
if
(
this
.
editor
.
contentEditable
===
'
true
'
)
{
this
.
editor
.
contentEditable
=
'
false
'
;
...
...
app/escriptorium/templates/core/document_part_edit.html
View file @
f6382625
...
...
@@ -566,6 +566,7 @@
<div
id=
"diplomatic-lines"
contenteditable=
"true"
autocomplete=
"off"
@
keydown=
"onKeyPress"
@
keyup=
"constrainLineNumber"
@
input=
"changed"
...
...
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