Permalink
Browse files

backbone, underscore upgrade. loader gif

  • Loading branch information...
1 parent 7e9a186 commit ae9c86a97dd8be320389eb90908aa4dd6fcbf4a1 @serdary committed Mar 8, 2013
View
@@ -3,3 +3,4 @@ db/*.sqlite3
log/*.log
tmp/
.sass-cache/
+.DS_Store
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -8,19 +8,24 @@ App.Routers.FeedsRouter = Backbone.Router.extend({
routes: {
'' : 'index',
- '/index': 'index',
- '/new' : 'newFeed',
- '/:id' : 'show'
+ 'index': 'index',
+ 'new' : 'newFeed',
+ ':id' : 'show'
},
index: function() {
+ $("#loader").show();
+ $('#app').html("");
+
feeds.fetch({
success: function() {
var view = new App.Views.IndexView({ feeds: feeds });
$('#app').html(view.render().el);
+ $("#loader").hide();
},
error: function() {
new Error({ message: "Error loading feeds" });
+ $("#loader").hide();
}
});
},

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -4,4 +4,10 @@
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
-*/
+*/
+#loader {
+ background-image: url("loading.gif");
+ display: none;
+ width: 32px;
+ height: 32px;
+}
@@ -26,7 +26,6 @@ def create
graph = Koala::Facebook::API.new(session[:fb_access_token])
obj_id = graph.put_wall_post(params[:feed][:message])
- #feed = create_feed_objects(graph.get_object(obj_id))[0]
feed = {}
rescue Exception => ex
session[:fb_access_token] = nil
@@ -3,6 +3,7 @@
</h1>
<div id="notice"></div>
+<div id="loader"></div>
<div id="app"></div>
<script type="text/javascript">

0 comments on commit ae9c86a

Please sign in to comment.