diff --git a/source/js/Media/VMM.TextElement.js b/source/js/Media/VMM.TextElement.js index 80a9409..fab8947 100644 --- a/source/js/Media/VMM.TextElement.js +++ b/source/js/Media/VMM.TextElement.js @@ -9,106 +9,7 @@ if(typeof VMM != 'undefined' && typeof VMM.TextElement == 'undefined') { }, create: function(data) { - return data; - - //$mediacontainer = element; - /* - var _valid = false; - - if (data.media != null && data.media != "") { - var mediaElem = "", captionElem = "", creditElem = "", _id = "", isTextMedia = false; - var m = VMM.MediaType(data.media); //returns an object with .type and .id - _valid = true; - - // CREDIT - if (data.credit != null && data.credit != "") { - creditElem = "
" + VMM.Util.linkify_with_twitter(data.credit, "_blank") + "
"; - } - // CAPTION - if (data.caption != null && data.caption != "") { - captionElem = "
" + VMM.Util.linkify_with_twitter(data.caption, "_blank") + "
"; - } - // IMAGE - if (m.type == "image") { - mediaElem = "
"; - // FLICKR - } else if (m.type == "flickr") { - _id = "flickr_" + m.id; - mediaElem = "
"; - VMM.ExternalAPI.flickr.get(m.id, "#" + _id); - // GOOGLE DOCS - } else if (m.type == "googledoc") { - _id = "googledoc_" + VMM.Util.unique_ID(5); - mediaElem = "

Loading Document

"; - VMM.ExternalAPI.googledocs.get(m.id, _id); - // YOUTUBE - } else if (m.type == "youtube") { - mediaElem = "

Loading YouTube video

"; - VMM.ExternalAPI.youtube.get(m.id); - // VIMEO - } else if (m.type == "vimeo") { - mediaElem = "
"; - VMM.ExternalAPI.vimeo.get(m.id); - // DAILYMOTION - } else if (m.type == "dailymotion") { - mediaElem = "
"; - // TWITTER - } else if (m.type == "twitter"){ - mediaElem = "

Loading Tweet

"; - isTextMedia = true; - VMM.ExternalAPI.twitter.prettyHTML(m.id, secondary); - // TWITTER - } else if (m.type == "twitter-ready") { - isTextMedia = true; - mediaElem = m.id; - // SOUNDCLOUD - } else if (m.type == "soundcloud") { - _id = "soundcloud_" + VMM.Util.unique_ID(5); - mediaElem = "

Loading Sound

"; - VMM.ExternalAPI.soundcloud.get(m.id, _id); - // GOOGLE MAPS - } else if (m.type == "google-map") { - _id = "googlemap_" + VMM.Util.unique_ID(7); - mediaElem = "

Loading Map

"; - VMM.ExternalAPI.googlemaps.get(m.id, _id); - // WIKIPEDIA - } else if (m.type == "wikipedia") { - _id = "wikipedia_" + VMM.Util.unique_ID(7); - mediaElem = "

Loading Wikipedia

"; - isTextMedia = true; - VMM.ExternalAPI.wikipedia.get(m.id, _id); - // UNKNOWN - } else if (m.type == "quote") { - isTextMedia = true; - mediaElem = "
" + m.id + "
"; - // UNKNOWN - } else if (m.type == "unknown") { - trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML"); - isTextMedia = true; - mediaElem = "
" + VMM.Util.properQuotes(m.id) + "
"; - // WEBSITE - } else if (m.type == "website") { - mediaElem = "
"; - //mediaElem = "" + ""; - // NO MATCH - } else { - trace("NO KNOWN MEDIA TYPE FOUND"); - trace(m.type); - } - - // WRAP THE MEDIA ELEMENT - mediaElem = "
" + mediaElem + creditElem + captionElem + "
"; - // RETURN - if (isTextMedia) { - return "
" + mediaElem + "
"; - } else { - return "
" + mediaElem + "
"; - } - - - }; - */ } }).init();