mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Handles errors when retrieving latests posts.
This commit is contained in:
		@@ -2,4 +2,14 @@
 | 
			
		||||
 * Latests post stylesheet
 | 
			
		||||
 *
 | 
			
		||||
 * @author Pierre HUBERT
 | 
			
		||||
 */
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Error message
 | 
			
		||||
 */
 | 
			
		||||
.latestPostsError {
 | 
			
		||||
	width: 100%;
 | 
			
		||||
	max-width: 500px;
 | 
			
		||||
	margin: auto;
 | 
			
		||||
	margin-top: 30px;
 | 
			
		||||
}
 | 
			
		||||
@@ -20,6 +20,11 @@ ComunicWeb.pages.latestPosts.main = {
 | 
			
		||||
			//Check for errors - display a modal
 | 
			
		||||
			if(response.error){
 | 
			
		||||
				
 | 
			
		||||
				//Display modal error
 | 
			
		||||
				var error = ComunicWeb.common.messages.createCalloutElem("Error", "Could not get the list of the latest posts ! Please try to refresh the page...", "danger");
 | 
			
		||||
				error.className += " latestPostsError";
 | 
			
		||||
				target.appendChild(error);
 | 
			
		||||
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user