Index: branches/RC/admin/editor/cmseditor/fckeditor.cfm =================================================================== diff -u -N --- branches/RC/admin/editor/cmseditor/fckeditor.cfm (revision 8929) +++ branches/RC/admin/editor/cmseditor/fckeditor.cfm (revision 0) @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - -if( attributes.checkBrowser ) -{ - sAgent = lCase( cgi.HTTP_USER_AGENT ); - isCompatibleBrowser = false; - - // check for Internet Explorer ( >= 5.5 ) - if( find( "msie", sAgent ) and not find( "mac", sAgent ) and not find( "opera", sAgent ) ) - { - // try to extract IE version - stResult = reFind( "msie ([5-9]\.[0-9])", sAgent, 1, true ); - if( arrayLen( stResult.pos ) eq 2 ) - { - // get IE Version - sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] ); - if( sBrowserVersion GTE 5.5 ) - isCompatibleBrowser = true; - } - } - // check for Gecko ( >= 20030210+ ) - else if( find( "gecko", sAgent ) ) - { - // try to extract Gecko version date - stResult = reFind( "gecko/(200[3-9][0-1][0-9][0-3][0-9])", sAgent, 1, true ); - if( arrayLen( stResult.pos ) eq 2 ) - { - // get Gecko build (i18n date) - sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] ); - if( sBrowserVersion GTE 20030210 ) - isCompatibleBrowser = true; - } - } -} -else -{ - // If we should not check browser compatibility, assume true - isCompatibleBrowser = true; -} - - - - - - - - // try to fix the basePath, if ending slash is missing - if( len( attributes.basePath) and right( attributes.basePath, 1 ) is not "/" ) - attributes.basePath = attributes.basePath & "/"; - - // construct the url - sURL = attributes.basePath & "editor/fckeditor.html?InstanceName=" & attributes.instanceName; - - // append toolbarset name to the url - if( len( attributes.toolbarSet ) ) - sURL = sURL & "&Toolbar=" & attributes.toolbarSet; - - // create configuration string: Key1=Value1&Key2=Value2&... (Key/Value:HTML encoded) - - /** - * CFML doesn't store casesensitive names for structure keys, but the configuration names must be casesensitive for js. - * So we need to find out the correct case for the configuration keys. - * We "fix" this by comparing the caseless configuration keys to a list of all available configuration options in the correct case. - * changed 20041206 hk@lwd.de (improvements are welcome!) - */ - lConfigKeys = ""; - lConfigKeys = lConfigKeys & "CustomConfigurationsPath,EditorAreaCSS,Debug,SkinPath,PluginsPath,AutoDetectLanguage,DefaultLanguage,EnableXHTML,EnableSourceXHTML"; - lConfigKeys = lConfigKeys & ",GeckoUseSPAN,StartupFocus,ForcePasteAsPlainText,LinkShowTargets,LinkTargets,LinkDefaultTarget,ToolbarStartExpanded,ToolbarCanCollapse"; - lConfigKeys = lConfigKeys & ",ToolbarSets,FontColors,FontNames,FontSizes,FontFormats,StylesXmlPath,LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight"; - lConfigKeys = lConfigKeys & ",LinkUpload,LinkUploadURL,LinkUploadWindowWidth,LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions"; - lConfigKeys = lConfigKeys & ",ImageBrowser,ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; - - sConfig = ""; - - for( key in attributes.config ) - { - iPos = listFindNoCase( lConfigKeys, key ); - if( iPos GT 0 ) - { - if( len( sConfig ) ) - sConfig = sConfig & "&"; - - fieldValue = attributes.config[key]; - fieldName = listGetAt( lConfigKeys, iPos ); - - // set all boolean possibilities in CFML to true/false values - if( isBoolean( fieldValue) and fieldValue ) - fieldValue = "true"; - else if( isBoolean( fieldValue) ) - fieldValue = "false"; - - sConfig = sConfig & HTMLEditFormat( fieldName ) & '=' & HTMLEditFormat( fieldValue ); - } - } - - - -
- - - -
-
- - - - - - - // append unit "px" for numeric width and/or height values - if( isNumeric( attributes.width ) ) - attributes.width = attributes.width & "px"; - if( isNumeric( attributes.height ) ) - attributes.height = attributes.height & "px"; - - - - -
- -
-
- -
- - \ No newline at end of file