Browse Source

Started addition of wikipedia

pull/90/head
Zach Wise 13 years ago
parent
commit
43363dfc71
  1. 8
      locale/de.js
  2. 8
      locale/en.js
  3. 8
      locale/es.js
  4. 8
      locale/fr.js
  5. 8
      locale/is.js
  6. 8
      locale/it.js
  7. 8
      locale/kr.js
  8. 8
      locale/nl.js
  9. 8
      locale/pt-br.js
  10. 8
      locale/zh-ch.js
  11. 8
      locale/zh-tw.js
  12. BIN
      source/gfx/timeline.psd
  13. 7
      source/js/VMM.ExternalAPI.js
  14. 33
      source/js/VMM.MediaElement.js
  15. 4
      source/js/VMM.MediaType.js
  16. 2
      source/js/VMM.Timeline.js
  17. 2
      source/js/timeline-embed.js
  18. 3
      source/less/VMM.Timeline.Core.less
  19. 5
      source/less/gfx.less
  20. 1
      themes/dark.css
  21. 2
      timeline-embed.js
  22. 8
      timeline-min.js
  23. 1
      timeline.css
  24. 46
      timeline.js
  25. BIN
      timeline.png

8
locale/de.js

File diff suppressed because one or more lines are too long

8
locale/en.js

File diff suppressed because one or more lines are too long

8
locale/es.js

File diff suppressed because one or more lines are too long

8
locale/fr.js

File diff suppressed because one or more lines are too long

8
locale/is.js

File diff suppressed because one or more lines are too long

8
locale/it.js

File diff suppressed because one or more lines are too long

8
locale/kr.js

File diff suppressed because one or more lines are too long

8
locale/nl.js

File diff suppressed because one or more lines are too long

8
locale/pt-br.js

File diff suppressed because one or more lines are too long

8
locale/zh-ch.js

File diff suppressed because one or more lines are too long

8
locale/zh-tw.js

File diff suppressed because one or more lines are too long

BIN
source/gfx/timeline.psd

Binary file not shown.

7
source/js/VMM.ExternalAPI.js

