Skip to content

Commit

Permalink
Loading spinner.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Sep 8, 2011
1 parent 45baa18 commit 01fdb14
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
5 changes: 5 additions & 0 deletions app/css/loading.sass
@@ -0,0 +1,5 @@
html, body.loading
height: 100%

body.loading
background: #eee url(/images/bodyload.gif?embed) center center no-repeat
Binary file added app/images/bodyload.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 4 additions & 11 deletions app/init/js_css.rb
Expand Up @@ -17,16 +17,9 @@ class Main
/js/setup.js
]

css :main, '/main.css', %w[
/css/style.css
]

css :error, '/error.css', %w[
/css/error.css
]

css :print, '/print.css', %w[
/css/print.css
]
css :main, '/main.css', %w[/css/style.css]
css :error, '/error.css', %w[/css/error.css]
css :print, '/print.css', %w[/css/print.css]
css :loading, '/loading.css', %w[/css/loading.css]
end
end
1 change: 1 addition & 0 deletions app/js/app/views.coffee
Expand Up @@ -59,6 +59,7 @@ class App.ChromeView extends Backbone.View
'click a': 'onTabClick'

render: ->
$('body').removeClass 'loading'
$(@el).html JST['editor/chrome']()

@$iframe = @$("iframe")
Expand Down
4 changes: 2 additions & 2 deletions app/views/layout.haml
Expand Up @@ -12,7 +12,7 @@

%title!= title
!= css :main, media: 'screen, projection'
!= css :print, media: 'print'
!= css :loading, media: 'screen, projection'

!= js_cdn :modernizr
!= "<link href='http://fonts.googleapis.com/css?family=Shanti|PT+Sans:400,700' rel='stylesheet' type='text/css'>"
Expand All @@ -28,7 +28,7 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

%body
%body.loading
!= yield

- unless request.xhr?
Expand Down

0 comments on commit 01fdb14

Please sign in to comment.