From bb95bf55f67c9848861f7352827c254e092e1ee4 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Sun, 5 Feb 2012 21:54:06 -0800 Subject: [PATCH] fix images in reshares. unfortunately, the reshare presenter is broken right now and i'm passing out in front of my laptop (re: cuke failure) :( [ci skip] --- public/javascripts/app/views/content_view.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/public/javascripts/app/views/content_view.js b/public/javascripts/app/views/content_view.js index 802af4ad6..abc66b781 100644 --- a/public/javascripts/app/views/content_view.js +++ b/public/javascripts/app/views/content_view.js @@ -1,12 +1,13 @@ app.views.Content = app.views.StreamObject.extend({ presenter : function(model){ var model = model || this.model + console.log(model.get("author")) return _.extend(this.defaultPresenter(), { text : app.helpers.textFormatter(model), o_embed_html : embedHTML(model), - largePhoto : this.largePhoto(), - smallPhotos : this.smallPhotos(), + largePhoto : this.largePhoto(model), + smallPhotos : this.smallPhotos(model), root : this.rootPresenter(model) }) @@ -21,14 +22,14 @@ app.views.Content = app.views.StreamObject.extend({ } }, - largePhoto : function() { - var photos = this.model.get("photos") + largePhoto : function(model) { + var photos = model.get("photos") if(!photos || photos.length == 0) { return } return photos[0] }, - smallPhotos : function() { - var photos = this.model.get("photos") + smallPhotos : function(model) { + var photos = model.get("photos") if(!photos || photos.length < 2) { return } return photos.slice(1,8) },