[svn r16539] Use the new mp3 player and make it works on IE 6 & 7

See FS#2977
skala
Julian Prud'homme 17 years ago
parent 3f54769c96
commit 298c94d626
  1. 2
      main/inc/lib/fckeditor/editor/css/fck_internal.css
  2. BIN
      main/inc/lib/fckeditor/editor/css/images/fck_mp3.gif
  3. 2
      main/inc/lib/fckeditor/editor/fckeditor.html
  4. 77
      main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js

@ -207,6 +207,6 @@ a[name]
background-position: center center; background-position: center center;
background-image: url(images/fck_mp3.gif); background-image: url(images/fck_mp3.gif);
background-repeat: no-repeat; background-repeat: no-repeat;
width: 200px; width: 300px;
height: 20px; height: 20px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 878 B

@ -143,7 +143,7 @@ if ( FCKConfig.Debug )
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
// FCK_MP3 Class added by Julio Montoya // FCK_MP3 Class added by Julio Montoya
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Video{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_video.gif);background-repeat:no-repeat;width:45px;height:45px}.FCK__MP3{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_mp3.gif);background-repeat:no-repeat;width:90px;height:25px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ; var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Video{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_video.gif);background-repeat:no-repeat;width:45px;height:45px}.FCK__MP3{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_mp3.gif);background-repeat:no-repeat;width:300px;height:20px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ; var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;
// Popup the debug window if debug mode is set to true. It guarantees that the // Popup the debug window if debug mode is set to true. It guarantees that the

@ -116,45 +116,62 @@ function Ok()
return false ; return false ;
} }
var e = (oMedia || new Media()) ; var oFakeImage = null ;
//if(!is_ie){ oEmbed = FCK.EditorDocument.createElement('embed');
if ( !oMedia ) UpdateEmbed(oEmbed);
{
var oFakeImage = null ;
}
if ( !oEmbed ) //oObject = FCK.EditorDocument.createElement('object');
{ //oObject.appendChild(oEmbed);
oEmbed = FCK.EditorDocument.createElement( 'embed' ) ;
oFakeImage = null ;
}
UpdateEmbed( oEmbed ) ; /*SetAttribute(oObject, 'classid', 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000');
SetAttribute(oObject, 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#6,0,0,0');
SetAttribute(oObject, 'width', '300');
SetAttribute(oObject, 'height', '20');
if ( !oFakeImage ) oParamBgcolor = FCK.EditorDocument.createElement('param');
{ SetAttribute(oParamBgcolor, 'value', '#FFFFFF');
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MP3', oEmbed ) ; SetAttribute(oParamBgcolor, 'name', 'bgcolor');
oFakeImage.setAttribute( '_fckmp3', 'true', 0 ) ; oObject.appendChild(oParamBgcolor);
oFakeImage = FCK.InsertElement( oFakeImage ) ;
} oParamMovie = FCK.EditorDocument.createElement('param');
oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ; SetAttribute(oParamMovie, 'value', getObjData(GetE('mpUrl').value));
//} SetAttribute(oParamMovie, 'name', 'movie');
oObject.appendChild(oParamMovie);
oParamWAllowfullscreen = FCK.EditorDocument.createElement('param');
SetAttribute(oParamWAllowfullscreen, 'value', 'false');
SetAttribute(oParamWAllowfullscreen, 'name', 'allowfullscreen');
oObject.appendChild(oParamWAllowfullscreen);
oParamScriptAccess = FCK.EditorDocument.createElement('param');
SetAttribute(oParamScriptAccess, 'value', 'always');
SetAttribute(oParamScriptAccess, 'name', 'allowscriptaccess');
oObject.appendChild(oParamScriptAccess);
oParamSRC = FCK.EditorDocument.createElement('param');
SetAttribute(oParamSRC, 'value', 'file='+getSoundUrl()+'&autostart='+getAutostart());
SetAttribute(oParamSRC, 'name', 'flashvars');
oObject.appendChild(oParamSRC);*/
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MP3', oEmbed ) ;
oFakeImage.setAttribute( '_fckmp3', 'true', 0 ) ;
oFakeImage = FCK.InsertElement( oFakeImage ) ;
updateMovie(e) ;
FCK.InsertHtml(e.getOuterHTML()) ;
return true ; return true ;
} }
function UpdateEmbed( e ) function UpdateEmbed( e )
{ {
SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ; SetAttribute( e, 'type' , 'application/x-shockwave-flash' );
SetAttribute( e, 'quality' , 'high' ) ; SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' );
SetAttribute( e, 'name' , 'Streaming' ) ; SetAttribute( e, 'width' , '300' );
SetAttribute( e, 'width' , '90' ) ; SetAttribute( e, 'height' , '20' );
SetAttribute( e, 'height' , '25' ) ; SetAttribute( e, 'bgcolor' , '#FFFFFF' );
SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ; SetAttribute( e, 'src', getObjData(GetE('mpUrl').value));
SetAttribute( e, 'src', getObjData(GetE('mpUrl').value)+'?autostart='+getAutostart()+'&mp3file='+getSoundUrl()) ; SetAttribute( e, 'allowfullscreen', 'false' );
SetAttribute( e, 'allowscriptaccess', 'always' );
SetAttribute( e, 'flashvars', 'file='+getSoundUrl()+'&autostart='+getAutostart());
} }
/** /**
@ -353,7 +370,7 @@ function getObjData(mpUrl)
//var configBasePath = FCKConfig.BasePath; //var configBasePath = FCKConfig.BasePath;
//var cor_indx=configBasePath.indexOf("inc/")+4; //var cor_indx=configBasePath.indexOf("inc/")+4;
//configBasePath.substring(0, cor_indx)+"lib/mp3player/player_mp3.swf"; //configBasePath.substring(0, cor_indx)+"lib/mp3player/player_mp3.swf";
var objdata = rel_path+'inc/lib/mp3player/player_mp3.swf'; // real_path variable is defined in fck_mp3.php var objdata = rel_path+'inc/lib/mediaplayer/player.swf'; // real_path variable is defined in fck_mp3.php
setSoundUrl(GetE('mpUrl').value); setSoundUrl(GetE('mpUrl').value);
return objdata; return objdata;
} }

Loading…
Cancel
Save