changeset 2462:142998f5e57f

adds feature for better rendering of links in alert boxes and markup to display custom messages via JS -> #moin-flash
author sharky93 <rishabhr123@gmail.com>
date Mon, 09 Sep 2013 19:46:59 +0530
parents f43a75cccab0
children 66110f4792af
files MoinMoin/themes/basic/static/css/basic.css MoinMoin/themes/basic/static/custom-less/basic.less MoinMoin/themes/basic/templates/layout.html
diffstat 3 files changed, 34 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/static/css/basic.css	Mon Sep 09 17:11:26 2013 +0530
+++ b/MoinMoin/themes/basic/static/css/basic.css	Mon Sep 09 19:46:59 2013 +0530
@@ -4240,11 +4240,18 @@
 .moin-flash > p + p {
   margin-top: 5px;
 }
+.moin-flash > a {
+  font-weight: bold;
+  color: #a47e3c;
+}
 .moin-flash-hint {
   background-color: #dff0d8;
   border-color: #d6e9c6;
   color: #468847;
 }
+.moin-flash-hint > a {
+  color: #356635;
+}
 .moin-flash-hint hr {
   border-top-color: #c9e2b3;
 }
@@ -4256,31 +4263,30 @@
   border-color: #bce8f1;
   color: #3a87ad;
 }
+.moin-flash-info > a {
+  color: #2d6987;
+}
 .moin-flash-info hr {
   border-top-color: #a6e1ec;
 }
 .moin-flash-info .alert-link {
   color: #2d6987;
 }
-.moin-flash-warning {
-  background-color: #f2dede;
-  border-color: #eed3d7;
-  color: #b94a48;
-}
-.moin-flash-warning hr {
-  border-top-color: #e6c1c7;
-}
-.moin-flash-warning .alert-link {
-  color: #953b39;
-}
+.moin-flash-warning,
 .moin-flash-error {
   background-color: #f2dede;
   border-color: #eed3d7;
   color: #b94a48;
 }
+.moin-flash-warning > a,
+.moin-flash-error > a {
+  color: #953b39;
+}
+.moin-flash-warning hr,
 .moin-flash-error hr {
   border-top-color: #e6c1c7;
 }
+.moin-flash-warning .alert-link,
 .moin-flash-error .alert-link {
   color: #953b39;
 }
--- a/MoinMoin/themes/basic/static/custom-less/basic.less	Mon Sep 09 17:11:26 2013 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/basic.less	Mon Sep 09 19:46:59 2013 +0530
@@ -2,21 +2,29 @@
 
 .moin-flash {
   .alert;
+  &>a {
+    .alert .alert-link;
+  }
 }
 
 .moin-flash-hint {
+  &>a {
+    .alert-success .alert-link;
+  }
   .alert-success;
 }
 
 .moin-flash-info {
+  &>a {
+    .alert-info .alert-link;
+  }
   .alert-info;
 }
 
-.moin-flash-warning {
-  .alert-danger;
-}
-
-.moin-flash-error {
+.moin-flash-warning, .moin-flash-error {
+  &>a {
+    .alert-danger .alert-link;
+  }
   .alert-danger;
 }
 
--- a/MoinMoin/themes/basic/templates/layout.html	Mon Sep 09 17:11:26 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Mon Sep 09 19:46:59 2013 +0530
@@ -101,12 +101,15 @@
 
         <div class="row">
             <div class="col-lg-12">
+                {# id -> moin-flash is used to add special alerts for ex. for changes to User Settings via JS, see common.js #}
+                <div id="moin-flash"> 
                     {% for category, msg in get_flashed_messages(with_categories=true) %}
                     <div class="moin-flash moin-flash-{{ category }}">
+                        {{ msg }}
                         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
-                        {{ msg }}
                     </div>
                     {% endfor %}
+                </div>
             </div>
         </div>