Browse Source

Latest compile v 2.10

pull/227/head
Zach Wise 13 years ago
parent
commit
34925b0fc4
  1. 3
      compiled/js/storyjs-embed-cdn.js
  2. 2
      compiled/js/storyjs-embed-generator.js
  3. 26
      compiled/js/timeline-min.js
  4. 159
      compiled/js/timeline.js

3
compiled/js/storyjs-embed-cdn.js

@ -584,7 +584,7 @@ function createStoryJS(c, src) {
================================================== */ ================================================== */
var storyjs_embedjs, t, te, x, var storyjs_embedjs, t, te, x,
isCDN = false, isCDN = false,
js_version = "2.05", js_version = "2.10",
jquery_version_required = "1.7.1", jquery_version_required = "1.7.1",
jquery_version = "", jquery_version = "",
ready = { ready = {
@ -636,6 +636,7 @@ function createStoryJS(c, src) {
}, },
font_presets = [ font_presets = [
{ name: "Merriweather-NewsCycle", google: [ 'News+Cycle:400,700:latin', 'Merriweather:400,700,900:latin' ] }, { name: "Merriweather-NewsCycle", google: [ 'News+Cycle:400,700:latin', 'Merriweather:400,700,900:latin' ] },
{ name: "NewsCycle-Merriweather", google: [ 'News+Cycle:400,700:latin', 'Merriweather:300,400,700:latin' ] },
{ name: "PoiretOne-Molengo", google: [ 'Poiret+One::latin', 'Molengo::latin' ] }, { name: "PoiretOne-Molengo", google: [ 'Poiret+One::latin', 'Molengo::latin' ] },
{ name: "Arvo-PTSans", google: [ 'Arvo:400,700,400italic:latin', 'PT+Sans:400,700,400italic:latin' ] }, { name: "Arvo-PTSans", google: [ 'Arvo:400,700,400italic:latin', 'PT+Sans:400,700,400italic:latin' ] },
{ name: "PTSerif-PTSans", google: [ 'PT+Sans:400,700,400italic:latin', 'PT+Serif:400,700,400italic:latin' ] }, { name: "PTSerif-PTSans", google: [ 'PT+Sans:400,700,400italic:latin', 'PT+Serif:400,700,400italic:latin' ] },

2
compiled/js/storyjs-embed-generator.js

@ -2,4 +2,4 @@
VéritéCo Embed Generator 0.8 VéritéCo Embed Generator 0.8
Designed and built by Zach Wise digitalartwork.net Designed and built by Zach Wise digitalartwork.net
Date: June 21, 2012 Date: June 21, 2012
*/function getScriptPath(e){var t=document.getElementsByTagName("script"),n="";for(var r=0;r<t.length;r++)t[r].src.match(e)&&(n=t[r].src);return n.split("?")[0].split("/").slice(0,-1).join("/")+"/"}function getUrlVars(e){var t=[],n,r,i=e.toString();i.match("&#038;")?i=i.replace("&#038;","&"):i.match("&#38;")?i=i.replace("&#38;","&"):i.match("&amp;")&&(i=i.replace("&amp;","&"));i.match("#")&&(i=i.split("#")[0]);r=i.slice(i.indexOf("?")+1).split("&");for(var s=0;s<r.length;s++){n=r[s].split("=");t.push(n[0]);t[n[0]]=n[1]}return t}function getLinkAndIframe(){var e={},t=document.getElementById("embed-source-url"),n=document.getElementById("embed-width"),r=document.getElementById("embed-height"),i=document.getElementById("embed-maptype"),s=document.getElementById("embed-language"),o=document.getElementById("embed_code"),u=document.getElementById("embed-font"),a=document.getElementById("embed-wordpressplugin"),f=document.getElementById("embed-startatend"),l=document.getElementById("embed-hashbookmark"),c=document.getElementById("embed-startzoomadjust"),h=document.getElementById("embed-startatslide"),p=document.getElementById("embed-debug"),d=document.getElementById("embed-googlemapkey"),v=!1,m=!1,g=!1,y,b,w,E,S;t.value.match("docs.google.com")?S=getUrlVars(t.value).key:t.value==""?S="0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE":S=t.value;f.checked&&(v=!0);l.checked&&(m=!0);p.checked&&(g=!0);E="[timeline ";n.value>0&&(E+="width='"+n.value+"' ");r.value>0&&(E+="height='"+n.value+"' ");E+="font='"+u.value+"' ";E+="maptype='"+i.value+"' ";E+="lang='"+s.value+"' ";E+="src='"+t.value+"' ";v&&(E+="start_at_end='"+v+"' ");m&&(E+="hash_bookmark='"+m+"' ");g&&(E+="debug='"+g+"' ");d.value!=""&&(E+="gmap_key='"+d.value+"' ");parseInt(h.value,10)>0&&(E+="start_at_slide='"+parseInt(h.value,10)+"' ");parseInt(c.value,10)>0&&(E+="start_zoom_adjust='"+parseInt(c.value,10)+"' ");E+="]";e.wordpress=E;w=embed_path+"?source="+S;w+="&font="+u.value;w+="&maptype="+i.value;w+="&lang="+s.value;v&&(w+="&start_at_end="+v);m&&(w+="&hash_bookmark="+m);g&&(w+="&debug="+g);parseInt(h.value,10)>0&&(w+="&start_at_slide="+parseInt(h.value,10));parseInt(c.value,10)>0&&(w+="&start_zoom_adjust="+parseInt(c.value,10));d.value!=""&&(w+="&gmap_key="+d.value);n.value>0&&(w+="&width="+n.value);r.value>0&&(w+="&height="+r.value);y="<iframe src='"+w+"'";n.value>0&&(y+=" width='"+n.value+"'");r.value>0&&(y+=" height='"+r.value+"'");y+=" frameborder='0'></iframe>";e.iframe=y;e.link=w;a.checked?e.copybox=E:e.copybox=y;return e}function updateEmbedCode(e,t){var n=document.getElementById("embed_code"),r=getLinkAndIframe();n.value=r.copybox;$("#preview-embed-link").attr("href",r.link);$("#preview-embed-iframe").html(r.iframe)}if(typeof embed_path=="undefined"||typeof embed_path=="undefined"){var embed_path=getScriptPath("timeline-embed-generator.js").split("js/")[0];embed_path.match("http")?embed_path=embed_path:embed_path=="/"?embed_path="index.html":embed_path+="index.html"}; */function getScriptPath(e){var t=document.getElementsByTagName("script"),n="";for(var r=0;r<t.length;r++)t[r].src.match(e)&&(n=t[r].src);return n.split("?")[0].split("/").slice(0,-1).join("/")+"/"}function getUrlVars(e){var t=[],n,r,i=e.toString();i.match("&#038;")?i=i.replace("&#038;","&"):i.match("&#38;")?i=i.replace("&#38;","&"):i.match("&amp;")&&(i=i.replace("&amp;","&"));i.match("#")&&(i=i.split("#")[0]);r=i.slice(i.indexOf("?")+1).split("&");for(var s=0;s<r.length;s++){n=r[s].split("=");t.push(n[0]);t[n[0]]=n[1]}return t}function getLinkAndIframe(){var e={},t=document.getElementById("embed-source-url"),n=document.getElementById("embed-width"),r=document.getElementById("embed-height"),i=document.getElementById("embed-maptype"),s=document.getElementById("embed-language"),o=document.getElementById("embed_code"),u=document.getElementById("embed-font"),a=document.getElementById("embed-wordpressplugin"),f=document.getElementById("embed-startatend"),l=document.getElementById("embed-hashbookmark"),c=document.getElementById("embed-startzoomadjust"),h=document.getElementById("embed-startatslide"),p=document.getElementById("embed-debug"),d=document.getElementById("embed-googlemapkey"),v=!1,m=!1,g=!1,y,b,w,E,S;t.value.match("docs.google.com")?S=getUrlVars(t.value).key:t.value==""?S="0Agl_Dv6iEbDadHdKcHlHcTB5bzhvbF9iTWwyMmJHdkE":S=t.value;f.checked&&(v=!0);l.checked&&(m=!0);p.checked&&(g=!0);E="[timeline ";n.value>0&&(E+="width='"+n.value+"' ");r.value>0&&(E+="height='"+n.value+"' ");E+="font='"+u.value+"' ";E+="maptype='"+i.value+"' ";E+="lang='"+s.value+"' ";E+="src='"+t.value+"' ";v&&(E+="start_at_end='"+v+"' ");m&&(E+="hash_bookmark='"+m+"' ");g&&(E+="debug='"+g+"' ");d.value!=""&&(E+="gmap_key='"+d.value+"' ");parseInt(h.value,10)>0&&(E+="start_at_slide='"+parseInt(h.value,10)+"' ");parseInt(c.value,10)>0&&(E+="start_zoom_adjust='"+parseInt(c.value,10)+"' ");E+="]";e.wordpress=E;w=embed_path+"?source="+S;w+="&font="+u.value;w+="&maptype="+i.value;w+="&lang="+s.value;v&&(w+="&start_at_end="+v);m&&(w+="&hash_bookmark="+m);g&&(w+="&debug="+g);parseInt(h.value,10)>0&&(w+="&start_at_slide="+parseInt(h.value,10));parseInt(c.value,10)>0&&(w+="&start_zoom_adjust="+parseInt(c.value,10));d.value!=""&&(w+="&gmap_key="+d.value);n.value>0&&(w+="&width="+n.value);r.value>0&&(w+="&height="+r.value);y="<iframe src='"+w+"'";n.value>0&&(y+=" width='"+n.value+"'");r.value>0&&(y+=" height='"+r.value+"'");y+=" frameborder='0'></iframe>";e.iframe=y;e.link=w;a.checked?e.copybox=E:e.copybox=y;return e}function updateEmbedCode(e,t){var n=document.getElementById("embed_code"),r=getLinkAndIframe();n.value=r.copybox;$("#preview-embed-link").attr("href",r.link);$("#preview-embed-iframe").html(r.iframe)}if(typeof embed_path=="undefined"||typeof embed_path=="undefined"){var embed_path=getScriptPath("storyjs-embed-generator.js").split("js/")[0];embed_path.match("http")?embed_path=embed_path:embed_path=="/"?embed_path="index.html":embed_path+="index.html"};

26
compiled/js/timeline-min.js vendored

File diff suppressed because one or more lines are too long

159
compiled/js/timeline.js

@ -1,19 +1,11 @@
/*! /*!
TimelineJS TimelineJS
Version 1.71 Version 2.10
Designed and built by Zach Wise at VéritéCo Designed and built by Zach Wise at VéritéCo
This program is free software: you can redistribute it and/or modify This Source Code Form is subject to the terms of the Mozilla Public
it under the terms of the GNU General Public License as published by License, v. 2.0. If a copy of the MPL was not distributed with this
the Free Software Foundation, either version 3 of the License, or file, You can obtain one at http://mozilla.org/MPL/2.0/.
(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/
*/ */
@ -3069,11 +3061,142 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
if (m.url[0].match("msid")) { if (m.url[0].match("msid")) {
loadKML(); loadKML();
} else { } else {
loadPlaces(); //loadPlaces();
} if (type.of(VMM.Util.getUrlVars(m.url)["q"]) == "string") {
geocodePlace();
}
}
// GEOCODE
function geocodePlace() {
var geocoder = new google.maps.Geocoder(),
address = VMM.Util.getUrlVars(m.url)["q"],
marker;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
// POSITION MAP
//map.setCenter(results[0].geometry.location);
//map.panTo(location);
if (typeof results[0].geometry.viewport != 'undefined') {
map.fitBounds(results[0].geometry.viewport);
} else if (typeof results[0].geometry.bounds != 'undefined') {
map.fitBounds(results[0].geometry.bounds);
} else {
map.setCenter(results[0].geometry.location);
}
if (has_location) {
map.panTo(location);
}
if (has_zoom) {
map.setZoom(zoom);
}
} else {
trace("Geocode for " + address + " was not successful for the following reason: " + status);
trace("TRYING PLACES SEARCH");
loadPlaces();
}
});
}
// PLACES // PLACES
function loadPlaces() { function loadPlaces() {
var place,
search_request,
infowindow,
search_bounds,
bounds_sw,
bounds_ne;
place_search = new google.maps.places.PlacesService(map);
infowindow = new google.maps.InfoWindow();
search_request = {
query: "",
types: ['country', 'neighborhood', 'political', 'locality', 'geocode']
};
if (type.of(VMM.Util.getUrlVars(m.url)["q"]) == "string") {
search_request.query = VMM.Util.getUrlVars(m.url)["q"];
}
if (has_location) {
search_request.location = location;
search_request.radius = "15000";
} else {
bounds_sw = new google.maps.LatLng(-89.999999,-179.999999);
bounds_ne = new google.maps.LatLng(89.999999,179.999999);
search_bounds = new google.maps.LatLngBounds(bounds_sw,bounds_ne);
//search_request.location = search_bounds;
}
place_search.textSearch(search_request, placeResults);
function placeResults(results, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
for (var i = 0; i < results.length; i++) {
//createMarker(results[i]);
}
if (has_location) {
map.panTo(location);
} else {
if (results.length >= 1) {
map.panTo(results[0].geometry.location);
if (has_zoom) {
map.setZoom(zoom);
}
}
}
} else {
trace("Place search for " + address + " was not successful for the following reason: " + status);
// IF There's a problem loading the map, load a simple iFrame version instead
trace("YOU MAY NEED A GOOGLE MAPS API KEY IN ORDER TO USE THIS FEATURE OF TIMELINEJS");
trace("FIND OUT HOW TO GET YOUR KEY HERE: https://developers.google.com/places/documentation/#Authentication");
trace("USING SIMPLE IFRAME MAP EMBED");
if (m.url.match("https")) {
m.url = m.url.replace("https", "http");
}
VMM.ExternalAPI.googlemaps.createiFrameMap(m);
}
}
function createMarker(place) {
var marker, placeLoc;
placeLoc = place.geometry.location;
marker = new google.maps.Marker({
map: map,
position: place.geometry.location
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(place.name);
infowindow.open(map, this);
});
}
}
function loadPlacesAlt() {
var api_key, var api_key,
places_url, places_url,
has_key = false; has_key = false;
@ -3179,11 +3302,12 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
kml_layer.setMap(map); kml_layer.setMap(map);
google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() { google.maps.event.addListenerOnce(kml_layer, "defaultviewport_changed", function() {
//map.fitBounds(kml_layer.getDefaultViewport() );
if (has_location) { if (has_location) {
map.panTo(location); map.panTo(location);
} } else {
map.fitBounds(kml_layer.getDefaultViewport() );
}
if (has_zoom) { if (has_zoom) {
map.setZoom(zoom); map.setZoom(zoom);
} }
@ -6308,7 +6432,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
$navigation, $navigation,
slider, slider,
timenav, timenav,
version = "2.05", version = "2.10",
timeline_id = "#timelinejs", timeline_id = "#timelinejs",
events = {}, events = {},
data = {}, data = {},
@ -8817,6 +8941,7 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef
startDate: getGVar(dd.gsx$startdate), startDate: getGVar(dd.gsx$startdate),
endDate: getGVar(dd.gsx$enddate), endDate: getGVar(dd.gsx$enddate),
headline: getGVar(dd.gsx$headline), headline: getGVar(dd.gsx$headline),
text: getGVar(dd.gsx$text),
tag: getGVar(dd.gsx$tag), tag: getGVar(dd.gsx$tag),
asset: { asset: {
media: getGVar(dd.gsx$media), media: getGVar(dd.gsx$media),

Loading…
Cancel
Save