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

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

View file

@ -26,8 +26,18 @@ body {
//clear : both; // here for testing! //clear : both; // here for testing!
.content { .content {
@include transition(box-shadow);
@include box-shadow(0,1px,3px,rgba(0,0,0,0.2)); @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; position : relative;
background-color : #fff; background-color : #fff;