From 7358924ea09564ea1aa0d195ab8127d5b3d778a9 Mon Sep 17 00:00:00 2001 From: Zach Wise Date: Sun, 27 May 2012 19:44:43 -0500 Subject: [PATCH] Organizational changes --- .gitignore | 15 ++++++--------- compiled/js/timeline-embed.js | 2 +- source/js/{ => Embed}/Embed.js | 23 ++++++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) rename source/js/{ => Embed}/Embed.js (94%) diff --git a/.gitignore b/.gitignore index c12495c..92d5293 100644 --- a/.gitignore +++ b/.gitignore @@ -2,16 +2,13 @@ .DS_Store* dev_examples/ cdn/ -<<<<<<< HEAD -======= -VMM.Timeline.CDN.js -CDN.js ->>>>>>> Canary +Embed.CDN.js +Embed.CDN.Generator.js +compiled/generator.html +compiled/index.html +compiled/js/timeline-embed-cdn.js +compiled/js/timeline-embed-generator.js *.tmproj *.tmproject -<<<<<<< HEAD -VMM.Timeline.CDN.js -======= ->>>>>>> Canary tmtags source/gfx/Sprites/ diff --git a/compiled/js/timeline-embed.js b/compiled/js/timeline-embed.js index 20cac66..08b75eb 100644 --- a/compiled/js/timeline-embed.js +++ b/compiled/js/timeline-embed.js @@ -33,4 +33,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @class LazyLoad @static @version 2.0.3 (git) -*/LazyLoad=function(a){function h(b,c){var d=a.createElement(b),e;for(e in c)c.hasOwnProperty(e)&&d.setAttribute(e,c[e]);return d}function i(a){var b=d[a],c,g;if(b){c=b.callback;g=b.urls;g.shift();e=0;if(!g.length){c&&c.call(b.context,b.obj);d[a]=null;f[a].length&&k(a)}}}function j(){var c=navigator.userAgent;b={async:a.createElement("script").async===!0};(b.webkit=/AppleWebKit\//.test(c))||(b.ie=/MSIE/.test(c))||(b.opera=/Opera/.test(c))||(b.gecko=/Gecko\//.test(c))||(b.unknown=!0)}function k(e,g,k,n,o){var p=function(){i(e)},q=e==="css",r=[],s,t,u,v,w,x;b||j();if(g){g=typeof g=="string"?[g]:g.concat();if(q||b.async||b.gecko||b.opera)f[e].push({urls:g,callback:k,obj:n,context:o});else for(s=0,t=g.length;s=0)if(g[b].href===a.urls[0]){i("css");break}e+=1;a&&(e<200?setTimeout(m,50):i("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets;return{css:function(a,b,c,d){k("css",a,b,c,d)},js:function(a,b,c,d){k("js",a,b,c,d)}}}(this.document);LazyLoad=function(a){function h(b,c){var d=a.createElement(b),e;for(e in c)c.hasOwnProperty(e)&&d.setAttribute(e,c[e]);return d}function i(a){var b=d[a],c,g;if(b){c=b.callback;g=b.urls;g.shift();e=0;if(!g.length){c&&c.call(b.context,b.obj);d[a]=null;f[a].length&&k(a)}}}function j(){var c=navigator.userAgent;b={async:a.createElement("script").async===!0};(b.webkit=/AppleWebKit\//.test(c))||(b.ie=/MSIE/.test(c))||(b.opera=/Opera/.test(c))||(b.gecko=/Gecko\//.test(c))||(b.unknown=!0)}function k(e,g,k,n,o){var p=function(){i(e)},q=e==="css",r=[],s,t,u,v,w,x;b||j();if(g){g=typeof g=="string"?[g]:g.concat();if(q||b.async||b.gecko||b.opera)f[e].push({urls:g,callback:k,obj:n,context:o});else for(s=0,t=g.length;s=0)if(g[b].href===a.urls[0]){i("css");break}e+=1;a&&(e<200?setTimeout(m,50):i("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets;return{css:function(a,b,c,d){k("css",a,b,c,d)},js:function(a,b,c,d){k("js",a,b,c,d)}}}(this.document);(function(){function m(){LazyLoad.js(k.js,n)}function n(){i.js=!0;k.lang!="en"?LazyLoad.js(j.locale,o):i.language=!0;s()}function o(){i.language=!0;s()}function p(){i.css=!0;s()}function q(){i.font.css=!0;s()}function r(){i.font.js=!0;s()}function s(){if(i.checks>40)return;i.checks++;if(i.js&&i.css&&i.font.css&&i.font.js&&i.language){if(!i.finished){i.finished=!0;u()}}else i.timeout=setTimeout("onloaded_check_again();",250)}function t(){b=document.createElement("div");c=document.getElementById("timeline-embed");c.appendChild(b);b.setAttribute("id","timeline");if(k.width.toString().match("%")){c.style.width=k.width;c.setAttribute("class","full-embed ");c.setAttribute("className","full-embed ")}else{c.setAttribute("class"," sized-embed");c.setAttribute("className"," sized-embed");k.width=k.width-2;c.style.width=k.width+"px"}if(k.height.toString().match("%"))c.style.height=k.height;else{k.height=k.height-16;c.style.height=k.height+"px"}b.style.position="relative"}function u(){VMM.debug=k.debug;a=new VMM.Timeline;a.init(k.source);e&&VMM.bindEvent(global,onTimelineHeadline,"TIMELINE_HEADLINE")}var a,b,c,d,e=!1,f="1.48",g="1.7.1",h="",i={timeout:"",checks:0,finished:!1,js:!1,css:!1,jquery:!1,has_jquery:!1,language:!1,font:{css:!1,js:!1}},j={base:"http://embed.verite.co/timeline/",css:"http://embed.verite.co/timeline/css/",js:"http://embed.verite.co/timeline/js/",locale:"http://embed.verite.co/timeline/js/locale/",jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js",font:{css:"http://embed.verite.co/timeline/css/themes/font/",js:"http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",google:["Bevan::latin","Pontano+Sans::latin"]}},k={version:f,debug:!1,embed:!0,width:"100%",height:"650",source:"https://docs.google.com/spreadsheet/pub?key=0Agl_Dv6iEbDadFYzRjJPUGktY0NkWXFUWkVIZDNGRHc&output=html",lang:"en",font:"default",css:j.css+"timeline.css?"+f,js:j.js+"timeline-min.js?"+f};if(typeof url_config=="object"){k.height="100%";for(d in url_config)Object.prototype.hasOwnProperty.call(url_config,d)&&(k[d]=url_config[d]);k.source.match("docs.google.com")||k.source.match("json")||k.source.match("storify")||(k.source="https://docs.google.com/spreadsheet/pub?key="+k.source+"&output=html");e=!0}else if(typeof timeline_config=="object")for(d in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,d)&&(k[d]=timeline_config[d]);else if(typeof config=="object")for(d in config)Object.prototype.hasOwnProperty.call(config,d)&&(k[d]=config[d]);k.lang.match("/")?j.locale=k.lang:j.locale=j.locale+k.lang+".js?"+f;if(k.js.match("locale")){k.lang=k.js.split("locale/")[1].replace(".js","");k.js=j.js+"timeline-min.js?"+f}timeline_config=k;t();LazyLoad.css(k.css,p);if(k.font=="default"){i.font.js=!0;i.font.css=!0}else{k.font.match("/")?j.font.css=k.font:j.font.css=j.font.css+k.font+".css?"+f;LazyLoad.css(j.font.css,q);switch(k.font){case"Merriweather-NewsCycle":j.font.google=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"];break;case"PoiretOne-Molengo":j.font.google=["Poiret+One::latin","Molengo::latin"];break;case"Arvo-PTSans":j.font.google=["Arvo:400,700,400italic:latin","PT+Sans:400,700,400italic:latin"];break;case"PTSerif-PTSans":j.font.google=["PT+Sans:400,700,400italic:latin","PT+Serif:400,700,400italic:latin"];break;case"DroidSerif-DroidSans":j.font.google=["Droid+Sans:400,700:latin","Droid+Serif:400,700,400italic:latin"];break;case"Lekton-Molengo":j.font.google=["Lekton:400,700,400italic:latin","Molengo::latin"];break;case"NixieOne-Ledger":j.font.google=["Nixie+One::latin","Ledger::latin"];break;case"AbrilFatface-Average":j.font.google=["Average::latin","Abril+Fatface::latin"];break;case"PlayfairDisplay-Muli":j.font.google=["Playfair+Display:400,400italic:latin","Muli:300,400,300italic,400italic:latin"];break;case"Rancho-Gudea":j.font.google=["Rancho::latin","Gudea:400,700,400italic:latin"];break;case"Bevan-PotanoSans":j.font.google=["Bevan::latin","Pontano+Sans::latin"];break;case"BreeSerif-OpenSans":j.font.google=["Bree+Serif::latin","Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800:latin"];break;case"SansitaOne-Kameron":j.font.google=["Sansita+One::latin","Kameron:400,700:latin"];break;case"Pacifico-Arimo":j.font.google=["Pacifico::latin","Arimo:400,700,400italic,700italic:latin"];break;default:j.font.google=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"]}WebFontConfig={google:{families:j.font.google}};LazyLoad.js(j.font.js,r)}try{i.has_jquery=jQuery;i.has_jquery=!0;if(i.has_jquery){var h=parseFloat(jQuery.fn.jquery);h=0)if(g[b].href===a.urls[0]){i("css");break}e+=1;a&&(e<200?setTimeout(m,50):i("css"))}}var b,c,d={},e=0,f={css:[],js:[]},g=a.styleSheets;return{css:function(a,b,c,d){k("css",a,b,c,d)},js:function(a,b,c,d){k("js",a,b,c,d)}}}(this.document);var timeline_path="http://embed.verite.co/timeline/";(function(){function m(){LazyLoad.js(k.js,n)}function n(){i.js=!0;k.lang!="en"?LazyLoad.js(j.locale,o):i.language=!0;s()}function o(){i.language=!0;s()}function p(){i.css=!0;s()}function q(){i.font.css=!0;s()}function r(){i.font.js=!0;s()}function s(){if(i.checks>40)return;i.checks++;if(i.js&&i.css&&i.font.css&&i.font.js&&i.language){if(!i.finished){i.finished=!0;u()}}else i.timeout=setTimeout("onloaded_check_again();",250)}function t(){b=document.createElement("div");c=document.getElementById("timeline-embed");c.appendChild(b);b.setAttribute("id","timeline");if(k.width.toString().match("%")){c.style.width=k.width;c.setAttribute("class","full-embed ");c.setAttribute("className","full-embed ")}else{c.setAttribute("class"," sized-embed");c.setAttribute("className"," sized-embed");k.width=k.width-2;c.style.width=k.width+"px"}if(k.height.toString().match("%"))c.style.height=k.height;else{k.height=k.height-16;c.style.height=k.height+"px"}b.style.position="relative"}function u(){VMM.debug=k.debug;a=new VMM.Timeline;a.init(k.source);e&&VMM.bindEvent(global,onTimelineHeadline,"TIMELINE_HEADLINE")}var a,b,c,d,e=!1,f="1.49",g="1.7.1",h="",i={timeout:"",checks:0,finished:!1,js:!1,css:!1,jquery:!1,has_jquery:!1,language:!1,font:{css:!1,js:!1}},j={base:timeline_path,css:timeline_path+"css/",js:timeline_path+"js/",locale:timeline_path+"js/locale/",jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js",font:{css:timeline_path+"css/themes/font/",js:"http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",google:["Bevan::latin","Pontano+Sans::latin"]}},k={version:f,debug:!1,embed:!0,width:"100%",height:"650",source:"https://docs.google.com/spreadsheet/pub?key=0Agl_Dv6iEbDadFYzRjJPUGktY0NkWXFUWkVIZDNGRHc&output=html",lang:"en",font:"default",css:j.css+"timeline.css?"+f,js:j.js+"timeline-min.js?"+f};if(typeof url_config=="object"){k.height="100%";for(d in url_config)Object.prototype.hasOwnProperty.call(url_config,d)&&(k[d]=url_config[d]);k.source.match("docs.google.com")||k.source.match("json")||k.source.match("storify")||(k.source="https://docs.google.com/spreadsheet/pub?key="+k.source+"&output=html");e=!0}else if(typeof timeline_config=="object")for(d in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,d)&&(k[d]=timeline_config[d]);else if(typeof config=="object")for(d in config)Object.prototype.hasOwnProperty.call(config,d)&&(k[d]=config[d]);k.lang.match("/")?j.locale=k.lang:j.locale=j.locale+k.lang+".js?"+f;if(k.js.match("locale")){k.lang=k.js.split("locale/")[1].replace(".js","");k.js=j.js+"timeline-min.js?"+f}timeline_config=k;t();LazyLoad.css(k.css,p);if(k.font=="default"){i.font.js=!0;i.font.css=!0}else{k.font.match("/")?j.font.css=k.font:j.font.css=j.font.css+k.font+".css?"+f;LazyLoad.css(j.font.css,q);switch(k.font){case"Merriweather-NewsCycle":j.font.google=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"];break;case"PoiretOne-Molengo":j.font.google=["Poiret+One::latin","Molengo::latin"];break;case"Arvo-PTSans":j.font.google=["Arvo:400,700,400italic:latin","PT+Sans:400,700,400italic:latin"];break;case"PTSerif-PTSans":j.font.google=["PT+Sans:400,700,400italic:latin","PT+Serif:400,700,400italic:latin"];break;case"DroidSerif-DroidSans":j.font.google=["Droid+Sans:400,700:latin","Droid+Serif:400,700,400italic:latin"];break;case"Lekton-Molengo":j.font.google=["Lekton:400,700,400italic:latin","Molengo::latin"];break;case"NixieOne-Ledger":j.font.google=["Nixie+One::latin","Ledger::latin"];break;case"AbrilFatface-Average":j.font.google=["Average::latin","Abril+Fatface::latin"];break;case"PlayfairDisplay-Muli":j.font.google=["Playfair+Display:400,400italic:latin","Muli:300,400,300italic,400italic:latin"];break;case"Rancho-Gudea":j.font.google=["Rancho::latin","Gudea:400,700,400italic:latin"];break;case"Bevan-PotanoSans":j.font.google=["Bevan::latin","Pontano+Sans::latin"];break;case"BreeSerif-OpenSans":j.font.google=["Bree+Serif::latin","Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800:latin"];break;case"SansitaOne-Kameron":j.font.google=["Sansita+One::latin","Kameron:400,700:latin"];break;case"Pacifico-Arimo":j.font.google=["Pacifico::latin","Arimo:400,700,400italic,700italic:latin"];break;default:j.font.google=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"]}WebFontConfig={google:{families:j.font.google}};LazyLoad.js(j.font.js,r)}try{i.has_jquery=jQuery;i.has_jquery=!0;if(i.has_jquery){var h=parseFloat(jQuery.fn.jquery);h