home
·
contact
·
privacy
projects
/
plomledger
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
24aadc3
)
In /edit_structured, fully disallow movement, and deletion, of date line.
master
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 6 Feb 2025 12:42:57 +0000
(13:42 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 6 Feb 2025 12:42:57 +0000
(13:42 +0100)
templates/edit_structured.tmpl
patch
|
blob
|
history
diff --git
a/templates/edit_structured.tmpl
b/templates/edit_structured.tmpl
index 46ef79df351baf9f9cfb04c2528a387261a3b74b..8569deafb696d48a3e623a51288f6406ec3b2487 100644
(file)
--- a/
templates/edit_structured.tmpl
+++ b/
templates/edit_structured.tmpl
@@
-122,13
+122,13
@@
function update_form() {
dat_lines.splice(i-1, 1);
dat_lines.splice(i, 0, prev_line);
});
dat_lines.splice(i-1, 1);
dat_lines.splice(i, 0, prev_line);
});
- add_button(td_btns, 'v',
i+1 < dat_lines.length
? false : true, function() {
+ add_button(td_btns, 'v',
(i && i+1 < dat_lines.length)
? false : true, function() {
const next_line = dat_lines[i];
dat_lines.splice(i, 1);
dat_lines.splice(i+1, 0, next_line);
});
td_btns.appendChild(document.createTextNode(' · · · '))
const next_line = dat_lines[i];
dat_lines.splice(i, 1);
dat_lines.splice(i+1, 0, next_line);
});
td_btns.appendChild(document.createTextNode(' · · · '))
- add_button(td_btns, 'delete',
fals
e, function() { dat_lines.splice(i, 1); });
+ add_button(td_btns, 'delete',
i > 0 ? false : tru
e, function() { dat_lines.splice(i, 1); });
// add error explanation row if necessary
if (dat_line.error) {
// add error explanation row if necessary
if (dat_line.error) {