@ -564,12 +564,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
//http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Beastie%20Boys&format=json&exintro=1
get: function(url, id) {
var wiki = {url: url, id: id};
VMM.master_config.wikipedia.que.push(wiki);
var api_obj = {url: url, id: id};
VMM.master_config.wikipedia.que.push(api_obj);
VMM.master_config.wikipedia.active = true;
},
create: function(wiki) {
create: function(api_obj) {
VMM.attachElement("#"+api_obj.id, api_obj.url);
/*
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + wiki.url + "&format=json&exintro=1&callback=?";
VMM.getJSON(the_url, function(d) {

33
source/js/VMM.MediaElement.js

@ -51,6 +51,9 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
} else if (m.type == "google-map") {
mediaElem = "<div class='thumbnail thumb-map'></div>";
return mediaElem;
} else if (m.type == "wikipedia") {
mediaElem = "<div class='thumbnail thumb-wikipedia'></div>";
return mediaElem;
} else if (m.type == "unknown") {
if (m.id.match("blockquote")) {
mediaElem = "<div class='thumbnail thumb-quote'></div>";
@ -79,6 +82,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
var creditElem = "";
var m = VMM.MediaType(data.media); //returns an object with .type and .id
var isTextMedia = false;
var _id = "";
_valid = true;
// CREDIT
@ -94,14 +98,14 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
mediaElem = "<img src='" + m.id + "'>";
// FLICKR
} else if (m.type == "flickr") {
var flickr_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + flickr_id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.get(m.id, "#" + flickr_id);
_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + _id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.get(m.id, "#" + _id);
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'><p>Loading Document</p></span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
_id = "googledoc_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame doc' id='" + _id + "'><span class='messege'><p>Loading Document</p></span></div>";
VMM.ExternalAPI.googledocs.get(m.id, _id);
// YOUTUBE
} else if (m.type == "youtube") {
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'><span class='messege'><p>Loading YouTube video</p></span></div>";
@ -122,14 +126,19 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
mediaElem = m.id;
// SOUNDCLOUD
} else if (m.type == "soundcloud") {
var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'><span class='messege'><p>Loading Sound</p></span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, soundcloud_id);
_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + _id + "'><span class='messege'><p>Loading Sound</p></span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, _id);
// GOOGLE MAPS
} else if (m.type == "google-map") {
var map_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + map_id + "'><span class='messege'><p>Loading Map</p></span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, map_id);
_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + _id + "'><span class='messege'><p>Loading Map</p></span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, _id);
// WIKIPEDIA
} else if (m.type == "wikipedia") {
_id = "wikipedia_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='wikipedia' id='" + "wikipedia_" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
VMM.ExternalAPI.wikipedia.get(m.id, _id);
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");

4
source/js/VMM.MediaType.js

@ -60,6 +60,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
media.type = "googledoc";
media.id = d;
success = true;
} else if (d.match('(www.)?wikipedia\.org')) {
media.type = "wikipedia";
media.id = d;
success = true;
} else if (d.indexOf('http://') == 0) {
media.type = "website";
media.id = d;

2
source/js/VMM.Timeline.js

@ -61,7 +61,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
timeline_id = "#timeline";
}
version = "1.02";
version = "1.10";
trace("TIMELINE VERSION " + version);

2
source/js/timeline-embed.js

@ -101,6 +101,8 @@
var cssReady = false;
var fontCSSReady = false;
var fontJSReady = false;
var base_path = "http://veritetimeline.appspot.com/latest/";
var js_url = "http://veritetimeline.appspot.com/latest/";
var font_css_url = "http://veritetimeline.appspot.com/latest/themes/font/"
var font_js_url = "http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";
var font_google = [ 'News+Cycle:400,700:latin', 'Merriweather:400,700,900:latin' ];

3
source/less/VMM.Timeline.Core.less

@ -276,6 +276,9 @@
.thumbnail.thumb-website {
.icon-website();
}
.thumbnail.thumb-wikipedia {
.icon-wikipedia();
}
.zFront {
z-index:204;

5
source/less/gfx.less

@ -104,6 +104,11 @@
background-repeat:no-repeat;
background-position: -280px -24px;
}
.icon-wikipedia() {
.base-sprite();
background-repeat:no-repeat;
background-position: -184px -48px;
}
/* Thumbnail Icons (Extra)
----------------------------------------------------------------- */

1
themes/dark.css

@ -57,6 +57,7 @@
.vmm-timeline .thumbnail.thumb-audio{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-304px -24px;}
.vmm-timeline .thumbnail.thumb-map{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-208px -48px;}
.vmm-timeline .thumbnail.thumb-website{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-232px -24px;}
.vmm-timeline .thumbnail.thumb-wikipedia{background-image:url(themes/timeline-dark.png);background-repeat:no-repeat;background-position:-184px -48px;}
.vmm-timeline .zFront{z-index:204;}
.slider{width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask{text-align:center;width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask .slider-container{position:absolute;top:0px;left:-2160px;width:100%;height:100%;text-align:center;display:block;background-color:#1a1a1a;}.slider .slider-container-mask .slider-container .slider-item-container{display:table-cell;vertical-align:middle;}
.slider img,.slider embed,.slider object,.slider video,.slider iframe{max-width:100%;}

2
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<t;++s)f[e].push({urls:[g[s]],callback:s===t-1?k:null,obj:n,context:o})}if(d[e]||!(v=d[e]=f[e].shift()))return;c||(c=a.head||a.getElementsByTagName("head")[0]);w=v.urls;for(s=0,t=w.length;s<t;++s){x=w[s];if(q)u=b.gecko?h("style"):h("link",{href:x,rel:"stylesheet"});else{u=h("script",{src:x});u.async=!1}u.className="lazyload";u.setAttribute("charset","utf-8");if(b.ie&&!q)u.onreadystatechange=function(){if(/loaded|complete/.test(u.readyState)){u.onreadystatechange=null;p()}};else if(q&&(b.gecko||b.webkit))if(b.webkit){v.urls[s]=u.href;m()}else{u.innerHTML='@import "'+x+'";';l(u)}else u.onload=u.onerror=p;r.push(u)}for(s=0,t=r.length;s<t;++s)c.appendChild(r[s])}function l(a){var b;try{b=!!a.sheet.cssRules}catch(c){e+=1;e<200?setTimeout(function(){l(a)},50):b&&i("css");return}i("css")}function m(){var a=d.css,b;if(a){b=g.length;while(--b>=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 r(){LazyLoad.js(a.js,s)}function s(){c=!0;w()}function t(){d=!0;w()}function u(){e=!0;w()}function v(){f=!0;w()}function w(){if(k>40)return;k++;if(c&&d&&e&&f){if(!j){j=!0;m=new VMM.Timeline;m.init(a.source)}}else l=setTimeout("checkAgain();",250)}var a={width:800,height:600,source:"taylor/data.json",font:"default",css:"http://veritetimeline.appspot.com/latest/timeline.css",js:"http://veritetimeline.appspot.com/latest/timeline-min.js"};if(typeof timeline_config=="object"){var b;for(b in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,b)&&(a[b]=timeline_config[b])}else if(typeof config=="object"){var b;for(b in config)Object.prototype.hasOwnProperty.call(config,b)&&(a[b]=config[b])}timeline_config=a;var c=!1,d=!1,e=!1,f=!1,g="http://veritetimeline.appspot.com/latest/themes/font/",h="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",i=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"],j=!1,k=0,l,m,n=document.createElement("div"),o=document.getElementById("timeline-embed");o.appendChild(n);n.setAttribute("id","timeline");a.width.toString().match("%")||a.width.toString().match("px")?o.style.width=a.width:o.style.width=a.width+"px";a.height.toString().match("%")||a.height.toString().match("px")?o.style.height=a.height:o.style.height=a.height+"px";n.style.position="relative";LazyLoad.css(a.css,t);if(a.font=="default"){f=!0;e=!0}else{a.font.match("http://")?g=a.font:g=g+a.font+".css";LazyLoad.css(g,u);switch(a.font){case"Merriweather-NewsCycle":i=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"];break;case"PoiretOne-Molengo":i=["Poiret+One::latin","Molengo::latin"];break;case"Arvo-PTSans":i=["Arvo:400,700,400italic:latin","PT+Sans:400,700,400italic:latin"];break;case"PTSerif-PTSans":i=["PT+Sans:400,700,400italic:latin","PT+Serif:400,700,400italic:latin"];break;case"DroidSerif-DroidSans":i=["Droid+Sans:400,700:latin","Droid+Serif:400,700,400italic:latin"];break;case"Lekton-Molengo":i=["Lekton:400,700,400italic:latin","Molengo::latin"];break;case"NixieOne-Ledger":i=["Nixie+One::latin","Ledger::latin"];break;case"AbrilFatface-Average":i=["Average::latin","Abril+Fatface::latin"];break;case"PlayfairDisplay-Muli":i=["Playfair+Display:400,400italic:latin","Muli:300,400,300italic,400italic:latin"];break;case"Rancho-Gudea":i=["Rancho::latin","Gudea:400,700,400italic:latin"];break;case"Bevan-PotanoSans":i=["Bevan::latin","Pontano+Sans::latin"];break;case"BreeSerif-OpenSans":i=["Bree+Serif::latin","Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800:latin"];break;case"SansitaOne-Kameron":i=["Sansita+One::latin","Kameron:400,700:latin"];break;case"Pacifico-Arimo":i=["Pacifico::latin","Arimo:400,700,400italic,700italic:latin"];break;default:i=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"]}WebFontConfig={google:{families:i}};LazyLoad.js(h,v)}try{var p=jQuery;p=!0}catch(q){var p=!1}p?r():LazyLoad.js("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",r);this.checkAgain=function(){w()}})();
*/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<t;++s)f[e].push({urls:[g[s]],callback:s===t-1?k:null,obj:n,context:o})}if(d[e]||!(v=d[e]=f[e].shift()))return;c||(c=a.head||a.getElementsByTagName("head")[0]);w=v.urls;for(s=0,t=w.length;s<t;++s){x=w[s];if(q)u=b.gecko?h("style"):h("link",{href:x,rel:"stylesheet"});else{u=h("script",{src:x});u.async=!1}u.className="lazyload";u.setAttribute("charset","utf-8");if(b.ie&&!q)u.onreadystatechange=function(){if(/loaded|complete/.test(u.readyState)){u.onreadystatechange=null;p()}};else if(q&&(b.gecko||b.webkit))if(b.webkit){v.urls[s]=u.href;m()}else{u.innerHTML='@import "'+x+'";';l(u)}else u.onload=u.onerror=p;r.push(u)}for(s=0,t=r.length;s<t;++s)c.appendChild(r[s])}function l(a){var b;try{b=!!a.sheet.cssRules}catch(c){e+=1;e<200?setTimeout(function(){l(a)},50):b&&i("css");return}i("css")}function m(){var a=d.css,b;if(a){b=g.length;while(--b>=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 t(){LazyLoad.js(a.js,u)}function u(){c=!0;y()}function v(){d=!0;y()}function w(){e=!0;y()}function x(){f=!0;y()}function y(){if(m>40)return;m++;if(c&&d&&e&&f){if(!l){l=!0;o=new VMM.Timeline;o.init(a.source)}}else n=setTimeout("checkAgain();",250)}var a={width:800,height:600,source:"taylor/data.json",font:"default",css:"http://veritetimeline.appspot.com/latest/timeline.css",js:"http://veritetimeline.appspot.com/latest/timeline-min.js"};if(typeof timeline_config=="object"){var b;for(b in timeline_config)Object.prototype.hasOwnProperty.call(timeline_config,b)&&(a[b]=timeline_config[b])}else if(typeof config=="object"){var b;for(b in config)Object.prototype.hasOwnProperty.call(config,b)&&(a[b]=config[b])}timeline_config=a;var c=!1,d=!1,e=!1,f=!1,g="http://veritetimeline.appspot.com/latest/",h="http://veritetimeline.appspot.com/latest/",i="http://veritetimeline.appspot.com/latest/themes/font/",j="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",k=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"],l=!1,m=0,n,o,p=document.createElement("div"),q=document.getElementById("timeline-embed");q.appendChild(p);p.setAttribute("id","timeline");a.width.toString().match("%")||a.width.toString().match("px")?q.style.width=a.width:q.style.width=a.width+"px";a.height.toString().match("%")||a.height.toString().match("px")?q.style.height=a.height:q.style.height=a.height+"px";p.style.position="relative";LazyLoad.css(a.css,v);if(a.font=="default"){f=!0;e=!0}else{a.font.match("http://")?i=a.font:i=i+a.font+".css";LazyLoad.css(i,w);switch(a.font){case"Merriweather-NewsCycle":k=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"];break;case"PoiretOne-Molengo":k=["Poiret+One::latin","Molengo::latin"];break;case"Arvo-PTSans":k=["Arvo:400,700,400italic:latin","PT+Sans:400,700,400italic:latin"];break;case"PTSerif-PTSans":k=["PT+Sans:400,700,400italic:latin","PT+Serif:400,700,400italic:latin"];break;case"DroidSerif-DroidSans":k=["Droid+Sans:400,700:latin","Droid+Serif:400,700,400italic:latin"];break;case"Lekton-Molengo":k=["Lekton:400,700,400italic:latin","Molengo::latin"];break;case"NixieOne-Ledger":k=["Nixie+One::latin","Ledger::latin"];break;case"AbrilFatface-Average":k=["Average::latin","Abril+Fatface::latin"];break;case"PlayfairDisplay-Muli":k=["Playfair+Display:400,400italic:latin","Muli:300,400,300italic,400italic:latin"];break;case"Rancho-Gudea":k=["Rancho::latin","Gudea:400,700,400italic:latin"];break;case"Bevan-PotanoSans":k=["Bevan::latin","Pontano+Sans::latin"];break;case"BreeSerif-OpenSans":k=["Bree+Serif::latin","Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800:latin"];break;case"SansitaOne-Kameron":k=["Sansita+One::latin","Kameron:400,700:latin"];break;case"Pacifico-Arimo":k=["Pacifico::latin","Arimo:400,700,400italic,700italic:latin"];break;default:k=["News+Cycle:400,700:latin","Merriweather:400,700,900:latin"]}WebFontConfig={google:{families:k}};LazyLoad.js(j,x)}try{var r=jQuery;r=!0}catch(s){var r=!1}r?t():LazyLoad.js("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",t);this.checkAgain=function(){y()}})();

8
timeline-min.js vendored

File diff suppressed because one or more lines are too long

1
timeline.css

@ -57,6 +57,7 @@
.vmm-timeline .thumbnail.thumb-audio{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-304px -24px;}
.vmm-timeline .thumbnail.thumb-map{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-208px -48px;}
.vmm-timeline .thumbnail.thumb-website{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-232px -24px;}
.vmm-timeline .thumbnail.thumb-wikipedia{background-image:url(timeline.png);background-repeat:no-repeat;background-position:-184px -48px;}
.vmm-timeline .zFront{z-index:204;}
.slider{width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask{text-align:center;width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask .slider-container{position:absolute;top:0px;left:-2160px;width:100%;height:100%;text-align:center;display:block;background-color:#ffffff;}.slider .slider-container-mask .slider-container .slider-item-container{display:table-cell;vertical-align:middle;}
.slider img,.slider embed,.slider object,.slider video,.slider iframe{max-width:100%;}

46
timeline.js

@ -1061,6 +1061,9 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
} else if (m.type == "google-map") {
mediaElem = "<div class='thumbnail thumb-map'></div>";
return mediaElem;
} else if (m.type == "wikipedia") {
mediaElem = "<div class='thumbnail thumb-wikipedia'></div>";
return mediaElem;
} else if (m.type == "unknown") {
if (m.id.match("blockquote")) {
mediaElem = "<div class='thumbnail thumb-quote'></div>";
@ -1089,6 +1092,7 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
var creditElem = "";
var m = VMM.MediaType(data.media); //returns an object with .type and .id
var isTextMedia = false;
var _id = "";
_valid = true;
// CREDIT
@ -1104,14 +1108,14 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
mediaElem = "<img src='" + m.id + "'>";
// FLICKR
} else if (m.type == "flickr") {
var flickr_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + flickr_id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.get(m.id, "#" + flickr_id);
_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + _id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.get(m.id, "#" + _id);
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'><p>Loading Document</p></span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
_id = "googledoc_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame doc' id='" + _id + "'><span class='messege'><p>Loading Document</p></span></div>";
VMM.ExternalAPI.googledocs.get(m.id, _id);
// YOUTUBE
} else if (m.type == "youtube") {
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'><span class='messege'><p>Loading YouTube video</p></span></div>";
@ -1132,14 +1136,19 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
mediaElem = m.id;
// SOUNDCLOUD
} else if (m.type == "soundcloud") {
var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'><span class='messege'><p>Loading Sound</p></span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, soundcloud_id);
_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + _id + "'><span class='messege'><p>Loading Sound</p></span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, _id);
// GOOGLE MAPS
} else if (m.type == "google-map") {
var map_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + map_id + "'><span class='messege'><p>Loading Map</p></span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, map_id);
_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + _id + "'><span class='messege'><p>Loading Map</p></span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, _id);
// WIKIPEDIA
} else if (m.type == "wikipedia") {
_id = "wikipedia_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='wikipedia' id='" + "wikipedia_" + _id + "'><span class='messege'><p>Loading Wikipedia</p></span></div>";
VMM.ExternalAPI.wikipedia.get(m.id, _id);
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");
@ -1249,6 +1258,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
media.type = "googledoc";
media.id = d;
success = true;
} else if (d.match('(www.)?wikipedia\.org')) {
media.type = "wikipedia";
media.id = d;
success = true;
} else if (d.indexOf('http://') == 0) {
media.type = "website";
media.id = d;
@ -2040,12 +2053,13 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
//http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Beastie%20Boys&format=json&exintro=1
get: function(url, id) {
var wiki = {url: url, id: id};
VMM.master_config.wikipedia.que.push(wiki);
var api_obj = {url: url, id: id};
VMM.master_config.wikipedia.que.push(api_obj);
VMM.master_config.wikipedia.active = true;
},
create: function(wiki) {
create: function(api_obj) {
VMM.attachElement("#"+api_obj.id, api_obj.url);
/*
var the_url = "http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=" + wiki.url + "&format=json&exintro=1&callback=?";
VMM.getJSON(the_url, function(d) {
@ -5431,7 +5445,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
timeline_id = "#timeline";
}
version = "1.02";
version = "1.10";
trace("TIMELINE VERSION " + version);

BIN
timeline.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Loading…
Cancel
Save