Browse Source

Google spreadsheet data source will now use the correct protocol

pull/90/head
Zach Wise 13 years ago
parent
commit
683c0bccc6
  1. 2
      .gitignore
  2. 28
      locale/de.js
  3. 28
      locale/en.js
  4. 28
      locale/es.js
  5. 28
      locale/fr.js
  6. 28
      locale/is.js
  7. 28
      locale/it.js
  8. 28
      locale/kr.js
  9. 28
      locale/nl.js
  10. 28
      locale/pt-br.js
  11. 28
      locale/zh-ch.js
  12. 28
      locale/zh-tw.js
  13. 36
      source/js/VMM.ExternalAPI.js
  14. 32
      source/js/VMM.Slider.js
  15. 22
      source/js/VMM.TImeline.Min.js
  16. 15
      source/js/VMM.Timeline.DataObj.js
  17. 17
      source/js/VMM.Timeline.License.js
  18. 7
      source/js/VMM.Timeline.js
  19. 17
      source/js/VMM.Util.js
  20. 7
      source/js/VMM.js
  21. 46
      timeline-min.js
  22. 8803
      timeline.js

2
.gitignore vendored

@ -9,4 +9,4 @@ dev_examples/
tmtags
source/gfx/Sprites/.DS_Store
source/gfx/Sprites/

28
locale/de.js

File diff suppressed because one or more lines are too long

28
locale/en.js

File diff suppressed because one or more lines are too long

28
locale/es.js

File diff suppressed because one or more lines are too long

28
locale/fr.js

File diff suppressed because one or more lines are too long

28
locale/is.js

File diff suppressed because one or more lines are too long

28
locale/it.js

File diff suppressed because one or more lines are too long

28
locale/kr.js

File diff suppressed because one or more lines are too long

28
locale/nl.js

File diff suppressed because one or more lines are too long

28
locale/pt-br.js

File diff suppressed because one or more lines are too long

28
locale/zh-ch.js

File diff suppressed because one or more lines are too long

28
locale/zh-tw.js

File diff suppressed because one or more lines are too long

36
source/js/VMM.ExternalAPI.js

