app/assets/javascripts/cytoplasm/cytoAjax.js.erb in cytoplasm-0.4.3 vs app/assets/javascripts/cytoplasm/cytoAjax.js.erb in cytoplasm-0.4.4
- old
+ new
@@ -87,7 +87,9 @@
// Setup callback messages
$.each(["success","sending","error"],function(i,type){
var $this = $('.cytoResponseMessage[data-type="'+type+'"]');
if (!$this.is('*')) $this = $('<p />').addClass('cytoResponseMessage').attr("data-type",type).hide().insertAfter($('header'));
});
+
+ <% [:success,:notice,:error].each do |msg|%><% if flash[msg] %>$.cytoAjaxResponse("<%=flash[msg]%>","<%=msg.to_s%>");<% end end %>
});
})(jQuery);
\ No newline at end of file