r4595 - in plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo: . css images
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sat Jan 27 12:34:04 EST 2007
Author: oscar
Date: 2007-01-27 12:34:04 -0500 (Sat, 27 Jan 2007)
New Revision: 4595
Added:
plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/images/grouper.png
Modified:
plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/css/content.css
plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/editor_plugin.js
plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/functions.js
plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/videoinput.html
Log:
added support for adding videos from Grouper.com
Modified: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/css/content.css
===================================================================
--- plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/css/content.css 2007-01-27 16:23:36 UTC (rev 4594)
+++ plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/css/content.css 2007-01-27 17:34:04 UTC (rev 4595)
@@ -32,4 +32,11 @@
background-position: center;
background-repeat: no-repeat;
background-color: #ffffcc;
+ }
+.ltVideoGrouper {
+ border: 1px dotted #cc0000;
+ background-image: url('../images/grouper.png');
+ background-position: center;
+ background-repeat: no-repeat;
+ background-color: #ffffcc;
}
\ No newline at end of file
Modified: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/editor_plugin.js 2007-01-27 16:23:36 UTC (rev 4594)
+++ plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/editor_plugin.js 2007-01-27 17:34:04 UTC (rev 4595)
@@ -1,298 +1,303 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('insertvideo', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
-
-// Singleton class
-var TinyMCE_insertvideoPlugin = {
- getInfo : function() {
- return {
- longname : 'insertvideo plugin',
- author : 'The LifeType Project',
- authorurl : 'http://www.lifetype.net',
- infourl : 'http://www.lifetype.net',
- version : "1.0"
- };
- },
-
- initInstance : function(inst) {
- tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/insertvideo/css/content.css");
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "insertvideo":
- return tinyMCE.getButtonHTML(cn, 'lang_insertvideo_desc', '{$pluginurl}/images/youtube.png', 'mceinsertvideo', true);
- }
-
- return "";
- },
-
- /**
- * Executes a specific command, this function handles plugin commands.
- *
- * @param {string} editor_id TinyMCE editor instance id that issued the command.
- * @param {HTMLElement} element Body or root element for the editor instance.
- * @param {string} command Command name to be executed.
- * @param {string} user_interface True/false if a user interface should be presented.
- * @param {mixed} value Custom value argument, can be anything.
- * @return true/false if the command was executed by this plugin or not.
- * @type
- */
- execCommand : function(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
- case "mceinsertvideo":
- // Show UI/Popup
- if (user_interface) {
- // Open a popup window and send in some custom data in a window argument
- var insertvideo = new Array();
-
- insertvideo['file'] = '../../plugins/insertvideo/videoinput.html'; // Relative to theme
- insertvideo['width'] = 500;
- insertvideo['height'] = 260;
-
- tinyMCE.openWindow(insertvideo, {editor_id : editor_id, resizable : "no", scrollbars : "no", inline : "yes"});
- }
- return true;
- }
-
- // Pass to next handler in chain
- return false;
- },
-
- cleanup : function(type, content) {
- switch (type) {
- case "insert_to_editor_dom":
- // Force relative/absolute
- if (tinyMCE.getParam('convert_urls')) {
- var imgs = content.getElementsByTagName("img");
- for (var i=0; i<imgs.length; i++) {
- //if (tinyMCE.getAttrib(imgs[i], "class")== "ltVideoYouTube") {
- if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
- var src = tinyMCE.getAttrib(imgs[i], "alt");
-
- if (tinyMCE.getParam('convert_urls'))
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
- imgs[i].setAttribute('alt', src);
- imgs[i].setAttribute('title', src);
- }
- }
- }
- break;
-
- case "get_from_editor_dom":
- var imgs = content.getElementsByTagName("img");
- for (var i=0; i<imgs.length; i++) {
- if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
- var src = tinyMCE.getAttrib(imgs[i], "alt");
-
- if (tinyMCE.getParam('convert_urls'))
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
- imgs[i].setAttribute('alt', src);
- imgs[i].setAttribute('title', src);
- }
- }
- break;
-
- case "insert_to_editor":
- var startPos = 0;
- var embedList = new Array();
-
- // Fix the embed and object elements
- content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
- content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
-
- // Parse all object tags and replace them with images from the embed data
- var index = 0;
- while ((startPos = content.indexOf('<object', startPos)) != -1) {
-
- // Find end of object
- endPos = content.indexOf('</object>', startPos);
- endPos += 9;
-
- objectTag = content.substring(startPos,endPos);
- attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
-
- var cssClass = "";
- if( attribs["data"] == undefined ) {
- startPos++;
- continue;
- }
- else {
- var videoType = getVideoType( attribs["data"] );
- if( videoType == 1 ) {
- cssClass = "ltVideoGoogleVideo";
- }
- else if( videoType == 2 ) {
- cssClass = "ltVideoYouTube";
- }
- else if( videoType == 3 ) {
- cssClass = "ltVideoMetacafe";
- }
- else if( videoType == 4 ) {
- cssClass = "ltVideoIfilm";
- }
- else if( videoType == 5 ) {
- cssClass = "ltVideoGoear";
- }
- else {
- // ignore it, it's not a youtube or googlevideo video
- startPos++;
- continue;
- }
- }
-
-
- // Insert image
- var contentAfter = content.substring(endPos);
- content = content.substring(0, startPos);
- content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
- content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["data"] + '"';
- content += ' alt="' + attribs["data"] + '" class="'+cssClass+'" />' + content.substring(endPos);
- content += contentAfter;
- index++;
-
- startPos++;
- }
-
- break;
-
- case "get_from_editor":
- // Parse all img tags and replace them with object+embed
- var startPos = -1;
-
- while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
- var endPos = content.indexOf('/>', startPos);
- var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
-
- // Is not flash, skip it
- if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" )
- continue;
-
- type = attribs['class'];
-
- endPos += 2;
-
- var embedHTML = '';
- var wmode = tinyMCE.getParam("flash_wmode", "transparent");
- var quality = tinyMCE.getParam("flash_quality", "high");
- var menu = tinyMCE.getParam("flash_menu", "false");
-
- embedHTML = getVideoFlashHTML( attribs["title"], attribs["width"], attribs["height"] , type );
-
- // Insert embed/object chunk
- chunkBefore = content.substring(0, startPos);
- chunkAfter = content.substring(endPos);
- content = chunkBefore + embedHTML + chunkAfter;
- }
- break;
- }
-
- // Pass through to next handler in chain
- return content;
- },
-
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- if (node == null)
- return;
-
- do {
- if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('ltVideo') == 0) {
- tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
- return true;
- }
- } while ((node = node.parentNode));
-
- tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
-
- return true;
- },
-
- // Private plugin internal functions
-
- _parseAttributes : function(attribute_string) {
- var attributeName = "";
- var attributeValue = "";
- var withInName;
- var withInValue;
- var attributes = new Array();
- var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
-
- if (attribute_string == null || attribute_string.length < 2)
- return null;
-
- withInName = withInValue = false;
-
- for (var i=0; i<attribute_string.length; i++) {
- var chr = attribute_string.charAt(i);
-
- if ((chr == '"' || chr == "'") && !withInValue)
- withInValue = true;
- else if ((chr == '"' || chr == "'") && withInValue) {
- withInValue = false;
-
- var pos = attributeName.lastIndexOf(' ');
- if (pos != -1)
- attributeName = attributeName.substring(pos+1);
-
- attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
-
- attributeName = "";
- attributeValue = "";
- } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
- withInName = true;
-
- if (chr == '=' && withInName)
- withInName = false;
-
- if (withInName)
- attributeName += chr;
-
- if (withInValue)
- attributeValue += chr;
- }
-
- return attributes;
- }
-};
-
-function getVideoFlashHTML( url, width, height , type )
-{
- html = "<object type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" data=\""+url+"\" id=\""+type+"\">"+
- "<param name=\"movie\" value=\""+url+"\" />"+
- "<param name=\"wmode\" value=\"transparent\" />"+
- "<param name=\"allowScriptAcess\" value=\"sameDomain\" />"+
- "<param name=\"quality\" value=\"best\" />"+
- "<param name=\"bgcolor\" value=\"#FFFFFF\" />";
-// "<param name=\"scale\" value=\"noScale\" />";
- if (type=='ltVideoGoear') {
- html= html + "<param name=\"FlashVars\" value=\""+url.substring( 43, url.length ) + "\" />";
- } else {
- html = html + "<param name=\"FlashVars\" value=\"playerMode=embedded\" />";
- }
-
- html = html + "</object>";
-
- return( html );
-}
-
-
-function getVideoType( url )
-{
- if( url.substring( 0, 24 ) == "http://video.google.com/" )
- return 1;
- else if( url.substring( 0, 23 ) == "http://www.youtube.com/" )
- return 2;
- else if( url.substring( 0, 24 ) == "http://www.metacafe.com/" )
- return 3;
- else if( url.substring( 0, 21 ) == "http://www.ifilm.com/" )
- return 4;
- else if( url.substring( 0, 21 ) == "http://www.goear.com/" )
- return 5;
- else
- return 0;
-}
-
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('insertvideo', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
+
+// Singleton class
+var TinyMCE_insertvideoPlugin = {
+ getInfo : function() {
+ return {
+ longname : 'insertvideo plugin',
+ author : 'The LifeType Project',
+ authorurl : 'http://www.lifetype.net',
+ infourl : 'http://www.lifetype.net',
+ version : "1.0"
+ };
+ },
+
+ initInstance : function(inst) {
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/insertvideo/css/content.css");
+ },
+
+ getControlHTML : function(cn) {
+ switch (cn) {
+ case "insertvideo":
+ return tinyMCE.getButtonHTML(cn, 'lang_insertvideo_desc', '{$pluginurl}/images/youtube.png', 'mceinsertvideo', true);
+ }
+
+ return "";
+ },
+
+ /**
+ * Executes a specific command, this function handles plugin commands.
+ *
+ * @param {string} editor_id TinyMCE editor instance id that issued the command.
+ * @param {HTMLElement} element Body or root element for the editor instance.
+ * @param {string} command Command name to be executed.
+ * @param {string} user_interface True/false if a user interface should be presented.
+ * @param {mixed} value Custom value argument, can be anything.
+ * @return true/false if the command was executed by this plugin or not.
+ * @type
+ */
+ execCommand : function(editor_id, element, command, user_interface, value) {
+ // Handle commands
+ switch (command) {
+ // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
+ case "mceinsertvideo":
+ // Show UI/Popup
+ if (user_interface) {
+ // Open a popup window and send in some custom data in a window argument
+ var insertvideo = new Array();
+
+ insertvideo['file'] = '../../plugins/insertvideo/videoinput.html'; // Relative to theme
+ insertvideo['width'] = 500;
+ insertvideo['height'] = 260;
+
+ tinyMCE.openWindow(insertvideo, {editor_id : editor_id, resizable : "no", scrollbars : "no", inline : "yes"});
+ }
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+ },
+
+ cleanup : function(type, content) {
+ switch (type) {
+ case "insert_to_editor_dom":
+ // Force relative/absolute
+ if (tinyMCE.getParam('convert_urls')) {
+ var imgs = content.getElementsByTagName("img");
+ for (var i=0; i<imgs.length; i++) {
+ //if (tinyMCE.getAttrib(imgs[i], "class")== "ltVideoYouTube") {
+ if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+ if (tinyMCE.getParam('convert_urls'))
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+ imgs[i].setAttribute('alt', src);
+ imgs[i].setAttribute('title', src);
+ }
+ }
+ }
+ break;
+
+ case "get_from_editor_dom":
+ var imgs = content.getElementsByTagName("img");
+ for (var i=0; i<imgs.length; i++) {
+ if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+ if (tinyMCE.getParam('convert_urls'))
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+ imgs[i].setAttribute('alt', src);
+ imgs[i].setAttribute('title', src);
+ }
+ }
+ break;
+
+ case "insert_to_editor":
+ var startPos = 0;
+ var embedList = new Array();
+
+ // Fix the embed and object elements
+ content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
+ content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
+
+ // Parse all object tags and replace them with images from the embed data
+ var index = 0;
+ while ((startPos = content.indexOf('<object', startPos)) != -1) {
+
+ // Find end of object
+ endPos = content.indexOf('</object>', startPos);
+ endPos += 9;
+
+ objectTag = content.substring(startPos,endPos);
+ attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
+
+ var cssClass = "";
+ if( attribs["data"] == undefined ) {
+ startPos++;
+ continue;
+ }
+ else {
+ var videoType = getVideoType( attribs["data"] );
+ if( videoType == 1 ) {
+ cssClass = "ltVideoGoogleVideo";
+ }
+ else if( videoType == 2 ) {
+ cssClass = "ltVideoYouTube";
+ }
+ else if( videoType == 3 ) {
+ cssClass = "ltVideoMetacafe";
+ }
+ else if( videoType == 4 ) {
+ cssClass = "ltVideoIfilm";
+ }
+ else if( videoType == 5 ) {
+ cssClass = "ltVideoGoear";
+ }
+ else if( videoType == 6 ) {
+ cssClass = "ltVideoGrouper";
+ }
+ else {
+ // ignore it, it's not a youtube or googlevideo video
+ startPos++;
+ continue;
+ }
+ }
+
+
+ // Insert image
+ var contentAfter = content.substring(endPos);
+ content = content.substring(0, startPos);
+ content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
+ content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["data"] + '"';
+ content += ' alt="' + attribs["data"] + '" class="'+cssClass+'" />' + content.substring(endPos);
+ content += contentAfter;
+ index++;
+
+ startPos++;
+ }
+
+ break;
+
+ case "get_from_editor":
+ // Parse all img tags and replace them with object+embed
+ var startPos = -1;
+
+ while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
+ var endPos = content.indexOf('/>', startPos);
+ var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
+
+ // Is not flash, skip it
+ if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" && attribs['class'] != "ltVideoGrouper")
+ continue;
+
+ type = attribs['class'];
+
+ endPos += 2;
+
+ var embedHTML = '';
+ var wmode = tinyMCE.getParam("flash_wmode", "transparent");
+ var quality = tinyMCE.getParam("flash_quality", "high");
+ var menu = tinyMCE.getParam("flash_menu", "false");
+
+ embedHTML = getVideoFlashHTML( attribs["title"], attribs["width"], attribs["height"] , type );
+
+ // Insert embed/object chunk
+ chunkBefore = content.substring(0, startPos);
+ chunkAfter = content.substring(endPos);
+ content = chunkBefore + embedHTML + chunkAfter;
+ }
+ break;
+ }
+
+ // Pass through to next handler in chain
+ return content;
+ },
+
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+ if (node == null)
+ return;
+
+ do {
+ if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('ltVideo') == 0) {
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
+ return true;
+ }
+ } while ((node = node.parentNode));
+
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
+
+ return true;
+ },
+
+ // Private plugin internal functions
+
+ _parseAttributes : function(attribute_string) {
+ var attributeName = "";
+ var attributeValue = "";
+ var withInName;
+ var withInValue;
+ var attributes = new Array();
+ var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
+
+ if (attribute_string == null || attribute_string.length < 2)
+ return null;
+
+ withInName = withInValue = false;
+
+ for (var i=0; i<attribute_string.length; i++) {
+ var chr = attribute_string.charAt(i);
+
+ if ((chr == '"' || chr == "'") && !withInValue)
+ withInValue = true;
+ else if ((chr == '"' || chr == "'") && withInValue) {
+ withInValue = false;
+
+ var pos = attributeName.lastIndexOf(' ');
+ if (pos != -1)
+ attributeName = attributeName.substring(pos+1);
+
+ attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
+
+ attributeName = "";
+ attributeValue = "";
+ } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
+ withInName = true;
+
+ if (chr == '=' && withInName)
+ withInName = false;
+
+ if (withInName)
+ attributeName += chr;
+
+ if (withInValue)
+ attributeValue += chr;
+ }
+
+ return attributes;
+ }
+};
+
+function getVideoFlashHTML( url, width, height , type )
+{
+ html = "<object type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" data=\""+url+"\" id=\""+type+"\">"+
+ "<param name=\"movie\" value=\""+url+"\" />"+
+ "<param name=\"wmode\" value=\"transparent\" />"+
+ "<param name=\"allowScriptAcess\" value=\"sameDomain\" />"+
+ "<param name=\"quality\" value=\"best\" />"+
+ "<param name=\"bgcolor\" value=\"#FFFFFF\" />";
+// "<param name=\"scale\" value=\"noScale\" />";
+ if (type=='ltVideoGoear') {
+ html= html + "<param name=\"FlashVars\" value=\""+url.substring( 43, url.length ) + "\" />";
+ } else {
+ html = html + "<param name=\"FlashVars\" value=\"playerMode=embedded\" />";
+ }
+
+ html = html + "</object>";
+
+ return( html );
+}
+
+
+function getVideoType( url )
+{
+ if( url.substring( 0, 24 ) == "http://video.google.com/" )
+ return 1;
+ else if( url.substring( 0, 23 ) == "http://www.youtube.com/" )
+ return 2;
+ else if( url.substring( 0, 24 ) == "http://www.metacafe.com/" )
+ return 3;
+ else if( url.substring( 0, 21 ) == "http://www.ifilm.com/" )
+ return 4;
+ else if( url.substring( 0, 21 ) == "http://www.goear.com/" )
+ return 5;
+ else if( url.substring( 0, 21 ) == "http://www.grouper.com/" )
+ return 6;
+ else
+ return 0;
+}
+
tinyMCE.addPlugin("insertvideo", TinyMCE_insertvideoPlugin );
\ No newline at end of file
Modified: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/functions.js
===================================================================
--- plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/functions.js 2007-01-27 16:23:36 UTC (rev 4594)
+++ plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/functions.js 2007-01-27 17:34:04 UTC (rev 4595)
@@ -107,6 +107,26 @@
return( url );
}
+function getGrouperVideoLink( url )
+{
+ // check if it's a link to a video page or a link to the video player
+ if( url.substring( 0, 46 ) == "http://grouper.com/video/MediaDetails.aspx?id=" ) {
+ // if it's a link to a video page, generate the right one
+ var regexp = /http:\/\/www.grouper.com\/video\/MediaDetails.aspx.*?id=([\-0-9a-zA-z_]*).*/i;
+ result = regexp.exec( url );
+ if( result ) {
+ videoId = result[1];
+ }
+ else {
+ videoId = url.substring( 46, url.length );
+ }
+
+ url = "http://grouper.com/mtg/mtgPlayer.swf?gvars=vurl~http%3a%2f%2fgrouper.com%2frss%2fflv.ashx%3fid%3d" + videoId + "_rf%7e-9_vfver~8_ap~1_extid~-1";
+ }
+
+ return( url );
+}
+
function insertVideoCode()
{
// get and check the URL
@@ -123,11 +143,13 @@
// dalealplay = document.getElementById("dalealplay");
metacafe = document.getElementById("metacafe");
ifilm = document.getElementById("ifilm");
- goear = document.getElementById("goear");
+ goear = document.getElementById("goear");
+ grouper = document.getElementById("grouper");
+
// bolt = document.getElementById("bolt");
- if( youtube.checked==false && gvideo.checked==false && metacafe.checked==false && ifilm.checked==false && goear.checked==false ) {
- window.alert( "You must select the video provider!" );
+ if( youtube.checked==false && gvideo.checked==false && metacafe.checked==false && ifilm.checked==false && goear.checked==false && grouper.checked==false ) {
+ window.alert( "You must select the right video site." );
return( false );
}
@@ -161,7 +183,12 @@
width=366;
height=75;
}
-
+ if( grouper.checked == true ) {
+ link = getGrouperVideoLink( url );
+ css="ltVideoGrouper";
+ width=496;
+ height=398;
+ }
insertFlash( link, css, width, height );
}
Added: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/images/grouper.png
===================================================================
(Binary files differ)
Property changes on: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/images/grouper.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/videoinput.html
===================================================================
--- plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/videoinput.html 2007-01-27 16:23:36 UTC (rev 4594)
+++ plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/videoinput.html 2007-01-27 17:34:04 UTC (rev 4595)
@@ -1,48 +1,50 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Insert Video</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="functions.js"></script>
- <base target="_self" />
-</head>
-<body style="display: none">
- <form name="video" id="video" method="post" action="#">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current"><span>Insert Video</span></li>
- </ul>
- </div>
- <div class="panel_wrapper">
- <div id="general_panel" class="panel_current">
- <legend>Please provide a link to a video file or a link to a video page.</legend>
- <table border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td nowrap="nowrap">Video URL:</td>
- <td><input type="text" id="url" name="url" value="" style="width:350px" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap">Source:</td>
- <td>
- <input type="radio" id="youtube" style="border:0px" name="type" value="1"><img src="images/youtube.png" alt="YouTube" /> YouTube<br />
- <input type="radio" id="gvideo" style="border:0px"name="type" value="2"><img src="images/gvideo.png" alt="Google Video" /> Google Video<br />
- <input type="radio" id="metacafe" style="border:0px"name="type" value="3"><img src="images/metacafe.png" alt="Metacafe" /> Metacafe<br />
- <input type="radio" id="ifilm" style="border:0px"name="type" value="4"><img src="images/ifilm.png" alt="iFilm" /> iFilm<br />
- <input type="radio" id="goear" style="border:0px"name="type" value="5"><img src="images/goear.png" alt="Goear" /> Goear<br />
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="mceActionPanel">
- <div style="float:left">
- <input type="button" name="insert" value="Insert Code" onClick="insertVideoCode()" id="insert" />
- </div>
- <div style="float:right">
- <input type="button" name="cancel" value="Close" onclick="tinyMCEPopup.close();" id="cancel" />
- </div>
- </div>
- </div>
- </div>
- </form>
-</body>
-</html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Insert Video</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="functions.js"></script>
+ <base target="_self" />
+</head>
+<body style="display: none">
+ <form name="video" id="video" method="post" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span>Insert Video</span></li>
+ </ul>
+ </div>
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel_current">
+ <legend>Please provide a link to a video file.</legend>
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td nowrap="nowrap">Video URL:</td>
+ <td><input type="text" id="url" name="url" value="" style="width:350px" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap">Select Source:</td>
+ <td>
+ <input type="radio" id="youtube" style="border:0px" name="type" value="1"><img src="images/youtube.png" alt="YouTube" /> YouTube<br />
+ <input type="radio" id="gvideo" style="border:0px"name="type" value="2"><img src="images/gvideo.png" alt="Google Video" /> Google Video<br />
+ <input type="radio" id="metacafe" style="border:0px"name="type" value="3"><img src="images/metacafe.png" alt="Metacafe" /> Metacafe<br />
+ <input type="radio" id="ifilm" style="border:0px"name="type" value="4"><img src="images/ifilm.png" alt="iFilm" /> iFilm<br />
+ <input type="radio" id="goear" style="border:0px"name="type" value="5"><img src="images/goear.png" alt="Goear" /> Goear<br />
+ <input type="radio" id="grouper" style="border:0px"name="type" value="6"><img src="images/grouper.png" alt="Grouper" /> Grouper<br />
+
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <div style="float:left">
+ <input type="button" name="insert" value="Insert Code" onClick="insertVideoCode()" id="insert" />
+ </div>
+ <div style="float:right">
+ <input type="button" name="cancel" value="Close" onclick="tinyMCEPopup.close();" id="cancel" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</body>
+</html>
More information about the pLog-svn
mailing list