Commit afa4a075 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show spinner on network graph while it loading

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent e740a00e
...@@ -226,8 +226,11 @@ module ApplicationHelper ...@@ -226,8 +226,11 @@ module ApplicationHelper
GitHub::Markup.render(file_name, file_content).html_safe GitHub::Markup.render(file_name, file_content).html_safe
end end
def spinner(text = nil) def spinner(text = nil, visible = false)
content_tag :div, class: 'loading hide' do css_class = "loading"
css_class << " hide" unless visible
content_tag :div, class: css_class do
content_tag(:i, nil, class: 'icon-spinner icon-spin') + text content_tag(:i, nil, class: 'icon-spinner icon-spin') + text
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.tip .tip
You can move around the graph by using the arrow keys. You can move around the graph by using the arrow keys.
.network-graph .network-graph
= spinner = spinner nil, true
:javascript :javascript
new Network({ new Network({
......
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