app/assets/javascripts/contour/global.js.coffee in contour-1.0.2 vs app/assets/javascripts/contour/global.js.coffee in contour-1.0.3
- old
+ new
@@ -4,9 +4,17 @@
if element && centered
element.html('<br /><center><img width=\"13\" height=\"13\" src=\"' + root_url + 'assets/contour/ajax-loader.gif\" align=\"absmiddle\" alt=\"...\" />' + text + '</center><br />')
else if element
element.html('<img width=\"13\" height=\"13\" src=\"' + root_url + 'assets/contour/ajax-loader.gif\" align=\"absmiddle\" alt=\"...\" />' + text)
+@flashMessage = (message, alert_type = 'success', overwrite = true) ->
+ div_block = "<div class='alert alert-#{alert_type}'><button type='button' class='close' data-dismiss='alert'>×</button>#{message}</div>"
+ flash_container = $('[data-object~="flash-container"]')
+ if overwrite
+ flash_container.html(div_block)
+ else
+ flash_container.append(div_block)
+
jQuery ->
$(".datepicker").datepicker
showOtherMonths: true
selectOtherMonths: true
changeMonth: true