diff --git a/korektury/models.py b/korektury/models.py index ceac374a..6aa41c2c 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -53,6 +53,17 @@ class KorekturovanePDF(models.Model): pdf = models.FileField(u'pdf', upload_to = generate_filename) stran = models.IntegerField(u'počet stran', help_text = 'Počet stran PDF', default = 0) + STATUS_PRIDAVANI = 'pridavani' + STATUS_ZANASENI = 'zanaseni' + STATUS_ZASTARALE = 'zastarale' + STATUS_CHOICES = ( + (STATUS_PRIDAVANI, u'Přidávání korektur'), + (STATUS_ZANASENI, u'Korektury jsou zanášeny'), + (STATUS_ZASTARALE, u'Stará verze, nekorigovat'), + ) + status = models.CharField(u'stav PDF',max_length=16, choices=STATUS_CHOICES, blank=False, + default = STATUS_PRIDAVANI) + #TODO Nepovinný foreign key k číslu @@ -101,10 +112,14 @@ class Oprava(models.Model): STATUS_K_OPRAVE = 'k_oprave' STATUS_OPRAVENO = 'opraveno' + STATUS_NENI_CHYBA = 'neni_chyba' + STATUS_K_REAKCI = 'k_reakci' STATUS_SMAZANO = 'smazano' STATUS_CHOICES = ( (STATUS_K_OPRAVE, u'K opravě'), (STATUS_OPRAVENO, u'Opraveno'), + (STATUS_NENI_CHYBA, u'Není chyba'), + (STATUS_K_REAKCI, u'K reakci autora textu'), (STATUS_SMAZANO, u'Smazáno'), ) status = models.CharField(u'stav opravy',max_length=16, choices=STATUS_CHOICES, blank=False, diff --git a/korektury/static/korektury/imgs/cross.png b/korektury/static/korektury/imgs/cross.png new file mode 100644 index 00000000..f3add6aa Binary files /dev/null and b/korektury/static/korektury/imgs/cross.png differ diff --git a/korektury/static/korektury/imgs/delete-gr.png b/korektury/static/korektury/imgs/delete-gr.png index c9816e47..de817f32 100644 Binary files a/korektury/static/korektury/imgs/delete-gr.png and b/korektury/static/korektury/imgs/delete-gr.png differ diff --git a/korektury/static/korektury/imgs/delete.png b/korektury/static/korektury/imgs/delete.png index f3add6aa..9b77ca3b 100644 Binary files a/korektury/static/korektury/imgs/delete.png and b/korektury/static/korektury/imgs/delete.png differ diff --git a/korektury/static/korektury/opraf.css b/korektury/static/korektury/opraf.css index dce8716d..e326a5e9 100644 --- a/korektury/static/korektury/opraf.css +++ b/korektury/static/korektury/opraf.css @@ -7,6 +7,8 @@ img{background:white;} .pointer-hi, .pointer, +.pointer-wontfix, +.pointer-wontfix-hi, .pointer-done, .pointer-done-hi { position:absolute; @@ -16,6 +18,7 @@ img{background:white;} } .pointer-done-hi, +.pointer-wontfix-hi, .pointer-hi { border-width: 3px; } @@ -36,13 +39,23 @@ img{background:white;} border-color: #00F; /*IE*/ border-color: rgba(0, 0, 255, 1); } +.pointer-wontfix { + border-color: #00F; /*IE*/ + border-color: rgba(128, 128, 128, 0.2); +} +.pointer-wontfix-hi { + border-color: #00F; /*IE*/ + border-color: rgba(128, 128, 128, 1); +} -.box:hover, .box-done:hover { +.box:hover, +.box-done:hover, +.box-wontfix:hover{ border-width:3px; margin: 0px; } -.box, .box-done { +.box, .box-done, .box-wontfix { margin: 1px; background-color: white; width:300px; @@ -57,6 +70,9 @@ img{background:white;} .box-done { border-color: blue; } +.box-wontfix { + border-color: grey; +} form { display:inline; } @@ -93,7 +109,9 @@ form { .box button, .box img, .box-done button, -.box-done img { +.box-done img, +.box-wontfix button, +.box-wontfix img{ border: 1px solid white; background-color:transparent; margin:0; @@ -102,7 +120,9 @@ form { .box button:hover, .box img:hover, .box-done img:hover, -.box-done button:hover { +.box-done button:hover, +.box-wontfix img:hover, +.box-wontfix button:hover{ border: 1px solid black; } diff --git a/korektury/static/korektury/opraf.js b/korektury/static/korektury/opraf.js index 6c955a72..4916fa3c 100644 --- a/korektury/static/korektury/opraf.js +++ b/korektury/static/korektury/opraf.js @@ -193,18 +193,36 @@ function show_form(img_id, dx, dy, id, text, action) { } -function box_onmouseover(box, done) +function box_onmouseover(box, stat) { var id = box.id; var pointer = document.getElementById(box.id + '-pointer'); - pointer.className = done ? 'pointer-done-hi' : 'pointer-hi'; + switch (stat){ + case 'done': + pointer.className = 'pointer-done-hi'; + break; + case 'wontfix': + pointer.className = 'pointer-wontfix-hi'; + break; + default: + pointer.className = 'pointer-hi'; + } } -function box_onmouseout(box, done) +function box_onmouseout(box, stat) { var id = box.id; var pointer = document.getElementById(box.id + '-pointer'); - pointer.className = done ? 'pointer-done' : 'pointer'; + switch (stat){ + case 'done': + pointer.className = 'pointer-done'; + break; + case 'wontfix': + pointer.className = 'pointer-wontfix'; + break; + default: + pointer.className = 'pointer'; + } } function save_scroll(form) diff --git a/korektury/templates/korektury/opraf.html b/korektury/templates/korektury/opraf.html index f59ecf62..d8c91199 100644 --- a/korektury/templates/korektury/opraf.html +++ b/korektury/templates/korektury/opraf.html @@ -61,12 +61,12 @@ {% for o in opravy %}