Zapomenutý switch podle document.body.class místo podle atributu
This commit is contained in:
		
							parent
							
								
									3e2469fc45
								
							
						
					
					
						commit
						b637aed7ab
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -67,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; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue