mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Handles errors when retrieving latests posts.
This commit is contained in:
parent
8ae6d01b4f
commit
85291fafba
@ -3,3 +3,13 @@
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user