Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve alert messages (ROL-2154) #40

Merged
merged 1 commit into from
Oct 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions app/src/main/webapp/WEB-INF/jsps/tiles/messages.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,41 @@
--%>
<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>

<script>
$(document).ready(function () {
// Remove the alert box after 10 seconds
$(".alert").delay(10000).slideUp(200, function() {
$(this).alert('close');
});
});
</script>
<style>
<%-- Alert message should not be bulleted --%>
.alert ul {
list-style-type: none;
margin: 0;
padding: 0;
}

</style>


<%-- Success Messages --%>
<s:if test="!actionMessages.isEmpty">
<div id="messages" class="alert alert-success">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<s:actionmessage />
</div>
</s:if>

<%-- Error Messages --%>
<s:if test="!actionErrors.isEmpty || !fieldErrors.isEmpty">
<div id="errors" class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<ul>

<s:iterator var="actionError" value="actionErrors">
Expand Down