[svn r17766] FS#2867 - FCKEditor: Moving towards the new system of managing URLs (to use relative or at least semi-absolute ones, a built-in the editor option is started to be used). Changing/addition of editor's configuration options for Documents tool and all tool introduction sections.

skala
Ivan Tcholakov 16 years ago
parent ee70347ede
commit 1cc00e9a2f
  1. 35
      main/inc/lib/fckeditor/editor/plugins/Flash/fck_flash.js
  2. 24
      main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.js
  3. 1
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin.js
  4. 15
      main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fck_embedmovies.js
  5. 24
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/flvPlayer.js

@ -72,16 +72,15 @@ function LoadSelection()
oMedia = new Media() ;
oMedia.setObjectElement( getSelectedMovie() ) ;
//GetE( 'txtURL' ).value = oMedia.url ;
GetE( 'txtURL' ).value = FCK.RemoveBasePath( oMedia.url ) ;
GetE( 'txtVSpace' ).value = oMedia.vspace ;
GetE( 'txtHSpace' ).value = oMedia.hspace ;
GetE( 'selAlign' ).value = oMedia.align ;
GetE( 'txtWidth' ).value = oMedia.width ;
GetE( 'txtHeight' ).value = oMedia.height ;
GetE( 'txtURL' ).value = oMedia.url ;
GetE( 'txtVSpace' ).value = oMedia.vspace ;
GetE( 'txtHSpace' ).value = oMedia.hspace ;
GetE( 'selAlign' ).value = oMedia.align ;
GetE( 'txtWidth' ).value = oMedia.width ;
GetE( 'txtHeight' ).value = oMedia.height ;
GetE( 'selQuality' ).value = oMedia.quality ;
GetE( 'selScale' ).value = oMedia.scale ;
GetE( 'selScale' ).value = oMedia.scale ;
GetE( 'txtBgColor' ).value = oMedia.bgcolor ;
GetE( 'chkLoop' ).value = oMedia.loop ;
GetE( 'chkAutoplay' ).value = oMedia.play ;
@ -101,7 +100,8 @@ function Ok()
//var e = ( oMedia || FCK.EditorDocument.createElement( 'OBJECT' ) ) ;
var e = ( oMedia || new Media() ) ;
e.url = FCK.AddBasePath( GetE( 'txtURL' ).value ) ;
e.url = GetE( 'txtURL' ).value ;
updateMovie(e) ;
@ -136,17 +136,8 @@ function updatePreview()
else
{
var preview = GetE( 'flashPreview' ) ;
/*
var sUrl = oEditor.FCKConfig.CreateDocumentWebDir + GetE( 'txtURL' ).value ;
if ( sUrl.indexOf( '?' ) > -1 )
{
sUrl = sUrl.substr( 0, sUrl.indexOf( '?' ) ) ;
GetE( 'txtURL' ).value = sUrl ;
}
*/
//oMedia.url = oEditor.FCKConfig.CreateDocumentWebDir + GetE( 'txtURL' ).value ; // this variable is call in document/create_document.php
oMedia.url = FCK.AddAbsolutePath( GetE( 'txtURL' ).value ) ;
oMedia.url = GetE( 'txtURL' ).value ;
updateMovie( oMedia ) ;
@ -210,7 +201,11 @@ function BrowseServer()
function SetUrl( url )
{
// Added by Ivan Tcholakov.
url = FCK.GetSelectedUrl( url ) ;
document.getElementById( 'txtURL' ).value = url ;
GetE( 'txtHeight' ).value = GetE( 'txtWidth' ).value = '' ;
updatePreview() ;
}

@ -387,27 +387,9 @@ function getObjData(mpUrl)
function setSoundUrl(url)
{
/* Weird!
var pos= url.indexOf('audio');
var end=url.length;
var string_audio = url.substring(pos, end ); // i.e -->> audio/listeningaudio.mp3
if (pos==-1) //// is in the main/upload
{
url = string_audio;
}
else
{
if (FCKConfig.CreateDocumentDir == '/')
{
url = string_audio;
}
else
{
url = FCKConfig.CreateDocumentDir + string_audio; // // FCKConfig.CreateDocumentDir variable is defined in create_document.php
}
}
*/
// Added by Ivan Tcholakov.
url = FCK.GetUrl( url, FCK.SEMI_ABSOLUTE_URL ) ;
mp3_url = url ;
}

@ -104,6 +104,7 @@ if ( FCKConfig.BaseHref.length > 0 )
}
}
/*
**************************************************************************************
* Internal configuration data. It is meant to be modified by developers only.

@ -83,7 +83,9 @@ window.onload = function ()
oEditor.FCKLanguageManager.TranslatePage(document);
// read settings from existing embedded movie or set to default
GetE('txtUrl').value = FCK.RemoveBasePath( GetParam( oMovie, ( EmbedInObject ? 'url' : 'src' ) ), '' ) ;
GetE('txtUrl').value = GetParam( oMovie, ( EmbedInObject ? 'url' : 'src' ), '' ) ;
GetE('chkAutosize').checked = GetParam(oMovie, 'autosize', true);
GetE('txtWidth').value = GetParam(oMovie, 'width', 250 );
GetE('txtHeight').value = GetParam(oMovie, 'height', 250 );
@ -114,15 +116,14 @@ function BrowseServer()
function SetUrl( url )
{
//GetE('txtUrl').value = url;
GetE('txtUrl').value = FCK.RemoveBasePath( url ) ;
// Added by Ivan Tcholakov.
url = FCK.GetSelectedUrl( url );
GetE('txtUrl').value = url;
}
function CreateEmbeddedMovie(e, url)
{
// Added by Ivan Tcholakov
url = FCK.AddBasePath( url ) ;
var sType, pluginspace, codebase, classid;
var sExt = url.match(/\.(mpg|mpeg|mp4|avi|wmv|mov|asf)$/i);
@ -228,7 +229,7 @@ function Ok()
oFakeImage = null ;
}
url = FCK.AddBasePath( GetE( 'txtUrl' ).value ) ;
url = GetE( 'txtUrl' ).value ;
if ( !oFakeImage )
{

@ -185,16 +185,13 @@ function updateMovie(e)
{
e.fileType = GetE('rbFileType').value;
//e.url = GetE('txtURL').value;
e.url = FCK.AddAbsolutePath( GetE('txtURL').value ) ;
e.url = GetE('txtURL').value;
e.purl = GetE('txtPlaylist').value;
//e.iurl = GetE('txtImgURL').value;
e.iurl = FCK.AddAbsolutePath( GetE('txtImgURL').value ) ;
e.iurl = GetE('txtImgURL').value;
//e.wmurl = GetE('txtWMURL').value;
e.wmurl = FCK.AddAbsolutePath( GetE('txtWMURL').value ) ;
e.wmurl = GetE('txtWMURL').value;
e.bgcolor = GetE('txtBgColor').value;
e.toolcolor = GetE('txtToolbarColor').value;
@ -211,8 +208,7 @@ function updateMovie(e)
e.align = GetE('selAlign').value;
e.dispPlaylist = GetE('selDispPlaylist').value;
//e.rurl = GetE('txtRURL').value;
e.rurl = FCK.AddAbsolutePath( GetE('txtRURL').value ) ;
e.rurl = GetE('txtRURL').value;
e.playlistDim = GetE('txtPLDim').value;
e.playlistThumbs = (GetE('chkPLThumbs').checked) ? 'true' : 'false';
@ -278,7 +274,7 @@ var sActualBrowser ;
function SetUrl( url ) {
// Added by Ivan Tcholakov.
url = FCK.AddAbsolutePath( url ) ;
url = FCK.GetUrl( url, FCK.SEMI_ABSOLUTE_URL ) ;
if ( sActualBrowser == 'flv' ) {
document.getElementById('txtURL').value = url ;
@ -364,7 +360,10 @@ Media.prototype.getInnerHTML = function (objectId){
//s+= '<p>\n';
s+= '<div id="player' + randomnumber + '-parent" style="text-align: center;' + cssfloat + '">\n';
s+= '<div style="border-style: none; height: ' + thisHeight + 'px; width: ' + thisWidth + 'px; overflow: hidden; background-color: rgb(220, 220, 220); background-image: url(' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/flvPlayer.gif); background-repeat:no-repeat; background-position:center;' + cssalign + '">';
s+= '<script src="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/swfobject.js" type="text/javascript"></script>\n';
//s+= '<script src="' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/swfobject.js" type="text/javascript"></script>\n';
s+= '<script src="' + FCK.GetUrl( oEditor.FCKConfig.PluginsPath + 'flvPlayer/swfobject.js', FCK.SEMI_ABSOLUTE_URL ) + '" type="text/javascript"></script>\n';
s+= '<div id="player' + randomnumber + '">';
s+= '<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.';
// Moved after info - Added width,height,overflow for MSIE7
@ -380,7 +379,10 @@ Media.prototype.getInnerHTML = function (objectId){
s+= '</div>';
s+= '<script type="text/javascript">\n';
//s+= ' //NOTE: FOR LIST OF POSSIBLE SETTINGS GOTO http://www.jeroenwijering.com/extras/readme.html\n';
s+= ' var s1 = new SWFObject("' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf","' + thisMediaType + '","' + thisWidth + '","' + thisHeight + '","7");\n';
//s+= ' var s1 = new SWFObject("' + oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf","' + thisMediaType + '","' + thisWidth + '","' + thisHeight + '","7");\n';
s+= ' var s1 = new SWFObject("' + FCK.GetUrl( oEditor.FCKConfig.PluginsPath + 'flvPlayer/mediaplayer.swf', FCK.SEMI_ABSOLUTE_URL ) + '","' + thisMediaType + '","' + thisWidth + '","' + thisHeight + '","7");\n';
s+= ' s1.addVariable("width","' + thisWidth + '");\n';
s+= ' s1.addVariable("height","' + thisHeight + '");\n';
s+= ' s1.addVariable("autostart","' + this.play + '");\n';

Loading…
Cancel
Save