Show spinner on network graph while it loading
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
		
							parent
							
								
									e740a00ed6
								
							
						
					
					
						commit
						afa4a075e4
					
				| 
						 | 
				
			
			@ -226,8 +226,11 @@ module ApplicationHelper
 | 
			
		|||
    GitHub::Markup.render(file_name, file_content).html_safe
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def spinner(text = nil)
 | 
			
		||||
    content_tag :div, class: 'loading hide' do
 | 
			
		||||
  def spinner(text = nil, visible = false)
 | 
			
		||||
    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
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
  .tip
 | 
			
		||||
    You can move around the graph by using the arrow keys.
 | 
			
		||||
  .network-graph
 | 
			
		||||
    = spinner
 | 
			
		||||
    = spinner nil, true
 | 
			
		||||
 | 
			
		||||
:javascript
 | 
			
		||||
  new Network({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue