Difference between revisions of "Team:UNITN-Trento/Notebook"
m |
m |
||
Line 74: | Line 74: | ||
step: undefined, | step: undefined, | ||
complete: function(data){ | complete: function(data){ | ||
− | $.each(data['data'],function(k,v){ | + | $.each(data['data'],function(k,v){ |
− | $('#cd-timeline_'+v['Segment']).append('<div class="cd-timeline-block"><div class="cd-timeline-img is-hidden '+v['Author']+'"></div><div class="cd-timeline-content is-hidden"><h2>'+v['Title']+'</h2><p>'+v['Text']+'</p><span class="cd-date">'+v['Date']+'</span></div></div>'); | + | |
+ | var imaLine; | ||
+ | if (v['image'] && v['thumb']) | ||
+ | { | ||
+ | imaLine = '<a class="fancybox" rel="group" href="'+v['image']+'"><img src="'+v['thumb']+'" alt="" style="width:100%;"/></a>'; | ||
+ | } | ||
+ | |||
+ | $('#cd-timeline_'+v['Segment']).append('<div class="cd-timeline-block"><div class="cd-timeline-img is-hidden '+v['Author']+'"></div><div class="cd-timeline-content is-hidden"><h2>'+v['Title']+'</h2><p>'+v['Text']+'<hr/>'+imaLine+'</p><span class="cd-date">'+v['Date']+'</span></div></div>'); | ||
}); | }); | ||
}, | }, |
Revision as of 10:15, 26 August 2015