Browse Source

Added ability to specify worksheet in Google Spreadsheet source url

pull/300/head
Fredrik Wollsén 12 years ago
parent
commit
05814ce4d4
  1. 2
      compiled/js/timeline-min.js
  2. 7
      compiled/js/timeline.js
  3. 7
      source/js/VMM.Timeline.DataObj.js

2
compiled/js/timeline-min.js vendored

File diff suppressed because one or more lines are too long

7
compiled/js/timeline.js

@ -9263,10 +9263,13 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
googlespreadsheet: {
getData: function(raw) {
var getjsondata, key, url, timeout, tries = 0;
var getjsondata, key, worksheet, url, timeout, tries = 0;
key = VMM.Util.getUrlVars(raw)["key"];
url = "https://spreadsheets.google.com/feeds/list/" + key + "/od6/public/values?alt=json";
worksheet = VMM.Util.getUrlVars(raw)["worksheet"];
if (worksheet == "") worksheet = "od6";
url = "https://spreadsheets.google.com/feeds/list/" + key + "/" + worksheet + "/public/values?alt=json";
timeout = setTimeout(function() {
trace("Google Docs timeout " + url);

7
source/js/VMM.Timeline.DataObj.js

@ -166,10 +166,13 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
googlespreadsheet: {
getData: function(raw) {
var getjsondata, key, url, timeout, tries = 0;
var getjsondata, key, worksheet, url, timeout, tries = 0;
key = VMM.Util.getUrlVars(raw)["key"];
url = "https://spreadsheets.google.com/feeds/list/" + key + "/od6/public/values?alt=json";
worksheet = VMM.Util.getUrlVars(raw)["worksheet"];
if (worksheet == "") worksheet = "od6";
url = "https://spreadsheets.google.com/feeds/list/" + key + "/" + worksheet + "/public/values?alt=json";
timeout = setTimeout(function() {
trace("Google Docs timeout " + url);

Loading…
Cancel
Save