@ -1,5 +1,5 @@
/ *
/ *
TimelineJS - ver . 2.26 . 4 - 2013 - 11 - 04
TimelineJS - ver . 2.26 . 4 - 2013 - 11 - 26
Copyright ( c ) 2012 - 2013 Northwestern University
Copyright ( c ) 2012 - 2013 Northwestern University
a project of the Northwestern University Knight Lab , originally created by Zach Wise
a project of the Northwestern University Knight Lab , originally created by Zach Wise
https : //github.com/NUKnightLab/TimelineJS
https : //github.com/NUKnightLab/TimelineJS
@ -3146,7 +3146,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
googlemaps : {
googlemaps : {
maptype : "toner" ,
maptype : "TERRAIN" , // see also below for default if this is a google type
setMapType : function ( d ) {
setMapType : function ( d ) {
if ( d != "" ) {
if ( d != "" ) {
@ -3276,7 +3276,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
layer = VMM . ExternalAPI . googlemaps . maptype ;
layer = VMM . ExternalAPI . googlemaps . maptype ;
}
}
} else {
} else {
layer = "toner" ;
layer = google . maps . MapTypeId [ 'TERRAIN' ] ;
}
}
@ -6972,7 +6972,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
type : "timeline" ,
type : "timeline" ,
touch : false ,
touch : false ,
orientation : "normal" ,
orientation : "normal" ,
maptype : "toner " ,
maptype : "" ,
version : "2.x" ,
version : "2.x" ,
preload : 4 ,
preload : 4 ,
current _slide : 0 ,
current _slide : 0 ,
@ -9455,7 +9455,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
is _valid = false ;
is _valid = false ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Parsing Google Doc Data" ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Parsing Google Doc Data" ) ;
function getGVar ( v ) {
function getGVar ( v ) {
if ( typeof v != 'undefined' ) {
if ( typeof v != 'undefined' ) {
return v . $t ;
return v . $t ;
@ -9463,7 +9463,9 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
return "" ;
return "" ;
}
}
}
}
if ( typeof d . feed . entry != 'undefined' ) {
if ( typeof d . feed . entry == 'undefined' ) {
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Error parsing spreadsheet. Make sure you have no blank rows and that the headers have not been changed." ) ;
} else {
is _valid = true ;
is _valid = true ;
for ( var i = 0 ; i < d . feed . entry . length ; i ++ ) {
for ( var i = 0 ; i < d . feed . entry . length ; i ++ ) {
@ -9513,8 +9515,6 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
}
}
} ;
} ;
} else {
}
}
@ -9574,7 +9574,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
k = 0 ;
k = 0 ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , VMM . Language . messages . loading _timeline + " Parsing Google Doc Data (cells)" ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , VMM . Language . messages . loading _timeline + " Parsing Google Doc Data (cells)" ) ;
function getGVar ( v ) {
function getGVar ( v ) {
if ( typeof v != 'undefined' ) {
if ( typeof v != 'undefined' ) {
return v . $t ;
return v . $t ;
@ -9663,7 +9663,6 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
for ( i = 0 ; i < list . length ; i ++ ) {
for ( i = 0 ; i < list . length ; i ++ ) {
var date = list [ i ] ;
var date = list [ i ] ;
if ( date . type . match ( "start" ) || date . type . match ( "title" ) ) {
if ( date . type . match ( "start" ) || date . type . match ( "title" ) ) {
data _obj . timeline . startDate = date . startDate ;
data _obj . timeline . startDate = date . startDate ;
data _obj . timeline . headline = date . headline ;
data _obj . timeline . headline = date . headline ;
@ -9682,37 +9681,39 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
}
}
data _obj . timeline . era . push ( era ) ;
data _obj . timeline . era . push ( era ) ;
} else {
} else {
var date = {
if ( date . startDate ) {
type : "google spreadsheet" ,
startDate : date . startDate ,
var date = {
endDate : date . endDate ,
type : "google spreadsheet" ,
headline : date . headline ,
startDate : date . startDate ,
text : date . text ,
endDate : date . endDate ,
tag : date . tag ,
headline : date . headline ,
asset : {
text : date . text ,
media : date . media ,
tag : date . tag ,
credit : date . credit ,
asset : {
caption : date . caption ,
media : date . media ,
thumbnail : date . thumbnail
credit : date . credit ,
}
caption : date . caption ,
} ;
thumbnail : date . thumbnail
}
data _obj . timeline . date . push ( date ) ;
} ;
data _obj . timeline . date . push ( date ) ;
} else {
trace ( "Skipping item " + i + " in list: no start date." )
}
}
}
}
}
//trace(cellnames);
//trace(max_row);
//trace(list);
}
}
is _valid = data _obj . timeline . date . length > 0 ;
if ( is _valid ) {
if ( is _valid ) {
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Finished Parsing Data" ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Finished Parsing Data" ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . data _ready , data _obj ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . data _ready , data _obj ) ;
} else {
} else {
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Unable to load Google Doc data source" ) ;
VMM . fireEvent ( global , VMM . Timeline . Config . events . messege , "Unable to load Google Doc data source. Make sure you have no blank rows and that the headers have not been changed. " ) ;
}
}
}
}