Compare commits

..

No commits in common. "b637aed7ab35b8f2d68a451d1cfdf37dc627edde" and "370dd7d841966514ea7751e75afcb57f63c3966a" have entirely different histories.

View file

@ -44,7 +44,6 @@ function place_comments_one_div(img_id, comments)
elp.style.width = w - x + w_skip;
elp.style.height = pointer_min_h + delta_y;
el.pointer = elp;
el.img_id = img_id;
el.style.position = 'absolute';
el.style.left = w + w_skip;
@ -67,12 +66,13 @@ function place_comments() {
// show comment form, when clicked to image
function img_click(element, ev) {
switch(document.body.dataset.status){
case "zanaseni":
var body_class = document.body.className;
switch(body_class){
case "comitting":
if (!confirm("Právě jsou zanášeny korektury, opravdu chcete přidat novou?"))
return;
break;
case "zastarale":
case "deprecated":
if (!confirm("Toto PDF je již zastaralé, opravdu chcete vytvořit korekturu?"))
return;
break;
@ -88,7 +88,7 @@ function img_click(element, ev) {
dy = ev.offsetY;
}
var img_id = element.id;
return show_form(img_id, dx, dy, '', '', '');
return show_form(img_id, dx, dy, '', '', '', '');
}
// hide or show text of correction
function toggle_visibility(oprava){
@ -101,7 +101,8 @@ function toggle_visibility(oprava){
// show comment form, when 'comment' button pressed
function comment(op)
{
var divpointer = op.pointer;
var divpointer = document.getElementById(op.id + '-pointer');
var dx = parseInt(divpointer.style.left);
var dy = parseInt(divpointer.style.top);
return show_form(op.img_id, dx, dy, op.dataset.opid, "", "comment");
@ -110,10 +111,11 @@ function comment(op)
// show comment form when 'update-comment' button pressed
function update_comment(oid,ktid)
{
var divbox = document.getElementById(oid);
var divpointer = divbox.pointer;
var divpointer = document.getElementById(oid + '-pointer');
var dx = parseInt(divpointer.style.left);
var dy = parseInt(divpointer.style.top);
var divbox = document.getElementById(oid);
var text = document.getElementById(ktid).textContent;
return show_form(divbox.img_id, dx, dy, ktid.substring(2), text, 'update-comment');
@ -121,14 +123,14 @@ function update_comment(oid,ktid)
function box_onmouseover(box)
{
var pointer = box.pointer;
var pointer = document.getElementById(box.id + '-pointer');
pointer.classList.remove('pointer');
pointer.classList.add('pointer-hi');
}
function box_onmouseout(box)
{
var pointer = box.pointer;
var pointer = document.getElementById(box.id + '-pointer');
pointer.classList.remove('pointer-hi');
pointer.classList.add('pointer');
}