Browse Source

Fix for IE problem loading from google docs thnx @mwidmann

pull/20/merge
Zach Wise 13 years ago
parent
commit
0df921d035
  1. 15
      source/js/timeline.js
  2. 15
      timeline.js

15
source/js/timeline.js

@ -1971,12 +1971,21 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
type: "google spreadsheet",
getData: function(raw_data) {
//https://spreadsheets.google.com/feeds/list/0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE/od6/public/values?alt=json
// https://docs.google.com/a/digitalartwork.net/spreadsheet/ccc?hl=en_US&key=0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE&rm=full#gid=0
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);
if ( $.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRequest();
xdr.open("get", _url);
xdr.onload = function() {
var json = $.parseJSON( xdr.responseText );
VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData( json );
}
xdr.send();
} else {
VMM.getJSON(_url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
}
},

15
timeline.js

@ -5450,12 +5450,21 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
type: "google spreadsheet",
getData: function(raw_data) {
//https://spreadsheets.google.com/feeds/list/0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE/od6/public/values?alt=json
// https://docs.google.com/a/digitalartwork.net/spreadsheet/ccc?hl=en_US&key=0Agl_Dv6iEbDadGRwZjJSRTR4RHJpanE2U3lkb0lyYUE&rm=full#gid=0
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);
if ( $.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRequest();
xdr.open("get", _url);
xdr.onload = function() {
var json = $.parseJSON( xdr.responseText );
VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData( json );
}
xdr.send();
} else {
VMM.getJSON(_url, VMM.Timeline.DataObj.model_GoogleSpreadsheet.buildData);
}
},

Loading…
Cancel
Save