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