changeset 22:65c8a53a0e53

Better warning for locally changed/new page files: - Smaller warning, using Bootstrap alerts. - Warning shows up at top of the page instead of top of the window.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 04 Jan 2013 16:01:22 -0800
parents 5639fb1a3693
children 69c34f45c6dd
files wikked/static/js/wikked/views.js wikked/static/tpl/state-warning.html
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/wikked/static/js/wikked/views.js	Fri Jan 04 15:59:58 2013 -0800
+++ b/wikked/static/js/wikked/views.js	Fri Jan 04 16:01:22 2013 -0800
@@ -182,7 +182,7 @@
                             var template = Handlebars.compile(src);
                             var warning = $(template(model.toJSON()));
                             warning.css('display', 'none');
-                            warning.prependTo($('#app'));
+                            warning.prependTo($('#app .page'));
                             warning.slideDown();
                             $('.dismiss', warning).click(function() {
                                 warning.slideUp();
--- a/wikked/static/tpl/state-warning.html	Fri Jan 04 15:59:58 2013 -0800
+++ b/wikked/static/tpl/state-warning.html	Fri Jan 04 16:01:22 2013 -0800
@@ -1,4 +1,4 @@
-<div class="warning error">
-    <p>This page is {{state}} in the repository. You can either <a href="{{url_edit}}">edit it</a> to commit the changes, or do it yourself through the command-line.</p>
-    <p><a href="#" class="dismiss">Dismiss</a></p>
+<div class="alert">
+    <button type="button" class="close" data-dismiss="alert">&times;</button>
+    <span>This page is {{state}} in the repository. You can either <a href="{{url_edit}}">edit it</a> to commit the changes, or do it yourself through the command-line.</span>
 </div>