Browse Source

Updated to v2.24 Allow larger date extremes, Added timeout to new Twitter API calls and added Afrikaans language

Allow larger date extremes
Added timeout to new Twitter API calls
Added Afrikaans language
Thanks to Kobus Bezuidenhout via Google Groups
https://groups.google.com/forum/?hl=en#!msg/verite-timeline/ZKnJPKi98vg/TySf58rFJGEJ
TALFancyBox
Zach Wise 12 years ago
parent
commit
7f1f2e10b0
  1. 1
      README.markdown
  2. 748
      codekit-config.json
  3. 2
      compiled/js/storyjs-embed.js
  4. 10
      compiled/js/timeline-min.js
  5. 23
      compiled/js/timeline.js
  6. 2
      source/js/Core

1
README.markdown

@ -135,6 +135,7 @@ as JSONP, otherwise, we will append `?callback=onJSONP_Data`. See more details b
Localization
*default is `en` English*
Languages available:
* `af` *Afrikaans*
* `ar` *Arabic (beta)*
* `bg` *Bulgarian*
* `ca` *Catalan*

748
codekit-config.json

File diff suppressed because it is too large Load Diff

2
compiled/js/storyjs-embed.js

File diff suppressed because one or more lines are too long

10
compiled/js/timeline-min.js vendored

File diff suppressed because one or more lines are too long

23
compiled/js/timeline.js

@ -1277,6 +1277,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
};
if (type.of(d) == "date") {
trace("DEBUG THIS, ITs A DATE");
date = d;
} else {
date = new Date(0, 0, 1, 0, 0, 0, 0);
@ -1398,7 +1399,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
p.second = true;
p.millisecond = true;
}
} else if (d.length <= 5) {
} else if (d.length <= 8) {
p.year = true;
date.setFullYear(parseInt(d, 10));
date.setMonth(0);
@ -1446,6 +1447,13 @@ if(typeof VMM != 'undefined' && typeof VMM.Date == 'undefined') {
} else {
date = new Date(Date.parse(d));
p.year = true;
p.month = true;
p.day = true;
p.hour = true;
p.minute = true;
p.second = true;
p.millisecond = true;
}
} else {
p.year = true;
@ -2899,6 +2907,11 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
},
errorTimeOutOembed: function(tweet) {
trace("TWITTER JSON ERROR TIMEOUT " + tweet.mid);
VMM.attachElement("#"+tweet.id.toString(), VMM.MediaElement.loadingmessage("Still waiting on Twitter: " + tweet.mid) );
},
pushQue: function() {
if (VMM.master_config.twitter.que.length > 0) {
VMM.ExternalAPI.twitter.create(VMM.master_config.twitter.que[0], VMM.ExternalAPI.twitter.pushQue);
@ -2908,7 +2921,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
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=?";
var the_url = "http://api.twitter.com/1/statuses/oembed.json?id=" + tweet.mid + "&omit_script=true&include_entities=true&callback=?",
twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.errorTimeOutOembed, VMM.master_config.timers.api, tweet);
//callback_timeout= setTimeout(callback, VMM.master_config.timers.api, tweet);
VMM.getJSON(the_url, function(d) {
var twit = "",
@ -2936,9 +2951,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
.error(function(jqXHR, textStatus, errorThrown) {
trace("TWITTER error");
trace("TWITTER ERROR: " + textStatus + " " + jqXHR.responseText);
clearTimeout(twitter_timeout);
//clearTimeout(callback_timeout);
VMM.attachElement("#"+tweet.id, VMM.MediaElement.loadingmessage("ERROR LOADING TWEET " + tweet.mid) );
})
.success(function(d) {
clearTimeout(twitter_timeout);
clearTimeout(callback_timeout);
callback();
});

2
source/js/Core

@ -1 +1 @@
Subproject commit b28b69ffb58efe05030fa0e3d343b9290464e6f0
Subproject commit b9173c60cf8eb2e886fbdc19648cb0fb99c02810
Loading…
Cancel
Save