forked from Public/pics
		
	PhotoPage: apply #photo_frame anchor to clicks as well
This commit is contained in:
		
							parent
							
								
									85be093a36
								
							
						
					
					
						commit
						5c2eff09b8
					
				| @ -4,14 +4,14 @@ function enableKeyDownNavigation() { | ||||
| 			var target = document.getElementById("previous_photo").href; | ||||
| 			if (target) { | ||||
| 				event.preventDefault(); | ||||
| 				document.location.href = target + '#photo_frame'; | ||||
| 				document.location.href = target; | ||||
| 			} | ||||
| 		} | ||||
| 		else if (event.keyCode == 39) { | ||||
| 			var target = document.getElementById("next_photo").href; | ||||
| 			if (target) { | ||||
| 				event.preventDefault(); | ||||
| 				document.location.href = target + '#photo_frame'; | ||||
| 				document.location.href = target; | ||||
| 			} | ||||
| 		} | ||||
| 	}, false); | ||||
|  | ||||
| @ -84,14 +84,14 @@ class PhotoPage extends Template | ||||
| 	{ | ||||
| 		if ($this->previous_photo_url) | ||||
| 			echo ' | ||||
| 				<a href="', $this->previous_photo_url, '" id="previous_photo"><i class="bi bi-arrow-left"></i></a>'; | ||||
| 				<a href="', $this->previous_photo_url, '#photo_frame" id="previous_photo"><i class="bi bi-arrow-left"></i></a>'; | ||||
| 		else | ||||
| 			echo ' | ||||
| 				<span id="previous_photo"><i class="bi bi-arrow-left"></i></span>'; | ||||
| 
 | ||||
| 		if ($this->next_photo_url) | ||||
| 			echo ' | ||||
| 				<a href="', $this->next_photo_url, '" id="next_photo"><i class="bi bi-arrow-right"></i></a>'; | ||||
| 				<a href="', $this->next_photo_url, '#photo_frame" id="next_photo"><i class="bi bi-arrow-right"></i></a>'; | ||||
| 		else | ||||
| 			echo ' | ||||
| 				<span id="next_photo"><i class="bi bi-arrow-right"></i></span>'; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user