|
|
|
@ -1843,7 +1843,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
|
|
|
|
|
if (data.caption != null && data.caption != "") { |
|
|
|
|
captionElem = "<div class='caption'>" + VMM.Util.linkify_with_twitter(data.caption, "_blank") + "</div>"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// IMAGE
|
|
|
|
|
if (m.type == "image") { |
|
|
|
|
mediaElem = "<img src='" + m.id + "'>"; |
|
|
|
@ -1855,13 +1854,6 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
|
|
|
|
|
// GOOGLE DOCS
|
|
|
|
|
} else if (m.type == "googledoc") { |
|
|
|
|
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5); |
|
|
|
|
/* |
|
|
|
|
if (m.id.match(/docs.google.com/i)) { |
|
|
|
|
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='" + m.id + "&embedded=true'></iframe>"; |
|
|
|
|
} else { |
|
|
|
|
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + m.id + "&embedded=true'></iframe>"; |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'>Loading Document</span></div>"; |
|
|
|
|
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id); |
|
|
|
|
// YOUTUBE
|
|
|
|
@ -1892,10 +1884,10 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
|
|
|
|
|
// UNKNOWN
|
|
|
|
|
} else if (m.type == "unknown") {
|
|
|
|
|
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");
|
|
|
|
|
mediaElem = VMM.Util.properQuotes(m.id); |
|
|
|
|
mediaElem = "<div class='media-frame plain-text'><div class='container'>" + VMM.Util.properQuotes(m.id) + "</div></div>"; |
|
|
|
|
// WEBSITE
|
|
|
|
|
} else if (m.type == "website") {
|
|
|
|
|
mediaElem = "<iframe class='media-frame' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>"; |
|
|
|
|
mediaElem = "<iframe class='media-frame website' frameborder='0' autostart='false' width='100%' height='100%' scrolling='yes' marginheight='0' marginwidth='0' src='" + m.id + "'></iframe>"; |
|
|
|
|
//mediaElem = "<a href='" + m.id + "' target='_blank'>" + "<img src='http://api.snapito.com/free/lc?url=" + m.id + "'></a>";
|
|
|
|
|
// NO MATCH
|
|
|
|
|
} else { |
|
|
|
@ -3892,7 +3884,6 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
/* PUBLIC |
|
|
|
|
================================================== */ |
|
|
|
|
this.show = function() { |
|
|
|
|
trace("LOADED: " + loaded); |
|
|
|
|
if (!loaded) { |
|
|
|
|
render(); |
|
|
|
|
} |
|
|
|
@ -3944,7 +3935,6 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
/* PRIVATE |
|
|
|
|
================================================== */ |
|
|
|
|
var render = function() { |
|
|
|
|
trace(data); |
|
|
|
|
VMM.attachElement(element, ""); |
|
|
|
|
VMM.appendElement(element, buildSlide() ); |
|
|
|
|
loaded = true; |
|
|
|
@ -3957,7 +3947,7 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var buildSlide = function() { |
|
|
|
|
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { text: false, media: false }}; |
|
|
|
|
var c = {slide:"", text: "", media: "", layout: "content-container layout", has: { headline: false, text: false, media: false }}; |
|
|
|
|
var b_slide, c_wrap; |
|
|
|
|
|
|
|
|
|
/* DATE |
|
|
|
@ -3965,7 +3955,15 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
if (data.startdate != null && data.startdate != "") { |
|
|
|
|
if (type.of(data.startdate) == "date") { |
|
|
|
|
if (data.type != "start") { |
|
|
|
|
c.text += VMM.createElement("h2", VMM.Util.date.prettyDate(data.startdate), "date"); |
|
|
|
|
var st = VMM.Util.date.prettyDate(data.startdate); |
|
|
|
|
var en = VMM.Util.date.prettyDate(data.enddate); |
|
|
|
|
if (st != en) { |
|
|
|
|
//st = VMM.Util.date.prettyDate(data.startdate, true);
|
|
|
|
|
//en = VMM.Util.date.prettyDate(data.enddate, true);
|
|
|
|
|
c.text += VMM.createElement("h2", st + "<small> — " + en + "</small>", "date"); |
|
|
|
|
} else { |
|
|
|
|
c.text += VMM.createElement("h2", st, "date"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3973,6 +3971,7 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
/* HEADLINE |
|
|
|
|
================================================== */ |
|
|
|
|
if (data.headline != null && data.headline != "") { |
|
|
|
|
c.has.headline = true; |
|
|
|
|
if (data.type == "start") { |
|
|
|
|
c.text += VMM.createElement("h2", VMM.Util.linkify_with_twitter(data.headline, "_blank"), "start"); |
|
|
|
|
} else { |
|
|
|
@ -3985,6 +3984,9 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
if (data.text != null && data.text != "") { |
|
|
|
|
c.has.text = true; |
|
|
|
|
c.text += VMM.createElement("p", VMM.Util.linkify_with_twitter(data.text, "_blank")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (c.has.text || c.has.headline) { |
|
|
|
|
c.text = VMM.createElement("div", c.text, "container"); |
|
|
|
|
c.text = VMM.createElement("div", c.text, "text"); |
|
|
|
|
} |
|
|
|
@ -3997,6 +3999,7 @@ if (typeof VMM.Slider != 'undefined') {
|
|
|
|
|
c.media = VMM.MediaElement.create(data.asset); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* COMBINE |
|
|
|
|
================================================== */ |
|
|
|
|
if (c.has.text) { c.layout += "-text" }; |
|
|
|
@ -5094,7 +5097,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
|
|
|
|
|
timeline_id = "#timeline"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
version = "0.99.00"; |
|
|
|
|
version = "1.01"; |
|
|
|
|
|
|
|
|
|
trace("TIMELINE VERSION " + version); |
|
|
|
|
|
|
|
|
|