Commit afa4a075e463103cd7148bc97db21421a0718a8a
1 parent
e740a00e
Exists in
spb-stable
and in
2 other branches
Show spinner on network graph while it loading
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
6 additions
and
3 deletions
Show diff stats
app/helpers/application_helper.rb
| @@ -226,8 +226,11 @@ module ApplicationHelper | @@ -226,8 +226,11 @@ module ApplicationHelper | ||
| 226 | GitHub::Markup.render(file_name, file_content).html_safe | 226 | GitHub::Markup.render(file_name, file_content).html_safe |
| 227 | end | 227 | end |
| 228 | 228 | ||
| 229 | - def spinner(text = nil) | ||
| 230 | - content_tag :div, class: 'loading hide' do | 229 | + def spinner(text = nil, visible = false) |
| 230 | + css_class = "loading" | ||
| 231 | + css_class << " hide" unless visible | ||
| 232 | + | ||
| 233 | + content_tag :div, class: css_class do | ||
| 231 | content_tag(:i, nil, class: 'icon-spinner icon-spin') + text | 234 | content_tag(:i, nil, class: 'icon-spinner icon-spin') + text |
| 232 | end | 235 | end |
| 233 | end | 236 | end |
app/views/projects/network/show.html.haml