diff -r 902822492a68 -r fe660c52c48f includes/clientside/tinymce/plugins/flash/jscripts/flash.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/includes/clientside/tinymce/plugins/flash/jscripts/flash.js Wed Jun 13 16:07:17 2007 -0400 @@ -0,0 +1,107 @@ +var url = tinyMCE.getParam("flash_external_list_url"); +if (url != null) { + // Fix relative + if (url.charAt(0) != '/' && url.indexOf('://') == -1) + url = tinyMCE.documentBasePath + "/" + url; + + document.write(''); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById("filebrowsercontainer").innerHTML = getBrowserHTML('filebrowser','file','flash','flash'); + + // Image list outsrc + var html = getFlashListHTML('filebrowser','file','flash','flash'); + if (html == "") + document.getElementById("linklistrow").style.display = 'none'; + else + document.getElementById("linklistcontainer").innerHTML = html; + + var formObj = document.forms[0]; + var swffile = tinyMCE.getWindowArg('swffile'); + var swfwidth = '' + tinyMCE.getWindowArg('swfwidth'); + var swfheight = '' + tinyMCE.getWindowArg('swfheight'); + + if (swfwidth.indexOf('%')!=-1) { + formObj.width2.value = "%"; + formObj.width.value = swfwidth.substring(0,swfwidth.length-1); + } else { + formObj.width2.value = "px"; + formObj.width.value = swfwidth; + } + + if (swfheight.indexOf('%')!=-1) { + formObj.height2.value = "%"; + formObj.height.value = swfheight.substring(0,swfheight.length-1); + } else { + formObj.height2.value = "px"; + formObj.height.value = swfheight; + } + + formObj.file.value = swffile; + formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true); + + selectByValue(formObj, 'linklist', swffile); + + // Handle file browser + if (isVisible('filebrowser')) + document.getElementById('file').style.width = '230px'; + + // Auto select flash in list + if (typeof(tinyMCEFlashList) != "undefined" && tinyMCEFlashList.length > 0) { + for (var i=0; i 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; +} + +function insertFlash() { + var formObj = document.forms[0]; + var html = ''; + var file = formObj.file.value; + var width = formObj.width.value; + var height = formObj.height.value; + if (formObj.width2.value=='%') { + width = width + '%'; + } + if (formObj.height2.value=='%') { + height = height + '%'; + } + + if (width == "") + width = 100; + + if (height == "") + height = 100; + + html += '' + + '' + file + ''; + + tinyMCEPopup.execCommand("mceInsertContent", true, html); + tinyMCE.selectedInstance.repaint(); + + tinyMCEPopup.close(); +}