mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Update callback of post deletion.
This commit is contained in:
		@@ -198,8 +198,22 @@ ComunicWeb.components.posts.ui = {
 | 
				
			|||||||
					//Delete the post
 | 
										//Delete the post
 | 
				
			||||||
					ComunicWeb.components.posts.interface.delete(infos.ID, function(response){
 | 
										ComunicWeb.components.posts.interface.delete(infos.ID, function(response){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
											//Check for error
 | 
				
			||||||
 | 
											if(response.error){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
												//Display an error
 | 
				
			||||||
 | 
												ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to delete post !", "danger");
 | 
				
			||||||
 | 
												
 | 
				
			||||||
 | 
												//Make the post visible
 | 
				
			||||||
							postRoot.style.visibility = "visible";
 | 
												postRoot.style.visibility = "visible";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
												return;
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											//Delete the post
 | 
				
			||||||
 | 
											emptyElem(postRoot);
 | 
				
			||||||
 | 
											postRoot.remove();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					});
 | 
										});
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user