Compare commits
No commits in common. "b637aed7ab35b8f2d68a451d1cfdf37dc627edde" and "370dd7d841966514ea7751e75afcb57f63c3966a" have entirely different histories.
b637aed7ab
...
370dd7d841
1 changed files with 12 additions and 10 deletions
|
@ -44,7 +44,6 @@ function place_comments_one_div(img_id, comments)
|
||||||
elp.style.width = w - x + w_skip;
|
elp.style.width = w - x + w_skip;
|
||||||
elp.style.height = pointer_min_h + delta_y;
|
elp.style.height = pointer_min_h + delta_y;
|
||||||
|
|
||||||
el.pointer = elp;
|
|
||||||
el.img_id = img_id;
|
el.img_id = img_id;
|
||||||
el.style.position = 'absolute';
|
el.style.position = 'absolute';
|
||||||
el.style.left = w + w_skip;
|
el.style.left = w + w_skip;
|
||||||
|
@ -67,12 +66,13 @@ function place_comments() {
|
||||||
|
|
||||||
// show comment form, when clicked to image
|
// show comment form, when clicked to image
|
||||||
function img_click(element, ev) {
|
function img_click(element, ev) {
|
||||||
switch(document.body.dataset.status){
|
var body_class = document.body.className;
|
||||||
case "zanaseni":
|
switch(body_class){
|
||||||
|
case "comitting":
|
||||||
if (!confirm("Právě jsou zanášeny korektury, opravdu chcete přidat novou?"))
|
if (!confirm("Právě jsou zanášeny korektury, opravdu chcete přidat novou?"))
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case "zastarale":
|
case "deprecated":
|
||||||
if (!confirm("Toto PDF je již zastaralé, opravdu chcete vytvořit korekturu?"))
|
if (!confirm("Toto PDF je již zastaralé, opravdu chcete vytvořit korekturu?"))
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
|
@ -88,7 +88,7 @@ function img_click(element, ev) {
|
||||||
dy = ev.offsetY;
|
dy = ev.offsetY;
|
||||||
}
|
}
|
||||||
var img_id = element.id;
|
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
|
// hide or show text of correction
|
||||||
function toggle_visibility(oprava){
|
function toggle_visibility(oprava){
|
||||||
|
@ -101,7 +101,8 @@ function toggle_visibility(oprava){
|
||||||
// show comment form, when 'comment' button pressed
|
// show comment form, when 'comment' button pressed
|
||||||
function comment(op)
|
function comment(op)
|
||||||
{
|
{
|
||||||
var divpointer = op.pointer;
|
var divpointer = document.getElementById(op.id + '-pointer');
|
||||||
|
|
||||||
var dx = parseInt(divpointer.style.left);
|
var dx = parseInt(divpointer.style.left);
|
||||||
var dy = parseInt(divpointer.style.top);
|
var dy = parseInt(divpointer.style.top);
|
||||||
return show_form(op.img_id, dx, dy, op.dataset.opid, "", "comment");
|
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
|
// show comment form when 'update-comment' button pressed
|
||||||
function update_comment(oid,ktid)
|
function update_comment(oid,ktid)
|
||||||
{
|
{
|
||||||
var divbox = document.getElementById(oid);
|
var divpointer = document.getElementById(oid + '-pointer');
|
||||||
var divpointer = divbox.pointer;
|
|
||||||
var dx = parseInt(divpointer.style.left);
|
var dx = parseInt(divpointer.style.left);
|
||||||
var dy = parseInt(divpointer.style.top);
|
var dy = parseInt(divpointer.style.top);
|
||||||
|
|
||||||
|
var divbox = document.getElementById(oid);
|
||||||
var text = document.getElementById(ktid).textContent;
|
var text = document.getElementById(ktid).textContent;
|
||||||
|
|
||||||
return show_form(divbox.img_id, dx, dy, ktid.substring(2), text, 'update-comment');
|
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)
|
function box_onmouseover(box)
|
||||||
{
|
{
|
||||||
var pointer = box.pointer;
|
var pointer = document.getElementById(box.id + '-pointer');
|
||||||
pointer.classList.remove('pointer');
|
pointer.classList.remove('pointer');
|
||||||
pointer.classList.add('pointer-hi');
|
pointer.classList.add('pointer-hi');
|
||||||
}
|
}
|
||||||
|
|
||||||
function box_onmouseout(box)
|
function box_onmouseout(box)
|
||||||
{
|
{
|
||||||
var pointer = box.pointer;
|
var pointer = document.getElementById(box.id + '-pointer');
|
||||||
pointer.classList.remove('pointer-hi');
|
pointer.classList.remove('pointer-hi');
|
||||||
pointer.classList.add('pointer');
|
pointer.classList.add('pointer');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue