changeset 1331:3c55f01432a5

add moin-flash div to layout.html and change js to append messages there instead of moin-header
author Roger Haase <crosseyedpenguin@yahoo.com>
date Thu, 19 Apr 2012 06:56:39 -0700
parents cae27a401354
children 941cb9945269
files MoinMoin/static/js/common.js MoinMoin/templates/layout.html
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/static/js/common.js	Sun Apr 15 12:57:55 2012 -0700
+++ b/MoinMoin/static/js/common.js	Thu Apr 19 06:56:39 2012 -0700
@@ -470,7 +470,7 @@
                 f.addClass('moin-flash');
                 f.addClass('moin-flash-javascript');
                 f.addClass('moin-flash-' + data.flash[i][1]);
-                $('#moin-header').append(f);
+                $('#moin-flash').append(f);
             }
             // get the new form element from the response
             newform = $(data.form);
--- a/MoinMoin/templates/layout.html	Sun Apr 15 12:57:55 2012 -0700
+++ b/MoinMoin/templates/layout.html	Thu Apr 19 06:56:39 2012 -0700
@@ -134,9 +134,11 @@
 
     {% block header_itemviews %}{% endblock %}
 
+    <div id="moin-flash">  {# client side javascript may add messages here #}
     {% for category, msg in get_flashed_messages(with_categories=true) %}
         <p class="moin-flash moin-flash-{{ category }}">{{ msg }}</p>
     {% endfor %}
+    </div>
 
 {% endblock %}
 </div>