mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Display images associated with comments.
This commit is contained in:
		@@ -4,6 +4,16 @@
 | 
				
			|||||||
 * @author Pierre HUBERT
 | 
					 * @author Pierre HUBERT
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.post-comments{
 | 
					.post-comments {
 | 
				
			||||||
	padding: 10px;
 | 
						padding: 10px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.post-comments .comment-img-contener {
 | 
				
			||||||
 | 
						text-align: center;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.post-comments img.comment-img {
 | 
				
			||||||
 | 
						width: 100px !important;
 | 
				
			||||||
 | 
						height: auto !important;
 | 
				
			||||||
 | 
						float: none;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -118,6 +118,35 @@ ComunicWeb.components.comments.ui = {
 | 
				
			|||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//Add comment image (if any)
 | 
							//Add comment image (if any)
 | 
				
			||||||
 | 
							if(infos.img_url != null){
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								var commentImageContener = createElem2({
 | 
				
			||||||
 | 
									appendTo: commentText,
 | 
				
			||||||
 | 
									type: "div",
 | 
				
			||||||
 | 
									class: "comment-img-contener"
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								var commentImageLink = createElem2({
 | 
				
			||||||
 | 
									appendTo: commentImageContener,
 | 
				
			||||||
 | 
									type: "a",
 | 
				
			||||||
 | 
									href: infos.img_url
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								createElem2({
 | 
				
			||||||
 | 
									appendTo: commentImageLink,
 | 
				
			||||||
 | 
									type: "img",
 | 
				
			||||||
 | 
									class: "comment-img",
 | 
				
			||||||
 | 
									src: infos.img_url
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								commentImageLink.onclick = function(){
 | 
				
			||||||
 | 
									$(this).ekkoLightbox({
 | 
				
			||||||
 | 
										alwaysShowClose: true,
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user