diff options
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/media')
15 files changed, 23 insertions, 20 deletions
diff --git a/public/javascripts/tiny_mce/plugins/media/css/content.css b/public/javascripts/tiny_mce/plugins/media/css/content.css index 1bf6a75..1bf6a75 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/css/content.css +++ b/public/javascripts/tiny_mce/plugins/media/css/content.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/css/media.css b/public/javascripts/tiny_mce/plugins/media/css/media.css index 2d08794..2d08794 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/css/media.css +++ b/public/javascripts/tiny_mce/plugins/media/css/media.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js index b226b00..951d1e4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js | |||
| @@ -1 +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 | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme.onResolveName){b.theme.onResolveName.add(function(h,i){if(i.name=="img"){a(g,function(l,j){if(b.dom.hasClass(i.node,j)){i.name=l;i.title=b.dom.getAttrib(i.node,"title");return false}})}})}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(i,h,j){if(j.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(j.className)){h.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});b.onBeforeSetContent.add(e._objectsToSpans,e);b.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.onPreProcess.add(function(g,i){var h=g.dom;if(i.set){e._spansToImgs(i.node);a(h.select("IMG",i.node),function(k){var j;if(f(k)){j=e._parse(k.title);h.setAttrib(k,"width",h.getAttrib(k,"width",j.width||100));h.setAttrib(k,"height",h.getAttrib(k,"height",j.height||100))}})}if(i.get){a(h.select("IMG",i.node),function(m){var l,j,k;if(g.getParam("media_use_script")){if(f(m)){m.className=m.className.replace(/mceItem/g,"mceTemp")}return}switch(m.className){case"mceItemFlash":l="d27cdb6e-ae6d-11cf-96b8-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="application/x-shockwave-flash";break;case"mceItemShockWave":l="166b1bca-3f9c-11cf-8075-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";k="application/x-director";break;case"mceItemWindowsMedia":l=g.getParam("media_wmp6_compatible")?"05589fa1-c356-11ce-bf01-00aa0055595a":"6bf52a52-394a-11d3-b153-00c04f79faa6";j="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";k="application/x-mplayer2";break;case"mceItemQuickTime":l="02bf25d5-8c17-4b23-bc80-d3488abddc6b";j="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";k="video/quicktime";break;case"mceItemRealMedia":l="cfcdaa03-8be4-11cf-b84b-0020afbbccfa";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="audio/x-pn-realaudio-plugin";break}if(l){h.replace(e._buildObj({classid:l,codebase:j,type:k},m),m)}})}});b.onPostProcess.add(function(g,h){h.content=h.content.replace(/_mce_value=/g,"value=")});function d(g,h){h=new RegExp(h+'="([^"]+)"',"g").exec(g);return h?b.dom.decode(h[1]):""}b.onPostProcess.add(function(g,h){if(g.getParam("media_use_script")){h.content=h.content.replace(/<img[^>]+>/g,function(j){var i=d(j,"class");if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(i)){at=e._parse(d(j,"title"));at.width=d(j,"width");at.height=d(j,"height");j='<script type="text/javascript">write'+i.substring(7)+"({"+e._serialize(at)+"});<\/script>"}return j})}})},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(b,e){var c=this,d=e.content;d=d.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(g,f,i){var h=c._parse(i);return'<img class="mceItem'+f+'" title="'+b.dom.encode(i)+'" src="'+c.url+'/img/trans.gif" width="'+h.width+'" height="'+h.height+'" />'});d=d.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');d=d.replace(/<embed([^>]*)\/?>/gi,'<span class="mceItemEmbed" $1></span>');d=d.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');d=d.replace(/<\/(object)([^>]*)>/gi,"</span>");d=d.replace(/<\/embed>/gi,"");d=d.replace(/<param([^>]*)>/gi,function(g,f){return"<span "+f.replace(/value=/gi,"_mce_value=")+' class="mceItemParam"></span>'});d=d.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');e.content=d},_buildObj:function(g,h){var d,c=this.editor,f=c.dom,e=this._parse(h.title),b;b=c.getParam("media_strict",true)&&g.type=="application/x-shockwave-flash";e.width=g.width=f.getAttrib(h,"width")||100;e.height=g.height=f.getAttrib(h,"height")||100;if(e.src){e.src=c.convertURL(e.src,"src",h)}if(b){d=f.create("span",{id:e.id,mce_name:"object",type:"application/x-shockwave-flash",data:e.src,style:f.getAttrib(h,"style"),width:g.width,height:g.height})}else{d=f.create("span",{id:e.id,mce_name:"object",classid:"clsid:"+g.classid,style:f.getAttrib(h,"style"),codebase:g.codebase,width:g.width,height:g.height})}a(e,function(j,i){if(!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(i)){if(g.type=="application/x-mplayer2"&&i=="src"&&!e.url){i="url"}if(j){f.add(d,"span",{mce_name:"param",name:i,_mce_value:j})}}});if(!b){f.add(d,"span",tinymce.extend({mce_name:"embed",type:g.type,style:f.getAttrib(h,"style")},e))}return d},_spansToImgs:function(e){var d=this,f=d.editor.dom,b,c;a(f.select("span",e),function(g){if(f.getAttrib(g,"class")=="mceItemObject"){c=f.getAttrib(g,"classid").toLowerCase().replace(/\s+/g,"");switch(c){case"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000":f.replace(d._createImg("mceItemFlash",g),g);break;case"clsid:166b1bca-3f9c-11cf-8075-444553540000":f.replace(d._createImg("mceItemShockWave",g),g);break;case"clsid:6bf52a52-394a-11d3-b153-00c04f79faa6":case"clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95":case"clsid:05589fa1-c356-11ce-bf01-00aa0055595a":f.replace(d._createImg("mceItemWindowsMedia",g),g);break;case"clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b":f.replace(d._createImg("mceItemQuickTime",g),g);break;case"clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa":f.replace(d._createImg("mceItemRealMedia",g),g);break;default:f.replace(d._createImg("mceItemFlash",g),g)}return}if(f.getAttrib(g,"class")=="mceItemEmbed"){switch(f.getAttrib(g,"type")){case"application/x-shockwave-flash":f.replace(d._createImg("mceItemFlash",g),g);break;case"application/x-director":f.replace(d._createImg("mceItemShockWave",g),g);break;case"application/x-mplayer2":f.replace(d._createImg("mceItemWindowsMedia",g),g);break;case"video/quicktime":f.replace(d._createImg("mceItemQuickTime",g),g);break;case"audio/x-pn-realaudio-plugin":f.replace(d._createImg("mceItemRealMedia",g),g);break;default:f.replace(d._createImg("mceItemFlash",g),g)}}})},_createImg:function(c,h){var b,g=this.editor.dom,f={},e="",d;d=["id","name","width","height","bgcolor","align","flashvars","src","wmode","allowfullscreen","quality"];b=g.create("img",{src:this.url+"/img/trans.gif",width:g.getAttrib(h,"width")||100,height:g.getAttrib(h,"height")||100,style:g.getAttrib(h,"style"),"class":c});a(d,function(i){var j=g.getAttrib(h,i);if(j){f[i]=j}});a(g.select("span",h),function(i){if(g.hasClass(i,"mceItemParam")){f[g.getAttrib(i,"name")]=g.getAttrib(i,"_mce_value")}});if(f.movie){f.src=f.movie;delete f.movie}h=g.select(".mceItemEmbed",h)[0];if(h){a(d,function(i){var j=g.getAttrib(h,i);if(j&&!f[i]){f[i]=j}})}delete f.width;delete f.height;b.title=this._serialize(f);return b},_parse:function(b){return tinymce.util.JSON.parse("{"+b+"}")},_serialize:function(b){return tinymce.util.JSON.serialize(b).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 index beec3bf..faa0cf7 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 952 2008-11-03 17:56:04Z spocke $ | 2 | * $Id: editor_plugin_src.js 1037 2009-03-02 16:41:15Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -165,14 +165,14 @@ | |||
| 165 | o.content = o.content.replace(/_mce_value=/g, 'value='); | 165 | o.content = o.content.replace(/_mce_value=/g, 'value='); |
| 166 | }); | 166 | }); |
| 167 | 167 | ||
| 168 | if (ed.getParam('media_use_script')) { | 168 | function getAttr(s, n) { |
| 169 | function getAttr(s, n) { | 169 | n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); |
| 170 | n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); | ||
| 171 | 170 | ||
| 172 | return n ? ed.dom.decode(n[1]) : ''; | 171 | return n ? ed.dom.decode(n[1]) : ''; |
| 173 | }; | 172 | }; |
| 174 | 173 | ||
| 175 | ed.onPostProcess.add(function(ed, o) { | 174 | ed.onPostProcess.add(function(ed, o) { |
| 175 | if (ed.getParam('media_use_script')) { | ||
| 176 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { | 176 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { |
| 177 | var cl = getAttr(im, 'class'); | 177 | var cl = getAttr(im, 'class'); |
| 178 | 178 | ||
| @@ -185,8 +185,8 @@ | |||
| 185 | 185 | ||
| 186 | return im; | 186 | return im; |
| 187 | }); | 187 | }); |
| 188 | }); | 188 | } |
| 189 | } | 189 | }); |
| 190 | }, | 190 | }, |
| 191 | 191 | ||
| 192 | getInfo : function() { | 192 | getInfo : function() { |
| @@ -233,16 +233,20 @@ | |||
| 233 | 233 | ||
| 234 | if (stc) { | 234 | if (stc) { |
| 235 | ob = dom.create('span', { | 235 | ob = dom.create('span', { |
| 236 | id : p.id, | ||
| 236 | mce_name : 'object', | 237 | mce_name : 'object', |
| 237 | type : 'application/x-shockwave-flash', | 238 | type : 'application/x-shockwave-flash', |
| 238 | data : p.src, | 239 | data : p.src, |
| 240 | style : dom.getAttrib(n, 'style'), | ||
| 239 | width : o.width, | 241 | width : o.width, |
| 240 | height : o.height | 242 | height : o.height |
| 241 | }); | 243 | }); |
| 242 | } else { | 244 | } else { |
| 243 | ob = dom.create('span', { | 245 | ob = dom.create('span', { |
| 246 | id : p.id, | ||
| 244 | mce_name : 'object', | 247 | mce_name : 'object', |
| 245 | classid : "clsid:" + o.classid, | 248 | classid : "clsid:" + o.classid, |
| 249 | style : dom.getAttrib(n, 'style'), | ||
| 246 | codebase : o.codebase, | 250 | codebase : o.codebase, |
| 247 | width : o.width, | 251 | width : o.width, |
| 248 | height : o.height | 252 | height : o.height |
| @@ -250,9 +254,9 @@ | |||
| 250 | } | 254 | } |
| 251 | 255 | ||
| 252 | each (p, function(v, k) { | 256 | each (p, function(v, k) { |
| 253 | if (!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)) { | 257 | if (!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(k)) { |
| 254 | // Use url instead of src in IE for Windows media | 258 | // Use url instead of src in IE for Windows media |
| 255 | if (o.type == 'application/x-mplayer2' && k == 'src') | 259 | if (o.type == 'application/x-mplayer2' && k == 'src' && !p.url) |
| 256 | k = 'url'; | 260 | k = 'url'; |
| 257 | 261 | ||
| 258 | if (v) | 262 | if (v) |
| @@ -261,7 +265,7 @@ | |||
| 261 | }); | 265 | }); |
| 262 | 266 | ||
| 263 | if (!stc) | 267 | if (!stc) |
| 264 | dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p)); | 268 | dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p)); |
| 265 | 269 | ||
| 266 | return ob; | 270 | return ob; |
| 267 | }, | 271 | }, |
| @@ -344,6 +348,7 @@ | |||
| 344 | src : this.url + '/img/trans.gif', | 348 | src : this.url + '/img/trans.gif', |
| 345 | width : dom.getAttrib(n, 'width') || 100, | 349 | width : dom.getAttrib(n, 'width') || 100, |
| 346 | height : dom.getAttrib(n, 'height') || 100, | 350 | height : dom.getAttrib(n, 'height') || 100, |
| 351 | style : dom.getAttrib(n, 'style'), | ||
| 347 | 'class' : cl | 352 | 'class' : cl |
| 348 | }); | 353 | }); |
| 349 | 354 | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flash.gif b/public/javascripts/tiny_mce/plugins/media/img/flash.gif index cb192e6..cb192e6 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/flash.gif +++ 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 index 042c2ab..042c2ab 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +++ 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 index 3b04991..3b04991 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +++ 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 index fdfe0b9..fdfe0b9 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +++ 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 index 5f235df..5f235df 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +++ 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 index 3884865..3884865 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/trans.gif +++ 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 index ab50f2d..ab50f2d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +++ 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 index f8dc810..f8dc810 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/js/embed.js +++ b/public/javascripts/tiny_mce/plugins/media/js/embed.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/js/media.js b/public/javascripts/tiny_mce/plugins/media/js/media.js index fa8e142..86cfa98 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/js/media.js +++ b/public/javascripts/tiny_mce/plugins/media/js/media.js | |||
| @@ -218,7 +218,7 @@ function insertMedia() { | |||
| 218 | break; | 218 | break; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | if (fe.width != f.width.value || fe.height != f.height.height) | 221 | if (fe.width != f.width.value || fe.height != f.height.value) |
| 222 | ed.execCommand('mceRepaint'); | 222 | ed.execCommand('mceRepaint'); |
| 223 | 223 | ||
| 224 | fe.title = serializeParameters(); | 224 | fe.title = serializeParameters(); |
| @@ -469,7 +469,7 @@ function setBool(pl, p, n) { | |||
| 469 | if (typeof(pl[n]) == "undefined") | 469 | if (typeof(pl[n]) == "undefined") |
| 470 | return; | 470 | return; |
| 471 | 471 | ||
| 472 | document.forms[0].elements[p + "_" + n].checked = pl[n]; | 472 | document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | function setStr(pl, p, n) { | 475 | function setStr(pl, p, n) { |
| @@ -490,7 +490,7 @@ function getBool(p, n, d, tv, fv) { | |||
| 490 | tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; | 490 | tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; |
| 491 | fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; | 491 | fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; |
| 492 | 492 | ||
| 493 | return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ','); | 493 | return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | function getStr(p, n, d) { | 496 | function getStr(p, n, d) { |
diff --git a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js index 6d0a996..6d0a996 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/media.htm b/public/javascripts/tiny_mce/plugins/media/media.htm index 8b3bc1d..911c03d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/media.htm +++ b/public/javascripts/tiny_mce/plugins/media/media.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 9 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 10 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 10 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 11 | <link href="css/media.css" rel="stylesheet" type="text/css" /> | 11 | <link href="css/media.css" rel="stylesheet" type="text/css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body style="display: none"> | 13 | <body style="display: none"> |
| 15 | <form onsubmit="insertMedia();return false;" action="#"> | 14 | <form onsubmit="insertMedia();return false;" action="#"> |
| @@ -52,7 +51,7 @@ | |||
| 52 | </tr> | 51 | </tr> |
| 53 | <tr id="linklistrow"> | 52 | <tr id="linklistrow"> |
| 54 | <td><label for="linklist">{#media_dlg.list}</label></td> | 53 | <td><label for="linklist">{#media_dlg.list}</label></td> |
| 55 | <td id="linklistcontainer"> </td> | 54 | <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td> |
| 56 | </tr> | 55 | </tr> |
| 57 | <tr> | 56 | <tr> |
| 58 | <td><label for="width">{#media_dlg.size}</label></td> | 57 | <td><label for="width">{#media_dlg.size}</label></td> |
| @@ -260,8 +259,7 @@ | |||
| 260 | <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td> | 259 | <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> | 260 | <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td> |
| 262 | 261 | ||
| 263 | <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td> | 262 | |
| 264 | <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td> | ||
| 265 | </tr> | 263 | </tr> |
| 266 | 264 | ||
| 267 | <tr> | 265 | <tr> |
