Commit 19d2dd98 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ek-replace-window-flash-function' into 'master'

Update window.Flash function

See merge request gitlab-org/gitlab!39784
parents 9ed303a6 b4881db0
......@@ -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