Commit b4881db0 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Replace window flash function with new flash

parent b1b0ac0a
......@@ -175,4 +175,4 @@ export {
removeFlashClickListener,
FLASH_TYPES,
};
window.Flash = deprecatedCreateFlash;
window.Flash = createFlash;
......@@ -14,7 +14,7 @@ $('input[type=submit]').enable()
// Show flash messages
<% if flash.notice %>
new Flash('<%= flash.discard(:notice) %>', 'notice')
new Flash({ message: '<%= flash.discard(:notice) %>', type: 'notice'})
<% elsif flash.alert %>
new Flash('<%= flash.discard(:alert) %>', 'alert')
new Flash({ message: '<%= flash.discard(:alert) %>', type: 'alert'})
<% end %>
- if @error.present?
new Flash('#{escape_javascript(@error)}', 'alert');
new Flash({ message: '#{escape_javascript(@error)}', type: 'alert' });
- elsif @repository.tags.empty?
$('.tags').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment