roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adityasha...@apache.org
Subject [roller] branch master updated: Improve alert messages (ROL-2154) 1. Add close button 2. Remove bulleted text 3. Autoclose messages after 10 seconds
Date Sat, 12 Oct 2019 09:32:09 GMT
This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git


The following commit(s) were added to refs/heads/master by this push:
     new dacf7e0  Improve alert messages (ROL-2154) 1. Add close button 2. Remove bulleted
text 3. Autoclose messages after 10 seconds
     new f9f1668  Merge pull request #40 from adityasharma7/ROL-2154
dacf7e0 is described below

commit dacf7e05551332b31764f6b115cc1284362e6cb0
Author: Aditya Sharma <iamadityasharma7@gmail.com>
AuthorDate: Sat Oct 12 15:00:14 2019 +0530

    Improve alert messages (ROL-2154)
    1. Add close button
    2. Remove bulleted text
    3. Autoclose messages after 10 seconds
---
 .../main/webapp/WEB-INF/jsps/tiles/messages.jsp    | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/app/src/main/webapp/WEB-INF/jsps/tiles/messages.jsp b/app/src/main/webapp/WEB-INF/jsps/tiles/messages.jsp
index bb8c58b..5f2bed2 100644
--- a/app/src/main/webapp/WEB-INF/jsps/tiles/messages.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/tiles/messages.jsp
@@ -17,9 +17,31 @@
 --%>
 <%@ 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>
@@ -27,6 +49,9 @@
 <%-- 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">


Mime
View raw message