Skip to content

Commit

Permalink
Use full thumbnail instead of thumb (see #178)
Browse files Browse the repository at this point in the history
This follows the rest of the field names in using a full
term rather than an abbreviation
  • Loading branch information
acdha committed Jul 24, 2015
1 parent ce92622 commit 61e7671
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 45 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ The data file should be in JSON format with the following structure
{
"title": {
"media": {
"caption": "",
"credit": "",
"url": "url_to_your_media.jpg",
"thumb": "url_to_your_media.jpg"
"caption": "",
"credit": "",
"url": "url_to_your_media.jpg",
"thumbnail": "url_to_your_media.jpg"
},
"text": {
"headline": "Headline Goes Here",
Expand Down Expand Up @@ -115,10 +115,10 @@ The data file should be in JSON format with the following structure
"format": ""
},
"media": {
"caption": "",
"credit": "",
"url": "url_to_your_media.jpg",
"thumb": "url_to_your_media.jpg"
"caption": "",
"credit": "",
"url": "url_to_your_media.jpg",
"thumbnail": "url_to_your_media.jpg"
},
"text": {
"headline": "Headline Goes Here",
Expand Down
28 changes: 14 additions & 14 deletions source/js/VCO.Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,50 +263,50 @@ VCO.Timeline = VCO.Class.extend({
this.goToId(this.config.events[n - 1].unique_id);
}
} else {
this.goToId(this.config.events[n].unique_id);
this.goToId(this.config.events[n].unique_id);
}
},

// Goto first slide
goToStart: function() {
this.goTo(0);
},

// Goto last slide
goToEnd: function() {
var _n = this.config.events.length - 1;
this.goTo(this.config.title ? _n + 1 : _n);
},

// Goto previous slide
goToPrev: function() {
this.goTo(this._getSlideIndex(this.current_id) - 1);
},

// Goto next slide
goToNext: function() {
this.goTo(this._getSlideIndex(this.current_id) + 1);
},

/* Event maniupluation
================================================== */

// Add an event
add: function(data) {
var unique_id = this.config.addEvent(data);

var n = this._getEventIndex(unique_id);
var d = this.config.events[n];

this._storyslider.createSlide(d, this.config.title ? n+1 : n);
this._storyslider._updateDrawSlides();
this._storyslider._updateDrawSlides();

this._timenav.createMarker(d, n);
this._timenav._updateDrawTimeline(false);
this._timenav._updateDrawTimeline(false);

this.fire("added", {unique_id: unique_id});
},

// Remove an event
remove: function(n) {
if(n >= 0 && n < this.config.events.length) {
Expand Down
4 changes: 2 additions & 2 deletions source/js/core/VCO.ConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
caption: item_data.mediacaption || '',
credit: item_data.mediacredit || '',
url: item_data.media || '',
thumb: item_data.mediathumbnail || ''
thumbnail: item_data.mediathumbnail || ''
},
text: {
headline: item_data.headline || '',
Expand Down Expand Up @@ -63,7 +63,7 @@
caption: item_data.mediacaption || '',
credit: item_data.mediacredit || '',
url: item_data.media || '',
thumb: item_data.mediathumbnail || ''
thumbnail: item_data.mediathumbnail || ''
},
text: {
headline: item_data.headline || '',
Expand Down
4 changes: 2 additions & 2 deletions source/js/timenav/VCO.TimeMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ VCO.TimeMarker = VCO.Class.extend({
if (this.data.media) {
this._el.media_container = VCO.Dom.create("div", "vco-timemarker-media-container", this._el.content);

if (this.data.media.thumb && this.data.media.thumb != "") {
if (this.data.media.thumbnail && this.data.media.thumbnail != "") {
this._el.media = VCO.Dom.create("img", "vco-timemarker-media", this._el.media_container);
this._el.media.src = this.data.media.thumb;
this._el.media.src = this.data.media.thumbnail;

} else {
var media_type = VCO.MediaType(this.data.media).type;
Expand Down
2 changes: 1 addition & 1 deletion util/convert_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def process_slide(s):
"caption": "",
"credit": "",
"url": "url_to_your_media.jpg",
"thumb": "url_to_your_media.jpg"
"thumbnail": "url_to_your_media.jpg"
},
"text": {
"headline": "Headline Goes Here",
Expand Down
28 changes: 14 additions & 14 deletions website/templates/examples/republican/timeline3.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"caption": "",
"credit": "",
"url": "",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "The Republican Run-Up",
Expand All @@ -18,7 +18,7 @@
"caption": "Rick Santorum at the Iowa State Fair before the Ages Straw Poll.",
"credit": "<a href=\"http://www.flickr.com/photos/gageskidmore/6057989217/\">Gage Skidmore</a>/Flickr",
"url": "https://farm7.staticflickr.com/6200/6057989217_3bd755477b.jpg",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Iowa",
Expand All @@ -35,7 +35,7 @@
"caption": "From Romney's victory speech, directed at Newt Gingrich, former House speaker",
"credit": "Romney Wins In New Hampshire Republican Primary/New York Times",
"url": "<blockquote>“In the last few days, we have seen some desperate Republicans join forces with him,” Romney said. “This is such a mistake for our party and for our nation. This country already has a leader who divides us with the bitter politics of envy.”</blockquote>",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "New Hampshire",
Expand All @@ -52,7 +52,7 @@
"caption": "Gingrich addresses supporters after South Carolina victory.",
"credit": "YouTube.com",
"url": "https://youtu.be/2n5yakw5jgo",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "South Carolina",
Expand All @@ -69,7 +69,7 @@
"caption": "",
"credit": "<a href=\"http://www.flickr.com/photos/mittromney/6812048183/\" title=\"Untitled by Mitt Romney, on Flickr\">Mitt Romney</a>/Flickr",
"url": "//farm8.staticflickr.com/7001/6812048183_316d424f2f.jpg",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Florida",
Expand All @@ -86,7 +86,7 @@
"caption": "",
"credit": "Twitter.com",
"url": "https://twitter.com/#!/MittRomney/status/165994713806155776",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Nevada",
Expand All @@ -103,7 +103,7 @@
"caption": "",
"credit": "<a href=\"http://www.flickr.com/photos/20325042@N05/6857070403/\" title=\"_MG_4530 by ernie_tacsik, on Flickr\">ernie_tacsik</a>/Flickr",
"url": "//farm8.staticflickr.com/7180/6857070403_03901a5026.jpg",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Missouri, Minnesota, Colorado",
Expand All @@ -120,7 +120,7 @@
"caption": "",
"credit": "Twitter.com",
"url": "https://twitter.com/#!/MattWilliams06/status/171385782936932353",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Maine",
Expand All @@ -137,7 +137,7 @@
"caption": "",
"credit": "YouTube",
"url": "https://youtu.be/IoFfUg8YtC0",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Arizona debates",
Expand All @@ -154,7 +154,7 @@
"caption": "",
"credit": "YouTube",
"url": "https://youtu.be/8-fU-knxT0U",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Gingrich refuses to get personal during South Carolina debate",
Expand All @@ -171,7 +171,7 @@
"caption": "",
"credit": "YouTube",
"url": "https://youtu.be/9sj5HcoGK2w",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Debates at University of South Florida",
Expand All @@ -188,7 +188,7 @@
"caption": "",
"credit": "<a href=\"http://www.foxnews.com/politics/2012/01/15/huntsman-to-withdraw-from-race-for-republican-presidential-nomination/#ixzz1mzZGCa5Q\" target=\"new\">Huntsman withdraws from race for Republican presidential nomination</a>/FoxNews.com",
"url": "<blockquote>\"Today, I am suspending my campaign for the presidency. I believe it is now time for our party to unite around the candidate best equipped to defeat Barack Obama. Despite our differences and the space between us on some of the issues, I believe that candidate is Gov. Mitt Romney.\"</blockquote>",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Huntsman drops out",
Expand All @@ -205,7 +205,7 @@
"caption": "",
"credit": "<a href=\"http://www.flickr.com/photos/mittromney/6795923698/\" title=\"Untitled by Mitt Romney, on Flickr\">Mitt Romney</a>/Flickr",
"url": "//farm8.staticflickr.com/7176/6795923698_d11ecca6bc.jpg",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Michigan and Arizona",
Expand All @@ -222,7 +222,7 @@
"caption": "",
"credit": "",
"url": "",
"thumb": ""
"thumbnail": ""
},
"text": {
"headline": "Super Tuesday",
Expand Down
4 changes: 2 additions & 2 deletions website/templates/examples/twain/marktwain.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"media": {
"url": "https://en.wikipedia.org/wiki/Mark_Twain",
"thumb": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Mark_Twain%2C_Brady-Handy_photo_portrait%2C_Feb_7%2C_1871%2C_cropped.jpg/153px-Mark_Twain%2C_Brady-Handy_photo_portrait%2C_Feb_7%2C_1871%2C_cropped.jpg"
"thumbnail": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Mark_Twain%2C_Brady-Handy_photo_portrait%2C_Feb_7%2C_1871%2C_cropped.jpg/153px-Mark_Twain%2C_Brady-Handy_photo_portrait%2C_Feb_7%2C_1871%2C_cropped.jpg"
}
},
"events": [
Expand Down Expand Up @@ -35,7 +35,7 @@
"caption": "Twain caricatured by Spy for Vanity Fair, 1908",
"credit": "Vanity Fair",
"url": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg",
"thumb": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
"thumbnail": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
},
"text": {
"headline": "Mark Twain JSON",
Expand Down
2 changes: 1 addition & 1 deletion website/templates/test/marktwain.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"caption": "Twain caricatured by Spy for Vanity Fair, 1908",
"credit": "Vanity Fair",
"url": "http://open.spotify.com/track/1OT1G66Lt9EpKFWkwK8i9z",
"thumb": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
"thumbnail": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
},
"text": {
"headline": "Mark Twain JSON",
Expand Down
2 changes: 1 addition & 1 deletion website/templates/test/marktwain_juked.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"caption": "Twain caricatured by Spy for Vanity Fair, 1908",
"credit": "Vanity Fair",
"url": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg",
"thumb": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
"thumbnail": "http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Mark_Twain_Vanity_Fair_1908-05-13.jpeg/375px-Mark_Twain_Vanity_Fair_1908-05-13.jpeg"
},
"text": {
"headline": "Mark Twain JSON",
Expand Down

0 comments on commit 61e7671

Please sign in to comment.