Už nemáme text v opravě, takže nemá smysl ho editovat
This commit is contained in:
parent
d818ce251b
commit
370dd7d841
2 changed files with 4 additions and 13 deletions
|
@ -98,23 +98,14 @@ function toggle_visibility(oprava){
|
|||
}
|
||||
}
|
||||
|
||||
// show comment form, when 'edit' or 'comment' button pressed
|
||||
function box_edit(op, action)
|
||||
// show comment form, when 'comment' button pressed
|
||||
function comment(op)
|
||||
{
|
||||
var divpointer = document.getElementById(op.id + '-pointer');
|
||||
|
||||
var text;
|
||||
if (action == 'update') {
|
||||
var text_el = document.getElementById(op.id + '-text');
|
||||
text = text_el.textContent;
|
||||
|
||||
} else {
|
||||
text = '';
|
||||
}
|
||||
|
||||
var dx = parseInt(divpointer.style.left);
|
||||
var dy = parseInt(divpointer.style.top);
|
||||
return show_form(op.img_id, dx, dy, op.dataset.opid, text, action);
|
||||
return show_form(op.img_id, dx, dy, op.dataset.opid, "", "comment");
|
||||
}
|
||||
|
||||
// show comment form when 'update-comment' button pressed
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<button type='button' value="notcomment" title='Korekturu nelze komentovat, protože už je uzavřená'>
|
||||
<img src="{% static "korektury/imgs/comment-gr.png" %}"/>
|
||||
</button>
|
||||
<button type='button' value="comment" onclick='box_edit(this.parentElement.parentElement.parentElement.parentElement, "comment");' title='Komentovat'>
|
||||
<button type='button' value="comment" onclick='comment(this.parentElement.parentElement.parentElement.parentElement);' title='Komentovat'>
|
||||
<img src="{% static "korektury/imgs/comment.png" %}"/>
|
||||
</button>
|
||||
|
||||
|
|
Loading…
Reference in a new issue