mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-10-31 18:24:27 +00:00 
			
		
		
		
	Handles errors when retrieving latests posts.
This commit is contained in:
		| @@ -2,4 +2,14 @@ | |||||||
|  * Latests post stylesheet |  * Latests post stylesheet | ||||||
|  * |  * | ||||||
|  * @author Pierre HUBERT |  * @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 | 			//Check for errors - display a modal | ||||||
| 			if(response.error){ | 			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; | 				return; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pierre
					Pierre