summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/media
diff options
context:
space:
mode:
authortill <till@php.net>2011-11-02 15:14:32 +0000
committertill <till@php.net>2011-11-02 15:14:32 +0000
commit4dd50a41ee477806745a05772d5abbf16d23db89 (patch)
tree3d65607d946f0eaecb468b8a21d40f147bc87fda /program/js/tiny_mce/plugins/media
parentd6284b4d22d1e6912b01228b7d2a63e9fecbc5fb (diff)
fix path/structure (my bad)
Diffstat (limited to 'program/js/tiny_mce/plugins/media')
-rw-r--r--program/js/tiny_mce/plugins/media/css/media.css17
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin.js1
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin_src.js890
-rw-r--r--program/js/tiny_mce/plugins/media/js/embed.js73
-rw-r--r--program/js/tiny_mce/plugins/media/js/media.js453
-rw-r--r--program/js/tiny_mce/plugins/media/langs/en_dlg.js1
-rw-r--r--program/js/tiny_mce/plugins/media/media.htm922
7 files changed, 2357 insertions, 0 deletions
diff --git a/program/js/tiny_mce/plugins/media/css/media.css b/program/js/tiny_mce/plugins/media/css/media.css
new file mode 100644
index 000000000..0c45c7ff6
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/css/media.css
@@ -0,0 +1,17 @@
+#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, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
+#width, #height { width: 40px }
+#src, #media_type { width: 250px }
+#class { width: 120px }
+#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
+.panel_wrapper div.current { height: 420px; 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 }
+iframe {border: 1px solid gray}
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin.js b/program/js/tiny_mce/plugins/media/editor_plugin.js
new file mode 100644
index 000000000..37b4320bd
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m<f.length;m++){k=f[m][0];q={name:k,clsids:tinymce.explode(f[m][1]||""),mimes:tinymce.explode(f[m][2]||""),codebase:f[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;a+=(a?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});a=new RegExp("write("+a+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(i,s){if(s.name==="img"&&n.dom.hasClass(s.node,"mceItemMedia")){s.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(s,t,i){if(i.nodeName==="IMG"&&i.className.indexOf("mceItemMedia")!==-1){t.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var s,i;i=n.selection.getNode();if(o(i)){s=n.dom.getAttrib(i,"data-mce-json");if(s){s=g.parse(s);tinymce.each(d,function(t){var u=n.dom.getAttrib(i,t);if(u){s[t]=u}});s.type=r.getType(i.className).name.toLowerCase()}}if(!s){s={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:s})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(s,i,t){i.setActive("media",o(t))})},convertUrl:function(k,n){var j=this,m=j.editor,l=m.settings,o=l.url_converter,i=l.url_converter_scope||j;if(!k){return k}if(n){return m.documentBaseURI.toAbsolute(k)}return o.call(i,k,"src","object")},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}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":g.serialize(m,"'")});n.width=m.width||(m.type=="audio"?"300":"320");n.height=m.height||(m.type=="audio"?"32":"240");return n},dataToHtml:function(i,j){return this.editor.serializer.serialize(this.dataToImg(i,j),{forced_root_block:"",force_absolute:j})},htmlToData:function(k){var j,i,l;l={type:"flash",video:{sources:[]},params:{}};j=this.editor.parser.parse(k);i=j.getAll("img")[0];if(i){l=g.parse(i.attr("data-mce-json"));l.type=this.getType(i.attr("class")).name.toLowerCase();tinymce.each(d,function(m){var n=i.attr(m);if(n){l[m]=n}})}return l},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(i,n){var M,L,N,K,J;J=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(J){M=p.documentBaseURI;G.params.src=J;if(p.getParam("flash_video_player_absvideourl",true)){i=M.toAbsolute(i||"",true);n=M.toAbsolute(n||"",true)}N="";L=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(L,function(P,O){P=P.replace(/\$url/,i||"");P=P.replace(/\$poster/,n||"");if(P.length>0){N+=(N?"&":"")+O+"="+escape(P)}});if(N.length){G.params.flashvars=N}K=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(K,function(P,O){G.params[O]=""+P})}}G=z.attr("data-mce-json");if(!G){return}G=g.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}if(q.name==="Iframe"){x=new b("iframe",1);tinymce.each(d,function(i){var n=z.attr(i);if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&n.length>0){x.attr(i,n)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new b("script",1).attr("type","text/javascript");y=new b("#text",3);y.value="write"+q.name+"("+g.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new b("video",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new b("audio",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new b("object",1).attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B});tinymce.each(d,function(i){var n=G[i];if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&i!="type"){H.attr(i,n)}});for(I in G.params){s=new b("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});H.append(j)}if(G.object_html){y=new b("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(i){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(i)}function J(O,i){return H[(O.attr(i)||"").toLowerCase()]}function p(O){var i=O.replace(/^.*\.([^.]+)$/,"$1");return H[i.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=a.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:g.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new b("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!h[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=s.attr("width");x=s.attr("height");G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(d,function(i){M.attr(i,s.attr(i))});for(N in s.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":g.serialize(K,"'")})}});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
new file mode 100644
index 000000000..ea79db18a
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
@@ -0,0 +1,890 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
+ mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
+
+ // Media types supported by this plugin
+ mediaTypes = [
+ // Type, clsid:s, mime types, codebase
+ ["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
+ ["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
+ ["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
+ ["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
+ ["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
+ ["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
+ ["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
+ ["Iframe"],
+ ["Video"],
+ ["EmbeddedAudio"],
+ ["Audio"]
+ ];
+
+ function toArray(obj) {
+ var undef, out, i;
+
+ if (obj && !obj.splice) {
+ out = [];
+
+ for (i = 0; true; i++) {
+ if (obj[i])
+ out[i] = obj[i];
+ else
+ break;
+ }
+
+ return out;
+ }
+
+ return obj;
+ };
+
+ tinymce.create('tinymce.plugins.MediaPlugin', {
+ init : function(ed, url) {
+ var self = this, lookup = {}, i, y, item, name;
+
+ function isMediaImg(node) {
+ return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
+ };
+
+ self.editor = ed;
+ self.url = url;
+
+ // Parse media types into a lookup table
+ scriptRegExp = '';
+ for (i = 0; i < mediaTypes.length; i++) {
+ name = mediaTypes[i][0];
+
+ item = {
+ name : name,
+ clsids : tinymce.explode(mediaTypes[i][1] || ''),
+ mimes : tinymce.explode(mediaTypes[i][2] || ''),
+ codebase : mediaTypes[i][3]
+ };
+
+ for (y = 0; y < item.clsids.length; y++)
+ lookup['clsid:' + item.clsids[y]] = item;
+
+ for (y = 0; y < item.mimes.length; y++)
+ lookup[item.mimes[y]] = item;
+
+ lookup['mceItem' + name] = item;
+ lookup[name.toLowerCase()] = item;
+
+ scriptRegExp += (scriptRegExp ? '|' : '') + name;
+ }
+
+ // Handle the media_types setting
+ tinymce.each(ed.getParam("media_types",
+ "video=mp4,m4v,ogv,webm;" +
+ "silverlight=xap;" +
+ "flash=swf,flv;" +
+ "shockwave=dcr;" +
+ "quicktime=mov,qt,mpg,mpeg;" +
+ "shockwave=dcr;" +
+ "windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
+ "realmedia=rm,ra,ram;" +
+ "java=jar;" +
+ "audio=mp3,ogg"
+ ).split(';'), function(item) {
+ var i, extensions, type;
+
+ item = item.split(/=/);
+ extensions = tinymce.explode(item[1].toLowerCase());
+ for (i = 0; i < extensions.length; i++) {
+ type = lookup[item[0].toLowerCase()];
+
+ if (type)
+ lookup[extensions[i]] = type;
+ }
+ });
+
+ scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
+ self.lookup = lookup;
+
+ ed.onPreInit.add(function() {
+ // Allow video elements
+ ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
+
+ // Convert video elements to image placeholder
+ ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
+ var i = nodes.length;
+
+ while (i--)
+ self.objectToImg(nodes[i]);
+ });
+
+ // Convert image placeholders to video elements
+ ed.serializer.addNodeFilter('img', function(nodes, name, args) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
+ self.imgToObject(node, args);
+ }
+ });
+ });
+
+ ed.onInit.add(function() {
+ // Display "media" instead of "img" in element path
+ if (ed.theme && ed.theme.onResolveName) {
+ ed.theme.onResolveName.add(function(theme, path_object) {
+ if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
+ path_object.name = 'media';
+ });
+ }
+
+ // Add contect menu if it's loaded
+ if (ed && ed.plugins.contextmenu) {
+ ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
+ if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
+ menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
+ });
+ }
+ });
+
+ // Register commands
+ ed.addCommand('mceMedia', function() {
+ var data, img;
+
+ img = ed.selection.getNode();
+ if (isMediaImg(img)) {
+ data = ed.dom.getAttrib(img, 'data-mce-json');
+ if (data) {
+ data = JSON.parse(data);
+
+ // Add some extra properties to the data object
+ tinymce.each(rootAttributes, function(name) {
+ var value = ed.dom.getAttrib(img, name);
+
+ if (value)
+ data[name] = value;
+ });
+
+ data.type = self.getType(img.className).name.toLowerCase();
+ }
+ }
+
+ if (!data) {
+ data = {
+ type : 'flash',
+ video: {sources:[]},
+ params: {}
+ };
+ }
+
+ ed.windowManager.open({
+ file : url + '/media.htm',
+ width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
+ height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url,
+ data : data
+ });
+ });
+
+ // Register buttons
+ ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
+
+ // Update media selection status
+ ed.onNodeChange.add(function(ed, cm, node) {
+ cm.setActive('media', isMediaImg(node));
+ });
+ },
+
+ convertUrl : function(url, force_absolute) {
+ var self = this, editor = self.editor, settings = editor.settings,
+ urlConverter = settings.url_converter,
+ urlConverterScope = settings.url_converter_scope || self;
+
+ if (!url)
+ return url;
+
+ if (force_absolute)
+ return editor.documentBaseURI.toAbsolute(url);
+
+ return urlConverter.call(urlConverterScope, url, 'src', 'object');
+ },
+
+ 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
+ };
+ },
+
+ /**
+ * Converts the JSON data object to an img node.
+ */
+ dataToImg : function(data, force_absolute) {
+ var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
+
+ data.params.src = self.convertUrl(data.params.src, force_absolute);
+
+ attrs = data.video.attrs;
+ if (attrs)
+ attrs.src = self.convertUrl(attrs.src, force_absolute);
+
+ if (attrs)
+ attrs.poster = self.convertUrl(attrs.poster, force_absolute);
+
+ sources = toArray(data.video.sources);
+ if (sources) {
+ for (i = 0; i < sources.length; i++)
+ sources[i].src = self.convertUrl(sources[i].src, force_absolute);
+ }
+
+ img = self.editor.dom.create('img', {
+ id : data.id,
+ style : data.style,
+ align : data.align,
+ hspace : data.hspace,
+ vspace : data.vspace,
+ src : self.editor.theme.url + '/img/trans.gif',
+ 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
+ 'data-mce-json' : JSON.serialize(data, "'")
+ });
+
+ img.width = data.width || (data.type == 'audio' ? "300" : "320");
+ img.height = data.height || (data.type == 'audio' ? "32" : "240");
+
+ return img;
+ },
+
+ /**
+ * Converts the JSON data object to a HTML string.
+ */
+ dataToHtml : function(data, force_absolute) {
+ return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
+ },
+
+ /**
+ * Converts the JSON data object to a HTML string.
+ */
+ htmlToData : function(html) {
+ var fragment, img, data;
+
+ data = {
+ type : 'flash',
+ video: {sources:[]},
+ params: {}
+ };
+
+ fragment = this.editor.parser.parse(html);
+ img = fragment.getAll('img')[0];
+
+ if (img) {
+ data = JSON.parse(img.attr('data-mce-json'));
+ data.type = this.getType(img.attr('class')).name.toLowerCase();
+
+ // Add some extra properties to the data object
+ tinymce.each(rootAttributes, function(name) {
+ var value = img.attr(name);
+
+ if (value)
+ data[name] = value;
+ });
+ }
+
+ return data;
+ },
+
+ /**
+ * Get type item by extension, class, clsid or mime type.
+ *
+ * @method getType
+ * @param {String} value Value to get type item by.
+ * @return {Object} Type item object or undefined.
+ */
+ getType : function(value) {
+ var i, values, typeItem;
+
+ // Find type by checking the classes
+ values = tinymce.explode(value, ' ');
+ for (i = 0; i < values.length; i++) {
+ typeItem = this.lookup[values[i]];
+
+ if (typeItem)
+ return typeItem;
+ }
+ },
+
+ /**
+ * Converts a tinymce.html.Node image element to video/object/embed.
+ */
+ imgToObject : function(node, args) {
+ var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
+ source, sources, params, param, typeItem, i, item, mp4Source, replacement,
+ posterSrc, style, audio;
+
+ // Adds the flash player
+ function addPlayer(video_src, poster_src) {
+ var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
+
+ flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
+ if (flashPlayer) {
+ baseUri = editor.documentBaseURI;
+ data.params.src = flashPlayer;
+
+ // Convert the movie url to absolute urls
+ if (editor.getParam('flash_video_player_absvideourl', true)) {
+ video_src = baseUri.toAbsolute(video_src || '', true);
+ poster_src = baseUri.toAbsolute(poster_src || '', true);
+ }
+
+ // Generate flash vars
+ flashVarsOutput = '';
+ flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
+ tinymce.each(flashVars, function(value, name) {
+ // Replace $url and $poster variables in flashvars value
+ value = value.replace(/\$url/, video_src || '');
+ value = value.replace(/\$poster/, poster_src || '');
+
+ if (value.length > 0)
+ flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
+ });
+
+ if (flashVarsOutput.length)
+ data.params.flashvars = flashVarsOutput;
+
+ params = editor.getParam('flash_video_player_params', {
+ allowfullscreen: true,
+ allowscriptaccess: true
+ });
+
+ tinymce.each(params, function(value, name) {
+ data.params[name] = "" + value;
+ });
+ }
+ };
+
+ data = node.attr('data-mce-json');
+ if (!data)
+ return;
+
+ data = JSON.parse(data);
+ typeItem = this.getType(node.attr('class'));
+
+ style = node.attr('data-mce-style')
+ if (!style) {
+ style = node.attr('style');
+
+ if (style)
+ style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
+ }
+
+ // Handle iframe
+ if (typeItem.name === 'Iframe') {
+ replacement = new Node('iframe', 1);
+
+ tinymce.each(rootAttributes, function(name) {
+ var value = node.attr(name);
+
+ if (name == 'class' && value)
+ value = value.replace(/mceItem.+ ?/g, '');
+
+ if (value && value.length > 0)
+ replacement.attr(name, value);
+ });
+
+ for (name in data.params)
+ replacement.attr(name, data.params[name]);
+
+ replacement.attr({
+ style: style,
+ src: data.params.src
+ });
+
+ node.replace(replacement);
+
+ return;
+ }
+
+ // Handle scripts
+ if (this.editor.settings.media_use_script) {
+ replacement = new Node('script', 1).attr('type', 'text/javascript');
+
+ value = new Node('#text', 3);
+ value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
+ width: node.attr('width'),
+ height: node.attr('height')
+ })) + ');';
+
+ replacement.append(value);
+ node.replace(replacement);
+
+ return;
+ }
+
+ // Add HTML5 video element
+ if (typeItem.name === 'Video' && data.video.sources[0]) {
+ // Create new object element
+ video = new Node('video', 1).attr(tinymce.extend({
+ id : node.attr('id'),
+ width: node.attr('width'),
+ height: node.attr('height'),
+ style : style
+ }, data.video.attrs));
+
+ // Get poster source and use that for flash fallback
+ if (data.video.attrs)
+ posterSrc = data.video.attrs.poster;
+
+ sources = data.video.sources = toArray(data.video.sources);
+ for (i = 0; i < sources.length; i++) {
+ if (/\.mp4$/.test(sources[i].src))
+ mp4Source = sources[i].src;
+ }
+
+ if (!sources[0].type) {
+ video.attr('src', sources[0].src);
+ sources.splice(0, 1);
+ }
+
+ for (i = 0; i < sources.length; i++) {
+ source = new Node('source', 1).attr(sources[i]);
+ source.shortEnded = true;
+ video.append(source);
+ }
+
+ // Create flash fallback for video if we have a mp4 source
+ if (mp4Source) {
+ addPlayer(mp4Source, posterSrc);
+ typeItem = self.getType('flash');
+ } else
+ data.params.src = '';
+ }
+
+ // Add HTML5 audio element
+ if (typeItem.name === 'Audio' && data.video.sources[0]) {
+ // Create new object element
+ audio = new Node('audio', 1).attr(tinymce.extend({
+ id : node.attr('id'),
+ width: node.attr('width'),
+ height: node.attr('height'),
+ style : style
+ }, data.video.attrs));
+
+ // Get poster source and use that for flash fallback
+ if (data.video.attrs)
+ posterSrc = data.video.attrs.poster;
+
+ sources = data.video.sources = toArray(data.video.sources);
+ if (!sources[0].type) {
+ audio.attr('src', sources[0].src);
+ sources.splice(0, 1);
+ }
+
+ for (i = 0; i < sources.length; i++) {
+ source = new Node('source', 1).attr(sources[i]);
+ source.shortEnded = true;
+ audio.append(source);
+ }
+
+ data.params.src = '';
+ }
+
+ if (typeItem.name === 'EmbeddedAudio') {
+ embed = new Node('embed', 1);
+ embed.shortEnded = true;
+ embed.attr({
+ id: node.attr('id'),
+ width: node.attr('width'),
+ height: node.attr('height'),
+ style : style,
+ type: node.attr('type')
+ });
+
+ for (name in data.params)
+ embed.attr(name, data.params[name]);
+
+ tinymce.each(rootAttributes, function(name) {
+ if (data[name] && name != 'type')
+ embed.attr(name, data[name]);
+ });
+
+ data.params.src = '';
+ }
+
+ // Do we have a params src then we can generate object
+ if (data.params.src) {
+ // Is flv movie add player for it
+ if (/\.flv$/i.test(data.params.src))
+ addPlayer(data.params.src, '');
+
+ if (args && args.force_absolute)
+ data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
+
+ // Create new object element
+ object = new Node('object', 1).attr({
+ id : node.attr('id'),
+ width: node.attr('width'),
+ height: node.attr('height'),
+ style : style
+ });
+
+ tinymce.each(rootAttributes, function(name) {
+ var value = data[name];
+
+ if (name == 'class' && value)
+ value = value.replace(/mceItem.+ ?/g, '');
+
+ if (value && name != 'type')
+ object.attr(name, value);
+ });
+
+ // Add params
+ for (name in data.params) {
+ param = new Node('param', 1);
+ param.shortEnded = true;
+ value = data.params[name];
+
+ // Windows media needs to use url instead of src for the media URL
+ if (name === 'src' && typeItem.name === 'WindowsMedia')
+ name = 'url';
+
+ param.attr({name: name, value: value});
+ object.append(param);
+ }
+
+ // Setup add type and classid if strict is disabled
+ if (this.editor.getParam('media_strict', true)) {
+ object.attr({
+ data: data.params.src,
+ type: typeItem.mimes[0]
+ });
+ } else {
+ object.attr({
+ classid: "clsid:" + typeItem.clsids[0],
+ codebase: typeItem.codebase
+ });
+
+ embed = new Node('embed', 1);
+ embed.shortEnded = true;
+ embed.attr({
+ id: node.attr('id'),
+ width: node.attr('width'),
+ height: node.attr('height'),
+ style : style,
+ type: typeItem.mimes[0]
+ });
+
+ for (name in data.params)
+ embed.attr(name, data.params[name]);
+
+ tinymce.each(rootAttributes, function(name) {
+ if (data[name] && name != 'type')
+ embed.attr(name, data[name]);
+ });
+
+ object.append(embed);
+ }
+
+ // Insert raw HTML
+ if (data.object_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.object_html;
+ object.append(value);
+ }
+
+ // Append object to video element if it exists
+ if (video)
+ video.append(object);
+ }
+
+ if (video) {
+ // Insert raw HTML
+ if (data.video_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.video_html;
+ video.append(value);
+ }
+ }
+
+ if (audio) {
+ // Insert raw HTML
+ if (data.video_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.video_html;
+ audio.append(value);
+ }
+ }
+
+ var n = video || audio || object || embed;
+ if (n)
+ node.replace(n);
+ else
+ node.remove();
+ },
+
+ /**
+ * Converts a tinymce.html.Node video/object/embed to an img element.
+ *
+ * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
+ * <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
+ *
+ * The JSON structure will be like this:
+ * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
+ */
+ objectToImg : function(node) {
+ var object, embed, video, iframe, img, name, id, width, height, style, i, html,
+ param, params, source, sources, data, type, lookup = this.lookup,
+ matches, attrs, urlConverter = this.editor.settings.url_converter,
+ urlConverterScope = this.editor.settings.url_converter_scope,
+ hspace, vspace, align, bgcolor;
+
+ function getInnerHTML(node) {
+ return new tinymce.html.Serializer({
+ inner: true,
+ validate: false
+ }).serialize(node);
+ };
+
+ function lookupAttribute(o, attr) {
+ return lookup[(o.attr(attr) || '').toLowerCase()];
+ }
+
+ function lookupExtension(src) {
+ var ext = src.replace(/^.*\.([^.]+)$/, '$1');
+ return lookup[ext.toLowerCase() || ''];
+ }
+
+ // If node isn't in document
+ if (!node.parent)
+ return;
+
+ // Handle media scripts
+ if (node.name === 'script') {
+ if (node.firstChild)
+ matches = scriptRegExp.exec(node.firstChild.value);
+
+ if (!matches)
+ return;
+
+ type = matches[1];
+ data = {video : {}, params : JSON.parse(matches[2])};
+ width = data.params.width;
+ height = data.params.height;
+ }
+
+ // Setup data objects
+ data = data || {
+ video : {},
+ params : {}
+ };
+
+ // Setup new image object
+ img = new Node('img', 1);
+ img.attr({
+ src : this.editor.theme.url + '/img/trans.gif'
+ });
+
+ // Video element
+ name = node.name;
+ if (name === 'video' || name == 'audio') {
+ video = node;
+ object = node.getAll('object')[0];
+ embed = node.getAll('embed')[0];
+ width = video.attr('width');
+ height = video.attr('height');
+ id = video.attr('id');
+ data.video = {attrs : {}, sources : []};
+
+ // Get all video attributes
+ attrs = data.video.attrs;
+ for (name in video.attributes.map)
+ attrs[name] = video.attributes.map[name];
+
+ source = node.attr('src');
+ if (source)
+ data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
+
+ // Get all sources
+ sources = video.getAll("source");
+ for (i = 0; i < sources.length; i++) {
+ source = sources[i].remove();
+
+ data.video.sources.push({
+ src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
+ type: source.attr('type'),
+ media: source.attr('media')
+ });
+ }
+
+ // Convert the poster URL
+ if (attrs.poster)
+ attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
+ }
+
+ // Object element
+ if (node.name === 'object') {
+ object = node;
+ embed = node.getAll('embed')[0];
+ }
+
+ // Embed element
+ if (node.name === 'embed')
+ embed = node;
+
+ // Iframe element
+ if (node.name === 'iframe') {
+ iframe = node;
+ type = 'Iframe';
+ }
+
+ if (object) {
+ // Get width/height
+ width = width || object.attr('width');
+ height = height || object.attr('height');
+ style = style || object.attr('style');
+ id = id || object.attr('id');
+ hspace = hspace || object.attr('hspace');
+ vspace = vspace || object.attr('vspace');
+ align = align || object.attr('align');
+ bgcolor = bgcolor || object.attr('bgcolor');
+ data.name = object.attr('name');
+
+ // Get all object params
+ params = object.getAll("param");
+ for (i = 0; i < params.length; i++) {
+ param = params[i];
+ name = param.remove().attr('name');
+
+ if (!excludedAttrs[name])
+ data.params[name] = param.attr('value');
+ }
+
+ data.params.src = data.params.src || object.attr('data');
+ }
+
+ if (embed) {
+ // Get width/height
+ width = width || embed.attr('width');
+ height = height || embed.attr('height');
+ style = style || embed.attr('style');
+ id = id || embed.attr('id');
+ hspace = hspace || embed.attr('hspace');
+ vspace = vspace || embed.attr('vspace');
+ align = align || embed.attr('align');
+ bgcolor = bgcolor || embed.attr('bgcolor');
+
+ // Get all embed attributes
+ for (name in embed.attributes.map) {
+ if (!excludedAttrs[name] && !data.params[name])
+ data.params[name] = embed.attributes.map[name];
+ }
+ }
+
+ if (iframe) {
+ // Get width/height
+ width = iframe.attr('width');
+ height = iframe.attr('height');
+ style = style || iframe.attr('style');
+ id = iframe.attr('id');
+ hspace = iframe.attr('hspace');
+ vspace = iframe.attr('vspace');
+ align = iframe.attr('align');
+ bgcolor = iframe.attr('bgcolor');
+
+ tinymce.each(rootAttributes, function(name) {
+ img.attr(name, iframe.attr(name));
+ });
+
+ // Get all iframe attributes
+ for (name in iframe.attributes.map) {
+ if (!excludedAttrs[name] && !data.params[name])
+ data.params[name] = iframe.attributes.map[name];
+ }
+ }
+
+ // Use src not movie
+ if (data.params.movie) {
+ data.params.src = data.params.src || data.params.movie;
+ delete data.params.movie;
+ }
+
+ // Convert the URL to relative/absolute depending on configuration
+ if (data.params.src)
+ data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
+
+ if (video) {
+ if (node.name === 'video')
+ type = lookup.video.name;
+ else if (node.name === 'audio')
+ type = lookup.audio.name;
+ }
+
+ if (object && !type)
+ type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
+
+ if (embed && !type)
+ type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
+
+ // for embedded audio we preserve the original specified type
+ if (embed && type == 'EmbeddedAudio') {
+ data.params.type = embed.attr('type');
+ }
+
+ // Replace the video/object/embed element with a placeholder image containing the data
+ node.replace(img);
+
+ // Remove embed
+ if (embed)
+ embed.remove();
+
+ // Serialize the inner HTML of the object element
+ if (object) {
+ html = getInnerHTML(object.remove());
+
+ if (html)
+ data.object_html = html;
+ }
+
+ // Serialize the inner HTML of the video element
+ if (video) {
+ html = getInnerHTML(video.remove());
+
+ if (html)
+ data.video_html = html;
+ }
+
+ data.hspace = hspace;
+ data.vspace = vspace;
+ data.align = align;
+ data.bgcolor = bgcolor;
+
+ // Set width/height of placeholder
+ img.attr({
+ id : id,
+ 'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
+ style : style,
+ width : width || (node.name == 'audio' ? "300" : "320"),
+ height : height || (node.name == 'audio' ? "32" : "240"),
+ hspace : hspace,
+ vspace : vspace,
+ align : align,
+ bgcolor : bgcolor,
+ "data-mce-json" : JSON.serialize(data, "'")
+ });
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
+})();
diff --git a/program/js/tiny_mce/plugins/media/js/embed.js b/program/js/tiny_mce/plugins/media/js/embed.js
new file mode 100644
index 000000000..f8dc81052
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/js/embed.js
@@ -0,0 +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);
+}
diff --git a/program/js/tiny_mce/plugins/media/js/media.js b/program/js/tiny_mce/plugins/media/js/media.js
new file mode 100644
index 000000000..c4ec45303
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/js/media.js
@@ -0,0 +1,453 @@
+(function() {
+ var 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 get(id) {
+ return document.getElementById(id);
+ }
+
+ function clone(obj) {
+ var i, len, copy, attr;
+
+ if (null == obj || "object" != typeof obj)
+ return obj;
+
+ // Handle Array
+ if ('length' in obj) {
+ copy = [];
+
+ for (i = 0, len = obj.length; i < len; ++i) {
+ copy[i] = clone(obj[i]);
+ }
+
+ return copy;
+ }
+
+ // Handle Object
+ copy = {};
+ for (attr in obj) {
+ if (obj.hasOwnProperty(attr))
+ copy[attr] = clone(obj[attr]);
+ }
+
+ return copy;
+ }
+
+ function getVal(id) {
+ var elm = get(id);
+
+ if (elm.nodeName == "SELECT")
+ return elm.options[elm.selectedIndex].value;
+
+ if (elm.type == "checkbox")
+ return elm.checked;
+
+ return elm.value;
+ }
+
+ function setVal(id, value, name) {
+ if (typeof(value) != 'undefined') {
+ var elm = get(id);
+
+ if (elm.nodeName == "SELECT")
+ selectByValue(document.forms[0], id, value);
+ else if (elm.type == "checkbox") {
+ if (typeof(value) == 'string') {
+ value = value.toLowerCase();
+ value = (!name && value === 'true') || (name && value === name.toLowerCase());
+ }
+ elm.checked = !!value;
+ } else
+ elm.value = value;
+ }
+ }
+
+ window.Media = {
+ init : function() {
+ var html, editor;
+
+ this.editor = editor = tinyMCEPopup.editor;
+
+ // Setup file browsers and color pickers
+ get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
+ get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
+ get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+ get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
+ get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
+ get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
+ get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
+ get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
+
+ html = this.getMediaListHTML('medialist', 'src', 'media', 'media');
+ if (html == "")
+ get("linklistrow").style.display = 'none';
+ else
+ get("linklistcontainer").innerHTML = html;
+
+ if (isVisible('filebrowser'))
+ get('src').style.width = '230px';
+
+ if (isVisible('video_filebrowser_altsource1'))
+ get('video_altsource1').style.width = '220px';
+
+ if (isVisible('video_filebrowser_altsource2'))
+ get('video_altsource2').style.width = '220px';
+
+ if (isVisible('audio_filebrowser_altsource1'))
+ get('audio_altsource1').style.width = '220px';
+
+ if (isVisible('audio_filebrowser_altsource2'))
+ get('audio_altsource2').style.width = '220px';
+
+ if (isVisible('filebrowser_poster'))
+ get('video_poster').style.width = '220px';
+
+ editor.dom.setOuterHTML(get('media_type'), this.getMediaTypeHTML(editor));
+
+ this.data = clone(tinyMCEPopup.getWindowArg('data'));
+ this.dataToForm();
+ this.preview();
+
+ updateColor('bgcolor_pick', 'bgcolor');
+ },
+
+ insert : function() {
+ var editor = tinyMCEPopup.editor;
+
+ this.formToData();
+ editor.execCommand('mceRepaint');
+ tinyMCEPopup.restoreSelection();
+ editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
+ tinyMCEPopup.close();
+ },
+
+ preview : function() {
+ get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
+ },
+
+ moveStates : function(to_form, field) {
+ var data = this.data, editor = this.editor,
+ mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
+
+ defaultStates = {
+ // QuickTime
+ quicktime_autoplay : true,
+ quicktime_controller : true,
+
+ // Flash
+ flash_play : true,
+ flash_loop : true,
+ flash_menu : true,
+
+ // WindowsMedia
+ windowsmedia_autostart : true,
+ windowsmedia_enablecontextmenu : true,
+ windowsmedia_invokeurls : true,
+
+ // RealMedia
+ realmedia_autogotourl : true,
+ realmedia_imagestatus : true
+ };
+
+ function parseQueryParams(str) {
+ var out = {};
+
+ if (str) {
+ tinymce.each(str.split('&'), function(item) {
+ var parts = item.split('=');
+
+ out[unescape(parts[0])] = unescape(parts[1]);
+ });
+ }
+
+ return out;
+ };
+
+ function setOptions(type, names) {
+ var i, name, formItemName, value, list;
+
+ if (type == data.type || type == 'global') {
+ names = tinymce.explode(names);
+ for (i = 0; i < names.length; i++) {
+ name = names[i];
+ formItemName = type == 'global' ? name : type + '_' + name;
+
+ if (type == 'global')
+ list = data;
+ else if (type == 'video' || type == 'audio') {
+ list = data.video.attrs;
+
+ if (!list && !to_form)
+ data.video.attrs = list = {};
+ } else
+ list = data.params;
+
+ if (list) {
+ if (to_form) {
+ setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
+ } else {
+ delete list[name];
+
+ value = getVal(formItemName);
+ if ((type == 'video' || type == 'audio') && value === true)
+ value = name;
+
+ if (defaultStates[formItemName]) {
+ if (value !== defaultStates[formItemName]) {
+ value = "" + value;
+ list[name] = value;
+ }
+ } else if (value) {
+ value = "" + value;
+ list[name] = value;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!to_form) {
+ data.type = get('media_type').options[get('media_type').selectedIndex].value;
+ data.width = getVal('width');
+ data.height = getVal('height');
+
+ // Switch type based on extension
+ src = getVal('src');
+ if (field == 'src') {
+ ext = src.replace(/^.*\.([^.]+)$/, '$1');
+ if (typeInfo = mediaPlugin.getType(ext))
+ data.type = typeInfo.name.toLowerCase();
+
+ setVal('media_type', data.type);
+ }
+
+ if (data.type == "video" || data.type == "audio") {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src: getVal('src')};
+ }
+ }
+
+ // Hide all fieldsets and show the one active
+ get('video_options').style.display = 'none';
+ get('audio_options').style.display = 'none';
+ get('flash_options').style.display = 'none';
+ get('quicktime_options').style.display = 'none';
+ get('shockwave_options').style.display = 'none';
+ get('windowsmedia_options').style.display = 'none';
+ get('realmedia_options').style.display = 'none';
+ get('embeddedaudio_options').style.display = 'none';
+
+ if (get(data.type + '_options'))
+ get(data.type + '_options').style.display = 'block';
+
+ setVal('media_type', data.type);
+
+ setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
+ setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
+ setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
+ setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
+ setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
+ setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
+ setOptions('audio', 'autoplay,loop,preload,controls');
+ setOptions('embeddedaudio', 'autoplay,loop,controls');
+ setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
+
+ if (to_form) {
+ if (data.type == 'video') {
+ if (data.video.sources[0])
+ setVal('src', data.video.sources[0].src);
+
+ src = data.video.sources[1];
+ if (src)
+ setVal('video_altsource1', src.src);
+
+ src = data.video.sources[2];
+ if (src)
+ setVal('video_altsource2', src.src);
+ } else if (data.type == 'audio') {
+ if (data.video.sources[0])
+ setVal('src', data.video.sources[0].src);
+
+ src = data.video.sources[1];
+ if (src)
+ setVal('audio_altsource1', src.src);
+
+ src = data.video.sources[2];
+ if (src)
+ setVal('audio_altsource2', src.src);
+ } else {
+ // Check flash vars
+ if (data.type == 'flash') {
+ tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
+ if (value == '$url')
+ data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
+ });
+ }
+
+ setVal('src', data.params.src);
+ }
+ } else {
+ src = getVal("src");
+
+ // YouTube *NEW*
+ if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // YouTube
+ if (src.match(/youtube.com(.+)v=([^&]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // Google video
+ if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
+ data.width = 425;
+ data.height = 326;
+ data.type = 'flash';
+ src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ if (data.type == 'video') {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src : src};
+
+ src = getVal("video_altsource1");
+ if (src)
+ data.video.sources[1] = {src : src};
+
+ src = getVal("video_altsource2");
+ if (src)
+ data.video.sources[2] = {src : src};
+ } else if (data.type == 'audio') {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src : src};
+
+ src = getVal("audio_altsource1");
+ if (src)
+ data.video.sources[1] = {src : src};
+
+ src = getVal("audio_altsource2");
+ if (src)
+ data.video.sources[2] = {src : src};
+ } else
+ data.params.src = src;
+
+ // Set default size
+ setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
+ setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
+ }
+ },
+
+ dataToForm : function() {
+ this.moveStates(true);
+ },
+
+ formToData : function(field) {
+ if (field == "width" || field == "height")
+ this.changeSize(field);
+
+ if (field == 'source') {
+ this.moveStates(false, field);
+ setVal('source', this.editor.plugins.media.dataToHtml(this.data));
+ this.panel = 'source';
+ } else {
+ if (this.panel == 'source') {
+ this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
+ this.dataToForm();
+ this.panel = '';
+ }
+
+ this.moveStates(false, field);
+ this.preview();
+ }
+ },
+
+ beforeResize : function() {
+ this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
+ this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
+ },
+
+ changeSize : function(type) {
+ var width, height, scale, size;
+
+ if (get('constrain').checked) {
+ width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
+ height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
+
+ if (type == 'width') {
+ this.height = Math.round((width / this.width) * height);
+ setVal('height', this.height);
+ } else {
+ this.width = Math.round((height / this.height) * width);
+ setVal('width', this.width);
+ }
+ }
+ },
+
+ getMediaListHTML : function() {
+ 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;Media.formToData(\'src\');">';
+ 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 "";
+ },
+
+ getMediaTypeHTML : function(editor) {
+ var html = "";
+ html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
+ html += '<option value="video">HTML5 Video</option>';
+ html += '<option value="audio">HTML5 Audio</option>';
+ html += '<option value="flash">Flash</option>';
+ html += '<option value="quicktime">QuickTime</option>';
+ html += '<option value="shockwave">Shockwave</option>';
+ html += '<option value="windowsmedia">Windows Media</option>';
+ html += '<option value="realmedia">Real Media</option>';
+ html += '<option value="iframe">Iframe</option>';
+
+ if (editor.getParam('media_embedded_audio', false)) {
+ html += '<option value="embeddedaudio">Embedded Audio</option>';
+ }
+
+ html += '</select>';
+ return html;
+ }
+ };
+
+ tinyMCEPopup.requireLangPack();
+ tinyMCEPopup.onInit.add(function() {
+ Media.init();
+ });
+})();
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..49412596a
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options"}); \ 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
new file mode 100644
index 000000000..957d83a68
--- /dev/null
+++ b/program/js/tiny_mce/plugins/media/media.htm
@@ -0,0 +1,922 @@
+<!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>{#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" />
+</head>
+<body style="display: none" role="application">
+<form onsubmit="Media.insert();return false;" action="#">
+ <div class="tabs" role="presentation">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
+ <li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#media_dlg.general}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="media_type">{#media_dlg.type}</label></td>
+ <td>
+ <select id="media_type"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="src">{#media_dlg.file}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
+ <td id="filebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr id="linklistrow">
+ <td><label for="linklist">{#media_dlg.list}</label></td>
+ <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td><label for="width">{#media_dlg.size}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
+ <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#media_dlg.preview}</legend>
+ <div id="prev"></div>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#media_dlg.advanced}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
+ <tr>
+ <td><label for="id">{#media_dlg.id}</label></td>
+ <td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
+ <td><label for="name">{#media_dlg.name}</label></td>
+ <td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="align">{#media_dlg.align}</label></td>
+ <td>
+ <select id="align" name="align" onchange="Media.formToData();">
+ <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">{#media_dlg.bgcolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="vspace">{#media_dlg.vspace}</label></td>
+ <td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
+ <td><label for="hspace">{#media_dlg.hspace}</label></td>
+ <td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="video_options">
+ <legend>{#media_dlg.html5_video_options}</legend>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_altsource1_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_altsource2_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_poster">{#media_dlg.poster}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_poster_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_preload">{#media_dlg.preload}</label></td>
+ <td>
+ <select id="video_preload" name="video_preload" onchange="Media.formToData();">
+ <option value="none">{#media_dlg.preload_none}</option>
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
+ <option value="auto">{#media_dlg.preload_auto}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="video_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
+ <td><label for="video_muted">{#media_dlg.mute}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
+ <td><label for="video_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
+ <td><label for="video_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="embeddedaudio_options">
+ <legend>{#media_dlg.embedded_audio_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="audio_options">
+ <legend>{#media_dlg.html5_audio_options}</legend>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="audio_altsource1_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="audio_altsource2_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="audio_preload">{#media_dlg.preload}</label></td>
+ <td>
+ <select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
+ <option value="none">{#media_dlg.preload_none}</option>
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
+ <option value="auto">{#media_dlg.preload_auto}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="flash_options">
+ <legend>{#media_dlg.flash_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="flash_quality">{#media_dlg.quality}</label></td>
+ <td>
+ <select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="high">high</option>
+ <option value="low">low</option>
+ <option value="autolow">autolow</option>
+ <option value="autohigh">autohigh</option>
+ <option value="best">best</option>
+ </select>
+ </td>
+
+ <td><label for="flash_scale">{#media_dlg.scale}</label></td>
+ <td>
+ <select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
+ <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">{#media_dlg.wmode}</label></td>
+ <td>
+ <select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
+ <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">{#media_dlg.salign}</label></td>
+ <td>
+ <select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
+ <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>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_play">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_menu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
+ <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="flash_base">{#media_dlg.base}</label></td>
+ <td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
+ <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="quicktime_options">
+ <legend>{#media_dlg.qt_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
+ <td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="tofit">tofit</option>
+ <option value="aspect">aspect</option>
+ </select>
+ </td>
+
+ <td colspan="2">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
+ <td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
+ <td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_target">{#media_dlg.target}</label></td>
+ <td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_href">{#media_dlg.href}</label></td>
+ <td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
+ <td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
+ <td colspan="4">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
+ <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="windowsmedia_options">
+ <legend>{#media_dlg.wmp_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
+ <td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
+ <td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
+ <td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
+ <td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
+ <td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
+ <td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
+ <td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
+ <td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
+ <td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ </table>
+ </fieldset>
+
+ <fieldset id="realmedia_options">
+ <legend>{#media_dlg.rmp_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_center">{#media_dlg.center}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ &nbsp;
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="realmedia_console">{#media_dlg.console}</label></td>
+ <td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
+
+ <td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
+ <td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
+ <td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
+
+ <td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
+ <td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="shockwave_options">
+ <legend>{#media_dlg.shockwave_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
+ <td>
+ <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
+ <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">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
+ <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">{#media_dlg.swstretchvalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
+ <option value="none">{#not_set}</option>
+ <option value="meet">Meet</option>
+ <option value="fill">Fill</option>
+ <option value="stage">Stage</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
+ <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="source_panel" class="panel">
+ <fieldset>
+ <legend>{#media_dlg.source}</legend>
+ <textarea id="source" style="width: 99%; height: 390px"></textarea>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>