Browse Source

Fix for twitter API v1 closing down, fix for Google Maps not showing custom map types.

TimelineJS will now use Oembed instead of the get tweet restful api from v1. This change means that avatar images will no longer be shown since they are not available in the Oembed json. closes #434

Google Maps api is now using v3.9 instead of the release version
There was a change in the latest Google Map API that causes custom map types to stop working
 More info: http://stackoverflow.com/questions/13486271/google-map-markermanager-cannot-call-method-substr-of-undefined
solution for now is to use API ver 3.9 closes #435

IE7 hook for alternative display was removed. closes #161
TALFancyBox v2.24
Zach Wise 12 years ago
parent
commit
97007fce3b
  1. 782
      codekit-config.json
  2. 1
      compiled/css/themes/dark.css
  3. 1
      compiled/css/timeline.css
  4. 2
      compiled/js/storyjs-embed.js
  5. 8
      compiled/js/timeline-min.js
  6. 87
      compiled/js/timeline.js
  7. 2
      source/jade/index.jade
  8. 2
      source/js/Core
  9. 22
      source/js/VMM.Timeline.js
  10. 2
      source/less/Core

782
codekit-config.json

File diff suppressed because it is too large Load Diff

1
compiled/css/themes/dark.css

@ -137,6 +137,7 @@
.vco-slider .slider-item .content .content-container .googleplus .created-at{background-repeat:no-repeat;background-position:-208px -72px;}
.vco-slider .slider-item .content .content-container .twitter,.vco-slider .slider-item .content .content-container .plain-text-quote,.vco-slider .slider-item .content .content-container .storify,.vco-slider .slider-item .content .content-container .googleplus{text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.vco-slider .slider-item .content .content-container .twitter blockquote,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote,.vco-slider .slider-item .content .content-container .storify blockquote,.vco-slider .slider-item .content .content-container .googleplus blockquote{color:#aaaaaa;}.vco-slider .slider-item .content .content-container .twitter blockquote p,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote p,.vco-slider .slider-item .content .content-container .storify blockquote p,.vco-slider .slider-item .content .content-container .googleplus blockquote p{font-size:24px;line-height:32px;margin-bottom:6px;padding-top:10px;background-color:#1a1a1a;color:#ffffff;}
.vco-slider .slider-item .content .content-container .twitter blockquote .quote-mark,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote .quote-mark,.vco-slider .slider-item .content .content-container .storify blockquote .quote-mark,.vco-slider .slider-item .content .content-container .googleplus blockquote .quote-mark{color:#aaaaaa;}
.vco-slider .slider-item .content .content-container .twitter blockquote{font-size:15px;}.vco-slider .slider-item .content .content-container .twitter blockquote p{font-size:24px;}
.vco-slider .slider-item .content .content-container.layout-text-media .text-media{border-top:1px solid #e3e3e3;padding-top:15px;padding-right:0;}
.vco-slider .slider-item .content .content-container.layout-text-media.pad-left .text-media{padding-right:15px;padding-top:0;border-right:1px solid #e3e3e3;border-top:0px solid #e3e3e3;}
.vco-slider .slider-item .content .content-container.layout-text{width:100%;}.vco-slider .slider-item .content .content-container.layout-text .text{width:100%;max-width:100%;}.vco-slider .slider-item .content .content-container.layout-text .text .container{display:block;vertical-align:middle;padding:0px;width:90%;text-align:left;margin-left:auto;margin-right:auto;}

1
compiled/css/timeline.css

@ -137,6 +137,7 @@
.vco-slider .slider-item .content .content-container .googleplus .created-at{background-repeat:no-repeat;background-position:-208px -72px;}
.vco-slider .slider-item .content .content-container .twitter,.vco-slider .slider-item .content .content-container .plain-text-quote,.vco-slider .slider-item .content .content-container .storify,.vco-slider .slider-item .content .content-container .googleplus{text-align:left;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}.vco-slider .slider-item .content .content-container .twitter blockquote,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote,.vco-slider .slider-item .content .content-container .storify blockquote,.vco-slider .slider-item .content .content-container .googleplus blockquote{color:#666666;}.vco-slider .slider-item .content .content-container .twitter blockquote p,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote p,.vco-slider .slider-item .content .content-container .storify blockquote p,.vco-slider .slider-item .content .content-container .googleplus blockquote p{font-size:24px;line-height:32px;margin-bottom:6px;padding-top:10px;background-color:#ffffff;color:#000000;}
.vco-slider .slider-item .content .content-container .twitter blockquote .quote-mark,.vco-slider .slider-item .content .content-container .plain-text-quote blockquote .quote-mark,.vco-slider .slider-item .content .content-container .storify blockquote .quote-mark,.vco-slider .slider-item .content .content-container .googleplus blockquote .quote-mark{color:#666666;}
.vco-slider .slider-item .content .content-container .twitter blockquote{font-size:15px;}.vco-slider .slider-item .content .content-container .twitter blockquote p{font-size:24px;}
.vco-slider .slider-item .content .content-container.layout-text-media .text-media{border-top:1px solid #e3e3e3;padding-top:15px;padding-right:0;}
.vco-slider .slider-item .content .content-container.layout-text-media.pad-left .text-media{padding-right:15px;padding-top:0;border-right:1px solid #e3e3e3;border-top:0px solid #e3e3e3;}
.vco-slider .slider-item .content .content-container.layout-text{width:100%;}.vco-slider .slider-item .content .content-container.layout-text .text{width:100%;max-width:100%;}.vco-slider .slider-item .content .content-container.layout-text .text .container{display:block;vertical-align:middle;padding:0px;width:90%;text-align:left;margin-left:auto;margin-right:auto;}

2
compiled/js/storyjs-embed.js

File diff suppressed because one or more lines are too long

8
compiled/js/timeline-min.js vendored

File diff suppressed because one or more lines are too long

87
compiled/js/timeline.js

@ -2824,9 +2824,14 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
var id = tweet.mid.toString(),
error_obj = { twitterid: tweet.mid },
the_url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet.mid + "&include_entities=true&callback=?",
twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOut, VMM.master_config.timers.api, tweet),
callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
the_url = "http://api.twitter.com/1/statuses/show.json?id=" + tweet.mid + "&include_entities=true&callback=?";
//twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOut, VMM.master_config.timers.api, tweet),
//callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
VMM.ExternalAPI.twitter.getOEmbed(tweet, callback);
/*
// Disabled thanks to twitter's new api
VMM.getJSON(the_url, function(d) {
var id = d.id_str,
@ -2871,6 +2876,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
callback();
});
*/
},
errorTimeOut: function(tweet) {
@ -2899,12 +2905,48 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM.master_config.twitter.que.remove(0);
}
},
getOEmbed: function(tweet, callback) {
var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + tweet.mid + "&omit_script=true&include_entities=true&callback=?";
VMM.getJSON(the_url, function(d) {
var twit = "",
tuser = "";
// TWEET CONTENT
twit += d.html.split("<\/p>\&mdash;")[0] + "</p></blockquote>";
tuser = d.author_url.split("twitter.com\/")[1];
// TWEET AUTHOR
twit += "<div class='vcard author'>";
twit += "<a class='screen-name url' href='" + d.author_url + "' target='_blank'>";
twit += "<span class='avatar'></span>";
twit += "<span class='fn'>" + d.author_name + "</span>";
twit += "<span class='nickname'>@" + tuser + "<span class='thumbnail-inline'></span></span>";
twit += "</a>";
twit += "</div>";
VMM.attachElement("#"+tweet.id.toString(), twit );
VMM.attachElement("#text_thumb_"+tweet.id.toString(), d.html );
VMM.attachElement("#marker_content_" + tweet.id.toString(), d.html );
})
.error(function(jqXHR, textStatus, errorThrown) {
trace("TWITTER error");
trace("TWITTER ERROR: " + textStatus + " " + jqXHR.responseText);
VMM.attachElement("#"+tweet.id, VMM.MediaElement.loadingmessage("ERROR LOADING TWEET " + tweet.mid) );
})
.success(function(d) {
callback();
});
},
getHTML: function(id) {
//var the_url = document.location.protocol + "//api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id+ "&callback=?";
var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + id+ "&omit_script=true&include_entities=true&callback=?";
VMM.getJSON(the_url, VMM.ExternalAPI.twitter.onJSONLoaded);
},
@ -3095,7 +3137,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
api_key = Aes.Ctr.decrypt(VMM.ExternalAPI.keys_master.google, VMM.ExternalAPI.keys_master.vp, 256);
}
map_url = "http://maps.googleapis.com/maps/api/js?key=" + api_key + "&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";
/*
Investigating a google map api change on the latest release that causes custom map types to stop working
http://stackoverflow.com/questions/13486271/google-map-markermanager-cannot-call-method-substr-of-undefined
soulution is to use api ver 3.9
*/
map_url = "http://maps.googleapis.com/maps/api/js?key=" + api_key + "&v=3.9&libraries=places&sensor=false&callback=VMM.ExternalAPI.googlemaps.onMapAPIReady";
if (VMM.master_config.googlemaps.active) {
VMM.master_config.googlemaps.que.push(m);
@ -3581,7 +3629,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
"stamen": "Map tiles by <a href='http://stamen.com'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0'>CC BY SA</a>.",
"apple": "Map data &copy; 2012 Apple, Imagery &copy; 2012 Apple"
},
map_providers: {
"toner": {
"url": "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png",
@ -4840,6 +4888,7 @@ if(typeof VMM != 'undefined' && typeof VMM.DragSlider == 'undefined') {
function onDragMove(e) {
dragMove(e.data.element, e);
}
function dragStart(elem, delem, e) {
@ -7354,28 +7403,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
};
function ie7Build() {
trace("IE7 or lower");
for(var i = 0; i < _dates.length; i++) {
trace(_dates[i]);
/*
var st = VMM.Date.prettyDate(data.startdate);
var en = VMM.Date.prettyDate(data.enddate);
var tag = "";
if (data.tag != null && data.tag != "") {
tag = VMM.createElement("span", data.tag, "slide-tag");
}
if (st != en) {
c.text += VMM.createElement("h2", st + " &mdash; " + en + tag, "date");
} else {
c.text += VMM.createElement("h2", st + tag, "date");
}
*/
}
};
function updateSize() {
trace("UPDATE SIZE");
config.width = VMM.Lib.width($timeline);

2
source/jade/index.jade

@ -23,5 +23,5 @@ html(lang="en")
body
// BEGIN Timeline Embed
div#timeline-embed
script(type='text/javascript', src='js/storyjs-embed-cdn.js?v214')
script(type='text/javascript', src='js/storyjs-embed-cdn.js?v222')
// END Timeline Embed

2
source/js/Core

@ -1 +1 @@
Subproject commit 0ec438a0d56a65ac15880b6f706a9c4aba33c087
Subproject commit b28b69ffb58efe05030fa0e3d343b9290464e6f0

22
source/js/VMM.Timeline.js

@ -522,28 +522,6 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
};
function ie7Build() {
trace("IE7 or lower");
for(var i = 0; i < _dates.length; i++) {
trace(_dates[i]);
/*
var st = VMM.Date.prettyDate(data.startdate);
var en = VMM.Date.prettyDate(data.enddate);
var tag = "";
if (data.tag != null && data.tag != "") {
tag = VMM.createElement("span", data.tag, "slide-tag");
}
if (st != en) {
c.text += VMM.createElement("h2", st + " &mdash; " + en + tag, "date");
} else {
c.text += VMM.createElement("h2", st + tag, "date");
}
*/
}
};
function updateSize() {
trace("UPDATE SIZE");
config.width = VMM.Lib.width($timeline);

2
source/less/Core

@ -1 +1 @@
Subproject commit 2f2c21d8bfae52d87a0800b0108aad6d4f416cb8
Subproject commit 52d3af7d16d1e1e53c69acde7511ec709516d1e1
Loading…
Cancel
Save