Compare commits
3 commits
370dd7d841
...
b637aed7ab
Author | SHA1 | Date | |
---|---|---|---|
b637aed7ab | |||
3e2469fc45 | |||
d5c57da921 |
1 changed files with 10 additions and 12 deletions
|
@ -44,6 +44,7 @@ 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;
|
||||
|
@ -66,13 +67,12 @@ function place_comments() {
|
|||
|
||||
// show comment form, when clicked to image
|
||||
function img_click(element, ev) {
|
||||
var body_class = document.body.className;
|
||||
switch(body_class){
|
||||
case "comitting":
|
||||
switch(document.body.dataset.status){
|
||||
case "zanaseni":
|
||||
if (!confirm("Právě jsou zanášeny korektury, opravdu chcete přidat novou?"))
|
||||
return;
|
||||
break;
|
||||
case "deprecated":
|
||||
case "zastarale":
|
||||
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,8 +101,7 @@ function toggle_visibility(oprava){
|
|||
// show comment form, when 'comment' button pressed
|
||||
function comment(op)
|
||||
{
|
||||
var divpointer = document.getElementById(op.id + '-pointer');
|
||||
|
||||
var divpointer = op.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");
|
||||
|
@ -111,11 +110,10 @@ function comment(op)
|
|||
// show comment form when 'update-comment' button pressed
|
||||
function update_comment(oid,ktid)
|
||||
{
|
||||
var divpointer = document.getElementById(oid + '-pointer');
|
||||
var divbox = document.getElementById(oid);
|
||||
var divpointer = divbox.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');
|
||||
|
@ -123,14 +121,14 @@ function update_comment(oid,ktid)
|
|||
|
||||
function box_onmouseover(box)
|
||||
{
|
||||
var pointer = document.getElementById(box.id + '-pointer');
|
||||
var pointer = box.pointer;
|
||||
pointer.classList.remove('pointer');
|
||||
pointer.classList.add('pointer-hi');
|
||||
}
|
||||
|
||||
function box_onmouseout(box)
|
||||
{
|
||||
var pointer = document.getElementById(box.id + '-pointer');
|
||||
var pointer = box.pointer;
|
||||
pointer.classList.remove('pointer-hi');
|
||||
pointer.classList.add('pointer');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue