Handles errors when retrieving latests posts.

This commit is contained in:
Pierre 2018-02-03 13:38:38 +01:00
parent 8ae6d01b4f
commit 85291fafba
2 changed files with 16 additions and 1 deletions

View File

@ -2,4 +2,14 @@
* Latests post stylesheet
*
* @author Pierre HUBERT
*/
*/
/**
* Error message
*/
.latestPostsError {
width: 100%;
max-width: 500px;
margin: auto;
margin-top: 30px;
}

View File

@ -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;
}