DG MS; clicking a post in the profile goes to the show page.

This commit is contained in:
danielgrippi 2012-04-20 18:31:38 -07:00 committed by Dennis Collinson
parent aa4c554177
commit b4ca14ade4
3 changed files with 19 additions and 3 deletions

View file

@ -8,7 +8,7 @@ app.views.Canvas = app.views.Base.extend(_.extend(app.views.infiniteScrollMixin,
renderTemplate : function() {
this.postRenderTemplate();
setTimeout(_.bind(this.mason, this), 1000)
setTimeout(_.bind(this.mason, this), 1000)
},
mason : function() {

View file

@ -4,6 +4,10 @@ app.views.SmallFrame = app.views.Base.extend({
templateName : "small-frame",
events : {
"click .content" : "goToPost"
},
postRenderTemplate : function() {
this.$el.addClass(this.photoClass() + ' ' + this.textClass())
},
@ -36,7 +40,9 @@ app.views.SmallFrame = app.views.Base.extend({
} else {
return baseClass + 'many'
}
},
goToPost : function() {
app.router.navigate(this.model.url(), true)
}
});

View file

@ -26,8 +26,18 @@ body {
//clear : both; // here for testing!
.content {
@include transition(box-shadow);
@include box-shadow(0,1px,3px,rgba(0,0,0,0.2));
&:hover {
@include box-shadow(0,1px,3px,rgba(0,0,0,0.5));
cursor : pointer;
}
&:active {
-webkit-transform : scale(0.98);
}
position : relative;
background-color : #fff;