Compare commits
No commits in common. "370dd7d841966514ea7751e75afcb57f63c3966a" and "4121de260eb68463b6dda64166e62a38c24fec78" have entirely different histories.
370dd7d841
...
4121de260e
2 changed files with 16 additions and 6 deletions
|
@ -98,14 +98,25 @@ function toggle_visibility(oprava){
|
|||
}
|
||||
}
|
||||
|
||||
// show comment form, when 'comment' button pressed
|
||||
function comment(op)
|
||||
// show comment form, when 'edit' or 'comment' button pressed
|
||||
function box_edit(oid, action)
|
||||
{
|
||||
var divpointer = document.getElementById(op.id + '-pointer');
|
||||
var divpointer = document.getElementById(oid + '-pointer');
|
||||
|
||||
var text;
|
||||
if (action == 'update') {
|
||||
var text_el = document.getElementById(oid + '-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, "", "comment");
|
||||
var divbox = document.getElementById(oid);
|
||||
id = oid.substring(2);
|
||||
return show_form(divbox.img_id, dx, dy, id, text, action);
|
||||
}
|
||||
|
||||
// show comment form when 'update-comment' button pressed
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
class='box'
|
||||
data-opravastatus="{{o.status}}"
|
||||
data-opravazobrazit="true"
|
||||
data-opid="{{o.id}}"
|
||||
onmouseover='box_onmouseover(this)'
|
||||
onmouseout='box_onmouseout(this)'
|
||||
>
|
||||
|
@ -49,7 +48,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='comment(this.parentElement.parentElement.parentElement.parentElement);' title='Komentovat'>
|
||||
<button type='button' value="comment" onclick='box_edit("op{{o.id}}", "comment");' title='Komentovat'>
|
||||
<img src="{% static "korektury/imgs/comment.png" %}"/>
|
||||
</button>
|
||||
|
||||
|
|
Loading…
Reference in a new issue