summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/media
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2008-04-15 21:22:00 +0000
committersvncommit <devs@roundcube.net>2008-04-15 21:22:00 +0000
commitd9344fc349e8c5765898c90bf5061e56cd21c8a0 (patch)
treea5916f5f3f88df8d6336b43dde8cdbb49cb47bdc /program/js/tiny_mce/plugins/media
parentd7a411f099596cbc8e749e1f0802ac2bb2c6289e (diff)
HTML editing fixes, upgrade to TinyMCE v3.0.6
Diffstat (limited to 'program/js/tiny_mce/plugins/media')
-rw-r--r--program/js/tiny_mce/plugins/media/css/content.css32
-rw-r--r--program/js/tiny_mce/plugins/media/css/media.css136
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin_src.js791
-rw-r--r--program/js/tiny_mce/plugins/media/images/media.gifbin280 -> 0 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/flash.gif (renamed from program/js/tiny_mce/plugins/media/images/flash.gif)bin241 -> 241 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/flv_player.swfbin0 -> 11668 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/quicktime.gif (renamed from program/js/tiny_mce/plugins/media/images/quicktime.gif)bin303 -> 303 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/realmedia.gif (renamed from program/js/tiny_mce/plugins/media/images/realmedia.gif)bin439 -> 439 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/shockwave.gif (renamed from program/js/tiny_mce/plugins/media/images/shockwave.gif)bin387 -> 387 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/trans.gifbin0 -> 43 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/img/windowsmedia.gif (renamed from program/js/tiny_mce/plugins/media/images/windowsmedia.gif)bin415 -> 415 bytes
-rw-r--r--program/js/tiny_mce/plugins/media/js/embed.js (renamed from program/js/tiny_mce/plugins/media/jscripts/embed.js)146
-rw-r--r--program/js/tiny_mce/plugins/media/js/media.js (renamed from program/js/tiny_mce/plugins/media/jscripts/media.js)1215
-rw-r--r--program/js/tiny_mce/plugins/media/langs/en.js94
-rw-r--r--program/js/tiny_mce/plugins/media/langs/en_dlg.js103
-rw-r--r--program/js/tiny_mce/plugins/media/media.htm359
17 files changed, 1461 insertions, 1417 deletions
diff --git a/program/js/tiny_mce/plugins/media/css/content.css b/program/js/tiny_mce/plugins/media/css/content.css
index 7873235e7..1bf6a7586 100644
--- a/program/js/tiny_mce/plugins/media/css/content.css
+++ b/program/js/tiny_mce/plugins/media/css/content.css
@@ -1,26 +1,6 @@
-.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {
- border: 1px dotted #cc0000;
- background-position: center;
- background-repeat: no-repeat;
- background-color: #ffffcc;
-}
-
-.mceItemShockWave {
- background-image: url('../images/shockwave.gif');
-}
-
-.mceItemFlash {
- background-image: url('../images/flash.gif');
-}
-
-.mceItemQuickTime {
- background-image: url('../images/quicktime.gif');
-}
-
-.mceItemWindowsMedia {
- background-image: url('../images/windowsmedia.gif');
-}
-
-.mceItemRealMedia {
- background-image: url('../images/realmedia.gif');
-}
+.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
+.mceItemShockWave {background-image: url(../img/shockwave.gif);}
+.mceItemFlash {background-image:url(../img/flash.gif);}
+.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
+.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
+.mceItemRealMedia {background-image:url(../img/realmedia.gif);}
diff --git a/program/js/tiny_mce/plugins/media/css/media.css b/program/js/tiny_mce/plugins/media/css/media.css
index 62d666a5f..89c6bd5a0 100644
--- a/program/js/tiny_mce/plugins/media/css/media.css
+++ b/program/js/tiny_mce/plugins/media/css/media.css
@@ -1,68 +1,68 @@
-#id, #name, #hspace, #vspace, #class_name, #align {
- width: 100px;
-}
-
-#hspace, #vspace {
- width: 50px;
-}
-
-#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
- width: 100px;
-}
-
-#flash_base, #flash_flashvars {
- width: 240px;
-}
-
-#width, #height {
- width: 40px;
-}
-
-#src, #media_type {
- width: 250px;
-}
-
-#class {
- width: 120px;
-}
-
-#prev {
- margin: 0;
- border: 1px solid black;
- width: 99%;
- height: 230px;
- overflow: auto;
-}
-
-.panel_wrapper div.current {
- height: 390px;
- overflow: auto;
-}
-
-#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
- display: none;
-}
-
-.mceAddSelectValue {
- background-color: #DDDDDD;
-}
-
-#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
- width: 70px;
-}
-
-#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
- width: 70px;
-}
-
-#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
- width: 70px;
-}
-
-#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
- width: 90px;
-}
-
-#qt_qtsrc {
- width: 200px;
-}
+#id, #name, #hspace, #vspace, #class_name, #align {
+ width: 100px;
+}
+
+#hspace, #vspace {
+ width: 50px;
+}
+
+#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode {
+ width: 100px;
+}
+
+#flash_base, #flash_flashvars {
+ width: 240px;
+}
+
+#width, #height {
+ width: 40px;
+}
+
+#src, #media_type {
+ width: 250px;
+}
+
+#class {
+ width: 120px;
+}
+
+#prev {
+ margin: 0;
+ border: 1px solid black;
+ width: 99%;
+ height: 230px;
+ overflow: auto;
+}
+
+.panel_wrapper div.current {
+ height: 390px;
+ overflow: auto;
+}
+
+#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options {
+ display: none;
+}
+
+.mceAddSelectValue {
+ background-color: #DDDDDD;
+}
+
+#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume {
+ width: 70px;
+}
+
+#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume {
+ width: 70px;
+}
+
+#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks {
+ width: 70px;
+}
+
+#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle {
+ width: 90px;
+}
+
+#qt_qtsrc {
+ width: 200px;
+}
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin.js b/program/js/tiny_mce/plugins/media/editor_plugin.js
index f0cbaee78..4591be7a4 100644
--- a/program/js/tiny_mce/plugins/media/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/media/editor_plugin.js
@@ -1 +1 @@
-tinyMCE.importPluginLanguagePack('media');var TinyMCE_MediaPlugin={getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(inst.hasPlugin('flash')&&!tinyMCE.flashWarn){alert('Flash plugin is deprecated and should not be used together with the media plugin.');tinyMCE.flashWarn=true}if(!tinyMCE.settings['media_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/media/css/content.css")},getControlHTML:function(cn){switch(cn){case"media":return tinyMCE.getButtonHTML(cn,'lang_media_desc','{$pluginurl}/images/media.gif','mceMedia')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceMedia":tinyMCE.openWindow({file:'../../plugins/media/media.htm',width:430+tinyMCE.getLang('lang_media_delta_width',0),height:470+tinyMCE.getLang('lang_media_delta_height',0)},{editor_id:editor_id,inline:"yes"});return true}return false},cleanup:function(type,content,inst){var nl,img,i,ne,d,s,ci;switch(type){case"insert_to_editor":img=tinyMCE.getParam("theme_href")+'/images/spacer.gif';content=content.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,'<img class="mceItem$1" title="$2" src="'+img+'" />');content=content.replace(/<object([^>]*)>/gi,'<div class="mceItemObject" $1>');content=content.replace(/<embed([^>]*)>/gi,'<div class="mceItemObjectEmbed" $1>');content=content.replace(/<\/(object|embed)([^>]*)>/gi,'</div>');content=content.replace(/<param([^>]*)>/gi,'<div $1 class="mceItemParam"></div>');content=content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>','gi'),'class="mceItemParam"></div>');break;case"insert_to_editor_dom":d=inst.getDoc();nl=content.getElementsByTagName("img");for(i=0;i<nl.length;i++){if(/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(nl[i].className)){nl[i].width=nl[i].title.replace(/.*width:[^0-9]?([0-9]+)%?.*/g,'$1');nl[i].height=nl[i].title.replace(/.*height:[^0-9]?([0-9]+)%?.*/g,'$1');}}nl=tinyMCE.selectElements(content,'DIV',function(n){return tinyMCE.hasCSSClass(n,'mceItemObject')});for(i=0;i<nl.length;i++){ci=tinyMCE.getAttrib(nl[i],"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemFlash',d,nl[i]),nl[i]);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemShockWave',d,nl[i]),nl[i]);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemWindowsMedia',d,nl[i]),nl[i]);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemQuickTime',d,nl[i]),nl[i]);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemRealMedia',d,nl[i]),nl[i]);break}}nl=tinyMCE.selectNodes(content,function(n){return n.className=='mceItemObjectEmbed'});for(i=0;i<nl.length;i++){switch(tinyMCE.getAttrib(nl[i],'type')){case'application/x-shockwave-flash':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemFlash');break;case'application/x-director':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemShockWave');break;case'application/x-mplayer2':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemWindowsMedia');break;case'video/quicktime':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemQuickTime');break;case'audio/x-pn-realaudio-plugin':TinyMCE_MediaPlugin._createImgFromEmbed(nl[i],d,'mceItemRealMedia');break}}break;case"get_from_editor":var startPos=-1,endPos,attribs,chunkBefore,chunkAfter,embedHTML,at,pl,cb,mt,ex;while((startPos=content.indexOf('<img',startPos+1))!=-1){endPos=content.indexOf('/>',startPos);attribs=TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos+4,endPos));if(!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))continue;endPos+=2;at=attribs['title'];if(at){at=at.replace(/&(#39|apos);/g,"'");at=at.replace(/&#quot;/g,'"');try{pl=eval('x={'+at+'};')}catch(ex){pl={}}}if(!tinyMCE.getParam('media_use_script',false)){switch(attribs['class']){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166B1BCA-3F9C-11CF-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=tinyMCE.getParam('media_wmp6_compatible')?'05589FA1-C356-11CE-BF01-00AA0055595A':'6BF52A52-394A-11D3-B153-00C04F79FAA6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break}pl.src=tinyMCE.convertURL(pl.src,null,true);embedHTML=TinyMCE_MediaPlugin._getEmbed(ci,cb,mt,pl,attribs)}else{switch(attribs['class']){case'mceItemFlash':s='writeFlash';break;case'mceItemShockWave':s='writeShockWave';break;case'mceItemWindowsMedia':s='writeWindowsMedia';break;case'mceItemQuickTime':s='writeQuickTime';break;case'mceItemRealMedia':s='writeRealMedia';break}if(attribs.width)at=at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g,"width:'"+attribs.width+"'");if(attribs.height)at=at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g,"height:'"+attribs.height+"'");pl.src=tinyMCE.convertURL(pl.src,null,true);at=at.replace(new RegExp("src:'[^']*'","g"),"src:'"+pl.src+"'");embedHTML='<script type="text/javascript">'+s+'({'+at+'});</script>'}chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node,'class'))){tinyMCE.switchClass(editor_id+'_media','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_media','mceButtonNormal');return true},_createImgFromEmbed:function(n,d,cl){var ne,at,i,ti='',an;ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;at=n.attributes;for(i=0;i<at.length;i++){if(at[i].specified&&at[i].nodeValue){an=at[i].nodeName.toLowerCase();if(an=='src')continue;if(an=='mce_src')an='src';if(an.indexOf('mce_')==-1&&!new RegExp('^(class|type)$').test(an))ti+=an.toLowerCase()+':\''+at[i].nodeValue+"',"}}ti=ti.length>0?ti.substring(0,ti.length-1):ti;ne.title=ti;n.parentNode.replaceChild(ne,n)},_createImg:function(cl,d,n){var i,nl,ti="",an,av,al=new Array();ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;al.id=tinyMCE.getAttrib(n,'id');al.name=tinyMCE.getAttrib(n,'name');al.width=tinyMCE.getAttrib(n,'width');al.height=tinyMCE.getAttrib(n,'height');al.bgcolor=tinyMCE.getAttrib(n,'bgcolor');al.align=tinyMCE.getAttrib(n,'align');al.class_name=tinyMCE.getAttrib(n,'mce_class');nl=n.getElementsByTagName('div');for(i=0;i<nl.length;i++){av=tinyMCE.getAttrib(nl[i],'value');av=av.replace(new RegExp('\\\\','g'),'\\\\');av=av.replace(new RegExp('"','g'),'\\"');av=av.replace(new RegExp("'",'g'),"\\'");an=tinyMCE.getAttrib(nl[i],'name');al[an]=av}if(al.movie){al.src=al.movie;al.movie=null}for(an in al){if(al[an]!=null&&typeof(al[an])!="function"&&al[an]!='')ti+=an.toLowerCase()+':\''+al[an]+"',"}ti=ti.length>0?ti.substring(0,ti.length-1):ti;ne.title=ti;return ne},_getEmbed:function(cls,cb,mt,p,at){var h='',n;p.width=at.width?at.width:p.width;p.height=at.height?at.height:p.height;h+='<object classid="clsid:'+cls+'" codebase="'+cb+'"';h+=typeof(p.id)!="undefined"?' id="'+p.id+'"':'';h+=typeof(p.name)!="undefined"?' name="'+p.name+'"':'';h+=typeof(p.width)!="undefined"?' width="'+p.width+'"':'';h+=typeof(p.height)!="undefined"?' height="'+p.height+'"':'';h+=typeof(p.align)!="undefined"?' align="'+p.align+'"':'';h+='>';for(n in p){if(typeof(p[n])!="undefined"&&typeof(p[n])!="function"){h+='<param name="'+n+'" value="'+p[n]+'" />';if(n=='src'&&p[n].indexOf('://')!=-1&&mt=='application/x-mplayer2')h+='<param name="url" value="'+p[n]+'" />'}}h+='<embed type="'+mt+'"';for(n in p){if(typeof(p[n])=="function")continue;if(!(n=='url'&&mt=='application/x-mplayer2'))h+=' '+n+'="'+p[n]+'"'}h+='></embed></object>';return h},_parseAttributes:function(attribute_string){var attributeName="",endChr='"';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;endChr=chr}else if(chr==endChr&&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}};tinyMCE.addPlugin("media",TinyMCE_MediaPlugin); \ No newline at end of file
+(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object|embed)([^>]*)>/gi,'</span>');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;});ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title);p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});if(p.src)p.src=ed.convertURL(p.src,'src',n);each(p,function(v,k){if(!/^(width|height|codebase|classid)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';dom.add(ob,'span',{mce_name:'param',name:k,'_value':v});}});dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='';im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(['id','name','width','height','bgcolor','align','flashvars','src','wmode'],function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin_src.js b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
index ee7e13427..d9df5b534 100644
--- a/program/js/tiny_mce/plugins/media/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
@@ -1,432 +1,359 @@
-/**
- * $Id: editor_plugin_src.js 296 2007-08-21 10:36:35Z spocke $
- *
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('media');
-
-var TinyMCE_MediaPlugin = {
- getInfo : function() {
- return {
- longname : 'Media',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
- version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
- };
- },
-
- initInstance : function(inst) {
- // Warn if user has flash plugin and media plugin at the same time
- if (inst.hasPlugin('flash') && !tinyMCE.flashWarn) {
- alert('Flash plugin is deprecated and should not be used together with the media plugin.');
- tinyMCE.flashWarn = true;
- }
-
- if (!tinyMCE.settings['media_skip_plugin_css'])
- tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/media/css/content.css");
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "media":
- return tinyMCE.getButtonHTML(cn, 'lang_media_desc', '{$pluginurl}/images/media.gif', 'mceMedia');
- }
-
- return "";
- },
-
- execCommand : function(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- case "mceMedia":
- tinyMCE.openWindow({
- file : '../../plugins/media/media.htm',
- width : 430 + tinyMCE.getLang('lang_media_delta_width', 0),
- height : 470 + tinyMCE.getLang('lang_media_delta_height', 0)
- }, {
- editor_id : editor_id,
- inline : "yes"
- });
-
- return true;
- }
-
- // Pass to next handler in chain
- return false;
- },
-
- cleanup : function(type, content, inst) {
- var nl, img, i, ne, d, s, ci;
-
- switch (type) {
- case "insert_to_editor":
- img = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
- content = content.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, '<img class="mceItem$1" title="$2" src="' + img + '" />');
- content = content.replace(/<object([^>]*)>/gi, '<div class="mceItemObject" $1>');
- content = content.replace(/<embed([^>]*)>/gi, '<div class="mceItemObjectEmbed" $1>');
- content = content.replace(/<\/(object|embed)([^>]*)>/gi, '</div>');
- content = content.replace(/<param([^>]*)>/gi, '<div $1 class="mceItemParam"></div>');
- content = content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>', 'gi'), 'class="mceItemParam"></div>');
- break;
-
- case "insert_to_editor_dom":
- d = inst.getDoc();
- nl = content.getElementsByTagName("img");
- for (i=0; i<nl.length; i++) {
- if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(nl[i].className)) {
- nl[i].width = nl[i].title.replace(/.*width:[^0-9]?([0-9]+)%?.*/g, '$1');
- nl[i].height = nl[i].title.replace(/.*height:[^0-9]?([0-9]+)%?.*/g, '$1');
- //nl[i].align = nl[i].title.replace(/.*align:([a-z]+).*/gi, '$1');
- }
- }
-
- nl = tinyMCE.selectElements(content, 'DIV', function (n) {return tinyMCE.hasCSSClass(n, 'mceItemObject');});
- for (i=0; i<nl.length; i++) {
- ci = tinyMCE.getAttrib(nl[i], "classid").toLowerCase().replace(/\s+/g, '');
-
- switch (ci) {
- case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
- nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemFlash', d, nl[i]), nl[i]);
- break;
-
- case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
- nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemShockWave', d, nl[i]), nl[i]);
- break;
-
- case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
- case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
- case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
- nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemWindowsMedia', d, nl[i]), nl[i]);
- break;
-
- case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
- nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemQuickTime', d, nl[i]), nl[i]);
- break;
-
- case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
- nl[i].parentNode.replaceChild(TinyMCE_MediaPlugin._createImg('mceItemRealMedia', d, nl[i]), nl[i]);
- break;
- }
- }
-
- // Handle embed (if any)
- nl = tinyMCE.selectNodes(content, function (n) {return n.className == 'mceItemObjectEmbed';});
- for (i=0; i<nl.length; i++) {
- switch (tinyMCE.getAttrib(nl[i], 'type')) {
- case 'application/x-shockwave-flash':
- TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemFlash');
- break;
-
- case 'application/x-director':
- TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemShockWave');
- break;
-
- case 'application/x-mplayer2':
- TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemWindowsMedia');
- break;
-
- case 'video/quicktime':
- TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemQuickTime');
- break;
-
- case 'audio/x-pn-realaudio-plugin':
- TinyMCE_MediaPlugin._createImgFromEmbed(nl[i], d, 'mceItemRealMedia');
- break;
- }
- }
- break;
-
- case "get_from_editor":
- var startPos = -1, endPos, attribs, chunkBefore, chunkAfter, embedHTML, at, pl, cb, mt, ex;
-
- while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
- endPos = content.indexOf('/>', startPos);
- attribs = TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos + 4, endPos));
-
- // Is not flash, skip it
- if (!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))
- continue;
-
- endPos += 2;
-
- // Parse attributes
- at = attribs['title'];
- if (at) {
- at = at.replace(/&(#39|apos);/g, "'");
- at = at.replace(/&#quot;/g, '"');
-
- try {
- pl = eval('x={' + at + '};');
- } catch (ex) {
- pl = {};
- }
- }
-
- // Use object/embed
- if (!tinyMCE.getParam('media_use_script', false)) {
- switch (attribs['class']) {
- case 'mceItemFlash':
- ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
- cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
- mt = 'application/x-shockwave-flash';
- break;
-
- case 'mceItemShockWave':
- ci = '166B1BCA-3F9C-11CF-8075-444553540000';
- cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
- mt = 'application/x-director';
- break;
-
- case 'mceItemWindowsMedia':
- ci = tinyMCE.getParam('media_wmp6_compatible') ? '05589FA1-C356-11CE-BF01-00AA0055595A' : '6BF52A52-394A-11D3-B153-00C04F79FAA6';
- cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
- mt = 'application/x-mplayer2';
- break;
-
- case 'mceItemQuickTime':
- ci = '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
- cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
- mt = 'video/quicktime';
- break;
-
- case 'mceItemRealMedia':
- ci = 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
- cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
- mt = 'audio/x-pn-realaudio-plugin';
- break;
- }
-
- // Convert the URL
- pl.src = tinyMCE.convertURL(pl.src, null, true);
-
- embedHTML = TinyMCE_MediaPlugin._getEmbed(ci, cb, mt, pl, attribs);
- } else {
- // Use script version
- switch (attribs['class']) {
- case 'mceItemFlash':
- s = 'writeFlash';
- break;
-
- case 'mceItemShockWave':
- s = 'writeShockWave';
- break;
-
- case 'mceItemWindowsMedia':
- s = 'writeWindowsMedia';
- break;
-
- case 'mceItemQuickTime':
- s = 'writeQuickTime';
- break;
-
- case 'mceItemRealMedia':
- s = 'writeRealMedia';
- break;
- }
-
- if (attribs.width)
- at = at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g, "width:'" + attribs.width + "'");
-
- if (attribs.height)
- at = at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g, "height:'" + attribs.height + "'");
-
- // Force absolute URL
- pl.src = tinyMCE.convertURL(pl.src, null, true);
- at = at.replace(new RegExp("src:'[^']*'", "g"), "src:'" + pl.src + "'");
-
- embedHTML = '<script type="text/javascript">' + s + '({' + at + '});</script>';
- }
-
- // Insert embed/object chunk
- chunkBefore = content.substring(0, startPos);
- chunkAfter = content.substring(endPos);
- content = chunkBefore + embedHTML + chunkAfter;
- }
- break;
- }
-
- return content;
- },
-
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- if (node == null)
- return;
-
- do {
- if (node.nodeName == "IMG" && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node, 'class'))) {
- tinyMCE.switchClass(editor_id + '_media', 'mceButtonSelected');
- return true;
- }
- } while ((node = node.parentNode));
-
- tinyMCE.switchClass(editor_id + '_media', 'mceButtonNormal');
-
- return true;
- },
-
- _createImgFromEmbed : function(n, d, cl) {
- var ne, at, i, ti = '', an;
-
- ne = d.createElement('img');
- ne.src = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
- ne.width = tinyMCE.getAttrib(n, 'width');
- ne.height = tinyMCE.getAttrib(n, 'height');
- ne.className = cl;
-
- at = n.attributes;
- for (i=0; i<at.length; i++) {
- if (at[i].specified && at[i].nodeValue) {
- an = at[i].nodeName.toLowerCase();
-
- if (an == 'src')
- continue;
-
- if (an == 'mce_src')
- an = 'src';
-
- if (an.indexOf('mce_') == -1 && !new RegExp('^(class|type)$').test(an))
- ti += an.toLowerCase() + ':\'' + at[i].nodeValue + "',";
- }
- }
-
- ti = ti.length > 0 ? ti.substring(0, ti.length - 1) : ti;
- ne.title = ti;
-
- n.parentNode.replaceChild(ne, n);
- },
-
- _createImg : function(cl, d, n) {
- var i, nl, ti = "", an, av, al = new Array();
-
- ne = d.createElement('img');
- ne.src = tinyMCE.getParam("theme_href") + '/images/spacer.gif';
- ne.width = tinyMCE.getAttrib(n, 'width');
- ne.height = tinyMCE.getAttrib(n, 'height');
- ne.className = cl;
-
- al.id = tinyMCE.getAttrib(n, 'id');
- al.name = tinyMCE.getAttrib(n, 'name');
- al.width = tinyMCE.getAttrib(n, 'width');
- al.height = tinyMCE.getAttrib(n, 'height');
- al.bgcolor = tinyMCE.getAttrib(n, 'bgcolor');
- al.align = tinyMCE.getAttrib(n, 'align');
- al.class_name = tinyMCE.getAttrib(n, 'mce_class');
-
- nl = n.getElementsByTagName('div');
- for (i=0; i<nl.length; i++) {
- av = tinyMCE.getAttrib(nl[i], 'value');
- av = av.replace(new RegExp('\\\\', 'g'), '\\\\');
- av = av.replace(new RegExp('"', 'g'), '\\"');
- av = av.replace(new RegExp("'", 'g'), "\\'");
- an = tinyMCE.getAttrib(nl[i], 'name');
- al[an] = av;
- }
-
- if (al.movie) {
- al.src = al.movie;
- al.movie = null;
- }
-
- for (an in al) {
- if (al[an] != null && typeof(al[an]) != "function" && al[an] != '')
- ti += an.toLowerCase() + ':\'' + al[an] + "',";
- }
-
- ti = ti.length > 0 ? ti.substring(0, ti.length - 1) : ti;
- ne.title = ti;
-
- return ne;
- },
-
- _getEmbed : function(cls, cb, mt, p, at) {
- var h = '', n;
-
- p.width = at.width ? at.width : p.width;
- p.height = at.height ? at.height : p.height;
-
- h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
- h += typeof(p.id) != "undefined" ? ' id="' + p.id + '"' : '';
- h += typeof(p.name) != "undefined" ? ' name="' + p.name + '"' : '';
- h += typeof(p.width) != "undefined" ? ' width="' + p.width + '"' : '';
- h += typeof(p.height) != "undefined" ? ' height="' + p.height + '"' : '';
- h += typeof(p.align) != "undefined" ? ' align="' + p.align + '"' : '';
- h += '>';
-
- for (n in p) {
- if (typeof(p[n]) != "undefined" && typeof(p[n]) != "function") {
- h += '<param name="' + n + '" value="' + p[n] + '" />';
-
- // Add extra url parameter if it's an absolute URL on WMP
- if (n == 'src' && p[n].indexOf('://') != -1 && mt == 'application/x-mplayer2')
- h += '<param name="url" value="' + p[n] + '" />';
- }
- }
-
- h += '<embed type="' + mt + '"';
-
- for (n in p) {
- if (typeof(p[n]) == "function")
- continue;
-
- // Skip url parameter for embed tag on WMP
- if (!(n == 'url' && mt == 'application/x-mplayer2'))
- h += ' ' + n + '="' + p[n] + '"';
- }
-
- h += '></embed></object>';
-
- return h;
- },
-
- _parseAttributes : function(attribute_string) {
- var attributeName = "", endChr = '"';
- 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;
- endChr = chr;
- } else if (chr == endChr && 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;
- }
-};
-
-tinyMCE.addPlugin("media", TinyMCE_MediaPlugin);
+/**
+ * $Id: editor_plugin_src.js 763 2008-04-03 13:25:45Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
+ */
+
+(function() {
+ var each = tinymce.each;
+
+ tinymce.create('tinymce.plugins.MediaPlugin', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+ t.url = url;
+
+ function isMediaElm(n) {
+ return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
+ };
+
+ // Register commands
+ ed.addCommand('mceMedia', function() {
+ ed.windowManager.open({
+ file : url + '/media.htm',
+ width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
+ height : 470 + parseInt(ed.getLang('media.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n));
+ });
+
+ ed.onInit.add(function() {
+ var lo = {
+ mceItemFlash : 'flash',
+ mceItemShockWave : 'shockwave',
+ mceItemWindowsMedia : 'windowsmedia',
+ mceItemQuickTime : 'quicktime',
+ mceItemRealMedia : 'realmedia'
+ };
+
+ if (ed.settings.content_css !== false)
+ ed.dom.loadCSS(url + "/css/content.css");
+
+ if (ed.theme.onResolveName) {
+ ed.theme.onResolveName.add(function(th, o) {
+ if (o.name == 'img') {
+ each(lo, function(v, k) {
+ if (ed.dom.hasClass(o.node, k)) {
+ o.name = v;
+ o.title = ed.dom.getAttrib(o.node, 'title');
+ return false;
+ }
+ });
+ }
+ });
+ }
+
+ if (ed && ed.plugins.contextmenu) {
+ ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
+ if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) {
+ m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
+ }
+ });
+ }
+ });
+
+ ed.onBeforeSetContent.add(function(ed, o) {
+ var h = o.content;
+
+ h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) {
+ var o = t._parse(c);
+
+ return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />'
+ });
+
+ h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>');
+ h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>');
+ h = h.replace(/<\/(object|embed)([^>]*)>/gi, '</span>');
+ h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_value=') + ' class="mceItemParam"></span>'});
+ h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam"></span>');
+
+ o.content = h;
+ });
+
+ ed.onSetContent.add(function() {
+ t._spansToImgs(ed.getBody());
+ });
+
+ ed.onPreProcess.add(function(ed, o) {
+ var dom = ed.dom;
+
+ if (o.set) {
+ t._spansToImgs(o.node);
+
+ each(dom.select('IMG', o.node), function(n) {
+ var p;
+
+ if (isMediaElm(n)) {
+ p = t._parse(n.title);
+ dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100));
+ dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100));
+ }
+ });
+ }
+
+ if (o.get) {
+ each(dom.select('IMG', o.node), function(n) {
+ var ci, cb, mt;
+
+ if (ed.getParam('media_use_script')) {
+ if (isMediaElm(n))
+ n.className = n.className.replace(/mceItem/g, 'mceTemp');
+
+ return;
+ }
+
+ switch (n.className) {
+ case 'mceItemFlash':
+ ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
+ mt = 'application/x-shockwave-flash';
+ break;
+
+ case 'mceItemShockWave':
+ ci = '166b1bca-3f9c-11cf-8075-444553540000';
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
+ mt = 'application/x-director';
+ break;
+
+ case 'mceItemWindowsMedia':
+ ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6';
+ cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
+ mt = 'application/x-mplayer2';
+ break;
+
+ case 'mceItemQuickTime':
+ ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b';
+ cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
+ mt = 'video/quicktime';
+ break;
+
+ case 'mceItemRealMedia':
+ ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa';
+ cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
+ mt = 'audio/x-pn-realaudio-plugin';
+ break;
+ }
+
+ if (ci) {
+ dom.replace(t._buildObj({
+ classid : ci,
+ codebase : cb,
+ type : mt
+ }, n), n);
+ }
+ });
+ }
+ });
+
+ ed.onPostProcess.add(function(ed, o) {
+ o.content = o.content.replace(/_value=/g, 'value=');
+ });
+
+ if (ed.getParam('media_use_script')) {
+ function getAttr(s, n) {
+ n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
+
+ return n ? ed.dom.decode(n[1]) : '';
+ };
+
+ ed.onPostProcess.add(function(ed, o) {
+ o.content = o.content.replace(/<img[^>]+>/g, function(im) {
+ var cl = getAttr(im, 'class');
+
+ if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) {
+ at = t._parse(getAttr(im, 'title'));
+ at.width = getAttr(im, 'width');
+ at.height = getAttr(im, 'height');
+ im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>';
+ }
+
+ return im;
+ });
+ });
+ }
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Media',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _buildObj : function(o, n) {
+ var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title);
+
+ p.width = o.width = dom.getAttrib(n, 'width') || 100;
+ p.height = o.height = dom.getAttrib(n, 'height') || 100;
+
+ ob = dom.create('span', {
+ mce_name : 'object',
+ classid : "clsid:" + o.classid,
+ codebase : o.codebase,
+ width : o.width,
+ height : o.height
+ });
+
+ if (p.src)
+ p.src = ed.convertURL(p.src, 'src', n);
+
+ each (p, function(v, k) {
+ if (!/^(width|height|codebase|classid)$/.test(k)) {
+ // Use url instead of src in IE for Windows media
+ if (o.type == 'application/x-mplayer2' && k == 'src')
+ k = 'url';
+
+ dom.add(ob, 'span', {mce_name : 'param', name : k, '_value' : v});
+ }
+ });
+
+ dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p));
+
+ return ob;
+ },
+
+ _spansToImgs : function(p) {
+ var t = this, dom = t.editor.dom, im, ci;
+
+ each(dom.select('span', p), function(n) {
+ // Convert object into image
+ if (dom.getAttrib(n, 'class') == 'mceItemObject') {
+ ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, '');
+
+ switch (ci) {
+ case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
+ dom.replace(t._createImg('mceItemFlash', n), n);
+ break;
+
+ case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
+ dom.replace(t._createImg('mceItemShockWave', n), n);
+ break;
+
+ case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
+ case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
+ case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
+ dom.replace(t._createImg('mceItemWindowsMedia', n), n);
+ break;
+
+ case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
+ dom.replace(t._createImg('mceItemQuickTime', n), n);
+ break;
+
+ case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
+ dom.replace(t._createImg('mceItemRealMedia', n), n);
+ break;
+
+ default:
+ dom.replace(t._createImg('mceItemFlash', n), n);
+ }
+
+ return;
+ }
+
+ // Convert embed into image
+ if (dom.getAttrib(n, 'class') == 'mceItemEmbed') {
+ switch (dom.getAttrib(n, 'type')) {
+ case 'application/x-shockwave-flash':
+ dom.replace(t._createImg('mceItemFlash', n), n);
+ break;
+
+ case 'application/x-director':
+ dom.replace(t._createImg('mceItemShockWave', n), n);
+ break;
+
+ case 'application/x-mplayer2':
+ dom.replace(t._createImg('mceItemWindowsMedia', n), n);
+ break;
+
+ case 'video/quicktime':
+ dom.replace(t._createImg('mceItemQuickTime', n), n);
+ break;
+
+ case 'audio/x-pn-realaudio-plugin':
+ dom.replace(t._createImg('mceItemRealMedia', n), n);
+ break;
+
+ default:
+ dom.replace(t._createImg('mceItemFlash', n), n);
+ }
+ }
+ });
+ },
+
+ _createImg : function(cl, n) {
+ var im, dom = this.editor.dom, pa = {}, ti = '';
+
+ // Create image
+ im = dom.create('img', {
+ src : this.url + '/img/trans.gif',
+ width : dom.getAttrib(n, 'width') || 100,
+ height : dom.getAttrib(n, 'height') || 100,
+ 'class' : cl
+ });
+
+ // Setup base parameters
+ each(['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode'], function(na) {
+ var v = dom.getAttrib(n, na);
+
+ if (v)
+ pa[na] = v;
+ });
+
+ // Add optional parameters
+ each(dom.select('span', n), function(n) {
+ if (dom.hasClass(n, 'mceItemParam'))
+ pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_value');
+ });
+
+ // Use src not movie
+ if (pa.movie) {
+ pa.src = pa.movie;
+ delete pa.movie;
+ }
+
+ delete pa.width;
+ delete pa.height;
+
+ im.title = this._serialize(pa);
+
+ return im;
+ },
+
+ _parse : function(s) {
+ return tinymce.util.JSON.parse('{' + s + '}');
+ },
+
+ _serialize : function(o) {
+ return tinymce.util.JSON.serialize(o).replace(/[{}]/g, '');
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
+})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/images/media.gif b/program/js/tiny_mce/plugins/media/images/media.gif
deleted file mode 100644
index 856df5237..000000000
--- a/program/js/tiny_mce/plugins/media/images/media.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/images/flash.gif b/program/js/tiny_mce/plugins/media/img/flash.gif
index cb192e6ce..cb192e6ce 100644
--- a/program/js/tiny_mce/plugins/media/images/flash.gif
+++ b/program/js/tiny_mce/plugins/media/img/flash.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/img/flv_player.swf b/program/js/tiny_mce/plugins/media/img/flv_player.swf
new file mode 100644
index 000000000..042c2ab96
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/img/flv_player.swf
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/images/quicktime.gif b/program/js/tiny_mce/plugins/media/img/quicktime.gif
index 3b0499145..3b0499145 100644
--- a/program/js/tiny_mce/plugins/media/images/quicktime.gif
+++ b/program/js/tiny_mce/plugins/media/img/quicktime.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/images/realmedia.gif b/program/js/tiny_mce/plugins/media/img/realmedia.gif
index fdfe0b9ac..fdfe0b9ac 100644
--- a/program/js/tiny_mce/plugins/media/images/realmedia.gif
+++ b/program/js/tiny_mce/plugins/media/img/realmedia.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/images/shockwave.gif b/program/js/tiny_mce/plugins/media/img/shockwave.gif
index 5f235dfc7..5f235dfc7 100644
--- a/program/js/tiny_mce/plugins/media/images/shockwave.gif
+++ b/program/js/tiny_mce/plugins/media/img/shockwave.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/img/trans.gif b/program/js/tiny_mce/plugins/media/img/trans.gif
new file mode 100644
index 000000000..388486517
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/img/trans.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/images/windowsmedia.gif b/program/js/tiny_mce/plugins/media/img/windowsmedia.gif
index ab50f2d88..ab50f2d88 100644
--- a/program/js/tiny_mce/plugins/media/images/windowsmedia.gif
+++ b/program/js/tiny_mce/plugins/media/img/windowsmedia.gif
Binary files differ
diff --git a/program/js/tiny_mce/plugins/media/jscripts/embed.js b/program/js/tiny_mce/plugins/media/js/embed.js
index 6fe25de09..f8dc81052 100644
--- a/program/js/tiny_mce/plugins/media/jscripts/embed.js
+++ b/program/js/tiny_mce/plugins/media/js/embed.js
@@ -1,73 +1,73 @@
-/**
- * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
- */
-
-function writeFlash(p) {
- writeEmbed(
- 'D27CDB6E-AE6D-11cf-96B8-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'application/x-shockwave-flash',
- p
- );
-}
-
-function writeShockWave(p) {
- writeEmbed(
- '166B1BCA-3F9C-11CF-8075-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
- 'application/x-director',
- p
- );
-}
-
-function writeQuickTime(p) {
- writeEmbed(
- '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
- 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
- 'video/quicktime',
- p
- );
-}
-
-function writeRealMedia(p) {
- writeEmbed(
- 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'audio/x-pn-realaudio-plugin',
- p
- );
-}
-
-function writeWindowsMedia(p) {
- p.url = p.src;
- writeEmbed(
- '6BF52A52-394A-11D3-B153-00C04F79FAA6',
- 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
- 'application/x-mplayer2',
- p
- );
-}
-
-function writeEmbed(cls, cb, mt, p) {
- var h = '', n;
-
- h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
- h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
- h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
- h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
- h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
- h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
- h += '>';
-
- for (n in p)
- h += '<param name="' + n + '" value="' + p[n] + '">';
-
- h += '<embed type="' + mt + '"';
-
- for (n in p)
- h += n + '="' + p[n] + '" ';
-
- h += '></embed></object>';
-
- document.write(h);
-}
+/**
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
+ */
+
+function writeFlash(p) {
+ writeEmbed(
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'application/x-shockwave-flash',
+ p
+ );
+}
+
+function writeShockWave(p) {
+ writeEmbed(
+ '166B1BCA-3F9C-11CF-8075-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
+ 'application/x-director',
+ p
+ );
+}
+
+function writeQuickTime(p) {
+ writeEmbed(
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
+ 'video/quicktime',
+ p
+ );
+}
+
+function writeRealMedia(p) {
+ writeEmbed(
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'audio/x-pn-realaudio-plugin',
+ p
+ );
+}
+
+function writeWindowsMedia(p) {
+ p.url = p.src;
+ writeEmbed(
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
+ 'application/x-mplayer2',
+ p
+ );
+}
+
+function writeEmbed(cls, cb, mt, p) {
+ var h = '', n;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
+ h += '>';
+
+ for (n in p)
+ h += '<param name="' + n + '" value="' + p[n] + '">';
+
+ h += '<embed type="' + mt + '"';
+
+ for (n in p)
+ h += n + '="' + p[n] + '" ';
+
+ h += '></embed></object>';
+
+ document.write(h);
+}
diff --git a/program/js/tiny_mce/plugins/media/jscripts/media.js b/program/js/tiny_mce/plugins/media/js/media.js
index 2b9a4f02c..2877d16b1 100644
--- a/program/js/tiny_mce/plugins/media/jscripts/media.js
+++ b/program/js/tiny_mce/plugins/media/js/media.js
@@ -1,594 +1,621 @@
-var oldWidth, oldHeight;
-var url = tinyMCE.getParam("media_external_list_url");
-if (url != null) {
- // Fix relative
- if (url.charAt(0) != '/' && url.indexOf('://') == -1)
- url = tinyMCE.documentBasePath + "/" + url;
-
- document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
-}
-
-function init() {
- var pl = "", f, val;
- var type = "flash", fe, i;
-
- tinyMCEPopup.resizeToInnerSize();
- f = document.forms[0]
-
- fe = tinyMCE.selectedInstance.getFocusElement();
- if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(fe, 'class'))) {
- pl = "x={" + fe.title + "};";
-
- switch (tinyMCE.getAttrib(fe, 'class')) {
- case 'mceItemFlash':
- type = 'flash';
- break;
-
- case 'mceItemShockWave':
- type = 'shockwave';
- break;
-
- case 'mceItemWindowsMedia':
- type = 'wmp';
- break;
-
- case 'mceItemQuickTime':
- type = 'qt';
- break;
-
- case 'mceItemRealMedia':
- type = 'rmp';
- break;
- }
-
- document.forms[0].insert.value = tinyMCE.getLang('lang_update', 'Insert', true);
- }
-
- document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
- document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
- document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
-
- var html = getMediaListHTML('filebrowser','src','media','media');
- if (html == "")
- document.getElementById("linklistrow").style.display = 'none';
- else
- document.getElementById("linklistcontainer").innerHTML = html;
-
- // Resize some elements
- if (isVisible('filebrowsercontainer'))
- document.getElementById('src').style.width = '230px';
-
- // Setup form
- if (pl != "") {
- pl = eval(pl);
-
- switch (type) {
- case "flash":
- setBool(pl, 'flash', 'play');
- setBool(pl, 'flash', 'loop');
- setBool(pl, 'flash', 'menu');
- setBool(pl, 'flash', 'swliveconnect');
- setStr(pl, 'flash', 'quality');
- setStr(pl, 'flash', 'scale');
- setStr(pl, 'flash', 'salign');
- setStr(pl, 'flash', 'wmode');
- setStr(pl, 'flash', 'base');
- setStr(pl, 'flash', 'flashvars');
- break;
-
- case "qt":
- setBool(pl, 'qt', 'loop');
- setBool(pl, 'qt', 'autoplay');
- setBool(pl, 'qt', 'cache');
- setBool(pl, 'qt', 'controller');
- setBool(pl, 'qt', 'correction');
- setBool(pl, 'qt', 'enablejavascript');
- setBool(pl, 'qt', 'kioskmode');
- setBool(pl, 'qt', 'autohref');
- setBool(pl, 'qt', 'playeveryframe');
- setBool(pl, 'qt', 'tarsetcache');
- setStr(pl, 'qt', 'scale');
- setStr(pl, 'qt', 'starttime');
- setStr(pl, 'qt', 'endtime');
- setStr(pl, 'qt', 'tarset');
- setStr(pl, 'qt', 'qtsrcchokespeed');
- setStr(pl, 'qt', 'volume');
- setStr(pl, 'qt', 'qtsrc');
- break;
-
- case "shockwave":
- setBool(pl, 'shockwave', 'sound');
- setBool(pl, 'shockwave', 'progress');
- setBool(pl, 'shockwave', 'autostart');
- setBool(pl, 'shockwave', 'swliveconnect');
- setStr(pl, 'shockwave', 'swvolume');
- setStr(pl, 'shockwave', 'swstretchstyle');
- setStr(pl, 'shockwave', 'swstretchhalign');
- setStr(pl, 'shockwave', 'swstretchvalign');
- break;
-
- case "wmp":
- setBool(pl, 'wmp', 'autostart');
- setBool(pl, 'wmp', 'enabled');
- setBool(pl, 'wmp', 'enablecontextmenu');
- setBool(pl, 'wmp', 'fullscreen');
- setBool(pl, 'wmp', 'invokeurls');
- setBool(pl, 'wmp', 'mute');
- setBool(pl, 'wmp', 'stretchtofit');
- setBool(pl, 'wmp', 'windowlessvideo');
- setStr(pl, 'wmp', 'balance');
- setStr(pl, 'wmp', 'baseurl');
- setStr(pl, 'wmp', 'captioningid');
- setStr(pl, 'wmp', 'currentmarker');
- setStr(pl, 'wmp', 'currentposition');
- setStr(pl, 'wmp', 'defaultframe');
- setStr(pl, 'wmp', 'playcount');
- setStr(pl, 'wmp', 'rate');
- setStr(pl, 'wmp', 'uimode');
- setStr(pl, 'wmp', 'volume');
- break;
-
- case "rmp":
- setBool(pl, 'rmp', 'autostart');
- setBool(pl, 'rmp', 'loop');
- setBool(pl, 'rmp', 'autogotourl');
- setBool(pl, 'rmp', 'center');
- setBool(pl, 'rmp', 'imagestatus');
- setBool(pl, 'rmp', 'maintainaspect');
- setBool(pl, 'rmp', 'nojava');
- setBool(pl, 'rmp', 'prefetch');
- setBool(pl, 'rmp', 'shuffle');
- setStr(pl, 'rmp', 'console');
- setStr(pl, 'rmp', 'controls');
- setStr(pl, 'rmp', 'numloop');
- setStr(pl, 'rmp', 'scriptcallbacks');
- break;
- }
-
- setStr(pl, null, 'src');
- setStr(pl, null, 'id');
- setStr(pl, null, 'name');
- setStr(pl, null, 'vspace');
- setStr(pl, null, 'hspace');
- setStr(pl, null, 'bgcolor');
- setStr(pl, null, 'align');
- setStr(pl, null, 'width');
- setStr(pl, null, 'height');
-
- if ((val = tinyMCE.getAttrib(fe, "width")) != "")
- pl.width = f.width.value = val;
-
- if ((val = tinyMCE.getAttrib(fe, "height")) != "")
- pl.height = f.height.value = val;
-
- oldWidth = pl.width ? parseInt(pl.width) : 0;
- oldHeight = pl.height ? parseInt(pl.height) : 0;
- } else
- oldWidth = oldHeight = 0;
-
- selectByValue(f, 'media_type', type);
- changedType(type);
- updateColor('bgcolor_pick', 'bgcolor');
-
- TinyMCE_EditableSelects.init();
- generatePreview();
-}
-
-function insertMedia() {
- var fe, f = document.forms[0], h;
-
- if (!AutoValidator.validate(f)) {
- alert(tinyMCE.getLang('lang_invalid_data'));
- return false;
- }
-
- f.width.value = f.width.value == "" ? 100 : f.width.value;
- f.height.value = f.height.value == "" ? 100 : f.height.value;
-
- fe = tinyMCE.selectedInstance.getFocusElement();
- if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(fe, 'class'))) {
- switch (f.media_type.options[f.media_type.selectedIndex].value) {
- case "flash":
- fe.className = "mceItemFlash";
- break;
-
- case "shockwave":
- fe.className = "mceItemShockWave";
- break;
-
- case "qt":
- fe.className = "mceItemQuickTime";
- break;
-
- case "wmp":
- fe.className = "mceItemWindowsMedia";
- break;
-
- case "rmp":
- fe.className = "mceItemRealMedia";
- break;
- }
-
- if (fe.width != f.width.value || fe.height != f.height.height)
- tinyMCE.selectedInstance.repaint();
-
- fe.title = serializeParameters();
- fe.width = f.width.value;
- fe.height = f.height.value;
- fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
- fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
- fe.align = f.align.options[f.align.selectedIndex].value;
- } else {
- h = '<img src="' + tinyMCE.getParam("theme_href") + '/images/spacer.gif"' ;
-
- switch (f.media_type.options[f.media_type.selectedIndex].value) {
- case "flash":
- h += ' class="mceItemFlash"';
- break;
-
- case "shockwave":
- h += ' class="mceItemShockWave"';
- break;
-
- case "qt":
- h += ' class="mceItemQuickTime"';
- break;
-
- case "wmp":
- h += ' class="mceItemWindowsMedia"';
- break;
-
- case "rmp":
- h += ' class="mceItemRealMedia"';
- break;
- }
-
- h += ' title="' + serializeParameters() + '"';
- h += ' width="' + f.width.value + '"';
- h += ' height="' + f.height.value + '"';
- h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
-
- h += ' />';
-
- tinyMCE.selectedInstance.execCommand('mceInsertContent', false, h);
- }
-
- tinyMCEPopup.close();
-}
-
-function getMediaListHTML() {
- if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
- var html = "";
-
- html += '<select id="linklist" name="linklist" style="width: 250px" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.src.value=this.options[this.selectedIndex].value;">';
- html += '<option value="">---</option>';
-
- for (var i=0; i<tinyMCEMediaList.length; i++)
- html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
-
- html += '</select>';
-
- return html;
- }
-
- return "";
-}
-
-function getType(v) {
- var fo, i, c, el, x, f = document.forms[0];
-
- fo = tinyMCE.getParam("media_types", "flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
-
- // YouTube
- if (v.indexOf('http://www.youtube.com/watch?v=') == 0 || v.indexOf('http://youtube.com/watch?v=') == 0) {
- f.width.value = '425';
- f.height.value = '350';
-
- v = v.replace('http://youtube.com/watch?v=', '');
- v = v.replace('http://www.youtube.com/watch?v=', '');
-
- f.src.value = 'http://www.youtube.com/v/' + v;
- return 'flash';
- }
-
- // Google video
- if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
- f.width.value = '425';
- f.height.value = '326';
- f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
- return 'flash';
- }
-
- for (i=0; i<fo.length; i++) {
- c = fo[i].split('=');
-
- el = c[1].split(',');
- for (x=0; x<el.length; x++)
- if (v.indexOf('.' + el[x]) != -1)
- return c[0];
- }
-
- return null;
-}
-
-function switchType(v) {
- var t = getType(v), d = document, f = d.forms[0];
-
- if (!t)
- return;
-
- selectByValue(d.forms[0], 'media_type', t);
- changedType(t);
-
- // Update qtsrc also
- if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
- alert(tinyMCE.getLang("lang_media_qt_stream_warn"));
-
- if (f.qt_qtsrc.value == '')
- f.qt_qtsrc.value = f.src.value;
- }
-}
-
-function changedType(t) {
- var d = document;
-
- d.getElementById('flash_options').style.display = 'none';
- d.getElementById('qt_options').style.display = 'none';
- d.getElementById('shockwave_options').style.display = 'none';
- d.getElementById('wmp_options').style.display = 'none';
- d.getElementById('rmp_options').style.display = 'none';
- d.getElementById(t + '_options').style.display = 'block';
-}
-
-function serializeParameters() {
- var d = document, f = d.forms[0], s = '';
-
- switch (f.media_type.options[f.media_type.selectedIndex].value) {
- case "flash":
- s += getBool('flash', 'play', true);
- s += getBool('flash', 'loop', true);
- s += getBool('flash', 'menu', true);
- s += getBool('flash', 'swliveconnect', false);
- s += getStr('flash', 'quality');
- s += getStr('flash', 'scale');
- s += getStr('flash', 'salign');
- s += getStr('flash', 'wmode');
- s += getStr('flash', 'base');
- s += getStr('flash', 'flashvars');
- break;
-
- case "qt":
- s += getBool('qt', 'loop', false);
- s += getBool('qt', 'autoplay', true);
- s += getBool('qt', 'cache', false);
- s += getBool('qt', 'controller', true);
- s += getBool('qt', 'correction', false, 'none', 'full');
- s += getBool('qt', 'enablejavascript', false);
- s += getBool('qt', 'kioskmode', false);
- s += getBool('qt', 'autohref', false);
- s += getBool('qt', 'playeveryframe', false);
- s += getBool('qt', 'targetcache', false);
- s += getStr('qt', 'scale');
- s += getStr('qt', 'starttime');
- s += getStr('qt', 'endtime');
- s += getStr('qt', 'target');
- s += getStr('qt', 'qtsrcchokespeed');
- s += getStr('qt', 'volume');
- s += getStr('qt', 'qtsrc');
- break;
-
- case "shockwave":
- s += getBool('shockwave', 'sound');
- s += getBool('shockwave', 'progress');
- s += getBool('shockwave', 'autostart');
- s += getBool('shockwave', 'swliveconnect');
- s += getStr('shockwave', 'swvolume');
- s += getStr('shockwave', 'swstretchstyle');
- s += getStr('shockwave', 'swstretchhalign');
- s += getStr('shockwave', 'swstretchvalign');
- break;
-
- case "wmp":
- s += getBool('wmp', 'autostart', true);
- s += getBool('wmp', 'enabled', false);
- s += getBool('wmp', 'enablecontextmenu', true);
- s += getBool('wmp', 'fullscreen', false);
- s += getBool('wmp', 'invokeurls', true);
- s += getBool('wmp', 'mute', false);
- s += getBool('wmp', 'stretchtofit', false);
- s += getBool('wmp', 'windowlessvideo', false);
- s += getStr('wmp', 'balance');
- s += getStr('wmp', 'baseurl');
- s += getStr('wmp', 'captioningid');
- s += getStr('wmp', 'currentmarker');
- s += getStr('wmp', 'currentposition');
- s += getStr('wmp', 'defaultframe');
- s += getStr('wmp', 'playcount');
- s += getStr('wmp', 'rate');
- s += getStr('wmp', 'uimode');
- s += getStr('wmp', 'volume');
- break;
-
- case "rmp":
- s += getBool('rmp', 'autostart', false);
- s += getBool('rmp', 'loop', false);
- s += getBool('rmp', 'autogotourl', true);
- s += getBool('rmp', 'center', false);
- s += getBool('rmp', 'imagestatus', true);
- s += getBool('rmp', 'maintainaspect', false);
- s += getBool('rmp', 'nojava', false);
- s += getBool('rmp', 'prefetch', false);
- s += getBool('rmp', 'shuffle', false);
- s += getStr('rmp', 'console');
- s += getStr('rmp', 'controls');
- s += getStr('rmp', 'numloop');
- s += getStr('rmp', 'scriptcallbacks');
- break;
- }
-
- s += getStr(null, 'id');
- s += getStr(null, 'name');
- s += getStr(null, 'src');
- s += getStr(null, 'align');
- s += getStr(null, 'bgcolor');
- s += getInt(null, 'vspace');
- s += getInt(null, 'hspace');
- s += getStr(null, 'width');
- s += getStr(null, 'height');
-
- s = s.length > 0 ? s.substring(0, s.length - 1) : s;
-
- return s;
-}
-
-function setBool(pl, p, n) {
- if (typeof(pl[n]) == "undefined")
- return;
-
- document.forms[0].elements[p + "_" + n].checked = pl[n];
-}
-
-function setStr(pl, p, n) {
- var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
-
- if (typeof(pl[n]) == "undefined")
- return;
-
- if (e.type == "text")
- e.value = pl[n];
- else
- selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
-}
-
-function getBool(p, n, d, tv, fv) {
- var v = document.forms[0].elements[p + "_" + n].checked;
-
- tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
- fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
-
- return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
-}
-
-function getStr(p, n, d) {
- var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
- var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
-
- return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
-}
-
-function getInt(p, n, d) {
- var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
- var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
-
- return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
-}
-
-function jsEncode(s) {
- s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
- s = s.replace(new RegExp('"', 'g'), '\\"');
- s = s.replace(new RegExp("'", 'g'), "\\'");
-
- return s;
-}
-
-function generatePreview(c) {
- var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
-
- p.innerHTML = '<!-- x --->';
-
- nw = parseInt(f.width.value);
- nh = parseInt(f.height.value);
-
- if (f.width.value != "" && f.height.value != "") {
- if (f.constrain.checked) {
- if (c == 'width' && oldWidth != 0) {
- wp = nw / oldWidth;
- nh = Math.round(wp * nh);
- f.height.value = nh;
- } else if (c == 'height' && oldHeight != 0) {
- hp = nh / oldHeight;
- nw = Math.round(hp * nw);
- f.width.value = nw;
- }
- }
- }
-
- if (f.width.value != "")
- oldWidth = nw;
-
- if (f.height.value != "")
- oldHeight = nh;
-
- // After constrain
- pl = serializeParameters();
-
- switch (f.media_type.options[f.media_type.selectedIndex].value) {
- case "flash":
- cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
- codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
- type = 'application/x-shockwave-flash';
- break;
-
- case "shockwave":
- cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
- codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
- type = 'application/x-director';
- break;
-
- case "qt":
- cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
- codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
- type = 'video/quicktime';
- break;
-
- case "wmp":
- cls = tinyMCE.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
- codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
- type = 'application/x-mplayer2';
- break;
-
- case "rmp":
- cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
- codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
- type = 'audio/x-pn-realaudio-plugin';
- break;
- }
-
- if (pl == '') {
- p.innerHTML = '';
- return;
- }
-
- pl = eval('x={' + pl + '};');
-
- if (!pl.src) {
- p.innerHTML = '';
- return;
- }
-
- pl.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], pl.src);
- pl.width = !pl.width ? 100 : pl.width;
- pl.height = !pl.height ? 100 : pl.height;
- pl.id = !pl.id ? 'obj' : pl.id;
- pl.name = !pl.name ? 'eobj' : pl.name;
- pl.align = !pl.align ? '' : pl.align;
-
- h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
-
- for (n in pl) {
- h += '<param name="' + n + '" value="' + pl[n] + '">';
-
- // Add extra url parameter if it's an absolute URL
- if (n == 'src' && pl[n].indexOf('://') != -1)
- h += '<param name="url" value="' + pl[n] + '" />';
- }
-
- h += '<embed type="' + type + '" ';
-
- for (n in pl)
- h += n + '="' + pl[n] + '" ';
-
- h += '></embed></object>';
-
- p.innerHTML = "<!-- x --->" + h;
-}
+tinyMCEPopup.requireLangPack();
+
+var oldWidth, oldHeight, ed, url;
+
+if (url = tinyMCEPopup.getParam("media_external_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+
+function init() {
+ var pl = "", f, val;
+ var type = "flash", fe, i;
+
+ ed = tinyMCEPopup.editor;
+
+ tinyMCEPopup.resizeToInnerSize();
+ f = document.forms[0]
+
+ fe = ed.selection.getNode();
+ if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
+ pl = fe.title;
+
+ switch (ed.dom.getAttrib(fe, 'class')) {
+ case 'mceItemFlash':
+ type = 'flash';
+ break;
+
+ case 'mceItemFlashVideo':
+ type = 'flv';
+ break;
+
+ case 'mceItemShockWave':
+ type = 'shockwave';
+ break;
+
+ case 'mceItemWindowsMedia':
+ type = 'wmp';
+ break;
+
+ case 'mceItemQuickTime':
+ type = 'qt';
+ break;
+
+ case 'mceItemRealMedia':
+ type = 'rmp';
+ break;
+ }
+
+ document.forms[0].insert.value = ed.getLang('update', 'Insert', true);
+ }
+
+ document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
+ document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+ var html = getMediaListHTML('medialist','src','media','media');
+ if (html == "")
+ document.getElementById("linklistrow").style.display = 'none';
+ else
+ document.getElementById("linklistcontainer").innerHTML = html;
+
+ // Resize some elements
+ if (isVisible('filebrowser'))
+ document.getElementById('src').style.width = '230px';
+
+ // Setup form
+ if (pl != "") {
+ pl = tinyMCEPopup.editor.plugins.media._parse(pl);
+
+ switch (type) {
+ case "flash":
+ setBool(pl, 'flash', 'play');
+ setBool(pl, 'flash', 'loop');
+ setBool(pl, 'flash', 'menu');
+ setBool(pl, 'flash', 'swliveconnect');
+ setStr(pl, 'flash', 'quality');
+ setStr(pl, 'flash', 'scale');
+ setStr(pl, 'flash', 'salign');
+ setStr(pl, 'flash', 'wmode');
+ setStr(pl, 'flash', 'base');
+ setStr(pl, 'flash', 'flashvars');
+ break;
+
+ case "qt":
+ setBool(pl, 'qt', 'loop');
+ setBool(pl, 'qt', 'autoplay');
+ setBool(pl, 'qt', 'cache');
+ setBool(pl, 'qt', 'controller');
+ setBool(pl, 'qt', 'correction');
+ setBool(pl, 'qt', 'enablejavascript');
+ setBool(pl, 'qt', 'kioskmode');
+ setBool(pl, 'qt', 'autohref');
+ setBool(pl, 'qt', 'playeveryframe');
+ setBool(pl, 'qt', 'tarsetcache');
+ setStr(pl, 'qt', 'scale');
+ setStr(pl, 'qt', 'starttime');
+ setStr(pl, 'qt', 'endtime');
+ setStr(pl, 'qt', 'tarset');
+ setStr(pl, 'qt', 'qtsrcchokespeed');
+ setStr(pl, 'qt', 'volume');
+ setStr(pl, 'qt', 'qtsrc');
+ break;
+
+ case "shockwave":
+ setBool(pl, 'shockwave', 'sound');
+ setBool(pl, 'shockwave', 'progress');
+ setBool(pl, 'shockwave', 'autostart');
+ setBool(pl, 'shockwave', 'swliveconnect');
+ setStr(pl, 'shockwave', 'swvolume');
+ setStr(pl, 'shockwave', 'swstretchstyle');
+ setStr(pl, 'shockwave', 'swstretchhalign');
+ setStr(pl, 'shockwave', 'swstretchvalign');
+ break;
+
+ case "wmp":
+ setBool(pl, 'wmp', 'autostart');
+ setBool(pl, 'wmp', 'enabled');
+ setBool(pl, 'wmp', 'enablecontextmenu');
+ setBool(pl, 'wmp', 'fullscreen');
+ setBool(pl, 'wmp', 'invokeurls');
+ setBool(pl, 'wmp', 'mute');
+ setBool(pl, 'wmp', 'stretchtofit');
+ setBool(pl, 'wmp', 'windowlessvideo');
+ setStr(pl, 'wmp', 'balance');
+ setStr(pl, 'wmp', 'baseurl');
+ setStr(pl, 'wmp', 'captioningid');
+ setStr(pl, 'wmp', 'currentmarker');
+ setStr(pl, 'wmp', 'currentposition');
+ setStr(pl, 'wmp', 'defaultframe');
+ setStr(pl, 'wmp', 'playcount');
+ setStr(pl, 'wmp', 'rate');
+ setStr(pl, 'wmp', 'uimode');
+ setStr(pl, 'wmp', 'volume');
+ break;
+
+ case "rmp":
+ setBool(pl, 'rmp', 'autostart');
+ setBool(pl, 'rmp', 'loop');
+ setBool(pl, 'rmp', 'autogotourl');
+ setBool(pl, 'rmp', 'center');
+ setBool(pl, 'rmp', 'imagestatus');
+ setBool(pl, 'rmp', 'maintainaspect');
+ setBool(pl, 'rmp', 'nojava');
+ setBool(pl, 'rmp', 'prefetch');
+ setBool(pl, 'rmp', 'shuffle');
+ setStr(pl, 'rmp', 'console');
+ setStr(pl, 'rmp', 'controls');
+ setStr(pl, 'rmp', 'numloop');
+ setStr(pl, 'rmp', 'scriptcallbacks');
+ break;
+ }
+
+ setStr(pl, null, 'src');
+ setStr(pl, null, 'id');
+ setStr(pl, null, 'name');
+ setStr(pl, null, 'vspace');
+ setStr(pl, null, 'hspace');
+ setStr(pl, null, 'bgcolor');
+ setStr(pl, null, 'align');
+ setStr(pl, null, 'width');
+ setStr(pl, null, 'height');
+
+ if ((val = ed.dom.getAttrib(fe, "width")) != "")
+ pl.width = f.width.value = val;
+
+ if ((val = ed.dom.getAttrib(fe, "height")) != "")
+ pl.height = f.height.value = val;
+
+ oldWidth = pl.width ? parseInt(pl.width) : 0;
+ oldHeight = pl.height ? parseInt(pl.height) : 0;
+ } else
+ oldWidth = oldHeight = 0;
+
+ selectByValue(f, 'media_type', type);
+ changedType(type);
+ updateColor('bgcolor_pick', 'bgcolor');
+
+ TinyMCE_EditableSelects.init();
+ generatePreview();
+}
+
+function insertMedia() {
+ var fe, f = document.forms[0], h;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (!AutoValidator.validate(f)) {
+ alert(ed.getLang('invalid_data'));
+ return false;
+ }
+
+ f.width.value = f.width.value == "" ? 100 : f.width.value;
+ f.height.value = f.height.value == "" ? 100 : f.height.value;
+
+ fe = ed.selection.getNode();
+ if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ fe.className = "mceItemFlash";
+ break;
+
+ case "flv":
+ fe.className = "mceItemFlashVideo";
+ break;
+
+ case "shockwave":
+ fe.className = "mceItemShockWave";
+ break;
+
+ case "qt":
+ fe.className = "mceItemQuickTime";
+ break;
+
+ case "wmp":
+ fe.className = "mceItemWindowsMedia";
+ break;
+
+ case "rmp":
+ fe.className = "mceItemRealMedia";
+ break;
+ }
+
+ if (fe.width != f.width.value || fe.height != f.height.height)
+ ed.execCommand('mceRepaint');
+
+ fe.title = serializeParameters();
+ fe.width = f.width.value;
+ fe.height = f.height.value;
+ fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
+ fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
+ fe.align = f.align.options[f.align.selectedIndex].value;
+ } else {
+ h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ;
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ h += ' class="mceItemFlash"';
+ break;
+
+ case "flv":
+ h += ' class="mceItemFlashVideo"';
+ break;
+
+ case "shockwave":
+ h += ' class="mceItemShockWave"';
+ break;
+
+ case "qt":
+ h += ' class="mceItemQuickTime"';
+ break;
+
+ case "wmp":
+ h += ' class="mceItemWindowsMedia"';
+ break;
+
+ case "rmp":
+ h += ' class="mceItemRealMedia"';
+ break;
+ }
+
+ h += ' title="' + serializeParameters() + '"';
+ h += ' width="' + f.width.value + '"';
+ h += ' height="' + f.height.value + '"';
+ h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
+
+ h += ' />';
+
+ ed.execCommand('mceInsertContent', false, h);
+ }
+
+ tinyMCEPopup.close();
+}
+
+function updatePreview() {
+ var f = document.forms[0], type;
+
+ f.width.value = f.width.value || '320';
+ f.height.value = f.height.value || '240';
+
+ type = getType(f.src.value);
+ selectByValue(f, 'media_type', type);
+ changedType(type);
+ generatePreview();
+}
+
+function getMediaListHTML() {
+ if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
+ var html = "";
+
+ html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">';
+ html += '<option value="">---</option>';
+
+ for (var i=0; i<tinyMCEMediaList.length; i++)
+ html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
+
+ html += '</select>';
+
+ return html;
+ }
+
+ return "";
+}
+
+function getType(v) {
+ var fo, i, c, el, x, f = document.forms[0];
+
+ fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
+
+ // YouTube
+ if (v.match(/watch\?v=(.+)(.*)/)) {
+ f.width.value = '425';
+ f.height.value = '350';
+ f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
+ return 'flash';
+ }
+
+ // Google video
+ if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
+ f.width.value = '425';
+ f.height.value = '326';
+ f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
+ return 'flash';
+ }
+
+ for (i=0; i<fo.length; i++) {
+ c = fo[i].split('=');
+
+ el = c[1].split(',');
+ for (x=0; x<el.length; x++)
+ if (v.indexOf('.' + el[x]) != -1)
+ return c[0];
+ }
+
+ return null;
+}
+
+function switchType(v) {
+ var t = getType(v), d = document, f = d.forms[0];
+
+ if (!t)
+ return;
+
+ selectByValue(d.forms[0], 'media_type', t);
+ changedType(t);
+
+ // Update qtsrc also
+ if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
+ alert(ed.getLang("media_qt_stream_warn"));
+
+ if (f.qt_qtsrc.value == '')
+ f.qt_qtsrc.value = f.src.value;
+ }
+}
+
+function changedType(t) {
+ var d = document;
+
+ d.getElementById('flash_options').style.display = 'none';
+ d.getElementById('flv_options').style.display = 'none';
+ d.getElementById('qt_options').style.display = 'none';
+ d.getElementById('shockwave_options').style.display = 'none';
+ d.getElementById('wmp_options').style.display = 'none';
+ d.getElementById('rmp_options').style.display = 'none';
+ d.getElementById(t + '_options').style.display = 'block';
+}
+
+function serializeParameters() {
+ var d = document, f = d.forms[0], s = '';
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ s += getBool('flash', 'play', true);
+ s += getBool('flash', 'loop', true);
+ s += getBool('flash', 'menu', true);
+ s += getBool('flash', 'swliveconnect', false);
+ s += getStr('flash', 'quality');
+ s += getStr('flash', 'scale');
+ s += getStr('flash', 'salign');
+ s += getStr('flash', 'wmode');
+ s += getStr('flash', 'base');
+ s += getStr('flash', 'flashvars');
+ break;
+
+ case "qt":
+ s += getBool('qt', 'loop', false);
+ s += getBool('qt', 'autoplay', true);
+ s += getBool('qt', 'cache', false);
+ s += getBool('qt', 'controller', true);
+ s += getBool('qt', 'correction', false, 'none', 'full');
+ s += getBool('qt', 'enablejavascript', false);
+ s += getBool('qt', 'kioskmode', false);
+ s += getBool('qt', 'autohref', false);
+ s += getBool('qt', 'playeveryframe', false);
+ s += getBool('qt', 'targetcache', false);
+ s += getStr('qt', 'scale');
+ s += getStr('qt', 'starttime');
+ s += getStr('qt', 'endtime');
+ s += getStr('qt', 'target');
+ s += getStr('qt', 'qtsrcchokespeed');
+ s += getStr('qt', 'volume');
+ s += getStr('qt', 'qtsrc');
+ break;
+
+ case "shockwave":
+ s += getBool('shockwave', 'sound');
+ s += getBool('shockwave', 'progress');
+ s += getBool('shockwave', 'autostart');
+ s += getBool('shockwave', 'swliveconnect');
+ s += getStr('shockwave', 'swvolume');
+ s += getStr('shockwave', 'swstretchstyle');
+ s += getStr('shockwave', 'swstretchhalign');
+ s += getStr('shockwave', 'swstretchvalign');
+ break;
+
+ case "wmp":
+ s += getBool('wmp', 'autostart', true);
+ s += getBool('wmp', 'enabled', false);
+ s += getBool('wmp', 'enablecontextmenu', true);
+ s += getBool('wmp', 'fullscreen', false);
+ s += getBool('wmp', 'invokeurls', true);
+ s += getBool('wmp', 'mute', false);
+ s += getBool('wmp', 'stretchtofit', false);
+ s += getBool('wmp', 'windowlessvideo', false);
+ s += getStr('wmp', 'balance');
+ s += getStr('wmp', 'baseurl');
+ s += getStr('wmp', 'captioningid');
+ s += getStr('wmp', 'currentmarker');
+ s += getStr('wmp', 'currentposition');
+ s += getStr('wmp', 'defaultframe');
+ s += getStr('wmp', 'playcount');
+ s += getStr('wmp', 'rate');
+ s += getStr('wmp', 'uimode');
+ s += getStr('wmp', 'volume');
+ break;
+
+ case "rmp":
+ s += getBool('rmp', 'autostart', false);
+ s += getBool('rmp', 'loop', false);
+ s += getBool('rmp', 'autogotourl', true);
+ s += getBool('rmp', 'center', false);
+ s += getBool('rmp', 'imagestatus', true);
+ s += getBool('rmp', 'maintainaspect', false);
+ s += getBool('rmp', 'nojava', false);
+ s += getBool('rmp', 'prefetch', false);
+ s += getBool('rmp', 'shuffle', false);
+ s += getStr('rmp', 'console');
+ s += getStr('rmp', 'controls');
+ s += getStr('rmp', 'numloop');
+ s += getStr('rmp', 'scriptcallbacks');
+ break;
+ }
+
+ s += getStr(null, 'id');
+ s += getStr(null, 'name');
+ s += getStr(null, 'src');
+ s += getStr(null, 'align');
+ s += getStr(null, 'bgcolor');
+ s += getInt(null, 'vspace');
+ s += getInt(null, 'hspace');
+ s += getStr(null, 'width');
+ s += getStr(null, 'height');
+
+ s = s.length > 0 ? s.substring(0, s.length - 1) : s;
+
+ return s;
+}
+
+function setBool(pl, p, n) {
+ if (typeof(pl[n]) == "undefined")
+ return;
+
+ document.forms[0].elements[p + "_" + n].checked = pl[n];
+}
+
+function setStr(pl, p, n) {
+ var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
+
+ if (typeof(pl[n]) == "undefined")
+ return;
+
+ if (e.type == "text")
+ e.value = pl[n];
+ else
+ selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
+}
+
+function getBool(p, n, d, tv, fv) {
+ var v = document.forms[0].elements[p + "_" + n].checked;
+
+ tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
+ fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
+
+ return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
+}
+
+function getStr(p, n, d) {
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
+
+ if (n == 'src')
+ v = tinyMCEPopup.editor.convertURL(v, 'src', null);
+
+ return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
+}
+
+function getInt(p, n, d) {
+ var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
+ var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
+
+ return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
+}
+
+function jsEncode(s) {
+ s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
+ s = s.replace(new RegExp('"', 'g'), '\\"');
+ s = s.replace(new RegExp("'", 'g'), "\\'");
+
+ return s;
+}
+
+function generatePreview(c) {
+ var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
+
+ p.innerHTML = '<!-- x --->';
+
+ nw = parseInt(f.width.value);
+ nh = parseInt(f.height.value);
+
+ if (f.width.value != "" && f.height.value != "") {
+ if (f.constrain.checked) {
+ if (c == 'width' && oldWidth != 0) {
+ wp = nw / oldWidth;
+ nh = Math.round(wp * nh);
+ f.height.value = nh;
+ } else if (c == 'height' && oldHeight != 0) {
+ hp = nh / oldHeight;
+ nw = Math.round(hp * nw);
+ f.width.value = nw;
+ }
+ }
+ }
+
+ if (f.width.value != "")
+ oldWidth = nw;
+
+ if (f.height.value != "")
+ oldHeight = nh;
+
+ // After constrain
+ pl = serializeParameters();
+
+ switch (f.media_type.options[f.media_type.selectedIndex].value) {
+ case "flash":
+ cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
+ type = 'application/x-shockwave-flash';
+ break;
+
+ case "shockwave":
+ cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
+ codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
+ type = 'application/x-director';
+ break;
+
+ case "qt":
+ cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
+ codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
+ type = 'video/quicktime';
+ break;
+
+ case "wmp":
+ cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
+ type = 'application/x-mplayer2';
+ break;
+
+ case "rmp":
+ cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
+ codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
+ type = 'audio/x-pn-realaudio-plugin';
+ break;
+ }
+
+ if (pl == '') {
+ p.innerHTML = '';
+ return;
+ }
+
+ pl = tinyMCEPopup.editor.plugins.media._parse(pl);
+
+ if (!pl.src) {
+ p.innerHTML = '';
+ return;
+ }
+
+ pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src);
+ pl.width = !pl.width ? 100 : pl.width;
+ pl.height = !pl.height ? 100 : pl.height;
+ pl.id = !pl.id ? 'obj' : pl.id;
+ pl.name = !pl.name ? 'eobj' : pl.name;
+ pl.align = !pl.align ? '' : pl.align;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
+
+ for (n in pl) {
+ h += '<param name="' + n + '" value="' + pl[n] + '">';
+
+ // Add extra url parameter if it's an absolute URL
+ if (n == 'src' && pl[n].indexOf('://') != -1)
+ h += '<param name="url" value="' + pl[n] + '" />';
+ }
+
+ h += '<embed type="' + type + '" ';
+
+ for (n in pl)
+ h += n + '="' + pl[n] + '" ';
+
+ h += '></embed></object>';
+
+ p.innerHTML = "<!-- x --->" + h;
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/program/js/tiny_mce/plugins/media/langs/en.js b/program/js/tiny_mce/plugins/media/langs/en.js
deleted file mode 100644
index 177438d7c..000000000
--- a/program/js/tiny_mce/plugins/media/langs/en.js
+++ /dev/null
@@ -1,94 +0,0 @@
-// UK lang variables
-
-tinyMCE.addToLang('media',{
-title : 'Insert / edit embedded media',
-desc : 'Insert / edit embedded media',
-general : 'General',
-advanced : 'Advanced',
-file : 'File/URL',
-list : 'List',
-size : 'Dimensions',
-preview : 'Preview',
-constrain_proportions : 'Constrain proportions',
-type : 'Type',
-id : 'Id',
-name : 'Name',
-class_name : 'Class',
-vspace : 'V-Space',
-hspace : 'H-Space',
-play : 'Auto play',
-loop : 'Loop',
-menu : 'Show menu',
-quality : 'Quality',
-scale : 'Scale',
-align : 'Align',
-salign : 'SAlign',
-wmode : 'WMode',
-bgcolor : 'Background',
-base : 'Base',
-flashvars : 'Flashvars',
-liveconnect : 'SWLiveConnect',
-autohref : 'AutoHREF',
-cache : 'Cache',
-hidden : 'Hidden',
-controller : 'Controller',
-kioskmode : 'Kiosk mode',
-playeveryframe : 'Play every frame',
-targetcache : 'Target cache',
-correction : 'No correction',
-enablejavascript : 'Enable JavaScript',
-starttime : 'Start time',
-endtime : 'End time',
-href : 'Href',
-qtsrcchokespeed : 'Choke speed',
-target : 'Target',
-volume : 'Volume',
-autostart : 'Auto start',
-enabled : 'Enabled',
-fullscreen : 'Fullscreen',
-invokeurls : 'Invoke URLs',
-mute : 'Mute',
-stretchtofit : 'Stretch to fit',
-windowlessvideo : 'Windowless video',
-balance : 'Balance',
-baseurl : 'Base URL',
-captioningid : 'Captioning id',
-currentmarker : 'Current marker',
-currentposition : 'Current position',
-defaultframe : 'Default frame',
-playcount : 'Play count',
-rate : 'Rate',
-uimode : 'UI Mode',
-flash_options : 'Flash options',
-qt_options : 'Quicktime options',
-wmp_options : 'Windows media player options',
-rmp_options : 'Real media player options',
-shockwave_options : 'Shockwave options',
-autogotourl : 'Auto goto URL',
-center : 'Center',
-imagestatus : 'Image status',
-maintainaspect : 'Maintain aspect',
-nojava : 'No java',
-prefetch : 'Prefetch',
-shuffle : 'Shuffle',
-console : 'Console',
-numloop : 'Num loops',
-controls : 'Controls',
-scriptcallbacks : 'Script callbacks',
-swstretchstyle : 'Stretch style',
-swstretchhalign : 'Stretch H-Align',
-swstretchvalign : 'Stretch V-Align',
-sound : 'Sound',
-progress : 'Progress',
-qtsrc : 'QT Src',
-qt_stream_warn : 'Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..',
-align_top : 'Top',
-align_right : 'Right',
-align_bottom : 'Bottom',
-align_left : 'Left',
-align_center : 'Center',
-align_top_left : 'Top left',
-align_top_right : 'Top right',
-align_bottom_left : 'Bottom left',
-align_bottom_right : 'Bottom right'
-}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/langs/en_dlg.js b/program/js/tiny_mce/plugins/media/langs/en_dlg.js
new file mode 100644
index 000000000..6d0a996f7
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/langs/en_dlg.js
@@ -0,0 +1,103 @@
+tinyMCE.addI18n('en.media_dlg',{
+title:"Insert / edit embedded media",
+general:"General",
+advanced:"Advanced",
+file:"File/URL",
+list:"List",
+size:"Dimensions",
+preview:"Preview",
+constrain_proportions:"Constrain proportions",
+type:"Type",
+id:"Id",
+name:"Name",
+class_name:"Class",
+vspace:"V-Space",
+hspace:"H-Space",
+play:"Auto play",
+loop:"Loop",
+menu:"Show menu",
+quality:"Quality",
+scale:"Scale",
+align:"Align",
+salign:"SAlign",
+wmode:"WMode",
+bgcolor:"Background",
+base:"Base",
+flashvars:"Flashvars",
+liveconnect:"SWLiveConnect",
+autohref:"AutoHREF",
+cache:"Cache",
+hidden:"Hidden",
+controller:"Controller",
+kioskmode:"Kiosk mode",
+playeveryframe:"Play every frame",
+targetcache:"Target cache",
+correction:"No correction",
+enablejavascript:"Enable JavaScript",
+starttime:"Start time",
+endtime:"End time",
+href:"Href",
+qtsrcchokespeed:"Choke speed",
+target:"Target",
+volume:"Volume",
+autostart:"Auto start",
+enabled:"Enabled",
+fullscreen:"Fullscreen",
+invokeurls:"Invoke URLs",
+mute:"Mute",
+stretchtofit:"Stretch to fit",
+windowlessvideo:"Windowless video",
+balance:"Balance",
+baseurl:"Base URL",
+captioningid:"Captioning id",
+currentmarker:"Current marker",
+currentposition:"Current position",
+defaultframe:"Default frame",
+playcount:"Play count",
+rate:"Rate",
+uimode:"UI Mode",
+flash_options:"Flash options",
+qt_options:"Quicktime options",
+wmp_options:"Windows media player options",
+rmp_options:"Real media player options",
+shockwave_options:"Shockwave options",
+autogotourl:"Auto goto URL",
+center:"Center",
+imagestatus:"Image status",
+maintainaspect:"Maintain aspect",
+nojava:"No java",
+prefetch:"Prefetch",
+shuffle:"Shuffle",
+console:"Console",
+numloop:"Num loops",
+controls:"Controls",
+scriptcallbacks:"Script callbacks",
+swstretchstyle:"Stretch style",
+swstretchhalign:"Stretch H-Align",
+swstretchvalign:"Stretch V-Align",
+sound:"Sound",
+progress:"Progress",
+qtsrc:"QT Src",
+qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
+align_top:"Top",
+align_right:"Right",
+align_bottom:"Bottom",
+align_left:"Left",
+align_center:"Center",
+align_top_left:"Top left",
+align_top_right:"Top right",
+align_bottom_left:"Bottom left",
+align_bottom_right:"Bottom right",
+flv_options:"Flash video options",
+flv_scalemode:"Scale mode",
+flv_buffer:"Buffer",
+flv_startimage:"Start image",
+flv_starttime:"Start time",
+flv_defaultvolume:"Default volumne",
+flv_hiddengui:"Hidden GUI",
+flv_autostart:"Auto start",
+flv_loop:"Loop",
+flv_showscalemodes:"Show scale modes",
+flv_smoothvideo:"Smooth video",
+flv_jscallback:"JS Callback"
+}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/media.htm b/program/js/tiny_mce/plugins/media/media.htm
index 2b1ef80e3..8b3bc1d6b 100644
--- a/program/js/tiny_mce/plugins/media/media.htm
+++ b/program/js/tiny_mce/plugins/media/media.htm
@@ -1,35 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_media_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/media.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <title>{#media_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/media.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
<link href="css/media.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
-<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<body style="display: none">
<form onsubmit="insertMedia();return false;" action="#">
<div class="tabs">
<ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{$lang_media_general}</a></span></li>
- <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{$lang_media_advanced}</a></span></li>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
+ <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
<fieldset>
- <legend>{$lang_media_general}</legend>
+ <legend>{#media_dlg.general}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <td><label for="media_type">{$lang_media_type}</label></td>
+ <td><label for="media_type">{#media_dlg.type}</label></td>
<td>
<select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();">
<option value="flash">Flash</option>
+ <!-- <option value="flv">Flash video (FLV)</option> -->
<option value="qt">Quicktime</option>
<option value="shockwave">Shockwave</option>
<option value="wmp">Windows Media</option>
@@ -38,65 +40,66 @@
</td>
</tr>
<tr>
- <td><label for="src">{$lang_media_file}</label></td>
+ <td><label for="src">{#media_dlg.file}</label></td>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><input id="src" name="src" type="text" value="" onchange="switchType(this.value);generatePreview();" /></td>
+ <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td>
<td id="filebrowsercontainer">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr id="linklistrow">
- <td><label for="linklist">{$lang_media_list}</label></td>
+ <td><label for="linklist">{#media_dlg.list}</label></td>
<td id="linklistcontainer">&nbsp;</td>
</tr>
<tr>
- <td><label for="width">{$lang_media_size}</label></td>
+ <td><label for="width">{#media_dlg.size}</label></td>
<td>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td>
- <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
- <td><label id="constrainlabel" for="constrain">{$lang_media_constrain_proportions}</label></td>
- </tr>
- </table>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td>
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
+ <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
+ </tr>
+ </table>
+ </td>
</tr>
</table>
</fieldset>
<fieldset>
- <legend>{$lang_media_preview}</legend>
+ <legend>{#media_dlg.preview}</legend>
<div id="prev"></div>
</fieldset>
</div>
<div id="advanced_panel" class="panel">
<fieldset>
- <legend>{$lang_media_advanced}</legend>
+ <legend>{#media_dlg.advanced}</legend>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
- <td><label for="id">{$lang_media_id}</label></td>
+ <td><label for="id">{#media_dlg.id}</label></td>
<td><input type="text" id="id" name="id" onchange="generatePreview();" /></td>
- <td><label for="name">{$lang_media_name}</label></td>
+ <td><label for="name">{#media_dlg.name}</label></td>
<td><input type="text" id="name" name="name" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="align">{$lang_media_align}</label></td>
+ <td><label for="align">{#media_dlg.align}</label></td>
<td>
<select id="align" name="align" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
- <option value="top">{$lang_media_align_top}</option>
- <option value="right">{$lang_media_align_right}</option>
- <option value="bottom">{$lang_media_align_bottom}</option>
- <option value="left">{$lang_media_align_left}</option>
+ <option value="">{#not_set}</option>
+ <option value="top">{#media_dlg.align_top}</option>
+ <option value="right">{#media_dlg.align_right}</option>
+ <option value="bottom">{#media_dlg.align_bottom}</option>
+ <option value="left">{#media_dlg.align_left}</option>
</select>
</td>
- <td><label for="bgcolor">{$lang_media_bgcolor}</label></td>
+ <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -108,23 +111,23 @@
</tr>
<tr>
- <td><label for="vspace">{$lang_media_vspace}</label></td>
+ <td><label for="vspace">{#media_dlg.vspace}</label></td>
<td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td>
- <td><label for="hspace">{$lang_media_hspace}</label></td>
+ <td><label for="hspace">{#media_dlg.hspace}</label></td>
<td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td>
</tr>
</table>
</fieldset>
<fieldset id="flash_options">
- <legend>{$lang_media_flash_options}</legend>
+ <legend>{#media_dlg.flash_options}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <td><label for="flash_quality">{$lang_media_quality}</label></td>
+ <td><label for="flash_quality">{#media_dlg.quality}</label></td>
<td>
<select id="flash_quality" name="flash_quality" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
+ <option value="">{#not_set}</option>
<option value="high">high</option>
<option value="low">low</option>
<option value="autolow">autolow</option>
@@ -133,40 +136,41 @@
</select>
</td>
- <td><label for="flash_scale">{$lang_media_scale}</label></td>
+ <td><label for="flash_scale">{#media_dlg.scale}</label></td>
<td>
<select id="flash_scale" name="flash_scale" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
+ <option value="">{#not_set}</option>
<option value="showall">showall</option>
<option value="noborder">noborder</option>
<option value="exactfit">exactfit</option>
+ <option value="noscale">noscale</option>
</select>
</td>
</tr>
<tr>
- <td><label for="flash_wmode">{$lang_media_wmode}</label></td>
+ <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
<td>
<select id="flash_wmode" name="flash_wmode" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
+ <option value="">{#not_set}</option>
<option value="window">window</option>
<option value="opaque">opaque</option>
<option value="transparent">transparent</option>
</select>
</td>
- <td><label for="flash_salign">{$lang_media_salign}</label></td>
+ <td><label for="flash_salign">{#media_dlg.salign}</label></td>
<td>
<select id="flash_salign" name="flash_salign" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
- <option value="l">{$lang_media_align_left}</option>
- <option value="t">{$lang_media_align_top}</option>
- <option value="r">{$lang_media_align_right}</option>
- <option value="b">{$lang_media_align_bottom}</option>
- <option value="tl">{$lang_media_align_top_left}</option>
- <option value="tr">{$lang_media_align_top_right}</option>
- <option value="bl">{$lang_media_align_bottom_left}</option>
- <option value="br">{$lang_media_align_bottom_right}</option>
+ <option value="">{#not_set}</option>
+ <option value="l">{#media_dlg.align_left}</option>
+ <option value="t">{#media_dlg.align_top}</option>
+ <option value="r">{#media_dlg.align_right}</option>
+ <option value="b">{#media_dlg.align_bottom}</option>
+ <option value="tl">{#media_dlg.align_top_left}</option>
+ <option value="tr">{#media_dlg.align_top_right}</option>
+ <option value="bl">{#media_dlg.align_bottom_left}</option>
+ <option value="br">{#media_dlg.align_bottom_right}</option>
</select>
</td>
</tr>
@@ -176,7 +180,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="flash_play">{$lang_media_play}</label></td>
+ <td><label for="flash_play">{#media_dlg.play}</label></td>
</tr>
</table>
</td>
@@ -185,7 +189,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="flash_loop">{$lang_media_loop}</label></td>
+ <td><label for="flash_loop">{#media_dlg.loop}</label></td>
</tr>
</table>
</td>
@@ -196,7 +200,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="flash_menu">{$lang_media_menu}</label></td>
+ <td><label for="flash_menu">{#media_dlg.menu}</label></td>
</tr>
</table>
</td>
@@ -205,7 +209,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td>
- <td><label for="flash_swliveconnect">{$lang_media_liveconnect}</label></td>
+ <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
</tr>
</table>
</td>
@@ -214,19 +218,116 @@
<table>
<tr>
- <td><label for="flash_base">{$lang_media_base}</label></td>
+ <td><label for="flash_base">{#media_dlg.base}</label></td>
<td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="flash_flashvars">{$lang_media_flashvars}</label></td>
+ <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
<td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td>
</tr>
</table>
</fieldset>
+ <fieldset id="flv_options">
+ <legend>{#media_dlg.flv_options}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td>
+ <td>
+ <select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();">
+ <option value="">{#not_set}</option>
+ <option value="none">none</option>
+ <option value="double">double</option>
+ <option value="full">full</option>
+ </select>
+ </td>
+
+ <td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td>
+ <td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td>
+ <td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td>
+
+ <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
+ <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td>
+ <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td>
+
+ <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
+ <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_loop">{#media_dlg.flv_loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td>
+ <td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td>
+ <td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td>
+ <td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
<fieldset id="qt_options">
- <legend>{$lang_media_qt_options}</legend>
+ <legend>{#media_dlg.qt_options}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
@@ -234,7 +335,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td>
- <td><label for="qt_loop">{$lang_media_loop}</label></td>
+ <td><label for="qt_loop">{#media_dlg.loop}</label></td>
</tr>
</table>
</td>
@@ -243,7 +344,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="qt_autoplay">{$lang_media_play}</label></td>
+ <td><label for="qt_autoplay">{#media_dlg.play}</label></td>
</tr>
</table>
</td>
@@ -254,7 +355,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td>
- <td><label for="qt_cache">{$lang_media_cache}</label></td>
+ <td><label for="qt_cache">{#media_dlg.cache}</label></td>
</tr>
</table>
</td>
@@ -263,7 +364,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="qt_controller">{$lang_media_controller}</label></td>
+ <td><label for="qt_controller">{#media_dlg.controller}</label></td>
</tr>
</table>
</td>
@@ -274,7 +375,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td>
- <td><label for="qt_correction">{$lang_media_correction}</label></td>
+ <td><label for="qt_correction">{#media_dlg.correction}</label></td>
</tr>
</table>
</td>
@@ -283,7 +384,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td>
- <td><label for="qt_enablejavascript">{$lang_media_enablejavascript}</label></td>
+ <td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td>
</tr>
</table>
</td>
@@ -294,7 +395,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td>
- <td><label for="qt_kioskmode">{$lang_media_kioskmode}</label></td>
+ <td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td>
</tr>
</table>
</td>
@@ -303,7 +404,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td>
- <td><label for="qt_autohref">{$lang_media_autohref}</label></td>
+ <td><label for="qt_autohref">{#media_dlg.autohref}</label></td>
</tr>
</table>
</td>
@@ -314,7 +415,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td>
- <td><label for="qt_playeveryframe">{$lang_media_playeveryframe}</label></td>
+ <td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td>
</tr>
</table>
</td>
@@ -323,16 +424,16 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td>
- <td><label for="qt_targetcache">{$lang_media_targetcache}</label></td>
+ <td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td><label for="qt_scale">{$lang_media_scale}</label></td>
+ <td><label for="qt_scale">{#media_dlg.scale}</label></td>
<td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();">
- <option value="">{$lang_not_set}</option>
+ <option value="">{#not_set}</option>
<option value="tofit">tofit</option>
<option value="aspect">aspect</option>
</select>
@@ -342,31 +443,31 @@
</tr>
<tr>
- <td><label for="qt_starttime">{$lang_media_starttime}</label></td>
+ <td><label for="qt_starttime">{#media_dlg.starttime}</label></td>
<td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td>
- <td><label for="qt_endtime">{$lang_media_endtime}</label></td>
+ <td><label for="qt_endtime">{#media_dlg.endtime}</label></td>
<td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="qt_target">{$lang_media_target}</label></td>
+ <td><label for="qt_target">{#media_dlg.target}</label></td>
<td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td>
- <td><label for="qt_href">{$lang_media_href}</label></td>
+ <td><label for="qt_href">{#media_dlg.href}</label></td>
<td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="qt_qtsrcchokespeed">{$lang_media_qtsrcchokespeed}</label></td>
+ <td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
<td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td>
- <td><label for="qt_volume">{$lang_media_volume}</label></td>
+ <td><label for="qt_volume">{#media_dlg.volume}</label></td>
<td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="qt_qtsrc">{$lang_media_qtsrc}</label></td>
+ <td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td>
<td colspan="4">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -380,7 +481,7 @@
</fieldset>
<fieldset id="wmp_options">
- <legend>{$lang_media_wmp_options}</legend>
+ <legend>{#media_dlg.wmp_options}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
@@ -388,7 +489,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="wmp_autostart">{$lang_media_autostart}</label></td>
+ <td><label for="wmp_autostart">{#media_dlg.autostart}</label></td>
</tr>
</table>
</td>
@@ -397,7 +498,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td>
- <td><label for="wmp_enabled">{$lang_media_enabled}</label></td>
+ <td><label for="wmp_enabled">{#media_dlg.enabled}</label></td>
</tr>
</table>
</td>
@@ -408,7 +509,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="wmp_enablecontextmenu">{$lang_media_menu}</label></td>
+ <td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td>
</tr>
</table>
</td>
@@ -417,7 +518,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td>
- <td><label for="wmp_fullscreen">{$lang_media_fullscreen}</label></td>
+ <td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td>
</tr>
</table>
</td>
@@ -428,7 +529,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="wmp_invokeurls">{$lang_media_invokeurls}</label></td>
+ <td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td>
</tr>
</table>
</td>
@@ -437,7 +538,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td>
- <td><label for="wmp_mute">{$lang_media_mute}</label></td>
+ <td><label for="wmp_mute">{#media_dlg.mute}</label></td>
</tr>
</table>
</td>
@@ -448,7 +549,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td>
- <td><label for="wmp_stretchtofit">{$lang_media_stretchtofit}</label></td>
+ <td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td>
</tr>
</table>
</td>
@@ -457,49 +558,49 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td>
- <td><label for="wmp_windowlessvideo">{$lang_media_windowlessvideo}</label></td>
+ <td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
</tr>
</table>
</td>
</tr>
<tr>
- <td><label for="wmp_balance">{$lang_media_balance}</label></td>
+ <td><label for="wmp_balance">{#media_dlg.balance}</label></td>
<td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td>
- <td><label for="wmp_baseurl">{$lang_media_baseurl}</label></td>
+ <td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td>
<td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="wmp_captioningid">{$lang_media_captioningid}</label></td>
+ <td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td>
<td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td>
- <td><label for="wmp_currentmarker">{$lang_media_currentmarker}</label></td>
+ <td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td>
<td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="wmp_currentposition">{$lang_media_currentposition}</label></td>
+ <td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td>
<td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td>
- <td><label for="wmp_defaultframe">{$lang_media_defaultframe}</label></td>
+ <td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td>
<td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="wmp_playcount">{$lang_media_playcount}</label></td>
+ <td><label for="wmp_playcount">{#media_dlg.playcount}</label></td>
<td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td>
- <td><label for="wmp_rate">{$lang_media_rate}</label></td>
+ <td><label for="wmp_rate">{#media_dlg.rate}</label></td>
<td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="wmp_uimode">{$lang_media_uimode}</label></td>
+ <td><label for="wmp_uimode">{#media_dlg.uimode}</label></td>
<td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td>
- <td><label for="wmp_volume">{$lang_media_volume}</label></td>
+ <td><label for="wmp_volume">{#media_dlg.volume}</label></td>
<td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td>
</tr>
@@ -507,7 +608,7 @@
</fieldset>
<fieldset id="rmp_options">
- <legend>{$lang_media_rmp_options}</legend>
+ <legend>{#media_dlg.rmp_options}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
@@ -515,7 +616,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td>
- <td><label for="rmp_autostart">{$lang_media_autostart}</label></td>
+ <td><label for="rmp_autostart">{#media_dlg.autostart}</label></td>
</tr>
</table>
</td>
@@ -524,7 +625,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td>
- <td><label for="rmp_loop">{$lang_media_loop}</label></td>
+ <td><label for="rmp_loop">{#media_dlg.loop}</label></td>
</tr>
</table>
</td>
@@ -535,7 +636,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="rmp_autogotourl">{$lang_media_autogotourl}</label></td>
+ <td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td>
</tr>
</table>
</td>
@@ -544,7 +645,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td>
- <td><label for="rmp_center">{$lang_media_center}</label></td>
+ <td><label for="rmp_center">{#media_dlg.center}</label></td>
</tr>
</table>
</td>
@@ -555,7 +656,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td>
- <td><label for="rmp_imagestatus">{$lang_media_imagestatus}</label></td>
+ <td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td>
</tr>
</table>
</td>
@@ -564,7 +665,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td>
- <td><label for="rmp_maintainaspect">{$lang_media_maintainaspect}</label></td>
+ <td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td>
</tr>
</table>
</td>
@@ -575,7 +676,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td>
- <td><label for="rmp_nojava">{$lang_media_nojava}</label></td>
+ <td><label for="rmp_nojava">{#media_dlg.nojava}</label></td>
</tr>
</table>
</td>
@@ -584,7 +685,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td>
- <td><label for="rmp_prefetch">{$lang_media_prefetch}</label></td>
+ <td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td>
</tr>
</table>
</td>
@@ -595,7 +696,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td>
- <td><label for="rmp_shuffle">{$lang_media_shuffle}</label></td>
+ <td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td>
</tr>
</table>
</td>
@@ -606,57 +707,57 @@
</tr>
<tr>
- <td><label for="rmp_console">{$lang_media_console}</label></td>
+ <td><label for="rmp_console">{#media_dlg.console}</label></td>
<td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td>
- <td><label for="rmp_controls">{$lang_media_controls}</label></td>
+ <td><label for="rmp_controls">{#media_dlg.controls}</label></td>
<td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="rmp_numloop">{$lang_media_numloop}</label></td>
+ <td><label for="rmp_numloop">{#media_dlg.numloop}</label></td>
<td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td>
- <td><label for="rmp_scriptcallbacks">{$lang_media_scriptcallbacks}</label></td>
+ <td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
<td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td>
</tr>
</table>
</fieldset>
<fieldset id="shockwave_options">
- <legend>{$lang_media_shockwave_options}</legend>
+ <legend>{#media_dlg.shockwave_options}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <td><label for="shockwave_swstretchstyle">{$lang_media_swstretchstyle}</label></td>
+ <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
<td>
<select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
- <option value="none">{$lang_not_set}</option>
+ <option value="none">{#not_set}</option>
<option value="meet">Meet</option>
<option value="fill">Fill</option>
<option value="stage">Stage</option>
</select>
</td>
- <td><label for="shockwave_swvolume">{$lang_media_volume}</label></td>
+ <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
<td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td>
</tr>
<tr>
- <td><label for="shockwave_swstretchhalign">{$lang_media_swstretchhalign}</label></td>
+ <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
<td>
<select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
- <option value="none">{$lang_not_set}</option>
- <option value="left">{$lang_media_align_left}</option>
- <option value="center">{$lang_media_align_center}</option>
- <option value="right">{$lang_media_align_right}</option>
+ <option value="none">{#not_set}</option>
+ <option value="left">{#media_dlg.align_left}</option>
+ <option value="center">{#media_dlg.align_center}</option>
+ <option value="right">{#media_dlg.align_right}</option>
</select>
</td>
- <td><label for="shockwave_swstretchvalign">{$lang_media_swstretchvalign}</label></td>
+ <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
<td>
<select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
- <option value="none">{$lang_not_set}</option>
+ <option value="none">{#not_set}</option>
<option value="meet">Meet</option>
<option value="fill">Fill</option>
<option value="stage">Stage</option>
@@ -669,7 +770,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td>
- <td><label for="shockwave_autostart">{$lang_media_autostart}</label></td>
+ <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
</tr>
</table>
</td>
@@ -678,7 +779,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td>
- <td><label for="shockwave_sound">{$lang_media_sound}</label></td>
+ <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
</tr>
</table>
</td>
@@ -690,7 +791,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td>
- <td><label for="shockwave_swliveconnect">{$lang_media_liveconnect}</label></td>
+ <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
</tr>
</table>
</td>
@@ -699,7 +800,7 @@
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td>
- <td><label for="shockwave_progress">{$lang_media_progress}</label></td>
+ <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
</tr>
</table>
</td>
@@ -711,11 +812,11 @@
<div class="mceActionPanel">
<div style="float: left">
- <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertMedia();" />
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
- <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>