DG MS; don't initialize a stream on post pages.

This commit is contained in:
danielgrippi 2012-02-15 15:07:28 -08:00
parent 21b420ca1e
commit 5f83abe418

View file

@ -14,8 +14,8 @@ app.Router = Backbone.Router.extend({
"u/:name": "stream", "u/:name": "stream",
"followed_tags": "stream", "followed_tags": "stream",
"tags/:name": "stream", "tags/:name": "stream",
"posts/:id": "stream", "posts/:id": "singlePost",
"p/:id": "stream" "p/:id": "singlePost"
}, },
stream : function() { stream : function() {
@ -27,6 +27,18 @@ app.Router = Backbone.Router.extend({
$("#main_stream").html(app.page.el); $("#main_stream").html(app.page.el);
$('#selected_aspect_contacts .content').html(streamFacesView.el); $('#selected_aspect_contacts .content').html(streamFacesView.el);
},
singlePost : function(id) {
new app.models.Post({id : id}).fetch({success : function(resp){
var postAttrs = resp.get("posts");
var view = new app.views.Post({
model : new app.models.Post(postAttrs)
}).render();
$("#main_stream").html(view.el);
}})
} }
}); });