@ -148,7 +148,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
trace("id " + id);
var twitter_timeout = setTimeout(VMM.ExternalAPI.twitter.notFoundError, 4000, id);
VMM.getJSON(the_url, VMM.ExternalAPI.twitter.formatJSON)
VMM.getJSON(VMM.Util.correctProtocol(the_url), VMM.ExternalAPI.twitter.formatJSON)
.error(function(jqXHR, textStatus, errorThrown) {
trace("TWITTER error");
trace("TWITTER ERROR: " + textStatus + " " + jqXHR.responseText);
@ -481,9 +481,9 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
create: function(doc) {
var mediaElem = "";
if (doc.url.match(/docs.google.com/i)) {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + doc.url + "&amp;embedded=true'></iframe>";
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + VMM.Util.correctProtocol(doc.url) + "&amp;embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + doc.url + "&amp;embedded=true'></iframe>";
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + VMM.Util.correctProtocol("http://docs.google.com/viewer?url=") + VMM.Util.correctProtocol(doc.url) + "&amp;embedded=true'></iframe>";
}
VMM.attachElement("#"+doc.id, mediaElem);
},
@ -560,6 +560,36 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
},
wikipedia: {
//http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Beastie%20Boys&format=json&exintro=1
get: function(url, id) {
var wiki = {url: url, id: id};
VMM.master_config.wikipedia.que.push(wiki);
VMM.master_config.wikipedia.active = true;
},
create: function(wiki) {
/*
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + wiki.url + "&format=json&exintro=1&callback=?";
VMM.getJSON(the_url, function(d) {
if (d.query.pages[0].extract.match("REDIRECT")) {
}
VMM.attachElement("#"+wiki.id, d.html);
});
*/
},
pushQue: function() {
for(var i = 0; i < VMM.master_config.wikipedia.que.length; i++) {
VMM.ExternalAPI.wikipedia.create(VMM.master_config.wikipedia.que[i]);
}
VMM.master_config.wikipedia.que = [];
},
},
youtube: {
get: function(id) {

32
source/js/VMM.Slider.js

@ -474,6 +474,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
var is_last = false;
var is_first = false;
var _pos = slides[current_slide].leftpos();
var _title = "";
//var _pos = VMM.Lib.position(slides[current_slide]);
if (current_slide == 0) {is_first = true};
@ -483,23 +484,42 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
/* set proper nav titles and dates etc.
================================================== */
trace(data[current_slide]);
if (is_first) {
VMM.Lib.visible(navigation.prevBtn, false);
} else {
VMM.Lib.visible(navigation.prevBtn, true);
_title = VMM.Util.unlinkify(data[current_slide - 1].title)
if (config.type == "timeline") {
VMM.attachElement(navigation.prevDate, data[current_slide - 1].date);
if(typeof data[current_slide - 1].date === "undefined") {
VMM.attachElement(navigation.prevDate, _title);
VMM.attachElement(navigation.prevTitle, "");
} else {
VMM.attachElement(navigation.prevDate, data[current_slide - 1].date);
VMM.attachElement(navigation.prevTitle, _title);
}
} else {
VMM.attachElement(navigation.prevTitle, _title);
}
VMM.attachElement(navigation.prevTitle, VMM.Util.unlinkify(data[current_slide - 1].title));
}
if (is_last) {
VMM.Lib.visible(navigation.nextBtn, false);
} else {
VMM.Lib.visible(navigation.nextBtn, true);
_title = VMM.Util.unlinkify(data[current_slide + 1].title);
if (config.type == "timeline") {
VMM.attachElement(navigation.nextDate, data[current_slide + 1].date);
if(typeof data[current_slide + 1].date === "undefined") {
VMM.attachElement(navigation.nextDate, _title);
VMM.attachElement(navigation.nextTitle, "");
} else {
VMM.attachElement(navigation.nextDate, data[current_slide + 1].date);
VMM.attachElement(navigation.nextTitle, _title);
}
} else {
VMM.attachElement(navigation.nextTitle, _title);
}
VMM.attachElement(navigation.nextTitle, VMM.Util.unlinkify(data[current_slide + 1].title) );
}
/* ANIMATE SLIDE
@ -541,8 +561,8 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
navigation.nextBtnContainer = VMM.appendAndGetElement(navigation.nextBtn, "<div>", "nav-container", temp_icon);
navigation.prevBtnContainer = VMM.appendAndGetElement(navigation.prevBtn, "<div>", "nav-container", temp_icon);
if (config.type == "timeline") {
navigation.nextDate = VMM.appendAndGetElement(navigation.nextBtnContainer, "<div>", "date", "1957");
navigation.prevDate = VMM.appendAndGetElement(navigation.prevBtnContainer, "<div>", "date", "1957");
navigation.nextDate = VMM.appendAndGetElement(navigation.nextBtnContainer, "<div>", "date", "");
navigation.prevDate = VMM.appendAndGetElement(navigation.prevBtnContainer, "<div>", "date", "");
}
navigation.nextTitle = VMM.appendAndGetElement(navigation.nextBtnContainer, "<div>", "title", "Title Goes Here");
navigation.prevTitle = VMM.appendAndGetElement(navigation.prevBtnContainer, "<div>", "title", "Title Goes Here");

22
source/js/VMM.TImeline.Min.js

@ -1,10 +1,26 @@
/* Timeline Minified
================================================== */
/*!
Timeline Minified
Designed and built by Zach Wise at VéritéCo
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.gnu.org/licenses/
*/
/* CodeKit Import
http://incident57.com/codekit/
================================================== */
// @codekit-prepend "VMM.Timeline.License.js";
// @codekit-prepend "VMM.Timeline.js";
VMM.debug = false;

15
source/js/VMM.Timeline.DataObj.js

@ -22,8 +22,7 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.DataObj == 'undefin
VMM.Timeline.DataObj.model_Tweets.getData("%23medill");
} else if ( raw_data.match("spreadsheet") ) {
trace("raw_data " + raw_data)
//VMM.fireEvent(global, "MESSEGE", VMM.Timeline.Config.language.messages.loading_timeline);
VMM.fireEvent(global, "MESSEGE", VMM.Timeline.Config.language.messages.loading_timeline);
trace("DATA SOURCE: GOOGLE SPREADSHEET");
VMM.Timeline.DataObj.model_GoogleSpreadsheet.getData(raw_data);
@ -225,17 +224,11 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.DataObj == 'undefin
getData: function(raw_data) {
var loc = (window.parent.document.location).toString();
var prefix = "";
if (loc.match("http")) {
prefix = loc;
} else {
prefix = "https://";
}
var _key = VMM.Util.getUrlVars(raw_data)["key"];
var _url ="https://spreadsheets.google.com/feeds/list/" + _key + "/od6/public/values?alt=json";
VMM.getJSON(_url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
var _url = "https://spreadsheets.google.com/feeds/list/" + _key + "/od6/public/values?alt=json";
VMM.getJSON(VMM.Util.correctProtocol(_url), VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
},
buildData: function(d) {

17
source/js/VMM.Timeline.License.js

@ -0,0 +1,17 @@
/*!
Timeline
Designed and built by Zach Wise at VéritéCo
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.gnu.org/licenses/
*/

7
source/js/VMM.Timeline.js

@ -20,6 +20,8 @@
http://incident57.com/codekit/
================================================== */
// @codekit-prepend "VMM.Timeline.License.js";
// @codekit-prepend "VMM.js";
// @codekit-prepend "VMM.Library.js";
// @codekit-prepend "VMM.Browser.js";
@ -35,12 +37,13 @@
// @codekit-prepend "VMM.Util.js";
// @codekit-prepend "VMM.LoadLib.js";
// @codekit-prepend "VMM.Language.js";
// @codekit-prepend "bootstrap-tooltip.js";
// @codekit-prepend "AES.js";
// @codekit-append "VMM.Timeline.TimeNav.js";
// @codekit-append "VMM.Timeline.DataObj.js";
// @codekit-prepend "lib/AES.js";
// @codekit-prepend "lib/bootstrap-tooltip.js";
/* Timeline
================================================== */

17
source/js/VMM.Util.js

@ -7,6 +7,23 @@ if(typeof VMM != 'undefined' && typeof VMM.Util == 'undefined') {
init: function() {
return this;
},
/* CORRECT PROTOCOL
================================================== */
correctProtocol: function(url) {
var loc = (window.parent.location.protocol).toString();
var prefix = "";
var _url = url.split("://", 2);
if (loc.match("http")) {
prefix = loc;
} else {
prefix = "https";
}
return prefix + "://" + _url[1];
},
/* RANDOM BETWEEN
================================================== */

7
source/js/VMM.js

@ -134,6 +134,13 @@ if (typeof VMM == 'undefined') {
que: []
},
wikipedia: {
active: false,
array: [],
api_loaded: false,
que: []
},
soundcloud: {
active: false,
array: [],

46
timeline-min.js vendored

File diff suppressed because one or more lines are too long

8803
timeline.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save