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]
This commit is contained in:
parent
fafa74a222
commit
bb95bf55f6
1 changed files with 7 additions and 6 deletions
|
|
@ -1,12 +1,13 @@
|
||||||
app.views.Content = app.views.StreamObject.extend({
|
app.views.Content = app.views.StreamObject.extend({
|
||||||
presenter : function(model){
|
presenter : function(model){
|
||||||
var model = model || this.model
|
var model = model || this.model
|
||||||
|
console.log(model.get("author"))
|
||||||
|
|
||||||
return _.extend(this.defaultPresenter(), {
|
return _.extend(this.defaultPresenter(), {
|
||||||
text : app.helpers.textFormatter(model),
|
text : app.helpers.textFormatter(model),
|
||||||
o_embed_html : embedHTML(model),
|
o_embed_html : embedHTML(model),
|
||||||
largePhoto : this.largePhoto(),
|
largePhoto : this.largePhoto(model),
|
||||||
smallPhotos : this.smallPhotos(),
|
smallPhotos : this.smallPhotos(model),
|
||||||
root : this.rootPresenter(model)
|
root : this.rootPresenter(model)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -21,14 +22,14 @@ app.views.Content = app.views.StreamObject.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
largePhoto : function() {
|
largePhoto : function(model) {
|
||||||
var photos = this.model.get("photos")
|
var photos = model.get("photos")
|
||||||
if(!photos || photos.length == 0) { return }
|
if(!photos || photos.length == 0) { return }
|
||||||
return photos[0]
|
return photos[0]
|
||||||
},
|
},
|
||||||
|
|
||||||
smallPhotos : function() {
|
smallPhotos : function(model) {
|
||||||
var photos = this.model.get("photos")
|
var photos = model.get("photos")
|
||||||
if(!photos || photos.length < 2) { return }
|
if(!photos || photos.length < 2) { return }
|
||||||
return photos.slice(1,8)
|
return photos.slice(1,8)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue