lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb in fullstack-cms-0.2.24 vs lib/generators/fullstack/cms/templates/rails/app/views/site/_javascripts.html.erb in fullstack-cms-0.2.25
- old
+ new
@@ -10,9 +10,22 @@
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=<%= get_setting(:facebook_app_id, :locale => false) %>";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
+
+ <% [:notice, :error, :alert].each do |sym| %>
+
+ <% if flash[sym].present? %>
+ <%= javascript_tag do %>
+ $.notify.<%= "#{sym}" %>('<%= j "#{flash[sym]}" %>');
+ <% end %>
+
+ <% flash.discard(sym) %>
+ <% end %>
+
+ <% end %>
+
<script type="text/javascript" src="http://platform.twitter.com/widgets.js" async="true">
</script>
<% end %>
<!-- script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true">