From e50a818e3a0a79ccaaa23cc4167e9710fefb671e Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Fri, 16 Jan 2009 05:04:20 +0100 Subject: [PATCH] [svn r17767] 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. --- .../editor/dialog/fck_flash/fck_flash.js | 3 +++ .../editor/dialog/fck_image/fck_image.js | 19 ++++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js b/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js index 993ba8c3a4..661d47b280 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_flash/fck_flash.js @@ -221,6 +221,9 @@ function BrowseServer() function SetUrl( url, width, height ) { + // Added by Ivan Tcholakov. + url = FCK.GetSelectedUrl( url ) ; + GetE('txtUrl').value = url ; if ( width ) diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js b/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js index cfc3869866..bccf5dbcb6 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_image/fck_image.js @@ -128,10 +128,9 @@ function LoadSelection() var sUrl = oImage.getAttribute( '_fcksavedurl' ) ; if ( sUrl == null ) sUrl = GetAttribute( oImage, 'src', '' ) ; - // Added by Ivan Tcholakov. - sUrl = FCK.RemoveBasePath( sUrl ) ; GetE('txtUrl').value = sUrl ; + GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; @@ -190,10 +189,9 @@ function LoadSelection() var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ; if ( sLinkUrl == null ) sLinkUrl = oLink.getAttribute('href',2) ; - // Added by Ivan Tcholakov. - sUrl = FCK.RemoveBasePath( sUrl ) ; GetE('txtLnkUrl').value = sLinkUrl ; + GetE('cmbLnkTarget').value = oLink.target ; } @@ -250,9 +248,6 @@ function Ok() } else { - // Added by Ivan Tcholakov. - sLnkUrl = FCK.AddBasePath( sLnkUrl ) ; - if ( oLink ) // Modifying an existent link. oLink.href = sLnkUrl ; else // Creating a new link. @@ -278,11 +273,9 @@ function Ok() function UpdateImage( e, skipId ) { - // Modified by Ivan Tcholakov. - //e.src = GetE('txtUrl').value ; - //SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ; - e.src = FCK.AddBasePath( GetE('txtUrl').value ) ; - SetAttribute( e, "_fcksavedurl", FCK.AddBasePath( GetE('txtUrl') ).value ) ; + e.src = GetE('txtUrl').value ; + + SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ; SetAttribute( e, "alt" , GetE('txtAlt').value ) ; SetAttribute( e, "width" , GetE('txtWidth').value ) ; SetAttribute( e, "height", GetE('txtHeight').value ) ; @@ -435,7 +428,7 @@ var sActualBrowser ; function SetUrl( url, width, height, alt ) { // Added by Ivan Tcholakov. - url = FCK.RemoveBasePath( url ) ; + url = FCK.GetSelectedUrl ( url ) ; if ( sActualBrowser == 'Link' ) {