summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/media
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
committerhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
commitf61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch)
tree3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/media
parent3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff)
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/media')
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/css/content.css6
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/css/media.css16
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/editor_plugin.js1
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/editor_plugin_src.js400
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/flash.gifbin0 -> 241 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/flv_player.swfbin0 -> 11668 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/quicktime.gifbin0 -> 303 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/realmedia.gifbin0 -> 439 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/shockwave.gifbin0 -> 387 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/trans.gifbin0 -> 43 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/img/windowsmedia.gifbin0 -> 415 bytes
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/js/embed.js73
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/js/media.js630
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/langs/en_dlg.js103
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/media/media.htm824
15 files changed, 2053 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/media/css/content.css b/public/javascripts/tiny_mce/plugins/media/css/content.css
new file mode 100755
index 0000000..1bf6a75
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/css/content.css
@@ -0,0 +1,6 @@
1.mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;}
2.mceItemShockWave {background-image: url(../img/shockwave.gif);}
3.mceItemFlash {background-image:url(../img/flash.gif);}
4.mceItemQuickTime {background-image:url(../img/quicktime.gif);}
5.mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);}
6.mceItemRealMedia {background-image:url(../img/realmedia.gif);}
diff --git a/public/javascripts/tiny_mce/plugins/media/css/media.css b/public/javascripts/tiny_mce/plugins/media/css/media.css
new file mode 100755
index 0000000..2d08794
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/css/media.css
@@ -0,0 +1,16 @@
1#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
2#hspace, #vspace { width: 50px }
3#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
4#flash_base, #flash_flashvars { width: 240px }
5#width, #height { width: 40px }
6#src, #media_type { width: 250px }
7#class { width: 120px }
8#prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto }
9.panel_wrapper div.current { height: 390px; overflow: auto }
10#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
11.mceAddSelectValue { background-color: #DDDDDD }
12#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 }
13#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
14#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
15#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
16#qt_qtsrc { width: 200px }
diff --git a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js
new file mode 100755
index 0000000..b226b00
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js
@@ -0,0 +1 @@
(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.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_mce_value]');});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'};ed.selection.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.selection.onBeforeSetContent.add(t._objectsToSpans,t);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(t._objectsToSpans,t);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(/_mce_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};},_objectsToSpans:function(ed,o){var t=this,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="'+t.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></span>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object)([^>]*)>/gi,'</span>');h=h.replace(/<\/embed>/gi,'');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_mce_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title),stc;stc=ed.getParam('media_strict',true)&&o.type=='application/x-shockwave-flash';p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;if(p.src)p.src=ed.convertURL(p.src,'src',n);if(stc){ob=dom.create('span',{mce_name:'object',type:'application/x-shockwave-flash',data:p.src,width:o.width,height:o.height});}else{ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});}each(p,function(v,k){if(!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';if(v)dom.add(ob,'span',{mce_name:'param',name:k,'_mce_value':v});}});if(!stc)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='',args;args=['id','name','width','height','bgcolor','align','flashvars','src','wmode','allowfullscreen','quality'];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(args,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,'_mce_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}n=dom.select('.mceItemEmbed',n)[0];if(n){each(args,function(na){var v=dom.getAttrib(n,na);if(v&&!pa[na])pa[na]=v;});}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/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js
new file mode 100755
index 0000000..beec3bf
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js
@@ -0,0 +1,400 @@
1/**
2 * $Id: editor_plugin_src.js 952 2008-11-03 17:56:04Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 var each = tinymce.each;
10
11 tinymce.create('tinymce.plugins.MediaPlugin', {
12 init : function(ed, url) {
13 var t = this;
14
15 t.editor = ed;
16 t.url = url;
17
18 function isMediaElm(n) {
19 return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);
20 };
21
22 ed.onPreInit.add(function() {
23 // Force in _value parameter this extra parameter is required for older Opera versions
24 ed.serializer.addRules('param[name|value|_mce_value]');
25 });
26
27 // Register commands
28 ed.addCommand('mceMedia', function() {
29 ed.windowManager.open({
30 file : url + '/media.htm',
31 width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
32 height : 470 + parseInt(ed.getLang('media.delta_height', 0)),
33 inline : 1
34 }, {
35 plugin_url : url
36 });
37 });
38
39 // Register buttons
40 ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
41
42 ed.onNodeChange.add(function(ed, cm, n) {
43 cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n));
44 });
45
46 ed.onInit.add(function() {
47 var lo = {
48 mceItemFlash : 'flash',
49 mceItemShockWave : 'shockwave',
50 mceItemWindowsMedia : 'windowsmedia',
51 mceItemQuickTime : 'quicktime',
52 mceItemRealMedia : 'realmedia'
53 };
54
55 ed.selection.onSetContent.add(function() {
56 t._spansToImgs(ed.getBody());
57 });
58
59 ed.selection.onBeforeSetContent.add(t._objectsToSpans, t);
60
61 if (ed.settings.content_css !== false)
62 ed.dom.loadCSS(url + "/css/content.css");
63
64 if (ed.theme.onResolveName) {
65 ed.theme.onResolveName.add(function(th, o) {
66 if (o.name == 'img') {
67 each(lo, function(v, k) {
68 if (ed.dom.hasClass(o.node, k)) {
69 o.name = v;
70 o.title = ed.dom.getAttrib(o.node, 'title');
71 return false;
72 }
73 });
74 }
75 });
76 }
77
78 if (ed && ed.plugins.contextmenu) {
79 ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
80 if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) {
81 m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
82 }
83 });
84 }
85 });
86
87 ed.onBeforeSetContent.add(t._objectsToSpans, t);
88
89 ed.onSetContent.add(function() {
90 t._spansToImgs(ed.getBody());
91 });
92
93 ed.onPreProcess.add(function(ed, o) {
94 var dom = ed.dom;
95
96 if (o.set) {
97 t._spansToImgs(o.node);
98
99 each(dom.select('IMG', o.node), function(n) {
100 var p;
101
102 if (isMediaElm(n)) {
103 p = t._parse(n.title);
104 dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100));
105 dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100));
106 }
107 });
108 }
109
110 if (o.get) {
111 each(dom.select('IMG', o.node), function(n) {
112 var ci, cb, mt;
113
114 if (ed.getParam('media_use_script')) {
115 if (isMediaElm(n))
116 n.className = n.className.replace(/mceItem/g, 'mceTemp');
117
118 return;
119 }
120
121 switch (n.className) {
122 case 'mceItemFlash':
123 ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000';
124 cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
125 mt = 'application/x-shockwave-flash';
126 break;
127
128 case 'mceItemShockWave':
129 ci = '166b1bca-3f9c-11cf-8075-444553540000';
130 cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
131 mt = 'application/x-director';
132 break;
133
134 case 'mceItemWindowsMedia':
135 ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6';
136 cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
137 mt = 'application/x-mplayer2';
138 break;
139
140 case 'mceItemQuickTime':
141 ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b';
142 cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
143 mt = 'video/quicktime';
144 break;
145
146 case 'mceItemRealMedia':
147 ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa';
148 cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
149 mt = 'audio/x-pn-realaudio-plugin';
150 break;
151 }
152
153 if (ci) {
154 dom.replace(t._buildObj({
155 classid : ci,
156 codebase : cb,
157 type : mt
158 }, n), n);
159 }
160 });
161 }
162 });
163
164 ed.onPostProcess.add(function(ed, o) {
165 o.content = o.content.replace(/_mce_value=/g, 'value=');
166 });
167
168 if (ed.getParam('media_use_script')) {
169 function getAttr(s, n) {
170 n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
171
172 return n ? ed.dom.decode(n[1]) : '';
173 };
174
175 ed.onPostProcess.add(function(ed, o) {
176 o.content = o.content.replace(/<img[^>]+>/g, function(im) {
177 var cl = getAttr(im, 'class');
178
179 if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) {
180 at = t._parse(getAttr(im, 'title'));
181 at.width = getAttr(im, 'width');
182 at.height = getAttr(im, 'height');
183 im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>';
184 }
185
186 return im;
187 });
188 });
189 }
190 },
191
192 getInfo : function() {
193 return {
194 longname : 'Media',
195 author : 'Moxiecode Systems AB',
196 authorurl : 'http://tinymce.moxiecode.com',
197 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
198 version : tinymce.majorVersion + "." + tinymce.minorVersion
199 };
200 },
201
202 // Private methods
203 _objectsToSpans : function(ed, o) {
204 var t = this, h = o.content;
205
206 h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) {
207 var o = t._parse(c);
208
209 return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + t.url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />'
210 });
211
212 h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>');
213 h = h.replace(/<embed([^>]*)\/?>/gi, '<span class="mceItemEmbed" $1></span>');
214 h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>');
215 h = h.replace(/<\/(object)([^>]*)>/gi, '</span>');
216 h = h.replace(/<\/embed>/gi, '');
217 h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_mce_value=') + ' class="mceItemParam"></span>'});
218 h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam"></span>');
219
220 o.content = h;
221 },
222
223 _buildObj : function(o, n) {
224 var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc;
225
226 stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash';
227
228 p.width = o.width = dom.getAttrib(n, 'width') || 100;
229 p.height = o.height = dom.getAttrib(n, 'height') || 100;
230
231 if (p.src)
232 p.src = ed.convertURL(p.src, 'src', n);
233
234 if (stc) {
235 ob = dom.create('span', {
236 mce_name : 'object',
237 type : 'application/x-shockwave-flash',
238 data : p.src,
239 width : o.width,
240 height : o.height
241 });
242 } else {
243 ob = dom.create('span', {
244 mce_name : 'object',
245 classid : "clsid:" + o.classid,
246 codebase : o.codebase,
247 width : o.width,
248 height : o.height
249 });
250 }
251
252 each (p, function(v, k) {
253 if (!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)) {
254 // Use url instead of src in IE for Windows media
255 if (o.type == 'application/x-mplayer2' && k == 'src')
256 k = 'url';
257
258 if (v)
259 dom.add(ob, 'span', {mce_name : 'param', name : k, '_mce_value' : v});
260 }
261 });
262
263 if (!stc)
264 dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p));
265
266 return ob;
267 },
268
269 _spansToImgs : function(p) {
270 var t = this, dom = t.editor.dom, im, ci;
271
272 each(dom.select('span', p), function(n) {
273 // Convert object into image
274 if (dom.getAttrib(n, 'class') == 'mceItemObject') {
275 ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, '');
276
277 switch (ci) {
278 case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':
279 dom.replace(t._createImg('mceItemFlash', n), n);
280 break;
281
282 case 'clsid:166b1bca-3f9c-11cf-8075-444553540000':
283 dom.replace(t._createImg('mceItemShockWave', n), n);
284 break;
285
286 case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':
287 case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':
288 case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':
289 dom.replace(t._createImg('mceItemWindowsMedia', n), n);
290 break;
291
292 case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':
293 dom.replace(t._createImg('mceItemQuickTime', n), n);
294 break;
295
296 case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':
297 dom.replace(t._createImg('mceItemRealMedia', n), n);
298 break;
299
300 default:
301 dom.replace(t._createImg('mceItemFlash', n), n);
302 }
303
304 return;
305 }
306
307 // Convert embed into image
308 if (dom.getAttrib(n, 'class') == 'mceItemEmbed') {
309 switch (dom.getAttrib(n, 'type')) {
310 case 'application/x-shockwave-flash':
311 dom.replace(t._createImg('mceItemFlash', n), n);
312 break;
313
314 case 'application/x-director':
315 dom.replace(t._createImg('mceItemShockWave', n), n);
316 break;
317
318 case 'application/x-mplayer2':
319 dom.replace(t._createImg('mceItemWindowsMedia', n), n);
320 break;
321
322 case 'video/quicktime':
323 dom.replace(t._createImg('mceItemQuickTime', n), n);
324 break;
325
326 case 'audio/x-pn-realaudio-plugin':
327 dom.replace(t._createImg('mceItemRealMedia', n), n);
328 break;
329
330 default:
331 dom.replace(t._createImg('mceItemFlash', n), n);
332 }
333 }
334 });
335 },
336
337 _createImg : function(cl, n) {
338 var im, dom = this.editor.dom, pa = {}, ti = '', args;
339
340 args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality'];
341
342 // Create image
343 im = dom.create('img', {
344 src : this.url + '/img/trans.gif',
345 width : dom.getAttrib(n, 'width') || 100,
346 height : dom.getAttrib(n, 'height') || 100,
347 'class' : cl
348 });
349
350 // Setup base parameters
351 each(args, function(na) {
352 var v = dom.getAttrib(n, na);
353
354 if (v)
355 pa[na] = v;
356 });
357
358 // Add optional parameters
359 each(dom.select('span', n), function(n) {
360 if (dom.hasClass(n, 'mceItemParam'))
361 pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value');
362 });
363
364 // Use src not movie
365 if (pa.movie) {
366 pa.src = pa.movie;
367 delete pa.movie;
368 }
369
370 // Merge with embed args
371 n = dom.select('.mceItemEmbed', n)[0];
372 if (n) {
373 each(args, function(na) {
374 var v = dom.getAttrib(n, na);
375
376 if (v && !pa[na])
377 pa[na] = v;
378 });
379 }
380
381 delete pa.width;
382 delete pa.height;
383
384 im.title = this._serialize(pa);
385
386 return im;
387 },
388
389 _parse : function(s) {
390 return tinymce.util.JSON.parse('{' + s + '}');
391 },
392
393 _serialize : function(o) {
394 return tinymce.util.JSON.serialize(o).replace(/[{}]/g, '');
395 }
396 });
397
398 // Register plugin
399 tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
400})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flash.gif b/public/javascripts/tiny_mce/plugins/media/img/flash.gif
new file mode 100755
index 0000000..cb192e6
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/flash.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf b/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf
new file mode 100755
index 0000000..042c2ab
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif b/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif
new file mode 100755
index 0000000..3b04991
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif b/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif
new file mode 100755
index 0000000..fdfe0b9
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif b/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif
new file mode 100755
index 0000000..5f235df
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/trans.gif b/public/javascripts/tiny_mce/plugins/media/img/trans.gif
new file mode 100755
index 0000000..3884865
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/trans.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif b/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif
new file mode 100755
index 0000000..ab50f2d
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif
Binary files differ
diff --git a/public/javascripts/tiny_mce/plugins/media/js/embed.js b/public/javascripts/tiny_mce/plugins/media/js/embed.js
new file mode 100755
index 0000000..f8dc810
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/js/embed.js
@@ -0,0 +1,73 @@
1/**
2 * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
3 */
4
5function writeFlash(p) {
6 writeEmbed(
7 'D27CDB6E-AE6D-11cf-96B8-444553540000',
8 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
9 'application/x-shockwave-flash',
10 p
11 );
12}
13
14function writeShockWave(p) {
15 writeEmbed(
16 '166B1BCA-3F9C-11CF-8075-444553540000',
17 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
18 'application/x-director',
19 p
20 );
21}
22
23function writeQuickTime(p) {
24 writeEmbed(
25 '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
26 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
27 'video/quicktime',
28 p
29 );
30}
31
32function writeRealMedia(p) {
33 writeEmbed(
34 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
35 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
36 'audio/x-pn-realaudio-plugin',
37 p
38 );
39}
40
41function writeWindowsMedia(p) {
42 p.url = p.src;
43 writeEmbed(
44 '6BF52A52-394A-11D3-B153-00C04F79FAA6',
45 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
46 'application/x-mplayer2',
47 p
48 );
49}
50
51function writeEmbed(cls, cb, mt, p) {
52 var h = '', n;
53
54 h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
55 h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
56 h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
57 h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
58 h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
59 h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
60 h += '>';
61
62 for (n in p)
63 h += '<param name="' + n + '" value="' + p[n] + '">';
64
65 h += '<embed type="' + mt + '"';
66
67 for (n in p)
68 h += n + '="' + p[n] + '" ';
69
70 h += '></embed></object>';
71
72 document.write(h);
73}
diff --git a/public/javascripts/tiny_mce/plugins/media/js/media.js b/public/javascripts/tiny_mce/plugins/media/js/media.js
new file mode 100755
index 0000000..fa8e142
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/js/media.js
@@ -0,0 +1,630 @@
1tinyMCEPopup.requireLangPack();
2
3var oldWidth, oldHeight, ed, url;
4
5if (url = tinyMCEPopup.getParam("media_external_list_url"))
6 document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
7
8function init() {
9 var pl = "", f, val;
10 var type = "flash", fe, i;
11
12 ed = tinyMCEPopup.editor;
13
14 tinyMCEPopup.resizeToInnerSize();
15 f = document.forms[0]
16
17 fe = ed.selection.getNode();
18 if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
19 pl = fe.title;
20
21 switch (ed.dom.getAttrib(fe, 'class')) {
22 case 'mceItemFlash':
23 type = 'flash';
24 break;
25
26 case 'mceItemFlashVideo':
27 type = 'flv';
28 break;
29
30 case 'mceItemShockWave':
31 type = 'shockwave';
32 break;
33
34 case 'mceItemWindowsMedia':
35 type = 'wmp';
36 break;
37
38 case 'mceItemQuickTime':
39 type = 'qt';
40 break;
41
42 case 'mceItemRealMedia':
43 type = 'rmp';
44 break;
45 }
46
47 document.forms[0].insert.value = ed.getLang('update', 'Insert', true);
48 }
49
50 document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
51 document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media');
52 document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
53
54 var html = getMediaListHTML('medialist','src','media','media');
55 if (html == "")
56 document.getElementById("linklistrow").style.display = 'none';
57 else
58 document.getElementById("linklistcontainer").innerHTML = html;
59
60 // Resize some elements
61 if (isVisible('filebrowser'))
62 document.getElementById('src').style.width = '230px';
63
64 // Setup form
65 if (pl != "") {
66 pl = tinyMCEPopup.editor.plugins.media._parse(pl);
67
68 switch (type) {
69 case "flash":
70 setBool(pl, 'flash', 'play');
71 setBool(pl, 'flash', 'loop');
72 setBool(pl, 'flash', 'menu');
73 setBool(pl, 'flash', 'swliveconnect');
74 setStr(pl, 'flash', 'quality');
75 setStr(pl, 'flash', 'scale');
76 setStr(pl, 'flash', 'salign');
77 setStr(pl, 'flash', 'wmode');
78 setStr(pl, 'flash', 'base');
79 setStr(pl, 'flash', 'flashvars');
80 break;
81
82 case "qt":
83 setBool(pl, 'qt', 'loop');
84 setBool(pl, 'qt', 'autoplay');
85 setBool(pl, 'qt', 'cache');
86 setBool(pl, 'qt', 'controller');
87 setBool(pl, 'qt', 'correction');
88 setBool(pl, 'qt', 'enablejavascript');
89 setBool(pl, 'qt', 'kioskmode');
90 setBool(pl, 'qt', 'autohref');
91 setBool(pl, 'qt', 'playeveryframe');
92 setBool(pl, 'qt', 'tarsetcache');
93 setStr(pl, 'qt', 'scale');
94 setStr(pl, 'qt', 'starttime');
95 setStr(pl, 'qt', 'endtime');
96 setStr(pl, 'qt', 'tarset');
97 setStr(pl, 'qt', 'qtsrcchokespeed');
98 setStr(pl, 'qt', 'volume');
99 setStr(pl, 'qt', 'qtsrc');
100 break;
101
102 case "shockwave":
103 setBool(pl, 'shockwave', 'sound');
104 setBool(pl, 'shockwave', 'progress');
105 setBool(pl, 'shockwave', 'autostart');
106 setBool(pl, 'shockwave', 'swliveconnect');
107 setStr(pl, 'shockwave', 'swvolume');
108 setStr(pl, 'shockwave', 'swstretchstyle');
109 setStr(pl, 'shockwave', 'swstretchhalign');
110 setStr(pl, 'shockwave', 'swstretchvalign');
111 break;
112
113 case "wmp":
114 setBool(pl, 'wmp', 'autostart');
115 setBool(pl, 'wmp', 'enabled');
116 setBool(pl, 'wmp', 'enablecontextmenu');
117 setBool(pl, 'wmp', 'fullscreen');
118 setBool(pl, 'wmp', 'invokeurls');
119 setBool(pl, 'wmp', 'mute');
120 setBool(pl, 'wmp', 'stretchtofit');
121 setBool(pl, 'wmp', 'windowlessvideo');
122 setStr(pl, 'wmp', 'balance');
123 setStr(pl, 'wmp', 'baseurl');
124 setStr(pl, 'wmp', 'captioningid');
125 setStr(pl, 'wmp', 'currentmarker');
126 setStr(pl, 'wmp', 'currentposition');
127 setStr(pl, 'wmp', 'defaultframe');
128 setStr(pl, 'wmp', 'playcount');
129 setStr(pl, 'wmp', 'rate');
130 setStr(pl, 'wmp', 'uimode');
131 setStr(pl, 'wmp', 'volume');
132 break;
133
134 case "rmp":
135 setBool(pl, 'rmp', 'autostart');
136 setBool(pl, 'rmp', 'loop');
137 setBool(pl, 'rmp', 'autogotourl');
138 setBool(pl, 'rmp', 'center');
139 setBool(pl, 'rmp', 'imagestatus');
140 setBool(pl, 'rmp', 'maintainaspect');
141 setBool(pl, 'rmp', 'nojava');
142 setBool(pl, 'rmp', 'prefetch');
143 setBool(pl, 'rmp', 'shuffle');
144 setStr(pl, 'rmp', 'console');
145 setStr(pl, 'rmp', 'controls');
146 setStr(pl, 'rmp', 'numloop');
147 setStr(pl, 'rmp', 'scriptcallbacks');
148 break;
149 }
150
151 setStr(pl, null, 'src');
152 setStr(pl, null, 'id');
153 setStr(pl, null, 'name');
154 setStr(pl, null, 'vspace');
155 setStr(pl, null, 'hspace');
156 setStr(pl, null, 'bgcolor');
157 setStr(pl, null, 'align');
158 setStr(pl, null, 'width');
159 setStr(pl, null, 'height');
160
161 if ((val = ed.dom.getAttrib(fe, "width")) != "")
162 pl.width = f.width.value = val;
163
164 if ((val = ed.dom.getAttrib(fe, "height")) != "")
165 pl.height = f.height.value = val;
166
167 oldWidth = pl.width ? parseInt(pl.width) : 0;
168 oldHeight = pl.height ? parseInt(pl.height) : 0;
169 } else
170 oldWidth = oldHeight = 0;
171
172 selectByValue(f, 'media_type', type);
173 changedType(type);
174 updateColor('bgcolor_pick', 'bgcolor');
175
176 TinyMCE_EditableSelects.init();
177 generatePreview();
178}
179
180function insertMedia() {
181 var fe, f = document.forms[0], h;
182
183 tinyMCEPopup.restoreSelection();
184
185 if (!AutoValidator.validate(f)) {
186 tinyMCEPopup.alert(ed.getLang('invalid_data'));
187 return false;
188 }
189
190 f.width.value = f.width.value == "" ? 100 : f.width.value;
191 f.height.value = f.height.value == "" ? 100 : f.height.value;
192
193 fe = ed.selection.getNode();
194 if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) {
195 switch (f.media_type.options[f.media_type.selectedIndex].value) {
196 case "flash":
197 fe.className = "mceItemFlash";
198 break;
199
200 case "flv":
201 fe.className = "mceItemFlashVideo";
202 break;
203
204 case "shockwave":
205 fe.className = "mceItemShockWave";
206 break;
207
208 case "qt":
209 fe.className = "mceItemQuickTime";
210 break;
211
212 case "wmp":
213 fe.className = "mceItemWindowsMedia";
214 break;
215
216 case "rmp":
217 fe.className = "mceItemRealMedia";
218 break;
219 }
220
221 if (fe.width != f.width.value || fe.height != f.height.height)
222 ed.execCommand('mceRepaint');
223
224 fe.title = serializeParameters();
225 fe.width = f.width.value;
226 fe.height = f.height.value;
227 fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : '');
228 fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : '');
229 fe.align = f.align.options[f.align.selectedIndex].value;
230 } else {
231 h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ;
232
233 switch (f.media_type.options[f.media_type.selectedIndex].value) {
234 case "flash":
235 h += ' class="mceItemFlash"';
236 break;
237
238 case "flv":
239 h += ' class="mceItemFlashVideo"';
240 break;
241
242 case "shockwave":
243 h += ' class="mceItemShockWave"';
244 break;
245
246 case "qt":
247 h += ' class="mceItemQuickTime"';
248 break;
249
250 case "wmp":
251 h += ' class="mceItemWindowsMedia"';
252 break;
253
254 case "rmp":
255 h += ' class="mceItemRealMedia"';
256 break;
257 }
258
259 h += ' title="' + serializeParameters() + '"';
260 h += ' width="' + f.width.value + '"';
261 h += ' height="' + f.height.value + '"';
262 h += ' align="' + f.align.options[f.align.selectedIndex].value + '"';
263
264 h += ' />';
265
266 ed.execCommand('mceInsertContent', false, h);
267 }
268
269 tinyMCEPopup.close();
270}
271
272function updatePreview() {
273 var f = document.forms[0], type;
274
275 f.width.value = f.width.value || '320';
276 f.height.value = f.height.value || '240';
277
278 type = getType(f.src.value);
279 selectByValue(f, 'media_type', type);
280 changedType(type);
281 generatePreview();
282}
283
284function getMediaListHTML() {
285 if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
286 var html = "";
287
288 html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">';
289 html += '<option value="">---</option>';
290
291 for (var i=0; i<tinyMCEMediaList.length; i++)
292 html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
293
294 html += '</select>';
295
296 return html;
297 }
298
299 return "";
300}
301
302function getType(v) {
303 var fo, i, c, el, x, f = document.forms[0];
304
305 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(';');
306
307 // YouTube
308 if (v.match(/watch\?v=(.+)(.*)/)) {
309 f.width.value = '425';
310 f.height.value = '350';
311 f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
312 return 'flash';
313 }
314
315 // Google video
316 if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
317 f.width.value = '425';
318 f.height.value = '326';
319 f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en';
320 return 'flash';
321 }
322
323 for (i=0; i<fo.length; i++) {
324 c = fo[i].split('=');
325
326 el = c[1].split(',');
327 for (x=0; x<el.length; x++)
328 if (v.indexOf('.' + el[x]) != -1)
329 return c[0];
330 }
331
332 return null;
333}
334
335function switchType(v) {
336 var t = getType(v), d = document, f = d.forms[0];
337
338 if (!t)
339 return;
340
341 selectByValue(d.forms[0], 'media_type', t);
342 changedType(t);
343
344 // Update qtsrc also
345 if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) {
346 alert(ed.getLang("media_qt_stream_warn"));
347
348 if (f.qt_qtsrc.value == '')
349 f.qt_qtsrc.value = f.src.value;
350 }
351}
352
353function changedType(t) {
354 var d = document;
355
356 d.getElementById('flash_options').style.display = 'none';
357 d.getElementById('flv_options').style.display = 'none';
358 d.getElementById('qt_options').style.display = 'none';
359 d.getElementById('shockwave_options').style.display = 'none';
360 d.getElementById('wmp_options').style.display = 'none';
361 d.getElementById('rmp_options').style.display = 'none';
362
363 if (t)
364 d.getElementById(t + '_options').style.display = 'block';
365}
366
367function serializeParameters() {
368 var d = document, f = d.forms[0], s = '';
369
370 switch (f.media_type.options[f.media_type.selectedIndex].value) {
371 case "flash":
372 s += getBool('flash', 'play', true);
373 s += getBool('flash', 'loop', true);
374 s += getBool('flash', 'menu', true);
375 s += getBool('flash', 'swliveconnect', false);
376 s += getStr('flash', 'quality');
377 s += getStr('flash', 'scale');
378 s += getStr('flash', 'salign');
379 s += getStr('flash', 'wmode');
380 s += getStr('flash', 'base');
381 s += getStr('flash', 'flashvars');
382 break;
383
384 case "qt":
385 s += getBool('qt', 'loop', false);
386 s += getBool('qt', 'autoplay', true);
387 s += getBool('qt', 'cache', false);
388 s += getBool('qt', 'controller', true);
389 s += getBool('qt', 'correction', false, 'none', 'full');
390 s += getBool('qt', 'enablejavascript', false);
391 s += getBool('qt', 'kioskmode', false);
392 s += getBool('qt', 'autohref', false);
393 s += getBool('qt', 'playeveryframe', false);
394 s += getBool('qt', 'targetcache', false);
395 s += getStr('qt', 'scale');
396 s += getStr('qt', 'starttime');
397 s += getStr('qt', 'endtime');
398 s += getStr('qt', 'target');
399 s += getStr('qt', 'qtsrcchokespeed');
400 s += getStr('qt', 'volume');
401 s += getStr('qt', 'qtsrc');
402 break;
403
404 case "shockwave":
405 s += getBool('shockwave', 'sound');
406 s += getBool('shockwave', 'progress');
407 s += getBool('shockwave', 'autostart');
408 s += getBool('shockwave', 'swliveconnect');
409 s += getStr('shockwave', 'swvolume');
410 s += getStr('shockwave', 'swstretchstyle');
411 s += getStr('shockwave', 'swstretchhalign');
412 s += getStr('shockwave', 'swstretchvalign');
413 break;
414
415 case "wmp":
416 s += getBool('wmp', 'autostart', true);
417 s += getBool('wmp', 'enabled', false);
418 s += getBool('wmp', 'enablecontextmenu', true);
419 s += getBool('wmp', 'fullscreen', false);
420 s += getBool('wmp', 'invokeurls', true);
421 s += getBool('wmp', 'mute', false);
422 s += getBool('wmp', 'stretchtofit', false);
423 s += getBool('wmp', 'windowlessvideo', false);
424 s += getStr('wmp', 'balance');
425 s += getStr('wmp', 'baseurl');
426 s += getStr('wmp', 'captioningid');
427 s += getStr('wmp', 'currentmarker');
428 s += getStr('wmp', 'currentposition');
429 s += getStr('wmp', 'defaultframe');
430 s += getStr('wmp', 'playcount');
431 s += getStr('wmp', 'rate');
432 s += getStr('wmp', 'uimode');
433 s += getStr('wmp', 'volume');
434 break;
435
436 case "rmp":
437 s += getBool('rmp', 'autostart', false);
438 s += getBool('rmp', 'loop', false);
439 s += getBool('rmp', 'autogotourl', true);
440 s += getBool('rmp', 'center', false);
441 s += getBool('rmp', 'imagestatus', true);
442 s += getBool('rmp', 'maintainaspect', false);
443 s += getBool('rmp', 'nojava', false);
444 s += getBool('rmp', 'prefetch', false);
445 s += getBool('rmp', 'shuffle', false);
446 s += getStr('rmp', 'console');
447 s += getStr('rmp', 'controls');
448 s += getStr('rmp', 'numloop');
449 s += getStr('rmp', 'scriptcallbacks');
450 break;
451 }
452
453 s += getStr(null, 'id');
454 s += getStr(null, 'name');
455 s += getStr(null, 'src');
456 s += getStr(null, 'align');
457 s += getStr(null, 'bgcolor');
458 s += getInt(null, 'vspace');
459 s += getInt(null, 'hspace');
460 s += getStr(null, 'width');
461 s += getStr(null, 'height');
462
463 s = s.length > 0 ? s.substring(0, s.length - 1) : s;
464
465 return s;
466}
467
468function setBool(pl, p, n) {
469 if (typeof(pl[n]) == "undefined")
470 return;
471
472 document.forms[0].elements[p + "_" + n].checked = pl[n];
473}
474
475function setStr(pl, p, n) {
476 var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n];
477
478 if (typeof(pl[n]) == "undefined")
479 return;
480
481 if (e.type == "text")
482 e.value = pl[n];
483 else
484 selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]);
485}
486
487function getBool(p, n, d, tv, fv) {
488 var v = document.forms[0].elements[p + "_" + n].checked;
489
490 tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'";
491 fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'";
492
493 return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ',');
494}
495
496function getStr(p, n, d) {
497 var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
498 var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
499
500 if (n == 'src')
501 v = tinyMCEPopup.editor.convertURL(v, 'src', null);
502
503 return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',");
504}
505
506function getInt(p, n, d) {
507 var e = document.forms[0].elements[(p != null ? p + "_" : "") + n];
508 var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value;
509
510 return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ",");
511}
512
513function jsEncode(s) {
514 s = s.replace(new RegExp('\\\\', 'g'), '\\\\');
515 s = s.replace(new RegExp('"', 'g'), '\\"');
516 s = s.replace(new RegExp("'", 'g'), "\\'");
517
518 return s;
519}
520
521function generatePreview(c) {
522 var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
523
524 p.innerHTML = '<!-- x --->';
525
526 nw = parseInt(f.width.value);
527 nh = parseInt(f.height.value);
528
529 if (f.width.value != "" && f.height.value != "") {
530 if (f.constrain.checked) {
531 if (c == 'width' && oldWidth != 0) {
532 wp = nw / oldWidth;
533 nh = Math.round(wp * nh);
534 f.height.value = nh;
535 } else if (c == 'height' && oldHeight != 0) {
536 hp = nh / oldHeight;
537 nw = Math.round(hp * nw);
538 f.width.value = nw;
539 }
540 }
541 }
542
543 if (f.width.value != "")
544 oldWidth = nw;
545
546 if (f.height.value != "")
547 oldHeight = nh;
548
549 // After constrain
550 pl = serializeParameters();
551
552 switch (f.media_type.options[f.media_type.selectedIndex].value) {
553 case "flash":
554 cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
555 codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';
556 type = 'application/x-shockwave-flash';
557 break;
558
559 case "shockwave":
560 cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000';
561 codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';
562 type = 'application/x-director';
563 break;
564
565 case "qt":
566 cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
567 codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
568 type = 'video/quicktime';
569 break;
570
571 case "wmp":
572 cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6';
573 codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
574 type = 'application/x-mplayer2';
575 break;
576
577 case "rmp":
578 cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';
579 codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';
580 type = 'audio/x-pn-realaudio-plugin';
581 break;
582 }
583
584 if (pl == '') {
585 p.innerHTML = '';
586 return;
587 }
588
589 pl = tinyMCEPopup.editor.plugins.media._parse(pl);
590
591 if (!pl.src) {
592 p.innerHTML = '';
593 return;
594 }
595
596 pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src);
597 pl.width = !pl.width ? 100 : pl.width;
598 pl.height = !pl.height ? 100 : pl.height;
599 pl.id = !pl.id ? 'obj' : pl.id;
600 pl.name = !pl.name ? 'eobj' : pl.name;
601 pl.align = !pl.align ? '' : pl.align;
602
603 // Avoid annoying warning about insecure items
604 if (!tinymce.isIE || document.location.protocol != 'https:') {
605 h += '<object classid="' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">';
606
607 for (n in pl) {
608 h += '<param name="' + n + '" value="' + pl[n] + '">';
609
610 // Add extra url parameter if it's an absolute URL
611 if (n == 'src' && pl[n].indexOf('://') != -1)
612 h += '<param name="url" value="' + pl[n] + '" />';
613 }
614 }
615
616 h += '<embed type="' + type + '" ';
617
618 for (n in pl)
619 h += n + '="' + pl[n] + '" ';
620
621 h += '></embed>';
622
623 // Avoid annoying warning about insecure items
624 if (!tinymce.isIE || document.location.protocol != 'https:')
625 h += '</object>';
626
627 p.innerHTML = "<!-- x --->" + h;
628}
629
630tinyMCEPopup.onInit.add(init);
diff --git a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js
new file mode 100755
index 0000000..6d0a996
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js
@@ -0,0 +1,103 @@
1tinyMCE.addI18n('en.media_dlg',{
2title:"Insert / edit embedded media",
3general:"General",
4advanced:"Advanced",
5file:"File/URL",
6list:"List",
7size:"Dimensions",
8preview:"Preview",
9constrain_proportions:"Constrain proportions",
10type:"Type",
11id:"Id",
12name:"Name",
13class_name:"Class",
14vspace:"V-Space",
15hspace:"H-Space",
16play:"Auto play",
17loop:"Loop",
18menu:"Show menu",
19quality:"Quality",
20scale:"Scale",
21align:"Align",
22salign:"SAlign",
23wmode:"WMode",
24bgcolor:"Background",
25base:"Base",
26flashvars:"Flashvars",
27liveconnect:"SWLiveConnect",
28autohref:"AutoHREF",
29cache:"Cache",
30hidden:"Hidden",
31controller:"Controller",
32kioskmode:"Kiosk mode",
33playeveryframe:"Play every frame",
34targetcache:"Target cache",
35correction:"No correction",
36enablejavascript:"Enable JavaScript",
37starttime:"Start time",
38endtime:"End time",
39href:"Href",
40qtsrcchokespeed:"Choke speed",
41target:"Target",
42volume:"Volume",
43autostart:"Auto start",
44enabled:"Enabled",
45fullscreen:"Fullscreen",
46invokeurls:"Invoke URLs",
47mute:"Mute",
48stretchtofit:"Stretch to fit",
49windowlessvideo:"Windowless video",
50balance:"Balance",
51baseurl:"Base URL",
52captioningid:"Captioning id",
53currentmarker:"Current marker",
54currentposition:"Current position",
55defaultframe:"Default frame",
56playcount:"Play count",
57rate:"Rate",
58uimode:"UI Mode",
59flash_options:"Flash options",
60qt_options:"Quicktime options",
61wmp_options:"Windows media player options",
62rmp_options:"Real media player options",
63shockwave_options:"Shockwave options",
64autogotourl:"Auto goto URL",
65center:"Center",
66imagestatus:"Image status",
67maintainaspect:"Maintain aspect",
68nojava:"No java",
69prefetch:"Prefetch",
70shuffle:"Shuffle",
71console:"Console",
72numloop:"Num loops",
73controls:"Controls",
74scriptcallbacks:"Script callbacks",
75swstretchstyle:"Stretch style",
76swstretchhalign:"Stretch H-Align",
77swstretchvalign:"Stretch V-Align",
78sound:"Sound",
79progress:"Progress",
80qtsrc:"QT Src",
81qt_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..",
82align_top:"Top",
83align_right:"Right",
84align_bottom:"Bottom",
85align_left:"Left",
86align_center:"Center",
87align_top_left:"Top left",
88align_top_right:"Top right",
89align_bottom_left:"Bottom left",
90align_bottom_right:"Bottom right",
91flv_options:"Flash video options",
92flv_scalemode:"Scale mode",
93flv_buffer:"Buffer",
94flv_startimage:"Start image",
95flv_starttime:"Start time",
96flv_defaultvolume:"Default volumne",
97flv_hiddengui:"Hidden GUI",
98flv_autostart:"Auto start",
99flv_loop:"Loop",
100flv_showscalemodes:"Show scale modes",
101flv_smoothvideo:"Smooth video",
102flv_jscallback:"JS Callback"
103}); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/media/media.htm b/public/javascripts/tiny_mce/plugins/media/media.htm
new file mode 100755
index 0000000..8b3bc1d
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/media/media.htm
@@ -0,0 +1,824 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4 <title>{#media_dlg.title}</title>
5 <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6 <script type="text/javascript" src="js/media.js"></script>
7 <script type="text/javascript" src="../../utils/mctabs.js"></script>
8 <script type="text/javascript" src="../../utils/validate.js"></script>
9 <script type="text/javascript" src="../../utils/form_utils.js"></script>
10 <script type="text/javascript" src="../../utils/editable_selects.js"></script>
11 <link href="css/media.css" rel="stylesheet" type="text/css" />
12 <base target="_self" />
13</head>
14<body style="display: none">
15 <form onsubmit="insertMedia();return false;" action="#">
16 <div class="tabs">
17 <ul>
18 <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>
19 <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
20 </ul>
21 </div>
22
23 <div class="panel_wrapper">
24 <div id="general_panel" class="panel current">
25 <fieldset>
26 <legend>{#media_dlg.general}</legend>
27
28 <table border="0" cellpadding="4" cellspacing="0">
29 <tr>
30 <td><label for="media_type">{#media_dlg.type}</label></td>
31 <td>
32 <select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();">
33 <option value="flash">Flash</option>
34 <!-- <option value="flv">Flash video (FLV)</option> -->
35 <option value="qt">Quicktime</option>
36 <option value="shockwave">Shockwave</option>
37 <option value="wmp">Windows Media</option>
38 <option value="rmp">Real Media</option>
39 </select>
40 </td>
41 </tr>
42 <tr>
43 <td><label for="src">{#media_dlg.file}</label></td>
44 <td>
45 <table border="0" cellspacing="0" cellpadding="0">
46 <tr>
47 <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td>
48 <td id="filebrowsercontainer">&nbsp;</td>
49 </tr>
50 </table>
51 </td>
52 </tr>
53 <tr id="linklistrow">
54 <td><label for="linklist">{#media_dlg.list}</label></td>
55 <td id="linklistcontainer">&nbsp;</td>
56 </tr>
57 <tr>
58 <td><label for="width">{#media_dlg.size}</label></td>
59 <td>
60 <table border="0" cellpadding="0" cellspacing="0">
61 <tr>
62 <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>
63 <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
64 <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
65 </tr>
66 </table>
67 </td>
68 </tr>
69 </table>
70 </fieldset>
71
72 <fieldset>
73 <legend>{#media_dlg.preview}</legend>
74 <div id="prev"></div>
75 </fieldset>
76 </div>
77
78 <div id="advanced_panel" class="panel">
79 <fieldset>
80 <legend>{#media_dlg.advanced}</legend>
81
82 <table border="0" cellpadding="4" cellspacing="0" width="100%">
83 <tr>
84 <td><label for="id">{#media_dlg.id}</label></td>
85 <td><input type="text" id="id" name="id" onchange="generatePreview();" /></td>
86 <td><label for="name">{#media_dlg.name}</label></td>
87 <td><input type="text" id="name" name="name" onchange="generatePreview();" /></td>
88 </tr>
89
90 <tr>
91 <td><label for="align">{#media_dlg.align}</label></td>
92 <td>
93 <select id="align" name="align" onchange="generatePreview();">
94 <option value="">{#not_set}</option>
95 <option value="top">{#media_dlg.align_top}</option>
96 <option value="right">{#media_dlg.align_right}</option>
97 <option value="bottom">{#media_dlg.align_bottom}</option>
98 <option value="left">{#media_dlg.align_left}</option>
99 </select>
100 </td>
101
102 <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
103 <td>
104 <table border="0" cellpadding="0" cellspacing="0">
105 <tr>
106 <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td>
107 <td id="bgcolor_pickcontainer">&nbsp;</td>
108 </tr>
109 </table>
110 </td>
111 </tr>
112
113 <tr>
114 <td><label for="vspace">{#media_dlg.vspace}</label></td>
115 <td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td>
116 <td><label for="hspace">{#media_dlg.hspace}</label></td>
117 <td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td>
118 </tr>
119 </table>
120 </fieldset>
121
122 <fieldset id="flash_options">
123 <legend>{#media_dlg.flash_options}</legend>
124
125 <table border="0" cellpadding="4" cellspacing="0">
126 <tr>
127 <td><label for="flash_quality">{#media_dlg.quality}</label></td>
128 <td>
129 <select id="flash_quality" name="flash_quality" onchange="generatePreview();">
130 <option value="">{#not_set}</option>
131 <option value="high">high</option>
132 <option value="low">low</option>
133 <option value="autolow">autolow</option>
134 <option value="autohigh">autohigh</option>
135 <option value="best">best</option>
136 </select>
137 </td>
138
139 <td><label for="flash_scale">{#media_dlg.scale}</label></td>
140 <td>
141 <select id="flash_scale" name="flash_scale" onchange="generatePreview();">
142 <option value="">{#not_set}</option>
143 <option value="showall">showall</option>
144 <option value="noborder">noborder</option>
145 <option value="exactfit">exactfit</option>
146 <option value="noscale">noscale</option>
147 </select>
148 </td>
149 </tr>
150
151 <tr>
152 <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
153 <td>
154 <select id="flash_wmode" name="flash_wmode" onchange="generatePreview();">
155 <option value="">{#not_set}</option>
156 <option value="window">window</option>
157 <option value="opaque">opaque</option>
158 <option value="transparent">transparent</option>
159 </select>
160 </td>
161
162 <td><label for="flash_salign">{#media_dlg.salign}</label></td>
163 <td>
164 <select id="flash_salign" name="flash_salign" onchange="generatePreview();">
165 <option value="">{#not_set}</option>
166 <option value="l">{#media_dlg.align_left}</option>
167 <option value="t">{#media_dlg.align_top}</option>
168 <option value="r">{#media_dlg.align_right}</option>
169 <option value="b">{#media_dlg.align_bottom}</option>
170 <option value="tl">{#media_dlg.align_top_left}</option>
171 <option value="tr">{#media_dlg.align_top_right}</option>
172 <option value="bl">{#media_dlg.align_bottom_left}</option>
173 <option value="br">{#media_dlg.align_bottom_right}</option>
174 </select>
175 </td>
176 </tr>
177
178 <tr>
179 <td colspan="2">
180 <table border="0" cellpadding="0" cellspacing="0">
181 <tr>
182 <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td>
183 <td><label for="flash_play">{#media_dlg.play}</label></td>
184 </tr>
185 </table>
186 </td>
187
188 <td colspan="2">
189 <table border="0" cellpadding="0" cellspacing="0">
190 <tr>
191 <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td>
192 <td><label for="flash_loop">{#media_dlg.loop}</label></td>
193 </tr>
194 </table>
195 </td>
196 </tr>
197
198 <tr>
199 <td colspan="2">
200 <table border="0" cellpadding="0" cellspacing="0">
201 <tr>
202 <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td>
203 <td><label for="flash_menu">{#media_dlg.menu}</label></td>
204 </tr>
205 </table>
206 </td>
207
208 <td colspan="2">
209 <table border="0" cellpadding="0" cellspacing="0">
210 <tr>
211 <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td>
212 <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
213 </tr>
214 </table>
215 </td>
216 </tr>
217 </table>
218
219 <table>
220 <tr>
221 <td><label for="flash_base">{#media_dlg.base}</label></td>
222 <td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td>
223 </tr>
224
225 <tr>
226 <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
227 <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td>
228 </tr>
229 </table>
230 </fieldset>
231
232 <fieldset id="flv_options">
233 <legend>{#media_dlg.flv_options}</legend>
234
235 <table border="0" cellpadding="4" cellspacing="0">
236 <tr>
237 <td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td>
238 <td>
239 <select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();">
240 <option value="">{#not_set}</option>
241 <option value="none">none</option>
242 <option value="double">double</option>
243 <option value="full">full</option>
244 </select>
245 </td>
246
247 <td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td>
248 <td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td>
249 </tr>
250
251 <tr>
252 <td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td>
253 <td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td>
254
255 <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
256 <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
257 </tr>
258
259 <tr>
260 <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td>
261 <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td>
262
263 <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td>
264 <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td>
265 </tr>
266
267 <tr>
268 <td colspan="2">
269 <table border="0" cellpadding="0" cellspacing="0">
270 <tr>
271 <td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td>
272 <td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td>
273 </tr>
274 </table>
275 </td>
276
277 <td colspan="2">
278 <table border="0" cellpadding="0" cellspacing="0">
279 <tr>
280 <td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td>
281 <td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td>
282 </tr>
283 </table>
284 </td>
285 </tr>
286
287 <tr>
288 <td colspan="2">
289 <table border="0" cellpadding="0" cellspacing="0">
290 <tr>
291 <td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td>
292 <td><label for="flv_loop">{#media_dlg.flv_loop}</label></td>
293 </tr>
294 </table>
295 </td>
296
297 <td colspan="2">
298 <table border="0" cellpadding="0" cellspacing="0">
299 <tr>
300 <td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td>
301 <td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td>
302 </tr>
303 </table>
304 </td>
305 </tr>
306
307 <tr>
308 <td colspan="2">
309 <table border="0" cellpadding="0" cellspacing="0">
310 <tr>
311 <td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td>
312 <td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td>
313 </tr>
314 </table>
315 </td>
316
317 <td colspan="2">
318 <table border="0" cellpadding="0" cellspacing="0">
319 <tr>
320 <td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td>
321 <td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td>
322 </tr>
323 </table>
324 </td>
325 </tr>
326 </table>
327 </fieldset>
328
329 <fieldset id="qt_options">
330 <legend>{#media_dlg.qt_options}</legend>
331
332 <table border="0" cellpadding="4" cellspacing="0">
333 <tr>
334 <td colspan="2">
335 <table border="0" cellpadding="0" cellspacing="0">
336 <tr>
337 <td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td>
338 <td><label for="qt_loop">{#media_dlg.loop}</label></td>
339 </tr>
340 </table>
341 </td>
342
343 <td colspan="2">
344 <table border="0" cellpadding="0" cellspacing="0">
345 <tr>
346 <td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td>
347 <td><label for="qt_autoplay">{#media_dlg.play}</label></td>
348 </tr>
349 </table>
350 </td>
351 </tr>
352
353 <tr>
354 <td colspan="2">
355 <table border="0" cellpadding="0" cellspacing="0">
356 <tr>
357 <td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td>
358 <td><label for="qt_cache">{#media_dlg.cache}</label></td>
359 </tr>
360 </table>
361 </td>
362
363 <td colspan="2">
364 <table border="0" cellpadding="0" cellspacing="0">
365 <tr>
366 <td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td>
367 <td><label for="qt_controller">{#media_dlg.controller}</label></td>
368 </tr>
369 </table>
370 </td>
371 </tr>
372
373 <tr>
374 <td colspan="2">
375 <table border="0" cellpadding="0" cellspacing="0">
376 <tr>
377 <td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td>
378 <td><label for="qt_correction">{#media_dlg.correction}</label></td>
379 </tr>
380 </table>
381 </td>
382
383 <td colspan="2">
384 <table border="0" cellpadding="0" cellspacing="0">
385 <tr>
386 <td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td>
387 <td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td>
388 </tr>
389 </table>
390 </td>
391 </tr>
392
393 <tr>
394 <td colspan="2">
395 <table border="0" cellpadding="0" cellspacing="0">
396 <tr>
397 <td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td>
398 <td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td>
399 </tr>
400 </table>
401 </td>
402
403 <td colspan="2">
404 <table border="0" cellpadding="0" cellspacing="0">
405 <tr>
406 <td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td>
407 <td><label for="qt_autohref">{#media_dlg.autohref}</label></td>
408 </tr>
409 </table>
410 </td>
411 </tr>
412
413 <tr>
414 <td colspan="2">
415 <table border="0" cellpadding="0" cellspacing="0">
416 <tr>
417 <td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td>
418 <td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td>
419 </tr>
420 </table>
421 </td>
422
423 <td colspan="2">
424 <table border="0" cellpadding="0" cellspacing="0">
425 <tr>
426 <td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td>
427 <td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td>
428 </tr>
429 </table>
430 </td>
431 </tr>
432
433 <tr>
434 <td><label for="qt_scale">{#media_dlg.scale}</label></td>
435 <td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();">
436 <option value="">{#not_set}</option>
437 <option value="tofit">tofit</option>
438 <option value="aspect">aspect</option>
439 </select>
440 </td>
441
442 <td colspan="2">&nbsp;</td>
443 </tr>
444
445 <tr>
446 <td><label for="qt_starttime">{#media_dlg.starttime}</label></td>
447 <td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td>
448
449 <td><label for="qt_endtime">{#media_dlg.endtime}</label></td>
450 <td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td>
451 </tr>
452
453 <tr>
454 <td><label for="qt_target">{#media_dlg.target}</label></td>
455 <td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td>
456
457 <td><label for="qt_href">{#media_dlg.href}</label></td>
458 <td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td>
459 </tr>
460
461 <tr>
462 <td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
463 <td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td>
464
465 <td><label for="qt_volume">{#media_dlg.volume}</label></td>
466 <td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td>
467 </tr>
468
469 <tr>
470 <td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td>
471 <td colspan="4">
472 <table border="0" cellspacing="0" cellpadding="0">
473 <tr>
474 <td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td>
475 <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
476 </tr>
477 </table>
478 </td>
479 </tr>
480 </table>
481 </fieldset>
482
483 <fieldset id="wmp_options">
484 <legend>{#media_dlg.wmp_options}</legend>
485
486 <table border="0" cellpadding="4" cellspacing="0">
487 <tr>
488 <td colspan="2">
489 <table border="0" cellpadding="0" cellspacing="0">
490 <tr>
491 <td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td>
492 <td><label for="wmp_autostart">{#media_dlg.autostart}</label></td>
493 </tr>
494 </table>
495 </td>
496
497 <td colspan="2">
498 <table border="0" cellpadding="0" cellspacing="0">
499 <tr>
500 <td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td>
501 <td><label for="wmp_enabled">{#media_dlg.enabled}</label></td>
502 </tr>
503 </table>
504 </td>
505 </tr>
506
507 <tr>
508 <td colspan="2">
509 <table border="0" cellpadding="0" cellspacing="0">
510 <tr>
511 <td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td>
512 <td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td>
513 </tr>
514 </table>
515 </td>
516
517 <td colspan="2">
518 <table border="0" cellpadding="0" cellspacing="0">
519 <tr>
520 <td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td>
521 <td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td>
522 </tr>
523 </table>
524 </td>
525 </tr>
526
527 <tr>
528 <td colspan="2">
529 <table border="0" cellpadding="0" cellspacing="0">
530 <tr>
531 <td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td>
532 <td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td>
533 </tr>
534 </table>
535 </td>
536
537 <td colspan="2">
538 <table border="0" cellpadding="0" cellspacing="0">
539 <tr>
540 <td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td>
541 <td><label for="wmp_mute">{#media_dlg.mute}</label></td>
542 </tr>
543 </table>
544 </td>
545 </tr>
546
547 <tr>
548 <td colspan="2">
549 <table border="0" cellpadding="0" cellspacing="0">
550 <tr>
551 <td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td>
552 <td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td>
553 </tr>
554 </table>
555 </td>
556
557 <td colspan="2">
558 <table border="0" cellpadding="0" cellspacing="0">
559 <tr>
560 <td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td>
561 <td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
562 </tr>
563 </table>
564 </td>
565 </tr>
566
567 <tr>
568 <td><label for="wmp_balance">{#media_dlg.balance}</label></td>
569 <td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td>
570
571 <td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td>
572 <td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td>
573 </tr>
574
575 <tr>
576 <td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td>
577 <td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td>
578
579 <td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td>
580 <td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td>
581 </tr>
582
583 <tr>
584 <td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td>
585 <td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td>
586
587 <td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td>
588 <td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td>
589 </tr>
590
591 <tr>
592 <td><label for="wmp_playcount">{#media_dlg.playcount}</label></td>
593 <td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td>
594
595 <td><label for="wmp_rate">{#media_dlg.rate}</label></td>
596 <td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td>
597 </tr>
598
599 <tr>
600 <td><label for="wmp_uimode">{#media_dlg.uimode}</label></td>
601 <td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td>
602
603 <td><label for="wmp_volume">{#media_dlg.volume}</label></td>
604 <td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td>
605 </tr>
606
607 </table>
608 </fieldset>
609
610 <fieldset id="rmp_options">
611 <legend>{#media_dlg.rmp_options}</legend>
612
613 <table border="0" cellpadding="4" cellspacing="0">
614 <tr>
615 <td colspan="2">
616 <table border="0" cellpadding="0" cellspacing="0">
617 <tr>
618 <td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td>
619 <td><label for="rmp_autostart">{#media_dlg.autostart}</label></td>
620 </tr>
621 </table>
622 </td>
623
624 <td colspan="2">
625 <table border="0" cellpadding="0" cellspacing="0">
626 <tr>
627 <td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td>
628 <td><label for="rmp_loop">{#media_dlg.loop}</label></td>
629 </tr>
630 </table>
631 </td>
632 </tr>
633
634 <tr>
635 <td colspan="2">
636 <table border="0" cellpadding="0" cellspacing="0">
637 <tr>
638 <td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td>
639 <td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td>
640 </tr>
641 </table>
642 </td>
643
644 <td colspan="2">
645 <table border="0" cellpadding="0" cellspacing="0">
646 <tr>
647 <td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td>
648 <td><label for="rmp_center">{#media_dlg.center}</label></td>
649 </tr>
650 </table>
651 </td>
652 </tr>
653
654 <tr>
655 <td colspan="2">
656 <table border="0" cellpadding="0" cellspacing="0">
657 <tr>
658 <td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td>
659 <td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td>
660 </tr>
661 </table>
662 </td>
663
664 <td colspan="2">
665 <table border="0" cellpadding="0" cellspacing="0">
666 <tr>
667 <td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td>
668 <td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td>
669 </tr>
670 </table>
671 </td>
672 </tr>
673
674 <tr>
675 <td colspan="2">
676 <table border="0" cellpadding="0" cellspacing="0">
677 <tr>
678 <td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td>
679 <td><label for="rmp_nojava">{#media_dlg.nojava}</label></td>
680 </tr>
681 </table>
682 </td>
683
684 <td colspan="2">
685 <table border="0" cellpadding="0" cellspacing="0">
686 <tr>
687 <td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td>
688 <td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td>
689 </tr>
690 </table>
691 </td>
692 </tr>
693
694 <tr>
695 <td colspan="2">
696 <table border="0" cellpadding="0" cellspacing="0">
697 <tr>
698 <td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td>
699 <td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td>
700 </tr>
701 </table>
702 </td>
703
704 <td colspan="2">
705 &nbsp;
706 </td>
707 </tr>
708
709 <tr>
710 <td><label for="rmp_console">{#media_dlg.console}</label></td>
711 <td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td>
712
713 <td><label for="rmp_controls">{#media_dlg.controls}</label></td>
714 <td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td>
715 </tr>
716
717 <tr>
718 <td><label for="rmp_numloop">{#media_dlg.numloop}</label></td>
719 <td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td>
720
721 <td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
722 <td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td>
723 </tr>
724 </table>
725 </fieldset>
726
727 <fieldset id="shockwave_options">
728 <legend>{#media_dlg.shockwave_options}</legend>
729
730 <table border="0" cellpadding="4" cellspacing="0">
731 <tr>
732 <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
733 <td>
734 <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();">
735 <option value="none">{#not_set}</option>
736 <option value="meet">Meet</option>
737 <option value="fill">Fill</option>
738 <option value="stage">Stage</option>
739 </select>
740 </td>
741
742 <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
743 <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td>
744 </tr>
745
746 <tr>
747 <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
748 <td>
749 <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();">
750 <option value="none">{#not_set}</option>
751 <option value="left">{#media_dlg.align_left}</option>
752 <option value="center">{#media_dlg.align_center}</option>
753 <option value="right">{#media_dlg.align_right}</option>
754 </select>
755 </td>
756
757 <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
758 <td>
759 <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();">
760 <option value="none">{#not_set}</option>
761 <option value="meet">Meet</option>
762 <option value="fill">Fill</option>
763 <option value="stage">Stage</option>
764 </select>
765 </td>
766 </tr>
767
768 <tr>
769 <td colspan="2">
770 <table border="0" cellpadding="0" cellspacing="0">
771 <tr>
772 <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td>
773 <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
774 </tr>
775 </table>
776 </td>
777
778 <td colspan="2">
779 <table border="0" cellpadding="0" cellspacing="0">
780 <tr>
781 <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td>
782 <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
783 </tr>
784 </table>
785 </td>
786 </tr>
787
788
789 <tr>
790 <td colspan="2">
791 <table border="0" cellpadding="0" cellspacing="0">
792 <tr>
793 <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td>
794 <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
795 </tr>
796 </table>
797 </td>
798
799 <td colspan="2">
800 <table border="0" cellpadding="0" cellspacing="0">
801 <tr>
802 <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td>
803 <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
804 </tr>
805 </table>
806 </td>
807 </tr>
808 </table>
809 </fieldset>
810 </div>
811 </div>
812
813 <div class="mceActionPanel">
814 <div style="float: left">
815 <input type="submit" id="insert" name="insert" value="{#insert}" />
816 </div>
817
818 <div style="float: right">
819 <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
820 </div>
821 </div>
822 </form>
823</body>
824</html>