zope.html-2.2.0/0000755000175000017500000000000011473031634013537 5ustar achapmanachapmanzope.html-2.2.0/src/0000755000175000017500000000000011473031633014325 5ustar achapmanachapmanzope.html-2.2.0/src/zope/0000755000175000017500000000000011473031633015302 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/0000755000175000017500000000000011473031633016246 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/configure.zcml0000644000175000017500000000430111471562244021121 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/ftesting.zcml0000644000175000017500000000263511471562006020767 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/browser.txt0000644000175000017500000001104411471562006020473 0ustar achapmanachapman====================== Views on editable HTML ====================== Let's start by uploading some HTML to create a file object:: >>> import StringIO >>> sio = StringIO.StringIO("This is a fragment." ... " There's one 8-bit Latin-1 character: \xd8.") >>> from zope.testbrowser.testing import Browser >>> browser = Browser() >>> browser.addHeader("Authorization", "Basic user:userpw") >>> browser.addHeader("Accept-Language", "en-US") >>> browser.open("http://localhost/@@+/zope.file.File") >>> ctrl = browser.getControl(name="form.data") >>> ctrl.mech_control.add_file(sio, "text/html", "sample.html") >>> browser.getControl("Add").click() We can see that the MIME handlers have marked this as HTML content:: >>> import zope.mimetype.types >>> file = getRootFolder()["sample.html"] >>> zope.mimetype.types.IContentTypeTextHtml.providedBy(file) True The "Edit" view can be used to check and modify the "Is fragment?" field, which is stored by the views in an annotation on the object. The particular fragment we uploaded here should be see as a fragment by default:: >>> browser.getLink("sample.html").click() >>> browser.getLink("Edit").click() >>> browser.open("http://localhost/sample.html/@@htmledit.html") >>> ctrl = browser.getControl(name="form.isFragment") >>> ctrl.value True The setting can be toggle by unchecking the checkbox and clicking "Save":: >>> ctrl.value = False >>> browser.getControl("Save").click() >>> ctrl = browser.getControl(name="form.isFragment") >>> ctrl.value False The edit view also allows editing of the HTML content if the document can be decoded. If the encoding of the document is not known, the document cannot be edited by the user is prompted to select an encoding that should be used. Our example document does not have a specified encoding, so we expect the form to indicate that the encoded is needed, and to allow the user to select and encoding. Let's reload the form to get rid of the "Updated..." message so we can see what the user is told:: >>> browser.getLink("Edit").click() >>> print browser.contents <...Can't decode text for editing; please specify the document encoding... >>> ctrl = browser.getControl(name="form.encoding") >>> ctrl.value [''] The user can then select an encoding:: >>> ctrl.value = ["utf-8"] >>> browser.getControl("Save").click() Since we just selected an encoding that doesn't work with the Latin-1 data we uploaded for the file, we're told that that encoding is not acceptable:: >>> print browser.contents <...Selected encoding cannot decode document... We need to select an encoding that actually makes sense for the data that we've uploaded:: >>> ctrl = browser.getControl(name="form.encoding") >>> ctrl.value = ["iso-8859-1"] >>> browser.getControl("Save").click() Now that the encoding has been saved, the document can be encoded and edited, and the encoding selection will no longer be available on the form:: >>> browser.getControl(name="form.encoding") Traceback (most recent call last): ... LookupError: name 'form.encoding' Since our selected encoding does not support all Unicode characters, there is an option available to allow re-encoding of the document if the content being saved after editing cannot be encoded in the original encoding of the document. The value of this option defaults to False since the user needs to be aware that the document encoding may be modified:: >>> browser.getControl(name="form.reencode").value False If we edit the text such that characters are included that cannot be encoded in the current encoding and try to save our changes without allowing re-encoding, we see a notification that the document can't be encoded in the original encoding and that re-encoding is needed:: >>> ctrl = browser.getControl(name="form.text") >>> ctrl.value = u"\u3060\u3051\u306e\u30b5\u30a4\u30c8".encode("utf-8") >>> browser.getControl("Save").click() >>> print browser.contents <...Can't encode text in current encoding... At this point, we can select the "Re-encode" option to allow the text to be saved in an encoding other than the original; this would allow us to save any text:: >>> browser.getControl(name="form.reencode").value = True >>> browser.getControl("Save").click() >>> print browser.contents <...Updated on ... If we now take a look at the "Content Type" view for the file, we see that the encoding has been updated to UTF-8:: >>> browser.getLink("Content Type").click() >>> browser.getControl(name="form.encoding").value ['utf-8'] zope.html-2.2.0/src/zope/html/fckeditor/0000755000175000017500000000000011473031633020220 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/0000755000175000017500000000000011473031633021026 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/0000755000175000017500000000000011473031633023000 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.cfc0000755000175000017500000002117611471562006025442 0ustar achapmanachapman #CreateHtml()# // display the html editor or a plain textarea? if( isCompatible() ) return getHtmlEditor(); else return getTextArea(); var sAgent = lCase( cgi.HTTP_USER_AGENT ); var stResult = ""; var sBrowserVersion = ""; // do not check if argument "checkBrowser" is false if( not this.checkBrowser ) return true; return FCKeditor_IsCompatibleBrowser(); if( Find( "%", this.width ) gt 0) sWidthCSS = this.width; else sWidthCSS = this.width & "px"; if( Find( "%", this.width ) gt 0) sHeightCSS = this.height; else sHeightCSS = this.height & "px"; result = "" & chr(13) & chr(10); // try to fix the basePath, if ending slash is missing if( len( this.basePath) and right( this.basePath, 1 ) is not "/" ) this.basePath = this.basePath & "/"; // construct the url sURL = this.basePath & "editor/fckeditor.html?InstanceName=" & this.instanceName; // append toolbarset name to the url if( len( this.toolbarSet ) ) sURL = sURL & "&Toolbar=" & this.toolbarSet; result = result & "" & chr(13) & chr(10); result = result & "" & chr(13) & chr(10); result = result & "" & chr(13) & chr(10); /** * 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 & "CustomConfigurationsPath,EditorAreaCSS,ToolbarComboPreviewCSS,DocType"; lConfigKeys = lConfigKeys & ",BaseHref,FullPage,Debug,AllowQueryStringDebug,SkinPath"; lConfigKeys = lConfigKeys & ",PreloadImages,PluginsPath,AutoDetectLanguage,DefaultLanguage,ContentLangDirection"; lConfigKeys = lConfigKeys & ",ProcessHTMLEntities,IncludeLatinEntities,IncludeGreekEntities,ProcessNumericEntities,AdditionalNumericEntities"; lConfigKeys = lConfigKeys & ",FillEmptyBlocks,FormatSource,FormatOutput,FormatIndentator"; lConfigKeys = lConfigKeys & ",StartupFocus,ForcePasteAsPlainText,AutoDetectPasteFromWord,ForceSimpleAmpersand"; lConfigKeys = lConfigKeys & ",TabSpaces,ShowBorders,SourcePopup,ToolbarStartExpanded,ToolbarCanCollapse"; lConfigKeys = lConfigKeys & ",IgnoreEmptyParagraphValue,FloatingPanelsZIndex,TemplateReplaceAll,TemplateReplaceCheckbox"; lConfigKeys = lConfigKeys & ",ToolbarLocation,ToolbarSets,EnterMode,ShiftEnterMode,Keystrokes"; lConfigKeys = lConfigKeys & ",ContextMenu,BrowserContextMenuOnCtrl,FontColors,FontNames,FontSizes"; lConfigKeys = lConfigKeys & ",FontFormats,StylesXmlPath,TemplatesXmlPath,SpellChecker,IeSpellDownloadUrl"; lConfigKeys = lConfigKeys & ",SpellerPagesServerScript,FirefoxSpellChecker,MaxUndoLevels,DisableObjectResizing,DisableFFTableHandles"; lConfigKeys = lConfigKeys & ",LinkDlgHideTarget,LinkDlgHideAdvanced,ImageDlgHideLink,ImageDlgHideAdvanced,FlashDlgHideAdvanced"; lConfigKeys = lConfigKeys & ",ProtectedTags,BodyId,BodyClass,DefaultLinkTarget,CleanWordKeepsStructure"; lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight,ImageBrowser"; lConfigKeys = lConfigKeys & ",ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,FlashBrowser,FlashBrowserURL"; lConfigKeys = lConfigKeys & ",FlashBrowserWindowWidth,FlashBrowserWindowHeight,LinkUpload,LinkUploadURL,LinkUploadWindowWidth"; lConfigKeys = lConfigKeys & ",LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions,ImageUpload,ImageUploadURL"; lConfigKeys = lConfigKeys & ",ImageUploadAllowedExtensions,ImageUploadDeniedExtensions,FlashUpload,FlashUploadURL,FlashUploadAllowedExtensions"; lConfigKeys = lConfigKeys & ",FlashUploadDeniedExtensions,SmileyPath,SmileyImages,SmileyColumns,SmileyWindowWidth,SmileyWindowHeight"; for( key in this.config ) { iPos = listFindNoCase( lConfigKeys, key ); if( iPos GT 0 ) { if( len( sParams ) ) sParams = sParams & "&"; fieldValue = this.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"; sParams = sParams & HTMLEditFormat( fieldName ) & '=' & HTMLEditFormat( fieldValue ); } } return sParams; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fcktemplates.xml0000755000175000017500000000561711471562006026221 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/_whatsnew_history.html0000755000175000017500000111322211471562006027454 0ustar achapmanachapman FCKeditor ChangeLog - What's New?

FCKeditor ChangeLog - What's New?

Version 2.6.3

Fixed Bugs:

This version has been sponsored by Data Illusion survey software solutions.

Version 2.6.3 Beta

New Features and Improvements:

Fixed Bugs:

Version 2.6.2

New Features and Improvements:

Fixed Bugs:

Version 2.6.1

New Features and Improvements:

Fixed Bugs:

Version 2.6

No changes. The stabilization of the 2.6 RC was completed successfully, as expected.

Version 2.6 RC

New Features and Improvements:

Fixed Bugs:

Version 2.6 Beta 1

New Features and Improvements:

Fixed Bugs:

Version 2.5.1

New Features and Improvements:

Fixed Bugs:

Version 2.5

New Features and Improvements:

Fixed Bugs:

Version 2.5 Beta

New Features and Improvements:

Fixed Bugs:

# This version has been partially sponsored by the Council of Europe.

Version 2.4.3

New Features and Improvements:

Fixed Bugs:

Version 2.4.2

Fixed Bugs:

Version 2.4.1

New Features and Improvements:

Fixed Bugs:

Version 2.4

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by Medical Media Lab.

Version 2.3.3

New Features and Improvements:

Version 2.3.2

New Features and Improvements:

Fixed Bugs:

Version 2.3.1

Fixed Bugs:

Version 2.3

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by Footsteps and Kentico.

Version 2.3 Beta

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by Footsteps and Kentico.
** This version has been partially sponsored by Nextide.

Version 2.2

New Features and Improvements:

Fixed Bugs:

Special thanks to Alfonso Martinez, who have provided many patches and suggestions for the following features / fixes present in this version. I encourage all you to donate to Alfonso, as a way to say thanks for his nice open source approach. Thanks Alfonso!. Check out his contributions:

* This version has been partially sponsored by Alkacon Software.

Version 2.1.1

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by Acctive Software S.A..

Version 2.1

New Features and Improvements:

Fixed Bugs:

Version 2.0

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by Infineon Technologies AG.
** This version has been partially sponsored by Visualsoft Web Solutions.
*** This version has been partially sponsored by Web Crossing, Inc.

Version 2.0 FC (Final Candidate)

New Features and Improvements:

Fixed Bugs:

* This version has been partially sponsored by the Hamilton College.
** This version has been partially sponsored by Infineon Technologies AG.

Version 2.0 RC3 (Release Candidate 3)

New Features and Improvements:

Fixed Bugs:

Version 2.0 RC2 (Release Candidate 2)

Version 2.0 RC1 (Release Candidate 1)

Version 2.0 Beta 2

Version 2.0 Beta 1

This is the first beta of the 2.x series. It brings a lot of new and important things. Beta versions will be released until all features available on version 1.x will be introduced in the 2.0.

Note: As it is a beta, it is not yet completely developed. Future versions can bring new features that can break backward compatibility with this version.

Version 1.6.1

* This version has been partially sponsored by Genuitec, LLC.

Version 1.6

* This version has been partially sponsored by Genuitec, LLC.

Version 1.5

Version 1.4

Version 1.3.1

Version 1.3

Version 1.2.4

Version 1.2.2

Version 1.2

Version 1.1

Version 1.0

Version 1.0 Final Candidate

Version 1.0 Release Candidate 1 (RC1)

Version 0.9.5 beta

Version 0.9.4 beta

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor_php4.php0000755000175000017500000001404611471562006026427 0ustar achapmanachapman= 5.5) ; } else if ( strpos($sAgent, 'Gecko/') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; return ($iVersion >= 20030210) ; } else if ( strpos($sAgent, 'Opera/') !== false ) { $fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ; return ($fVersion >= 9.5) ; } else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) ) { $iVersion = $matches[1] ; return ( $matches[1] >= 522 ) ; } else return false ; } class FCKeditor { /** * Name of the FCKeditor instance. * * @access protected * @var string */ var $InstanceName ; /** * Path to FCKeditor relative to the document root. * * @var string */ var $BasePath ; /** * Width of the FCKeditor. * Examples: 100%, 600 * * @var mixed */ var $Width ; /** * Height of the FCKeditor. * Examples: 400, 50% * * @var mixed */ var $Height ; /** * Name of the toolbar to load. * * @var string */ var $ToolbarSet ; /** * Initial value. * * @var string */ var $Value ; /** * This is where additional configuration can be passed. * Example: * $oFCKeditor->Config['EnterMode'] = 'br'; * * @var array */ var $Config ; /** * Main Constructor. * Refer to the _samples/php directory for examples. * * @param string $instanceName */ function FCKeditor( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/fckeditor/' ; $this->Width = '100%' ; $this->Height = '200' ; $this->ToolbarSet = 'Default' ; $this->Value = '' ; $this->Config = array() ; } /** * Display FCKeditor. * */ function Create() { echo $this->CreateHtml() ; } /** * Return the HTML code required to run FCKeditor. * * @return string */ function CreateHtml() { $HtmlValue = htmlspecialchars( $this->Value ) ; $Html = '' ; if ( !isset( $_GET ) ) { global $HTTP_GET_VARS ; $_GET = $HTTP_GET_VARS ; } if ( $this->IsCompatible() ) { if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" ) $File = 'fckeditor.original.html' ; else $File = 'fckeditor.html' ; $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; if ( $this->ToolbarSet != '' ) $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. $Html .= "InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; // Render the configurations hidden field. $Html .= "InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ; // Render the editor IFRAME. $Html .= "" ; } else { if ( strpos( $this->Width, '%' ) === false ) $WidthCSS = $this->Width . 'px' ; else $WidthCSS = $this->Width ; if ( strpos( $this->Height, '%' ) === false ) $HeightCSS = $this->Height . 'px' ; else $HeightCSS = $this->Height ; $Html .= "" ; } return $Html ; } /** * Returns true if browser is compatible with FCKeditor. * * @return boolean */ function IsCompatible() { return FCKeditor_IsCompatibleBrowser() ; } /** * Get settings from Config array as a single string. * * @access protected * @return string */ function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; } return $sParams ; } /** * Encode characters that may break the configuration string * generated by GetConfigFieldString(). * * @access protected * @param string $valueToEncode * @return string */ function EncodeConfig( $valueToEncode ) { $chars = array( '&' => '%26', '=' => '%3D', '"' => '%22' ) ; return strtr( $valueToEncode, $chars ) ; } } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckpackager.xml0000755000175000017500000003162111471562006025772 0ustar achapmanachapman
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.lasso0000755000175000017500000000755511471562006026035 0ustar achapmanachapman[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the integration file for Lasso. * * It defines the FCKeditor class ("custom type" in Lasso terms) that can * be used to create editor instances in Lasso pages on server side. */ define_type( 'editor', -namespace='fck_', -description='Creates an instance of FCKEditor.' ); local( 'instancename' = 'FCKEditor1', 'width' = '100%', 'height' = '200', 'toolbarset' = 'Default', 'initialvalue' = string, 'basepath' = '/fckeditor/', 'config' = array, 'checkbrowser' = true, 'displayerrors' = false ); define_tag( 'onCreate', -required='instancename', -type='string', -optional='width', -type='string', -optional='height', -type='string', -optional='toolbarset', -type='string', -optional='initialvalue', -type='string', -optional='basepath', -type='string', -optional='config', -type='array' ); self->instancename = #instancename; local_defined('width') ? self->width = #width; local_defined('height') ? self->height = #height; local_defined('toolbarset') ? self->toolbarset = #toolbarset; local_defined('initialvalue') ? self->initialvalue = #initialvalue; local_defined('basepath') ? self->basepath = #basepath; local_defined('config') ? self->config = #config; /define_tag; define_tag('create'); if(self->isCompatibleBrowser); local('out' = ' ' + self->parseConfig + ' '); else; local('out' = ' '); /if; return(@#out); /define_tag; define_tag('isCompatibleBrowser'); local('result' = false); if (client_browser->Find("MSIE") && !client_browser->Find("mac") && !client_browser->Find("Opera")); #result = client_browser->Substring(client_browser->Find("MSIE")+5,3)>=5.5; /if; if (client_browser->Find("Gecko/")); #result = client_browser->Substring(client_browser->Find("Gecko/")+6,8)>=20030210; /if; if (client_browser->Find("Opera/")); #result = client_browser->Substring(client_browser->Find("Opera/")+6,4)>=9.5; /if; if (client_browser->Find("AppleWebKit/")); #result = client_browser->Substring(client_browser->Find("AppleWebKit/")+12,3)>=522; /if; return(#result); /define_tag; define_tag('parseConfig'); if(self->config->size); local('out' = '\n'; return(@#out); /if; /define_tag; /define_type; ] zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/_documentation.html0000755000175000017500000000235611471562006026710 0ustar achapmanachapman FCKeditor - Documentation

FCKeditor Documentation

You can find the official documentation for FCKeditor online, at http://docs.fckeditor.net/.

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.php0000755000175000017500000000174211471562006025473 0ustar achapmanachapman] && Render the configurations HIDDEN FIELD. html = html + [] +CHR(13)+CHR(10) && Render the EDITOR IFRAME. html = html + [] ELSE IF ( AT("%", THIS.cWIDTH)=0 ) WidthCSS = THIS.cWIDTH + 'px' ELSE WidthCSS = THIS.cWIDTH ENDIF IF ( AT("%",THIS.cHEIGHT)=0 ) HeightCSS = THIS.cHEIGHT + 'px' ELSE HeightCSS = THIS.cHEIGHT ENDIF html = html + [] ENDIF RETURN (html) ENDFUNC && ----------------------------------------------------------------------- FUNCTION IsCompatible() LOCAL llRetval LOCAL sAgent llRetval=.F. SET POINT TO "." sAgent = LOWER(ALLTRIM(request.servervariables("HTTP_USER_AGENT"))) IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0 iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3)) llRetval= iVersion > 5.5 ELSE IF AT("gecko/",sAgent)>0 iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8)) llRetval =iVersion > 20030210 ENDIF ELSE IF AT("opera/",sAgent)>0 iVersion=VAL(SUBSTR(sAgent,AT("opera/",sAgent)+6,4)) llRetval =iVersion >= 9.5 ENDIF ELSE IF AT("applewebkit/",sAgent)>0 iVersion=VAL(SUBSTR(sAgent,AT("applewebkit/",sAgent)+12,3)) llRetval =iVersion >= 522 ENDIF ENDIF SET POINT TO RETURN (llRetval) ENDFUNC && ----------------------------------------------------------------------- FUNCTION GetConfigFieldString() LOCAL sParams LOCAL bFirst LOCAL sKey sParams = "" bFirst = .T. FOR lnLoop=1 TO 10 && ALEN(this.aconfig) IF !EMPTY(THIS.aConfig(lnLoop,1)) IF bFirst = .F. sParams = sParams + "&" ELSE bFirst = .F. ENDIF sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2) ELSE EXIT ENDIF NEXT RETURN(sParams) ENDFUNC ENDDEFINE %> zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckstyles.xml0000755000175000017500000000657211471562006025547 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/_samples0000644000175000017500000000005411471562006024526 0ustar achapmanachapmanwe don't need or want the samples directory zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/0000755000175000017500000000000011473031633024266 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/0000755000175000017500000000000011473031633025525 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/0000755000175000017500000000000011473031633027015 5ustar achapmanachapman././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/fck_dialog_common.csszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/fck_dialog_common.css0000755000175000017500000000335511471562004033171 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the CSS file used for interface details in some dialog * windows. */ /* ######### * WARNING * ######### * When changing this file, the minified version of it must be updated in the * fck_dialog_common.js file (see GetCommonDialogCss). */ .ImagePreviewArea { border: #000000 1px solid; overflow: auto; width: 100%; height: 170px; background-color: #ffffff; } .FlashPreviewArea { border: #000000 1px solid; padding: 5px; overflow: auto; width: 100%; height: 170px; background-color: #ffffff; } .BtnReset { float: left; background-position: center center; background-image: url(images/reset.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: 1px none; font-size: 1px ; } .BtnLocked, .BtnUnlocked { float: left; background-position: center center; background-image: url(images/locked.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: none 1px; font-size: 1px ; } .BtnUnlocked { background-image: url(images/unlocked.gif); } .BtnOver { border: outset 1px; cursor: pointer; cursor: hand; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/images/0000755000175000017500000000000011473031633030262 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/images/reset.gif0000755000175000017500000000015011471562004032071 0ustar achapmanachapmanGIF89a ¢www  ¤™™Ìff™33™ÿÿÿ!ù, -XºÜ2„ Ñ ´£d!ƒ×Q}`Xt Gç4ç;¦L€O¶`© ßÂC\$;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/images/unlocked.gif0000755000175000017500000000011311471562004032552 0ustar achapmanachapmanGIF89a ‘€€€ÿÿÿÿ!ù, œq»Êý–ˆf¶”„58è=` ] z_IµO;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/images/locked.gif0000755000175000017500000000011211471562004032206 0ustar achapmanachapmanGIF89a ‘€€€ÿÿÿÿ!ù, œ©!Îc’µ&¦¹.£;Þ…ã–¥ÚÂ*;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/common/fck_dialog_common.js0000755000175000017500000002436111471562004033015 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Useful functions used by almost all dialog window pages. * Dialogs should link to this file as the very first script on the page. */ // Automatically detect the correct document.domain (#123). (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.parent.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; // Attention: FCKConfig must be available in the page. function GetCommonDialogCss( prefix ) { // CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt). return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ; } // Gets a element by its Id. Used for shorter coding. function GetE( elementId ) { return document.getElementById( elementId ) ; } function ShowE( element, isVisible ) { if ( typeof( element ) == 'string' ) element = GetE( element ) ; element.style.display = isVisible ? '' : 'none' ; } function SetAttribute( element, attName, attValue ) { if ( attValue == null || attValue.length == 0 ) element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive else element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive } function GetAttribute( element, attName, valueIfNull ) { var oAtt = element.attributes[attName] ; if ( oAtt == null || !oAtt.specified ) return valueIfNull ? valueIfNull : '' ; var oValue = element.getAttribute( attName, 2 ) ; if ( oValue == null ) oValue = oAtt.nodeValue ; return ( oValue == null ? valueIfNull : oValue ) ; } function SelectField( elementId ) { var element = GetE( elementId ) ; element.focus() ; // element.select may not be available for some fields (like Columns:   Headers:   Border size:   Alignment:      
Width:    
Height:    pixels
 
Cell spacing:    
Cell padding:    
Caption  
Summary  
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_image/0000755000175000017500000000000011473031633027432 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_image/fck_image.js0000755000175000017500000003142711471562004031706 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Scripts related to the Image dialog window (see fck_image.html). */ var dialog = window.parent ; var oEditor = dialog.InnerDialogLoaded() ; var FCK = oEditor.FCK ; var FCKLang = oEditor.FCKLang ; var FCKConfig = oEditor.FCKConfig ; var FCKDebug = oEditor.FCKDebug ; var FCKTools = oEditor.FCKTools ; var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ; //#### Dialog Tabs // Set the dialog tabs. dialog.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ; if ( !bImageButton && !FCKConfig.ImageDlgHideLink ) dialog.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ; if ( FCKConfig.ImageUpload ) dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; if ( !FCKConfig.ImageDlgHideAdvanced ) dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. function OnDialogTabChange( tabCode ) { ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ShowE('divLink' , ( tabCode == 'Link' ) ) ; ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; } // Get the selected image (if available). var oImage = dialog.Selection.GetSelectedElement() ; if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) ) oImage = null ; // Get the active link. var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; var oImageOriginal ; function UpdateOriginal( resetSize ) { if ( !eImgPreview ) return ; if ( GetE('txtUrl').value.length == 0 ) { oImageOriginal = null ; return ; } oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ; if ( resetSize ) { oImageOriginal.onload = function() { this.onload = null ; ResetSizes() ; } } oImageOriginal.src = eImgPreview.src ; } var bPreviewInitialized ; window.onload = function() { // Translate the dialog box texts. oEditor.FCKLanguageManager.TranslatePage(document) ; GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ; GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ; // Load the selected element information (if any). LoadSelection() ; // Show/Hide the "Browse Server" button. GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ; GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; UpdateOriginal() ; // Set the actual uploader URL. if ( FCKConfig.ImageUpload ) GetE('frmUpload').action = FCKConfig.ImageUploadURL ; dialog.SetAutoSize( true ) ; // Activate the "OK" button. dialog.SetOkButton( true ) ; SelectField( 'txtUrl' ) ; } function LoadSelection() { if ( ! oImage ) return ; var sUrl = oImage.getAttribute( '_fcksavedurl' ) ; if ( sUrl == null ) sUrl = GetAttribute( oImage, 'src', '' ) ; GetE('txtUrl').value = sUrl ; GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ; GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ; GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ; GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ; GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ; var iWidth, iHeight ; var regexSize = /^\s*(\d+)px\s*$/i ; if ( oImage.style.width ) { var aMatchW = oImage.style.width.match( regexSize ) ; if ( aMatchW ) { iWidth = aMatchW[1] ; oImage.style.width = '' ; SetAttribute( oImage, 'width' , iWidth ) ; } } if ( oImage.style.height ) { var aMatchH = oImage.style.height.match( regexSize ) ; if ( aMatchH ) { iHeight = aMatchH[1] ; oImage.style.height = '' ; SetAttribute( oImage, 'height', iHeight ) ; } } GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ; GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ; // Get Advances Attributes GetE('txtAttId').value = oImage.id ; GetE('cmbAttLangDir').value = oImage.dir ; GetE('txtAttLangCode').value = oImage.lang ; GetE('txtAttTitle').value = oImage.title ; GetE('txtLongDesc').value = oImage.longDesc ; if ( oEditor.FCKBrowserInfo.IsIE ) { GetE('txtAttClasses').value = oImage.className || '' ; GetE('txtAttStyle').value = oImage.style.cssText ; } else { GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ; GetE('txtAttStyle').value = oImage.getAttribute('style',2) ; } if ( oLink ) { var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ; if ( sLinkUrl == null ) sLinkUrl = oLink.getAttribute('href',2) ; GetE('txtLnkUrl').value = sLinkUrl ; GetE('cmbLnkTarget').value = oLink.target ; } UpdatePreview() ; } //#### The OK button was hit. function Ok() { if ( GetE('txtUrl').value.length == 0 ) { dialog.SetSelectedTab( 'Info' ) ; GetE('txtUrl').focus() ; alert( FCKLang.DlgImgAlertUrl ) ; return false ; } var bHasImage = ( oImage != null ) ; if ( bHasImage && bImageButton && oImage.tagName == 'IMG' ) { if ( confirm( 'Do you want to transform the selected image on a image button?' ) ) oImage = null ; } else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' ) { if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) ) oImage = null ; } oEditor.FCKUndo.SaveUndoStep() ; if ( !bHasImage ) { if ( bImageButton ) { oImage = FCK.EditorDocument.createElement( 'input' ) ; oImage.type = 'image' ; oImage = FCK.InsertElement( oImage ) ; } else oImage = FCK.InsertElement( 'img' ) ; } UpdateImage( oImage ) ; var sLnkUrl = GetE('txtLnkUrl').value.Trim() ; if ( sLnkUrl.length == 0 ) { if ( oLink ) FCK.ExecuteNamedCommand( 'Unlink' ) ; } else { if ( oLink ) // Modifying an existent link. oLink.href = sLnkUrl ; else // Creating a new link. { if ( !bHasImage ) oEditor.FCKSelection.SelectNode( oImage ) ; oLink = oEditor.FCK.CreateLink( sLnkUrl )[0] ; if ( !bHasImage ) { oEditor.FCKSelection.SelectNode( oLink ) ; oEditor.FCKSelection.Collapse( false ) ; } } SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ; SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ; } return true ; } function UpdateImage( e, skipId ) { 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 ) ; SetAttribute( e, "vspace", GetE('txtVSpace').value ) ; SetAttribute( e, "hspace", GetE('txtHSpace').value ) ; SetAttribute( e, "border", GetE('txtBorder').value ) ; SetAttribute( e, "align" , GetE('cmbAlign').value ) ; // Advances Attributes if ( ! skipId ) SetAttribute( e, 'id', GetE('txtAttId').value ) ; SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ; SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ; SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ; if ( oEditor.FCKBrowserInfo.IsIE ) { e.className = GetE('txtAttClasses').value ; e.style.cssText = GetE('txtAttStyle').value ; } else { SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ; SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; } } var eImgPreview ; var eImgPreviewLink ; function SetPreviewElements( imageElement, linkElement ) { eImgPreview = imageElement ; eImgPreviewLink = linkElement ; UpdatePreview() ; UpdateOriginal() ; bPreviewInitialized = true ; } function UpdatePreview() { if ( !eImgPreview || !eImgPreviewLink ) return ; if ( GetE('txtUrl').value.length == 0 ) eImgPreviewLink.style.display = 'none' ; else { UpdateImage( eImgPreview, true ) ; if ( GetE('txtLnkUrl').value.Trim().length > 0 ) eImgPreviewLink.href = 'javascript:void(null);' ; else SetAttribute( eImgPreviewLink, 'href', '' ) ; eImgPreviewLink.style.display = '' ; } } var bLockRatio = true ; function SwitchLock( lockButton ) { bLockRatio = !bLockRatio ; lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ; lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ; if ( bLockRatio ) { if ( GetE('txtWidth').value.length > 0 ) OnSizeChanged( 'Width', GetE('txtWidth').value ) ; else OnSizeChanged( 'Height', GetE('txtHeight').value ) ; } } // Fired when the width or height input texts change function OnSizeChanged( dimension, value ) { // Verifies if the aspect ration has to be maintained if ( oImageOriginal && bLockRatio ) { var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ; if ( value.length == 0 || isNaN( value ) ) { e.value = '' ; return ; } if ( dimension == 'Width' ) value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ; else value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ; if ( !isNaN( value ) ) e.value = value ; } UpdatePreview() ; } // Fired when the Reset Size button is clicked function ResetSizes() { if ( ! oImageOriginal ) return ; if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete ) { setTimeout( ResetSizes, 50 ) ; return ; } GetE('txtWidth').value = oImageOriginal.width ; GetE('txtHeight').value = oImageOriginal.height ; UpdatePreview() ; } function BrowseServer() { OpenServerBrowser( 'Image', FCKConfig.ImageBrowserURL, FCKConfig.ImageBrowserWindowWidth, FCKConfig.ImageBrowserWindowHeight ) ; } function LnkBrowseServer() { OpenServerBrowser( 'Link', FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; } function OpenServerBrowser( type, url, width, height ) { sActualBrowser = type ; OpenFileBrowser( url, width, height ) ; } var sActualBrowser ; function SetUrl( url, width, height, alt ) { if ( sActualBrowser == 'Link' ) { GetE('txtLnkUrl').value = url ; UpdatePreview() ; } else { GetE('txtUrl').value = url ; GetE('txtWidth').value = width ? width : '' ; GetE('txtHeight').value = height ? height : '' ; if ( alt ) GetE('txtAlt').value = alt; UpdatePreview() ; UpdateOriginal( true ) ; } dialog.SetSelectedTab( 'Info' ) ; } function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) { // Remove animation window.parent.Throbber.Hide() ; GetE( 'divUpload' ).style.display = '' ; switch ( errorNumber ) { case 0 : // No errors alert( 'Your file has been successfully uploaded' ) ; break ; case 1 : // Custom error alert( customMsg ) ; return ; case 101 : // Custom warning alert( customMsg ) ; break ; case 201 : alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; break ; case 202 : alert( 'Invalid file type' ) ; return ; case 203 : alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; return ; case 500 : alert( 'The connector is disabled' ) ; break ; default : alert( 'Error on file upload. Error number: ' + errorNumber ) ; return ; } sActualBrowser = '' ; SetUrl( fileUrl ) ; GetE('frmUpload').reset() ; } var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ; var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ; function CheckUpload() { var sFile = GetE('txtUploadFile').value ; if ( sFile.length == 0 ) { alert( 'Please select a file to upload' ) ; return false ; } if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || ( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) { OnUploadCompleted( 202 ) ; return false ; } // Show animation window.parent.Throbber.Show( 100 ) ; GetE( 'divUpload' ).style.display = 'none' ; return true ; } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_image/fck_image_preview.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_image/fck_image_preview.0000755000175000017500000000563711471562004033116 0ustar achapmanachapman
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_paste.html0000755000175000017500000003000311471562004030350 0ustar achapmanachapman
Please paste inside the following box using the keyboard (Ctrl+V) and hit OK.
 

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_checkbox.html0000755000175000017500000000604511471562004031033 0ustar achapmanachapman Checkbox Properties
Name
Value
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_smiley.html0000755000175000017500000000571411471562004030551 0ustar achapmanachapman
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_form.html0000755000175000017500000000560111471562004030205 0ustar achapmanachapman
Name
Action
Method
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/0000755000175000017500000000000011473031633027462 5ustar achapmanachapman././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/logo_fckeditor.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/logo_fckeditor.gif0000755000175000017500000000377411471562004033160 0ustar achapmanachapmanGIF89aì)Õ0ì–M? ŸƒÏÇÁoXFùÜÃ@@@çãà¿¿¿·«¢ÛÕÑW<'K.cJ6‡teüíá000óñðò¹ˆ«“ù²ï¨k{fUpppýöðè| ```öÊ¥é…/ïïï“‚tPPP ŸŸŸ¯¯¯úåÒë>ßßßîŸ\ñ°z÷Ó´ÏÏÏô–æsÿÿÿ!ù0,ì)ÿÀ‚pH,K°¤r¹„!L£ÉtJ ̬vËíz¿à°xL./]è´z6qK); `Î]u¦|Þá.fe 0 ‚I c‘‰‰w–hY{—.™JwyJ–*LId«­¬e0Œ0®f‘c…Zµ”Y²IwL¤Çh¦ s¢I¡Y¨ª¬ ©KÙY·JÜ\ßY“JÅJã0Ù`몈`ÖJåÝ´€K»]óìÚ`¬cÆÆÂ’e >c !,K˜(` (Â(˜’‰Hà ÐÝ(4X²ž 4xDA̪ÕR¤ƒÿŒ+mP©/‰þütÐ-ˆ³Ni»é g¹–î2æD䪀Œ2e­ºòèD×ôIR -𵯠-™6G¡Ôkˆ@ôàÂ5|×”ôý ÃÁ *Õ¢% ‰õÎ+VëÛ`¥ eÎ0.ÐÐ à]C“|Χd5-¤µ}í¦ jйFu« ¼]PA-‰Ã5¾O³6S€s—‹“4ž ²ëvI.ÈrÎ@I(Z®ø1*ìág­ÂW•0-õê‰OÂÒ¹€î‹ sUß9~ÝqÇ *瀮‘GÜ1Áõ,—JØ'À9%A¡…ç\°ÿW†L\dáïÍ'áG‘ÀBŒz*ºò^5Si3ŸP>®¬R#€ÄÕuÅPX`‰)p ErÅMp‡ŸÀ¢5݉£b”L4–K7è=PTMš¥ÇÚ7®±tÕÅH–Df¬A£—ÂèeZšiºâfˆ»Íñà ÎB“]PÃàjÁÀ‘œXN(°¥!CU€À¡)êŽ5ø¥Ž.¡ $BÅÚ¥Žª@8‚ 8PAmнhÏQ„¢&ã,° @Áh7f¸k¯¿Âð€.8øwtÀgŸr)ÉG hçhT´œ3€–x¤DM²m¥…P  ÿ.&QÐMµ(Ы-À¬;IÚ†î÷žYiy‰j®s©\X“l•Ö¤]­«r.¶ <\–(ëE[s¤ F(ÎáÌ0$—lòÉ(sq‡?Ç} M Å¥lóÍ8ç¬rp¦À¼D`4k Ð)`ÀÑ(qÀÑ$èìôÓeÈÖD{Á 9ðÂÖ$1ÂÖ[ŸõØdoÖ0ø¬ÆÈ_ðÆ$ÎZsDÜ['…Ýeç³€ ­qgÐs˜'§Lw×0ö bÃàA !l­÷ä6—]k¸F(BÎñ¶Í‡+Í´ ,Nùé&ó ³‘œÕÐ0«±á`#¾ÿEé`£®;%¼ÙÃqiø-C¬/ùl#Dv-dáÁ"l-¡ðÂÑG'a€òµ4éD¿u#0ö‰GÀîdÏÞEÈ1·-—ìsá÷‹¿Á÷çÿµKî$ÿÉ- 0à à%l_ÛÚúØ5÷u¡ukÐÀpvF¼âÝáuKÀŸÿ¾ƒ*ð€|Aˆ¸žÐv&üØ&HA§Y ôcƒئ…â”ÀÂóÚòÄ–ÂFpk8@ ćBÓÁàXõÊ·‚ÅE€ aÓJh@ÖpovÍ,‚ ÚA.Ià„ë²€?¼Á Š[kZäØ8ÿ°‰¹ “Çÿ5Ðqw|A´·¸¬Àq_´aÃÌÝÁ)PA6X3µ©!ˆ‹Ãž˜¸¾@n` s\ óƒ†lƒTB(?@Hé%rl7ìÂÓ¢¾©!jDΪxB p†K¨ž)GIÀSiNŒá'_ù´Xvxd´%–`Éà-!… \ŸƒÀRîq˜Æô%2óC/2gÎ|&A’‘ [28\Ââ°H½zÀnž\B Np©LB(EÐʘóœ•[$T08K4©fÆâ˜¸L-„ò‡´^&‰©BŽ6î‹kÜ ·Ìr"Tgéôr™¹3 q.ÿ–HÝôwÏ,­|08âÖ6°@ŠÒ›¤L¡¼Ô­]‘"Ä›IOŠN=%b€ri"Ñ$ôO$¡ù¹Gøô§.ĪÉÔ„²As‰€ PO4Pò¥0§Uc˜?Û@«/+WIùĺ*!¬ù#!ÅYÖ”µ5 `ga™@‚ po¨ȨU ¼„ÀnØûÞõз£IO° p¬Q7ðQb§‹= Ö°§Ôºöµ8cA:P5ØÚö¶‚] އÛÞú ,¨íï@Üâ÷¸ÈM®r—ËÜæ:÷¹Ðnt=ö[’IË@ØÍ®v·Ë]wVw×í®xÇK^ñFã»oy×ËÞöZâ¼è-ƒzÝKßú’¾ñÍB;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/sponsors/0000755000175000017500000000000011473031633031350 5ustar achapmanachapman././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/sponsors/spellchec0000755000175000017500000000264711471562004033250 0ustar achapmanachapmanGIF89aKKæÈÈÜ}}°¼¼Öûûüïïôüí×­­ÎŽŽ¼ŸŸÅããìûåÄÓÓãþûõêêðöÆõÂuøÓœôô÷õ½kÜÜè÷ˉùܰþöëøøúú຃ƒ¬ýòáppŸ÷Ï“ÏÏßüéÍ©©Æ²²ÌììòŒŒ³ââìxp’ÅÅÙùئyy¦  ¿ë´eõõù¼¼Òok•·¡–­‘‚áÛܤЀ»µÁܸŒ¥ŽêàØË·©â¯hxq““‹¿šv­}›…„îÅŠÓµ•ÇŸs×ÏÏÙÙåmm¥ô¹aff™ÿÿÿ!ù,KKÿ€D‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œ—""£Š%'C¨¤«…(¨¯%¬²+¯¨ ²¬@µC(¸«!µ*¾¤µ!Å£ »Ë#»Ðǯ՜ͯÉÚšÒµÏߙרÔä˜Ü¨Ùé—á©Êî‰õˆæCãóƒ$H0‡  úP ]?"(œ(Ä T;ö@F¬: P£‹BR\|ÅÏ)(` hªfÔÂá!L‚¢Uë¼!,lq Á‚‰h*`BÆ®«-&*H÷`bSA $\yuˆ(BøÆ`âÚA?ÿÂ(‹Š† qßB+0Ñà§)¼ «CÂV"/ V¨Æ— P"€ :µë†ã»i…<öÕ–àaÈŠ•¸úƒ ©€—Vëªö/Aƒ‚½e‚`OA¬…|ö™ >ܶé„ h 2ÔxàâC R˜:±ZqÏ®*øMÄ·Ô jûŽ]†Ü%P@?ð+‘ÔB´%¶BæB$ø$v Û¸BPÀ@ÀžH%|°‘C^z ¢Aî‚–VNÝ'"âE ºô P(°DD•‚ó|ˆß‹1±øÐ?ìÁ8л=Tˆ)Öøš 'ꨈ=D iä‘H&©äÿ’ó\€@ÀAA%!,p”À#^b‚À ,ÐÈ•Wb@ ”9@˜ŽÀiI À‚€ Y¥ Ñ!zeŸòh @PÉzJIå üI„– € v:” €À§„j)• pA °§% ªçÀü6üpÿýF&ð‰IšL:rÈ$c’爬ÉçºR.2k¸çâò¦§‡t‰2ÍŒ$À­±ón|6°å—‚@f$°¥|"kì¸_p±®[šie£è¶Ên³À¶L5”t À»PWìí§H¯[u¤T6ª¨•üÙ¥¥O p!y 4¦=rÚU'€õ¸–R«là“tîY0u©üò¸Ó…ÀyÀšf’Km¸O?B%ŸÜ60Á²„\i¶¤÷êÓp®„”P6@%þÒKÉæ‚Pûä‡R¾-¤ðI¤½fNô¬“¡h(; %Ê!Ϫµœ%jÇÇ=!©Šýýøó;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about/logo_fredck.gif0000755000175000017500000000163011471562004032431 0ustar achapmanachapmanGIF89aW$Õ0ì–Mò¹ˆñ°zõɤï§iüñçò¶ƒó»‹çxùÛÁöÌ©ýôìúâÎþûø÷Ôµè}#ð¬qé‚+ë’EþøóôÀ•ùßÈüíàì—Oø×¼÷аúæÔî¡_ûêÛï£cöÊ¥üíáï¨kòµ‚ì’F÷Ó´ùÜÃë=ò¸‡ûêÜé…/ñ²{î ^öΫê‡4íœWæsõÅÿÿÿ!ù0,W$ÿ@˜pH,Ȥò¸(0ÇàE­VŽŠ¥±ìz¿Ê‰…ÉXÏhô Á»ßÅ‚£HÛïÖÁÎï:x‚/}†DsSƒŒx‡} f”Ž` ‹•œi—~š£v  Hu¤¬g mK³´³0²µ´",¼½¾,/½U-¾T¾T¾{^.ÔÕÔ#ÓÖÚÛÖ-/Õ,TÛTÖTÕ`ÙÛ$-ö÷øùöÏà/Ü.|«ö€5xÚ¹«†¢–€+L0áÙ l ° FúE°¡?‚,úÙPàÍ»C&$P¡ÍÛ…m,(¼¸‰s µÿ`g¬…¬fM†hnÞ˜—¢…±šã¸mh…AjëÐXKIM‚ °’|Z ®.$”¨Öâ:´,T+§•[Ñ*,zgmÕ®Tܦ}1ÔÅ_tû«‹µšW+lñ­Fì°Å‘..@@PM.µp>ÃavÔJ7k´ Image Properties
URL
Short Description


Width 
Height 

Border 
HSpace 
VSpace 
Align 
   
Preview
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_hiddenfield.html0000755000175000017500000000610511471562004031501 0ustar achapmanachapman Hidden Field Properties
Name
Value
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template.html0000755000175000017500000001434611471562004031063 0ustar achapmanachapman
Please select the template to open in the editor
(the actual contents will be lost):
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_select/0000755000175000017500000000000011473031633027627 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_select/fck_select.js0000755000175000017500000001124511471562004032274 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Scripts for the fck_select.html page. */ function Select( combo ) { var iIndex = combo.selectedIndex ; oListText.selectedIndex = iIndex ; oListValue.selectedIndex = iIndex ; var oTxtText = document.getElementById( "txtText" ) ; var oTxtValue = document.getElementById( "txtValue" ) ; oTxtText.value = oListText.value ; oTxtValue.value = oListValue.value ; } function Add() { var oTxtText = document.getElementById( "txtText" ) ; var oTxtValue = document.getElementById( "txtValue" ) ; AddComboOption( oListText, oTxtText.value, oTxtText.value ) ; AddComboOption( oListValue, oTxtValue.value, oTxtValue.value ) ; oListText.selectedIndex = oListText.options.length - 1 ; oListValue.selectedIndex = oListValue.options.length - 1 ; oTxtText.value = '' ; oTxtValue.value = '' ; oTxtText.focus() ; } function Modify() { var iIndex = oListText.selectedIndex ; if ( iIndex < 0 ) return ; var oTxtText = document.getElementById( "txtText" ) ; var oTxtValue = document.getElementById( "txtValue" ) ; oListText.options[ iIndex ].innerHTML = HTMLEncode( oTxtText.value ) ; oListText.options[ iIndex ].value = oTxtText.value ; oListValue.options[ iIndex ].innerHTML = HTMLEncode( oTxtValue.value ) ; oListValue.options[ iIndex ].value = oTxtValue.value ; oTxtText.value = '' ; oTxtValue.value = '' ; oTxtText.focus() ; } function Move( steps ) { ChangeOptionPosition( oListText, steps ) ; ChangeOptionPosition( oListValue, steps ) ; } function Delete() { RemoveSelectedOptions( oListText ) ; RemoveSelectedOptions( oListValue ) ; } function SetSelectedValue() { var iIndex = oListValue.selectedIndex ; if ( iIndex < 0 ) return ; var oTxtValue = document.getElementById( "txtSelValue" ) ; oTxtValue.value = oListValue.options[ iIndex ].value ; } // Moves the selected option by a number of steps (also negative) function ChangeOptionPosition( combo, steps ) { var iActualIndex = combo.selectedIndex ; if ( iActualIndex < 0 ) return ; var iFinalIndex = iActualIndex + steps ; if ( iFinalIndex < 0 ) iFinalIndex = 0 ; if ( iFinalIndex > ( combo.options.length - 1 ) ) iFinalIndex = combo.options.length - 1 ; if ( iActualIndex == iFinalIndex ) return ; var oOption = combo.options[ iActualIndex ] ; var sText = HTMLDecode( oOption.innerHTML ) ; var sValue = oOption.value ; combo.remove( iActualIndex ) ; oOption = AddComboOption( combo, sText, sValue, null, iFinalIndex ) ; oOption.selected = true ; } // Remove all selected options from a SELECT object function RemoveSelectedOptions(combo) { // Save the selected index var iSelectedIndex = combo.selectedIndex ; var oOptions = combo.options ; // Remove all selected options for ( var i = oOptions.length - 1 ; i >= 0 ; i-- ) { if (oOptions[i].selected) combo.remove(i) ; } // Reset the selection based on the original selected index if ( combo.options.length > 0 ) { if ( iSelectedIndex >= combo.options.length ) iSelectedIndex = combo.options.length - 1 ; combo.selectedIndex = iSelectedIndex ; } } // Add a new option to a SELECT object (combo or list) function AddComboOption( combo, optionText, optionValue, documentObject, index ) { var oOption ; if ( documentObject ) oOption = documentObject.createElement("OPTION") ; else oOption = document.createElement("OPTION") ; if ( index != null ) combo.options.add( oOption, index ) ; else combo.options.add( oOption ) ; oOption.innerHTML = optionText.length > 0 ? HTMLEncode( optionText ) : ' ' ; oOption.value = optionValue ; return oOption ; } function HTMLEncode( text ) { if ( !text ) return '' ; text = text.replace( /&/g, '&' ) ; text = text.replace( //g, '>' ) ; return text ; } function HTMLDecode( text ) { if ( !text ) return '' ; text = text.replace( />/g, '>' ) ; text = text.replace( /</g, '<' ) ; text = text.replace( /&/g, '&' ) ; return text ; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_flash.html0000755000175000017500000001314411471562004030340 0ustar achapmanachapman Flash Properties
URL
Width
  Height
Preview
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_link.html0000755000175000017500000003112511471562004030177 0ustar achapmanachapman Link Properties zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_colorselector.html0000755000175000017500000001225111471562004032120 0ustar achapmanachapman
Highlight
 
Selected

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_docprops.html0000755000175000017500000005414311471562004031100 0ustar achapmanachapman
Page Title

Language Direction
    Language Code

Character Set Encoding
    Other Character Set Encoding
 
Document Type Heading
Other Document Type Heading

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_anchor.html0000755000175000017500000001425311471562004030517 0ustar achapmanachapman Anchor Properties
Anchor Name
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_listprop.html0000755000175000017500000000750511471562004031123 0ustar achapmanachapman
List Type
 
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_replace.html0000755000175000017500000004130211471562004030653 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_link/0000755000175000017500000000000011473031633027305 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_link/fck_link.js0000755000175000017500000006203511471562004031433 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Scripts related to the Link dialog window (see fck_link.html). */ var dialog = window.parent ; var oEditor = dialog.InnerDialogLoaded() ; var FCK = oEditor.FCK ; var FCKLang = oEditor.FCKLang ; var FCKConfig = oEditor.FCKConfig ; var FCKRegexLib = oEditor.FCKRegexLib ; var FCKTools = oEditor.FCKTools ; //#### Dialog Tabs // Set the dialog tabs. dialog.AddTab( 'Info', FCKLang.DlgLnkInfoTab ) ; if ( !FCKConfig.LinkDlgHideTarget ) dialog.AddTab( 'Target', FCKLang.DlgLnkTargetTab, true ) ; if ( FCKConfig.LinkUpload ) dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload, true ) ; if ( !FCKConfig.LinkDlgHideAdvanced ) dialog.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. function OnDialogTabChange( tabCode ) { ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ShowE('divTarget' , ( tabCode == 'Target' ) ) ; ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAttribs' , ( tabCode == 'Advanced' ) ) ; dialog.SetAutoSize( true ) ; } //#### Regular Expressions library. var oRegex = new Object() ; oRegex.UriProtocol = /^(((http|https|ftp|news):\/\/)|mailto:)/gi ; oRegex.UrlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi ; oRegex.UrlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi ; oRegex.ReserveTarget = /^_(blank|self|top|parent)$/i ; oRegex.PopupUri = /^javascript:void\(\s*window.open\(\s*'([^']+)'\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*\)\s*$/ ; // Accessible popups oRegex.OnClickPopup = /^\s*on[cC]lick="\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*"$/ ; oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ; //#### Parser Functions var oParser = new Object() ; // This method simply returns the two inputs in numerical order. You can even // provide strings, as the method would parseInt() the values. oParser.SortNumerical = function(a, b) { return parseInt( a, 10 ) - parseInt( b, 10 ) ; } oParser.ParseEMailParams = function(sParams) { // Initialize the oEMailParams object. var oEMailParams = new Object() ; oEMailParams.Subject = '' ; oEMailParams.Body = '' ; var aMatch = sParams.match( /(^|^\?|&)subject=([^&]+)/i ) ; if ( aMatch ) oEMailParams.Subject = decodeURIComponent( aMatch[2] ) ; aMatch = sParams.match( /(^|^\?|&)body=([^&]+)/i ) ; if ( aMatch ) oEMailParams.Body = decodeURIComponent( aMatch[2] ) ; return oEMailParams ; } // This method returns either an object containing the email info, or FALSE // if the parameter is not an email link. oParser.ParseEMailUri = function( sUrl ) { // Initializes the EMailInfo object. var oEMailInfo = new Object() ; oEMailInfo.Address = '' ; oEMailInfo.Subject = '' ; oEMailInfo.Body = '' ; var aLinkInfo = sUrl.match( /^(\w+):(.*)$/ ) ; if ( aLinkInfo && aLinkInfo[1] == 'mailto' ) { // This seems to be an unprotected email link. var aParts = aLinkInfo[2].match( /^([^\?]+)\??(.+)?/ ) ; if ( aParts ) { // Set the e-mail address. oEMailInfo.Address = aParts[1] ; // Look for the optional e-mail parameters. if ( aParts[2] ) { var oEMailParams = oParser.ParseEMailParams( aParts[2] ) ; oEMailInfo.Subject = oEMailParams.Subject ; oEMailInfo.Body = oEMailParams.Body ; } } return oEMailInfo ; } else if ( aLinkInfo && aLinkInfo[1] == 'javascript' ) { // This may be a protected email. // Try to match the url against the EMailProtectionFunction. var func = FCKConfig.EMailProtectionFunction ; if ( func != null ) { try { // Escape special chars. func = func.replace( /([\/^$*+.?()\[\]])/g, '\\$1' ) ; // Define the possible keys. var keys = new Array('NAME', 'DOMAIN', 'SUBJECT', 'BODY') ; // Get the order of the keys (hold them in the array ) and // the function replaced by regular expression patterns. var sFunc = func ; var pos = new Array() ; for ( var i = 0 ; i < keys.length ; i ++ ) { var rexp = new RegExp( keys[i] ) ; var p = func.search( rexp ) ; if ( p >= 0 ) { sFunc = sFunc.replace( rexp, '\'([^\']*)\'' ) ; pos[pos.length] = p + ':' + keys[i] ; } } // Sort the available keys. pos.sort( oParser.SortNumerical ) ; // Replace the excaped single quotes in the url, such they do // not affect the regexp afterwards. aLinkInfo[2] = aLinkInfo[2].replace( /\\'/g, '###SINGLE_QUOTE###' ) ; // Create the regexp and execute it. var rFunc = new RegExp( '^' + sFunc + '$' ) ; var aMatch = rFunc.exec( aLinkInfo[2] ) ; if ( aMatch ) { var aInfo = new Array(); for ( var i = 1 ; i < aMatch.length ; i ++ ) { var k = pos[i-1].match(/^\d+:(.+)$/) ; aInfo[k[1]] = aMatch[i].replace(/###SINGLE_QUOTE###/g, '\'') ; } // Fill the EMailInfo object that will be returned oEMailInfo.Address = aInfo['NAME'] + '@' + aInfo['DOMAIN'] ; oEMailInfo.Subject = decodeURIComponent( aInfo['SUBJECT'] ) ; oEMailInfo.Body = decodeURIComponent( aInfo['BODY'] ) ; return oEMailInfo ; } } catch (e) { } } // Try to match the email against the encode protection. var aMatch = aLinkInfo[2].match( /^(?:void\()?location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'\)?$/ ) ; if ( aMatch ) { // The link is encoded oEMailInfo.Address = eval( aMatch[1] ) ; if ( aMatch[2] ) { var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ; oEMailInfo.Subject = oEMailParams.Subject ; oEMailInfo.Body = oEMailParams.Body ; } return oEMailInfo ; } } return false; } oParser.CreateEMailUri = function( address, subject, body ) { // Switch for the EMailProtection setting. switch ( FCKConfig.EMailProtection ) { case 'function' : var func = FCKConfig.EMailProtectionFunction ; if ( func == null ) { if ( FCKConfig.Debug ) { alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ; } return ''; } // Split the email address into name and domain parts. var aAddressParts = address.split( '@', 2 ) ; if ( aAddressParts[1] == undefined ) { aAddressParts[1] = '' ; } // Replace the keys by their values (embedded in single quotes). func = func.replace(/NAME/g, "'" + aAddressParts[0].replace(/'/g, '\\\'') + "'") ; func = func.replace(/DOMAIN/g, "'" + aAddressParts[1].replace(/'/g, '\\\'') + "'") ; func = func.replace(/SUBJECT/g, "'" + encodeURIComponent( subject ).replace(/'/g, '\\\'') + "'") ; func = func.replace(/BODY/g, "'" + encodeURIComponent( body ).replace(/'/g, '\\\'') + "'") ; return 'javascript:' + func ; case 'encode' : var aParams = [] ; var aAddressCode = [] ; if ( subject.length > 0 ) aParams.push( 'subject='+ encodeURIComponent( subject ) ) ; if ( body.length > 0 ) aParams.push( 'body=' + encodeURIComponent( body ) ) ; for ( var i = 0 ; i < address.length ; i++ ) aAddressCode.push( address.charCodeAt( i ) ) ; return 'javascript:void(location.href=\'mailto:\'+String.fromCharCode(' + aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\')' ; } // EMailProtection 'none' var sBaseUri = 'mailto:' + address ; var sParams = '' ; if ( subject.length > 0 ) sParams = '?subject=' + encodeURIComponent( subject ) ; if ( body.length > 0 ) { sParams += ( sParams.length == 0 ? '?' : '&' ) ; sParams += 'body=' + encodeURIComponent( body ) ; } return sBaseUri + sParams ; } //#### Initialization Code // oLink: The actual selected link in the editor. var oLink = dialog.Selection.GetSelection().MoveToAncestorNode( 'A' ) ; if ( oLink ) FCK.Selection.SelectNode( oLink ) ; window.onload = function() { // Translate the dialog box texts. oEditor.FCKLanguageManager.TranslatePage(document) ; // Fill the Anchor Names and Ids combos. LoadAnchorNamesAndIds() ; // Load the selected link information (if any). LoadSelection() ; // Update the dialog box. SetLinkType( GetE('cmbLinkType').value ) ; // Show/Hide the "Browse Server" button. GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ; // Show the initial dialog content. GetE('divInfo').style.display = '' ; // Set the actual uploader URL. if ( FCKConfig.LinkUpload ) GetE('frmUpload').action = FCKConfig.LinkUploadURL ; // Set the default target (from configuration). SetDefaultTarget() ; // Activate the "OK" button. dialog.SetOkButton( true ) ; // Select the first field. switch( GetE('cmbLinkType').value ) { case 'url' : SelectField( 'txtUrl' ) ; break ; case 'email' : SelectField( 'txtEMailAddress' ) ; break ; case 'anchor' : if ( GetE('divSelAnchor').style.display != 'none' ) SelectField( 'cmbAnchorName' ) ; else SelectField( 'cmbLinkType' ) ; } } var bHasAnchors ; function LoadAnchorNamesAndIds() { // Since version 2.0, the anchors are replaced in the DOM by IMGs so the user see the icon // to edit them. So, we must look for that images now. var aAnchors = new Array() ; var i ; var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ; for( i = 0 ; i < oImages.length ; i++ ) { if ( oImages[i].getAttribute('_fckanchor') ) aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ; } // Add also real anchors var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ; for( i = 0 ; i < oLinks.length ; i++ ) { if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) ) aAnchors[ aAnchors.length ] = oLinks[i] ; } var aIds = FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ; bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ; for ( i = 0 ; i < aAnchors.length ; i++ ) { var sName = aAnchors[i].name ; if ( sName && sName.length > 0 ) FCKTools.AddSelectOption( GetE('cmbAnchorName'), sName, sName ) ; } for ( i = 0 ; i < aIds.length ; i++ ) { FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ; } ShowE( 'divSelAnchor' , bHasAnchors ) ; ShowE( 'divNoAnchor' , !bHasAnchors ) ; } function LoadSelection() { if ( !oLink ) return ; var sType = 'url' ; // Get the actual Link href. var sHRef = oLink.getAttribute( '_fcksavedurl' ) ; if ( sHRef == null ) sHRef = oLink.getAttribute( 'href' , 2 ) || '' ; // Look for a popup javascript link. var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ; if( oPopupMatch ) { GetE('cmbTarget').value = 'popup' ; sHRef = oPopupMatch[1] ; FillPopupFields( oPopupMatch[2], oPopupMatch[3] ) ; SetTarget( 'popup' ) ; } // Accessible popups, the popup data is in the onclick attribute if ( !oPopupMatch ) { var onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; if ( onclick ) { // Decode the protected string onclick = decodeURIComponent( onclick ) ; oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ; if( oPopupMatch ) { GetE( 'cmbTarget' ).value = 'popup' ; FillPopupFields( oPopupMatch[1], oPopupMatch[2] ) ; SetTarget( 'popup' ) ; } } } // Search for the protocol. var sProtocol = oRegex.UriProtocol.exec( sHRef ) ; // Search for a protected email link. var oEMailInfo = oParser.ParseEMailUri( sHRef ); if ( oEMailInfo ) { sType = 'email' ; GetE('txtEMailAddress').value = oEMailInfo.Address ; GetE('txtEMailSubject').value = oEMailInfo.Subject ; GetE('txtEMailBody').value = oEMailInfo.Body ; } else if ( sProtocol ) { sProtocol = sProtocol[0].toLowerCase() ; GetE('cmbLinkProtocol').value = sProtocol ; // Remove the protocol and get the remaining URL. var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ; sType = 'url' ; GetE('txtUrl').value = sUrl ; } else if ( sHRef.substr(0,1) == '#' && sHRef.length > 1 ) // It is an anchor link. { sType = 'anchor' ; GetE('cmbAnchorName').value = GetE('cmbAnchorId').value = sHRef.substr(1) ; } else // It is another type of link. { sType = 'url' ; GetE('cmbLinkProtocol').value = '' ; GetE('txtUrl').value = sHRef ; } if ( !oPopupMatch ) { // Get the target. var sTarget = oLink.target ; if ( sTarget && sTarget.length > 0 ) { if ( oRegex.ReserveTarget.test( sTarget ) ) { sTarget = sTarget.toLowerCase() ; GetE('cmbTarget').value = sTarget ; } else GetE('cmbTarget').value = 'frame' ; GetE('txtTargetFrame').value = sTarget ; } } // Get Advances Attributes GetE('txtAttId').value = oLink.id ; GetE('txtAttName').value = oLink.name ; GetE('cmbAttLangDir').value = oLink.dir ; GetE('txtAttLangCode').value = oLink.lang ; GetE('txtAttAccessKey').value = oLink.accessKey ; GetE('txtAttTabIndex').value = oLink.tabIndex <= 0 ? '' : oLink.tabIndex ; GetE('txtAttTitle').value = oLink.title ; GetE('txtAttContentType').value = oLink.type ; GetE('txtAttCharSet').value = oLink.charset ; var sClass ; if ( oEditor.FCKBrowserInfo.IsIE ) { sClass = oLink.getAttribute('className',2) || '' ; // Clean up temporary classes for internal use: sClass = sClass.replace( FCKRegexLib.FCK_Class, '' ) ; GetE('txtAttStyle').value = oLink.style.cssText ; } else { sClass = oLink.getAttribute('class',2) || '' ; GetE('txtAttStyle').value = oLink.getAttribute('style',2) || '' ; } GetE('txtAttClasses').value = sClass ; // Update the Link type combo. GetE('cmbLinkType').value = sType ; } //#### Link type selection. function SetLinkType( linkType ) { ShowE('divLinkTypeUrl' , (linkType == 'url') ) ; ShowE('divLinkTypeAnchor' , (linkType == 'anchor') ) ; ShowE('divLinkTypeEMail' , (linkType == 'email') ) ; if ( !FCKConfig.LinkDlgHideTarget ) dialog.SetTabVisibility( 'Target' , (linkType == 'url') ) ; if ( FCKConfig.LinkUpload ) dialog.SetTabVisibility( 'Upload' , (linkType == 'url') ) ; if ( !FCKConfig.LinkDlgHideAdvanced ) dialog.SetTabVisibility( 'Advanced' , (linkType != 'anchor' || bHasAnchors) ) ; if ( linkType == 'email' ) dialog.SetAutoSize( true ) ; } //#### Target type selection. function SetTarget( targetType ) { GetE('tdTargetFrame').style.display = ( targetType == 'popup' ? 'none' : '' ) ; GetE('tdPopupName').style.display = GetE('tablePopupFeatures').style.display = ( targetType == 'popup' ? '' : 'none' ) ; switch ( targetType ) { case "_blank" : case "_self" : case "_parent" : case "_top" : GetE('txtTargetFrame').value = targetType ; break ; case "" : GetE('txtTargetFrame').value = '' ; break ; } if ( targetType == 'popup' ) dialog.SetAutoSize( true ) ; } //#### Called while the user types the URL. function OnUrlChange() { var sUrl = GetE('txtUrl').value ; var sProtocol = oRegex.UrlOnChangeProtocol.exec( sUrl ) ; if ( sProtocol ) { sUrl = sUrl.substr( sProtocol[0].length ) ; GetE('txtUrl').value = sUrl ; GetE('cmbLinkProtocol').value = sProtocol[0].toLowerCase() ; } else if ( oRegex.UrlOnChangeTestOther.test( sUrl ) ) { GetE('cmbLinkProtocol').value = '' ; } } //#### Called while the user types the target name. function OnTargetNameChange() { var sFrame = GetE('txtTargetFrame').value ; if ( sFrame.length == 0 ) GetE('cmbTarget').value = '' ; else if ( oRegex.ReserveTarget.test( sFrame ) ) GetE('cmbTarget').value = sFrame.toLowerCase() ; else GetE('cmbTarget').value = 'frame' ; } // Accessible popups function BuildOnClickPopup() { var sWindowName = "'" + GetE('txtPopupName').value.replace(/\W/gi, "") + "'" ; var sFeatures = '' ; var aChkFeatures = document.getElementsByName( 'chkFeature' ) ; for ( var i = 0 ; i < aChkFeatures.length ; i++ ) { if ( i > 0 ) sFeatures += ',' ; sFeatures += aChkFeatures[i].value + '=' + ( aChkFeatures[i].checked ? 'yes' : 'no' ) ; } if ( GetE('txtPopupWidth').value.length > 0 ) sFeatures += ',width=' + GetE('txtPopupWidth').value ; if ( GetE('txtPopupHeight').value.length > 0 ) sFeatures += ',height=' + GetE('txtPopupHeight').value ; if ( GetE('txtPopupLeft').value.length > 0 ) sFeatures += ',left=' + GetE('txtPopupLeft').value ; if ( GetE('txtPopupTop').value.length > 0 ) sFeatures += ',top=' + GetE('txtPopupTop').value ; if ( sFeatures != '' ) sFeatures = sFeatures + ",status" ; return ( "window.open(this.href," + sWindowName + ",'" + sFeatures + "'); return false" ) ; } //#### Fills all Popup related fields. function FillPopupFields( windowName, features ) { if ( windowName ) GetE('txtPopupName').value = windowName ; var oFeatures = new Object() ; var oFeaturesMatch ; while( ( oFeaturesMatch = oRegex.PopupFeatures.exec( features ) ) != null ) { var sValue = oFeaturesMatch[2] ; if ( sValue == ( 'yes' || '1' ) ) oFeatures[ oFeaturesMatch[1] ] = true ; else if ( ! isNaN( sValue ) && sValue != 0 ) oFeatures[ oFeaturesMatch[1] ] = sValue ; } // Update all features check boxes. var aChkFeatures = document.getElementsByName('chkFeature') ; for ( var i = 0 ; i < aChkFeatures.length ; i++ ) { if ( oFeatures[ aChkFeatures[i].value ] ) aChkFeatures[i].checked = true ; } // Update position and size text boxes. if ( oFeatures['width'] ) GetE('txtPopupWidth').value = oFeatures['width'] ; if ( oFeatures['height'] ) GetE('txtPopupHeight').value = oFeatures['height'] ; if ( oFeatures['left'] ) GetE('txtPopupLeft').value = oFeatures['left'] ; if ( oFeatures['top'] ) GetE('txtPopupTop').value = oFeatures['top'] ; } //#### The OK button was hit. function Ok() { var sUri, sInnerHtml ; oEditor.FCKUndo.SaveUndoStep() ; switch ( GetE('cmbLinkType').value ) { case 'url' : sUri = GetE('txtUrl').value ; if ( sUri.length == 0 ) { alert( FCKLang.DlnLnkMsgNoUrl ) ; return false ; } sUri = GetE('cmbLinkProtocol').value + sUri ; break ; case 'email' : sUri = GetE('txtEMailAddress').value ; if ( sUri.length == 0 ) { alert( FCKLang.DlnLnkMsgNoEMail ) ; return false ; } sUri = oParser.CreateEMailUri( sUri, GetE('txtEMailSubject').value, GetE('txtEMailBody').value ) ; break ; case 'anchor' : var sAnchor = GetE('cmbAnchorName').value ; if ( sAnchor.length == 0 ) sAnchor = GetE('cmbAnchorId').value ; if ( sAnchor.length == 0 ) { alert( FCKLang.DlnLnkMsgNoAnchor ) ; return false ; } sUri = '#' + sAnchor ; break ; } // If no link is selected, create a new one (it may result in more than one link creation - #220). var aLinks = oLink ? [ oLink ] : oEditor.FCK.CreateLink( sUri, true ) ; // If no selection, no links are created, so use the uri as the link text (by dom, 2006-05-26) var aHasSelection = ( aLinks.length > 0 ) ; if ( !aHasSelection ) { sInnerHtml = sUri; // Built a better text for empty links. switch ( GetE('cmbLinkType').value ) { // anchor: use old behavior --> return true case 'anchor': sInnerHtml = sInnerHtml.replace( /^#/, '' ) ; break ; // url: try to get path case 'url': var oLinkPathRegEx = new RegExp("//?([^?\"']+)([?].*)?$") ; var asLinkPath = oLinkPathRegEx.exec( sUri ) ; if (asLinkPath != null) sInnerHtml = asLinkPath[1]; // use matched path break ; // mailto: try to get email address case 'email': sInnerHtml = GetE('txtEMailAddress').value ; break ; } // Create a new (empty) anchor. aLinks = [ oEditor.FCK.InsertElement( 'a' ) ] ; } for ( var i = 0 ; i < aLinks.length ; i++ ) { oLink = aLinks[i] ; if ( aHasSelection ) sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). oLink.href = sUri ; SetAttribute( oLink, '_fcksavedurl', sUri ) ; var onclick; // Accessible popups if( GetE('cmbTarget').value == 'popup' ) { onclick = BuildOnClickPopup() ; // Encode the attribute onclick = encodeURIComponent( " onclick=\"" + onclick + "\"" ) ; SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ; } else { // Check if the previous onclick was for a popup: // In that case remove the onclick handler. onclick = oLink.getAttribute( 'onclick_fckprotectedatt' ) ; if ( onclick ) { // Decode the protected string onclick = decodeURIComponent( onclick ) ; if( oRegex.OnClickPopup.test( onclick ) ) SetAttribute( oLink, 'onclick_fckprotectedatt', '' ) ; } } oLink.innerHTML = sInnerHtml ; // Set (or restore) the innerHTML // Target if( GetE('cmbTarget').value != 'popup' ) SetAttribute( oLink, 'target', GetE('txtTargetFrame').value ) ; else SetAttribute( oLink, 'target', null ) ; // Let's set the "id" only for the first link to avoid duplication. if ( i == 0 ) SetAttribute( oLink, 'id', GetE('txtAttId').value ) ; // Advances Attributes SetAttribute( oLink, 'name' , GetE('txtAttName').value ) ; SetAttribute( oLink, 'dir' , GetE('cmbAttLangDir').value ) ; SetAttribute( oLink, 'lang' , GetE('txtAttLangCode').value ) ; SetAttribute( oLink, 'accesskey', GetE('txtAttAccessKey').value ) ; SetAttribute( oLink, 'tabindex' , ( GetE('txtAttTabIndex').value > 0 ? GetE('txtAttTabIndex').value : null ) ) ; SetAttribute( oLink, 'title' , GetE('txtAttTitle').value ) ; SetAttribute( oLink, 'type' , GetE('txtAttContentType').value ) ; SetAttribute( oLink, 'charset' , GetE('txtAttCharSet').value ) ; if ( oEditor.FCKBrowserInfo.IsIE ) { var sClass = GetE('txtAttClasses').value ; // If it's also an anchor add an internal class if ( GetE('txtAttName').value.length != 0 ) sClass += ' FCK__AnchorC' ; SetAttribute( oLink, 'className', sClass ) ; oLink.style.cssText = GetE('txtAttStyle').value ; } else { SetAttribute( oLink, 'class', GetE('txtAttClasses').value ) ; SetAttribute( oLink, 'style', GetE('txtAttStyle').value ) ; } } // Select the (first) link. oEditor.FCKSelection.SelectNode( aLinks[0] ); return true ; } function BrowseServer() { OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ; } function SetUrl( url ) { GetE('txtUrl').value = url ; OnUrlChange() ; dialog.SetSelectedTab( 'Info' ) ; } function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) { // Remove animation window.parent.Throbber.Hide() ; GetE( 'divUpload' ).style.display = '' ; switch ( errorNumber ) { case 0 : // No errors alert( 'Your file has been successfully uploaded' ) ; break ; case 1 : // Custom error alert( customMsg ) ; return ; case 101 : // Custom warning alert( customMsg ) ; break ; case 201 : alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; break ; case 202 : alert( 'Invalid file type' ) ; return ; case 203 : alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; return ; case 500 : alert( 'The connector is disabled' ) ; break ; default : alert( 'Error on file upload. Error number: ' + errorNumber ) ; return ; } SetUrl( fileUrl ) ; GetE('frmUpload').reset() ; } var oUploadAllowedExtRegex = new RegExp( FCKConfig.LinkUploadAllowedExtensions, 'i' ) ; var oUploadDeniedExtRegex = new RegExp( FCKConfig.LinkUploadDeniedExtensions, 'i' ) ; function CheckUpload() { var sFile = GetE('txtUploadFile').value ; if ( sFile.length == 0 ) { alert( 'Please select a file to upload' ) ; return false ; } if ( ( FCKConfig.LinkUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || ( FCKConfig.LinkUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) { OnUploadCompleted( 202 ) ; return false ; } // Show animation window.parent.Throbber.Show( 100 ) ; GetE( 'divUpload' ).style.display = 'none' ; return true ; } function SetDefaultTarget() { var target = FCKConfig.DefaultLinkTarget || '' ; if ( oLink || target.length == 0 ) return ; switch ( target ) { case '_blank' : case '_self' : case '_parent' : case '_top' : GetE('cmbTarget').value = target ; break ; default : GetE('cmbTarget').value = 'frame' ; break ; } GetE('txtTargetFrame').value = target ; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_about.html0000755000175000017500000001306611471562004030360 0ustar achapmanachapman
version
2.6.4.1
Build 23187
Support Open Source Software
Selected Sponsor
Selected Sponsor
For further information go to http://www.fckeditor.net/.
Copyright © 2003-2009 Frederico Caldeira Knabben
Become a Sponsor
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/0000755000175000017500000000000011473031633031036 5ustar achapmanachapman././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000000011473031633033262 5ustar achapmanachapman././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controlWindow.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000440111471562004033265 0ustar achapmanachapman//////////////////////////////////////////////////// // controlWindow object //////////////////////////////////////////////////// function controlWindow( controlForm ) { // private properties this._form = controlForm; // public properties this.windowType = "controlWindow"; // this.noSuggestionSelection = "- No suggestions -"; // by FredCK this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ; // set up the properties for elements of the given control form this.suggestionList = this._form.sugg; this.evaluatedText = this._form.misword; this.replacementText = this._form.txtsugg; this.undoButton = this._form.btnUndo; // public methods this.addSuggestion = addSuggestion; this.clearSuggestions = clearSuggestions; this.selectDefaultSuggestion = selectDefaultSuggestion; this.resetForm = resetForm; this.setSuggestedText = setSuggestedText; this.enableUndo = enableUndo; this.disableUndo = disableUndo; } function resetForm() { if( this._form ) { this._form.reset(); } } function setSuggestedText() { var slct = this.suggestionList; var txt = this.replacementText; var str = ""; if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) { str = slct.options[slct.selectedIndex].text; } txt.value = str; } function selectDefaultSuggestion() { var slct = this.suggestionList; var txt = this.replacementText; if( slct.options.length == 0 ) { this.addSuggestion( this.noSuggestionSelection ); } else { slct.options[0].selected = true; } this.setSuggestedText(); } function addSuggestion( sugg_text ) { var slct = this.suggestionList; if( sugg_text ) { var i = slct.options.length; var newOption = new Option( sugg_text, 'sugg_text'+i ); slct.options[i] = newOption; } } function clearSuggestions() { var slct = this.suggestionList; for( var j = slct.length - 1; j > -1; j-- ) { if( slct.options[j] ) { slct.options[j] = null; } } } function enableUndo() { if( this.undoButton ) { if( this.undoButton.disabled == true ) { this.undoButton.disabled = false; } } } function disableUndo() { if( this.undoButton ) { if( this.undoButton.disabled == false ) { this.undoButton.disabled = true; } } } ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/controls.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000001005211471562004033264 0ustar achapmanachapman
Not in dictionary:
Change to:
  
  
  
  
././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.csszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000157211471562004033273 0ustar achapmanachapman.blend { font-family: courier new; font-size: 10pt; border: 0; margin-bottom:-1; } .normalLabel { font-size:8pt; } .normalText { font-family:arial, helvetica, sans-serif; font-size:10pt; color:000000; background-color:FFFFFF; } .plainText { font-family: courier new, courier, monospace; font-size: 10pt; color:000000; background-color:FFFFFF; } .controlWindowBody { font-family:arial, helvetica, sans-serif; font-size:8pt; padding: 7px ; /* by FredCK */ margin: 0px ; /* by FredCK */ /* color:000000; by FredCK */ /* background-color:DADADA; by FredCK */ } .readonlyInput { background-color:DADADA; color:000000; font-size:8pt; width:392px; } .textDefault { font-size:8pt; width: 200px; } .buttonDefault { width:90px; height:22px; font-size:8pt; } .suggSlct { width:200px; margin-top:2; font-size:8pt; } ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/blank.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000000011471562004033254 0ustar achapmanachapman././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000003441011471562004033270 0ustar achapmanachapman//////////////////////////////////////////////////// // spellChecker.js // // spellChecker object // // This file is sourced on web pages that have a textarea object to evaluate // for spelling. It includes the implementation for the spellCheckObject. // //////////////////////////////////////////////////// // constructor function spellChecker( textObject ) { // public properties - configurable // this.popUpUrl = '/speller/spellchecker.html'; // by FredCK this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK this.popUpName = 'spellchecker'; // this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK this.popUpProps = null ; // by FredCK // this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK //this.spellCheckScript = '/cgi-bin/spellchecker.pl'; // values used to keep track of what happened to a word this.replWordFlag = "R"; // single replace this.ignrWordFlag = "I"; // single ignore this.replAllFlag = "RA"; // replace all occurances this.ignrAllFlag = "IA"; // ignore all occurances this.fromReplAll = "~RA"; // an occurance of a "replace all" word this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word // properties set at run time this.wordFlags = new Array(); this.currentTextIndex = 0; this.currentWordIndex = 0; this.spellCheckerWin = null; this.controlWin = null; this.wordWin = null; this.textArea = textObject; // deprecated this.textInputs = arguments; // private methods this._spellcheck = _spellcheck; this._getSuggestions = _getSuggestions; this._setAsIgnored = _setAsIgnored; this._getTotalReplaced = _getTotalReplaced; this._setWordText = _setWordText; this._getFormInputs = _getFormInputs; // public methods this.openChecker = openChecker; this.startCheck = startCheck; this.checkTextBoxes = checkTextBoxes; this.checkTextAreas = checkTextAreas; this.spellCheckAll = spellCheckAll; this.ignoreWord = ignoreWord; this.ignoreAll = ignoreAll; this.replaceWord = replaceWord; this.replaceAll = replaceAll; this.terminateSpell = terminateSpell; this.undo = undo; // set the current window's "speller" property to the instance of this class. // this object can now be referenced by child windows/frames. window.speller = this; } // call this method to check all text boxes (and only text boxes) in the HTML document function checkTextBoxes() { this.textInputs = this._getFormInputs( "^text$" ); this.openChecker(); } // call this method to check all textareas (and only textareas ) in the HTML document function checkTextAreas() { this.textInputs = this._getFormInputs( "^textarea$" ); this.openChecker(); } // call this method to check all text boxes and textareas in the HTML document function spellCheckAll() { this.textInputs = this._getFormInputs( "^text(area)?$" ); this.openChecker(); } // call this method to check text boxe(s) and/or textarea(s) that were passed in to the // object's constructor or to the textInputs property function openChecker() { this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps ); if( !this.spellCheckerWin.opener ) { this.spellCheckerWin.opener = window; } } function startCheck( wordWindowObj, controlWindowObj ) { // set properties from args this.wordWin = wordWindowObj; this.controlWin = controlWindowObj; // reset properties this.wordWin.resetForm(); this.controlWin.resetForm(); this.currentTextIndex = 0; this.currentWordIndex = 0; // initialize the flags to an array - one element for each text input this.wordFlags = new Array( this.wordWin.textInputs.length ); // each element will be an array that keeps track of each word in the text for( var i=0; i wi ) || i > ti ) { // future word: set as "from ignore all" if // 1) do not already have a flag and // 2) have the same value as current word if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) && ( !this.wordFlags[i][j] )) { this._setAsIgnored( i, j, this.fromIgnrAll ); } } } } // finally, move on this.currentWordIndex++; this._spellcheck(); return true; } function replaceWord() { var wi = this.currentWordIndex; var ti = this.currentTextIndex; if( !this.wordWin ) { alert( 'Error: Word frame not available.' ); return false; } if( !this.wordWin.getTextVal( ti, wi )) { alert( 'Error: "Not in dictionary" text is missing' ); return false; } if( !this.controlWin.replacementText ) { return false ; } var txt = this.controlWin.replacementText; if( txt.value ) { var newspell = new String( txt.value ); if( this._setWordText( ti, wi, newspell, this.replWordFlag )) { this.currentWordIndex++; this._spellcheck(); } } return true; } function replaceAll() { var ti = this.currentTextIndex; var wi = this.currentWordIndex; if( !this.wordWin ) { alert( 'Error: Word frame not available.' ); return false; } var s_word_to_repl = this.wordWin.getTextVal( ti, wi ); if( !s_word_to_repl ) { alert( 'Error: "Not in dictionary" text is missing' ); return false; } var txt = this.controlWin.replacementText; if( !txt.value ) return false; var newspell = new String( txt.value ); // set this word as a "replace all" word. this._setWordText( ti, wi, newspell, this.replAllFlag ); // loop through all the words after this word for( var i = ti; i < this.wordWin.textInputs.length; i++ ) { for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) { if(( i == ti && j > wi ) || i > ti ) { // future word: set word text to s_word_to_repl if // 1) do not already have a flag and // 2) have the same value as s_word_to_repl if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl ) && ( !this.wordFlags[i][j] )) { this._setWordText( i, j, newspell, this.fromReplAll ); } } } } // finally, move on this.currentWordIndex++; this._spellcheck(); return true; } function terminateSpell() { // called when we have reached the end of the spell checking. var msg = ""; // by FredCK var numrepl = this._getTotalReplaced(); if( numrepl == 0 ) { // see if there were no misspellings to begin with if( !this.wordWin ) { msg = ""; } else { if( this.wordWin.totalMisspellings() ) { // msg += "No words changed."; // by FredCK msg += FCKLang.DlgSpellNoChanges ; // by FredCK } else { // msg += "No misspellings found."; // by FredCK msg += FCKLang.DlgSpellNoMispell ; // by FredCK } } } else if( numrepl == 1 ) { // msg += "One word changed."; // by FredCK msg += FCKLang.DlgSpellOneChange ; // by FredCK } else { // msg += numrepl + " words changed."; // by FredCK msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ; } if( msg ) { // msg += "\n"; // by FredCK alert( msg ); } if( numrepl > 0 ) { // update the text field(s) on the opener window for( var i = 0; i < this.textInputs.length; i++ ) { // this.textArea.value = this.wordWin.text; if( this.wordWin ) { if( this.wordWin.textInputs[i] ) { this.textInputs[i].value = this.wordWin.textInputs[i]; } } } } // return back to the calling window // this.spellCheckerWin.close(); // by FredCK if ( typeof( this.OnFinished ) == 'function' ) // by FredCK this.OnFinished(numrepl) ; // by FredCK return true; } function undo() { // skip if this is the first word! var ti = this.currentTextIndex; var wi = this.currentWordIndex; if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) { this.wordWin.removeFocus( ti, wi ); // go back to the last word index that was acted upon do { // if the current word index is zero then reset the seed if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) { this.currentTextIndex--; this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1; if( this.currentWordIndex < 0 ) this.currentWordIndex = 0; } else { if( this.currentWordIndex > 0 ) { this.currentWordIndex--; } } } while ( this.wordWin.totalWords( this.currentTextIndex ) == 0 || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll || this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll ); var text_idx = this.currentTextIndex; var idx = this.currentWordIndex; var preReplSpell = this.wordWin.originalSpellings[text_idx][idx]; // if we got back to the first word then set the Undo button back to disabled if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) { this.controlWin.disableUndo(); } var i, j, origSpell ; // examine what happened to this current word. switch( this.wordFlags[text_idx][idx] ) { // replace all: go through this and all the future occurances of the word // and revert them all to the original spelling and clear their flags case this.replAllFlag : for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) { for( j = 0; j < this.wordWin.totalWords( i ); j++ ) { if(( i == text_idx && j >= idx ) || i > text_idx ) { origSpell = this.wordWin.originalSpellings[i][j]; if( origSpell == preReplSpell ) { this._setWordText ( i, j, origSpell, undefined ); } } } } break; // ignore all: go through all the future occurances of the word // and clear their flags case this.ignrAllFlag : for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) { for( j = 0; j < this.wordWin.totalWords( i ); j++ ) { if(( i == text_idx && j >= idx ) || i > text_idx ) { origSpell = this.wordWin.originalSpellings[i][j]; if( origSpell == preReplSpell ) { this.wordFlags[i][j] = undefined; } } } } break; // replace: revert the word to its original spelling case this.replWordFlag : this._setWordText ( text_idx, idx, preReplSpell, undefined ); break; } // For all four cases, clear the wordFlag of this word. re-start the process this.wordFlags[text_idx][idx] = undefined; this._spellcheck(); } } function _spellcheck() { var ww = this.wordWin; // check if this is the last word in the current text element if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) { this.currentTextIndex++; this.currentWordIndex = 0; // keep going if we're not yet past the last text element if( this.currentTextIndex < this.wordWin.textInputs.length ) { this._spellcheck(); return; } else { this.terminateSpell(); return; } } // if this is after the first one make sure the Undo button is enabled if( this.currentWordIndex > 0 ) { this.controlWin.enableUndo(); } // skip the current word if it has already been worked on if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) { // increment the global current word index and move on. this.currentWordIndex++; this._spellcheck(); } else { var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex ); if( evalText ) { this.controlWin.evaluatedText.value = evalText; ww.setFocus( this.currentTextIndex, this.currentWordIndex ); this._getSuggestions( this.currentTextIndex, this.currentWordIndex ); } } } function _getSuggestions( text_num, word_num ) { this.controlWin.clearSuggestions(); // add suggestion in list for each suggested word. // get the array of suggested words out of the // three-dimensional array containing all suggestions. var a_suggests = this.wordWin.suggestions[text_num][word_num]; if( a_suggests ) { // got an array of suggestions. for( var ii = 0; ii < a_suggests.length; ii++ ) { this.controlWin.addSuggestion( a_suggests[ii] ); } } this.controlWin.selectDefaultSuggestion(); } function _setAsIgnored( text_num, word_num, flag ) { // set the UI this.wordWin.removeFocus( text_num, word_num ); // do the bookkeeping this.wordFlags[text_num][word_num] = flag; return true; } function _getTotalReplaced() { var i_replaced = 0; for( var i = 0; i < this.wordFlags.length; i++ ) { for( var j = 0; j < this.wordFlags[i].length; j++ ) { if(( this.wordFlags[i][j] == this.replWordFlag ) || ( this.wordFlags[i][j] == this.replAllFlag ) || ( this.wordFlags[i][j] == this.fromReplAll )) { i_replaced++; } } } return i_replaced; } function _setWordText( text_num, word_num, newText, flag ) { // set the UI and form inputs this.wordWin.setText( text_num, word_num, newText ); // keep track of what happened to this word: this.wordFlags[text_num][word_num] = flag; return true; } function _getFormInputs( inputPattern ) { var inputs = new Array(); for( var i = 0; i < document.forms.length; i++ ) { for( var j = 0; j < document.forms[i].elements.length; j++ ) { if( document.forms[i].elements[j].type.match( inputPattern )) { inputs[inputs.length] = document.forms[i].elements[j]; } } } return inputs; } ././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000000011473031633033262 5ustar achapmanachapman././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000001333611471562004033274 0ustar achapmanachapman$val ) { # $val = str_replace( "'", "%27", $val ); echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n"; } } # make declarations for the text input index function print_textindex_decl( $text_input_idx ) { echo "words[$text_input_idx] = [];\n"; echo "suggs[$text_input_idx] = [];\n"; } # set an element of the JavaScript 'words' array to a misspelled word function print_words_elem( $word, $index, $text_input_idx ) { echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n"; } # set an element of the JavaScript 'suggs' array to a list of suggestions function print_suggs_elem( $suggs, $index, $text_input_idx ) { echo "suggs[$text_input_idx][$index] = ["; foreach( $suggs as $key=>$val ) { if( $val ) { echo "'" . escape_quote( $val ) . "'"; if ( $key+1 < count( $suggs )) { echo ", "; } } } echo "];\n"; } # escape single quote function escape_quote( $str ) { return preg_replace ( "/'/", "\\'", $str ); } # handle a server-side error. function error_handler( $err ) { echo "error = '" . preg_replace( "/['\\\\]/", "\\\\$0", $err ) . "';\n"; } ## get the list of misspelled words. Put the results in the javascript words array ## for each misspelled word, get suggestions and put in the javascript suggs array function print_checker_results() { global $aspell_prog; global $aspell_opts; global $tempfiledir; global $textinputs; global $input_separator; $aspell_err = ""; # create temp file $tempfile = tempnam( $tempfiledir, 'aspell_data_' ); # open temp file, add the submitted text. if( $fh = fopen( $tempfile, 'w' )) { for( $i = 0; $i < count( $textinputs ); $i++ ) { $text = urldecode( $textinputs[$i] ); // Strip all tags for the text. (by FredCK - #339 / #681) $text = preg_replace( "/<[^>]+>/", " ", $text ) ; $lines = explode( "\n", $text ); fwrite ( $fh, "%\n" ); # exit terse mode fwrite ( $fh, "^$input_separator\n" ); fwrite ( $fh, "!\n" ); # enter terse mode foreach( $lines as $key=>$value ) { # use carat on each line to escape possible aspell commands fwrite( $fh, "^$value\n" ); } } fclose( $fh ); # exec aspell command - redirect STDERR to STDOUT $cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1"; if( $aspellret = shell_exec( $cmd )) { $linesout = explode( "\n", $aspellret ); $index = 0; $text_input_index = -1; # parse each line of aspell return foreach( $linesout as $key=>$val ) { $chardesc = substr( $val, 0, 1 ); # if '&', then not in dictionary but has suggestions # if '#', then not in dictionary and no suggestions # if '*', then it is a delimiter between text inputs # if '@' then version info if( $chardesc == '&' || $chardesc == '#' ) { $line = explode( " ", $val, 5 ); print_words_elem( $line[1], $index, $text_input_index ); if( isset( $line[4] )) { $suggs = explode( ", ", $line[4] ); } else { $suggs = array(); } print_suggs_elem( $suggs, $index, $text_input_index ); $index++; } elseif( $chardesc == '*' ) { $text_input_index++; print_textindex_decl( $text_input_index ); $index = 0; } elseif( $chardesc != '@' && $chardesc != "" ) { # assume this is error output $aspell_err .= $val; } } if( $aspell_err ) { $aspell_err = "Error executing `$cmd`\\n$aspell_err"; error_handler( $aspell_err ); } } else { error_handler( "System error: Aspell program execution failed (`$cmd`)" ); } } else { error_handler( "System error: Could not open file '$tempfile' for writing" ); } # close temp file, delete file unlink( $tempfile ); } ?> ././@LongLink0000000000000000000000000000020500000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000001121211471562004033263 0ustar achapmanachapman#!/usr/bin/perl use CGI qw/ :standard /; use File::Temp qw/ tempfile tempdir /; # my $spellercss = '/speller/spellerStyle.css'; # by FredCK my $spellercss = '../spellerStyle.css'; # by FredCK # my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK my $wordWindowSrc = '../wordWindow.js'; # by FredCK my @textinputs = param( 'textinputs[]' ); # array # my $aspell_cmd = 'aspell'; # by FredCK (for Linux) my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows) my $lang = 'en_US'; # my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; # by FredCK my $input_separator = "A"; # set the 'wordtext' JavaScript variable to the submitted text. sub printTextVar { for( my $i = 0; $i <= $#textinputs; $i++ ) { print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n"; } } sub printTextIdxDecl { my $idx = shift; print "words[$idx] = [];\n"; print "suggs[$idx] = [];\n"; } sub printWordsElem { my( $textIdx, $wordIdx, $word ) = @_; print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n"; } sub printSuggsElem { my( $textIdx, $wordIdx, @suggs ) = @_; print "suggs[$textIdx][$wordIdx] = ["; for my $i ( 0..$#suggs ) { print "'" . escapeQuote( $suggs[$i] ) . "'"; if( $i < $#suggs ) { print ", "; } } print "];\n"; } sub printCheckerResults { my $textInputIdx = -1; my $wordIdx = 0; my $unhandledText; # create temp file my $dir = tempdir( CLEANUP => 1 ); my( $fh, $tmpfilename ) = tempfile( DIR => $dir ); # temp file was created properly? # open temp file, add the submitted text. for( my $i = 0; $i <= $#textinputs; $i++ ) { $text = url_decode( $textinputs[$i] ); # Strip all tags for the text. (by FredCK - #339 / #681) $text =~ s/<[^>]+>/ /g; @lines = split( /\n/, $text ); print $fh "\%\n"; # exit terse mode print $fh "^$input_separator\n"; print $fh "!\n"; # enter terse mode for my $line ( @lines ) { # use carat on each line to escape possible aspell commands print $fh "^$line\n"; } } # exec aspell command my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1"; open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return; # parse each line of aspell return for my $ret ( ) { chomp( $ret ); # if '&', then not in dictionary but has suggestions # if '#', then not in dictionary and no suggestions # if '*', then it is a delimiter between text inputs if( $ret =~ /^\*/ ) { $textInputIdx++; printTextIdxDecl( $textInputIdx ); $wordIdx = 0; } elsif( $ret =~ /^(&|#)/ ) { my @tokens = split( " ", $ret, 5 ); printWordsElem( $textInputIdx, $wordIdx, $tokens[1] ); my @suggs = (); if( $tokens[4] ) { @suggs = split( ", ", $tokens[4] ); } printSuggsElem( $textInputIdx, $wordIdx, @suggs ); $wordIdx++; } else { $unhandledText .= $ret; } } close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return; } sub escapeQuote { my $str = shift; $str =~ s/'/\\'/g; return $str; } sub handleError { my $err = shift; print "error = '" . escapeQuote( $err ) . "';\n"; } sub url_decode { local $_ = @_ ? shift : $_; defined or return; # change + signs to spaces tr/+/ /; # change hex escapes to the proper characters s/%([a-fA-F0-9]{2})/pack "H2", $1/eg; return $_; } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Display HTML # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # print < EOF ././@LongLink0000000000000000000000000000020600000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000001264211471562004033273 0ustar achapmanachapman ]+>", " ", "all")> ././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000001635211471562004033275 0ustar achapmanachapman//////////////////////////////////////////////////// // wordWindow object //////////////////////////////////////////////////// function wordWindow() { // private properties this._forms = []; // private methods this._getWordObject = _getWordObject; //this._getSpellerObject = _getSpellerObject; this._wordInputStr = _wordInputStr; this._adjustIndexes = _adjustIndexes; this._isWordChar = _isWordChar; this._lastPos = _lastPos; // public properties this.wordChar = /[a-zA-Z]/; this.windowType = "wordWindow"; this.originalSpellings = new Array(); this.suggestions = new Array(); this.checkWordBgColor = "pink"; this.normWordBgColor = "white"; this.text = ""; this.textInputs = new Array(); this.indexes = new Array(); //this.speller = this._getSpellerObject(); // public methods this.resetForm = resetForm; this.totalMisspellings = totalMisspellings; this.totalWords = totalWords; this.totalPreviousWords = totalPreviousWords; //this.getTextObjectArray = getTextObjectArray; this.getTextVal = getTextVal; this.setFocus = setFocus; this.removeFocus = removeFocus; this.setText = setText; //this.getTotalWords = getTotalWords; this.writeBody = writeBody; this.printForHtml = printForHtml; } function resetForm() { if( this._forms ) { for( var i = 0; i < this._forms.length; i++ ) { this._forms[i].reset(); } } return true; } function totalMisspellings() { var total_words = 0; for( var i = 0; i < this.textInputs.length; i++ ) { total_words += this.totalWords( i ); } return total_words; } function totalWords( textIndex ) { return this.originalSpellings[textIndex].length; } function totalPreviousWords( textIndex, wordIndex ) { var total_words = 0; for( var i = 0; i <= textIndex; i++ ) { for( var j = 0; j < this.totalWords( i ); j++ ) { if( i == textIndex && j == wordIndex ) { break; } else { total_words++; } } } return total_words; } //function getTextObjectArray() { // return this._form.elements; //} function getTextVal( textIndex, wordIndex ) { var word = this._getWordObject( textIndex, wordIndex ); if( word ) { return word.value; } } function setFocus( textIndex, wordIndex ) { var word = this._getWordObject( textIndex, wordIndex ); if( word ) { if( word.type == "text" ) { word.focus(); word.style.backgroundColor = this.checkWordBgColor; } } } function removeFocus( textIndex, wordIndex ) { var word = this._getWordObject( textIndex, wordIndex ); if( word ) { if( word.type == "text" ) { word.blur(); word.style.backgroundColor = this.normWordBgColor; } } } function setText( textIndex, wordIndex, newText ) { var word = this._getWordObject( textIndex, wordIndex ); var beginStr; var endStr; if( word ) { var pos = this.indexes[textIndex][wordIndex]; var oldText = word.value; // update the text given the index of the string beginStr = this.textInputs[textIndex].substring( 0, pos ); endStr = this.textInputs[textIndex].substring( pos + oldText.length, this.textInputs[textIndex].length ); this.textInputs[textIndex] = beginStr + newText + endStr; // adjust the indexes on the stack given the differences in // length between the new word and old word. var lengthDiff = newText.length - oldText.length; this._adjustIndexes( textIndex, wordIndex, lengthDiff ); word.size = newText.length; word.value = newText; this.removeFocus( textIndex, wordIndex ); } } function writeBody() { var d = window.document; var is_html = false; d.open(); // iterate through each text input. for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) { var end_idx = 0; var begin_idx = 0; d.writeln( '
' ); var wordtxt = this.textInputs[txtid]; this.indexes[txtid] = []; if( wordtxt ) { var orig = this.originalSpellings[txtid]; if( !orig ) break; //!!! plain text, or HTML mode? d.writeln( '
' ); // iterate through each occurrence of a misspelled word. for( var i = 0; i < orig.length; i++ ) { // find the position of the current misspelled word, // starting at the last misspelled word. // and keep looking if it's a substring of another word do { begin_idx = wordtxt.indexOf( orig[i], end_idx ); end_idx = begin_idx + orig[i].length; // word not found? messed up! if( begin_idx == -1 ) break; // look at the characters immediately before and after // the word. If they are word characters we'll keep looking. var before_char = wordtxt.charAt( begin_idx - 1 ); var after_char = wordtxt.charAt( end_idx ); } while ( this._isWordChar( before_char ) || this._isWordChar( after_char ) ); // keep track of its position in the original text. this.indexes[txtid][i] = begin_idx; // write out the characters before the current misspelled word for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) { // !!! html mode? make it html compatible d.write( this.printForHtml( wordtxt.charAt( j ))); } // write out the misspelled word. d.write( this._wordInputStr( orig[i] )); // if it's the last word, write out the rest of the text if( i == orig.length-1 ){ d.write( printForHtml( wordtxt.substr( end_idx ))); } } d.writeln( '
' ); } d.writeln( '
' ); } //for ( var j = 0; j < d.forms.length; j++ ) { // alert( d.forms[j].name ); // for( var k = 0; k < d.forms[j].elements.length; k++ ) { // alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value ); // } //} // set the _forms property this._forms = d.forms; d.close(); } // return the character index in the full text after the last word we evaluated function _lastPos( txtid, idx ) { if( idx > 0 ) return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length; else return 0; } function printForHtml( n ) { return n ; // by FredCK /* var htmlstr = n; if( htmlstr.length == 1 ) { // do simple case statement if it's just one character switch ( n ) { case "\n": htmlstr = '
'; break; case "<": htmlstr = '<'; break; case ">": htmlstr = '>'; break; } return htmlstr; } else { htmlstr = htmlstr.replace( //g, '>' ); htmlstr = htmlstr.replace( /\n/g, '
' ); return htmlstr; } */ } function _isWordChar( letter ) { if( letter.search( this.wordChar ) == -1 ) { return false; } else { return true; } } function _getWordObject( textIndex, wordIndex ) { if( this._forms[textIndex] ) { if( this._forms[textIndex].elements[wordIndex] ) { return this._forms[textIndex].elements[wordIndex]; } } return null; } function _wordInputStr( word ) { var str = ''; return str; } function _adjustIndexes( textIndex, wordIndex, lengthDiff ) { for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) { this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff; } } ././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages/spellerpage0000755000175000017500000000437411471562004033276 0ustar achapmanachapman Speller Pages zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_spellerpages.html0000755000175000017500000000444311471562004031733 0ustar achapmanachapman Spell Check zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_source.html0000755000175000017500000000437111471562004030545 0ustar achapmanachapman Source
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_textfield.html0000755000175000017500000000753711471562004031244 0ustar achapmanachapman
Name
Value
Character Width
Maximum Characters
Type
 
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/0000755000175000017500000000000011473031633030163 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/images/0000755000175000017500000000000011473031633031430 5ustar achapmanachapman././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/images/template2.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/images/template0000755000175000017500000000051511471562004033171 0ustar achapmanachapmanGIF89adF‘²²²ÿÿÿ!ù,dFÿ„©Ëí£œ´Ú …Þ¼û†âH–b¦êʪh ÇrùÎö-×øÎ“z j~Â"ŽhLÆ‚€ó J§ÔÀ§ŠÍJAL­W{ýŠ·Ÿîøü £Ç܃ò=cÂç#9ýî±ã÷óšíñ˜çÆgHhp¨¸¡·øÖè˜Yä'è¥v™Õ–HÉ7é Ê3JzTx:g©‰•ÙJÅ  JgJ›“z+™«[ÉÛd ¼Â ;õj%;l$Ìlâüìó+}]Rœ …¼í´Œ]J¾4NÞr}Α®>4î /ÞŽÛI_nn®?ßïâ]¼ƒNð˜í Â2 üç°NÈî j ˆC‹7Îêèï#HìÚ•Twò\JrZº| 3¦Ì™ ;././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/images/template3.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_template/images/template0000755000175000017500000000064611471562004033176 0ustar achapmanachapmanGIF89adF‘²²²ÿÿÿ!ù,dFÿ„©Ëí£œ´Ú …Þ¼û†âH–b¦êʪh ÇrùÎö-×øÎ“z j~Â"ŽhLƦó J§Ôªõúü0±Ü®÷Õ>à²ùœõ •l׸ g­ãt±¡ŽmÑæŸ 2—·Th08rÈÃxò¦rø×¤áÈ!¨xy³9éÑ9#ºGéågø Êa†ÈJ"j9«z‹*)BKºšÛËk ›Û:¼‹¬ö+àú¥+{z›XLØì4]M-üˆ«ÌmL>N­ ^-îýüMmîþN¿Qzmå‡ï»^ÜžÞM] Radio Button Properties
Name
Value
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_specialchar.html0000755000175000017500000001130411471562004031515 0ustar achapmanachapman
    
 
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_docprops/0000755000175000017500000000000011473031633030201 5ustar achapmanachapman././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_docprops/fck_document_preview.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_docprops/fck_document_pr0000755000175000017500000000543311471562004033275 0ustar achapmanachapman Document Properties - Preview
Normal Text
Visited Link Active Link
















zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_tablecell.html0000755000175000017500000002331211471562004031170 0ustar achapmanachapman Table Cell Properties
Width:   
Height:   pixels
   
Word Wrap:  
   
Horizontal Alignment:  
Vertical Alignment:  
   
Cell Type:  
     
Rows Span:  
Columns Span:  
     
Background Color:    
Border Color:    
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_select.html0000755000175000017500000001420311471562004030517 0ustar achapmanachapman Select Properties
Name 
Value 
Size   lines


 Available Options 
Text
Value

  
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_textarea.html0000755000175000017500000000521111471562004031054 0ustar achapmanachapman Text Area Properties
Name
Collumns

Rows
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_flash/0000755000175000017500000000000011473031633027445 5ustar achapmanachapman././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_flash/fck_flash_preview.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_flash/fck_flash_preview.0000755000175000017500000000307111471562004033132 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_flash/fck_flash.js0000755000175000017500000002012711471562004031727 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Scripts related to the Flash dialog window (see fck_flash.html). */ var dialog = window.parent ; var oEditor = dialog.InnerDialogLoaded() ; var FCK = oEditor.FCK ; var FCKLang = oEditor.FCKLang ; var FCKConfig = oEditor.FCKConfig ; var FCKTools = oEditor.FCKTools ; //#### Dialog Tabs // Set the dialog tabs. dialog.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ; if ( FCKConfig.FlashUpload ) dialog.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ; if ( !FCKConfig.FlashDlgHideAdvanced ) dialog.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ; // Function called when a dialog tag is selected. function OnDialogTabChange( tabCode ) { ShowE('divInfo' , ( tabCode == 'Info' ) ) ; ShowE('divUpload' , ( tabCode == 'Upload' ) ) ; ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ; } // Get the selected flash embed (if available). var oFakeImage = dialog.Selection.GetSelectedElement() ; var oEmbed ; if ( oFakeImage ) { if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') ) oEmbed = FCK.GetRealElement( oFakeImage ) ; else oFakeImage = null ; } window.onload = function() { // Translate the dialog box texts. oEditor.FCKLanguageManager.TranslatePage(document) ; // Load the selected element information (if any). LoadSelection() ; // Show/Hide the "Browse Server" button. GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ; // Set the actual uploader URL. if ( FCKConfig.FlashUpload ) GetE('frmUpload').action = FCKConfig.FlashUploadURL ; dialog.SetAutoSize( true ) ; // Activate the "OK" button. dialog.SetOkButton( true ) ; SelectField( 'txtUrl' ) ; } function LoadSelection() { if ( ! oEmbed ) return ; GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ; GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ; GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ; // Get Advances Attributes GetE('txtAttId').value = oEmbed.id ; GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ; GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ; GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ; GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ; GetE('txtAttTitle').value = oEmbed.title ; if ( oEditor.FCKBrowserInfo.IsIE ) { GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ; GetE('txtAttStyle').value = oEmbed.style.cssText ; } else { GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ; GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) || '' ; } UpdatePreview() ; } //#### The OK button was hit. function Ok() { if ( GetE('txtUrl').value.length == 0 ) { dialog.SetSelectedTab( 'Info' ) ; GetE('txtUrl').focus() ; alert( oEditor.FCKLang.DlgAlertUrl ) ; return false ; } oEditor.FCKUndo.SaveUndoStep() ; if ( !oEmbed ) { oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ; oFakeImage = null ; } UpdateEmbed( oEmbed ) ; if ( !oFakeImage ) { oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ; oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ; oFakeImage = FCK.InsertElement( oFakeImage ) ; } oEditor.FCKEmbedAndObjectProcessor.RefreshView( oFakeImage, oEmbed ) ; return true ; } function UpdateEmbed( e ) { SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ; SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ; SetAttribute( e, 'src', GetE('txtUrl').value ) ; SetAttribute( e, "width" , GetE('txtWidth').value ) ; SetAttribute( e, "height", GetE('txtHeight').value ) ; // Advances Attributes SetAttribute( e, 'id' , GetE('txtAttId').value ) ; SetAttribute( e, 'scale', GetE('cmbScale').value ) ; SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ; SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ; SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ; SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ; if ( oEditor.FCKBrowserInfo.IsIE ) { SetAttribute( e, 'className', GetE('txtAttClasses').value ) ; e.style.cssText = GetE('txtAttStyle').value ; } else { SetAttribute( e, 'class', GetE('txtAttClasses').value ) ; SetAttribute( e, 'style', GetE('txtAttStyle').value ) ; } } var ePreview ; function SetPreviewElement( previewEl ) { ePreview = previewEl ; if ( GetE('txtUrl').value.length > 0 ) UpdatePreview() ; } function UpdatePreview() { if ( !ePreview ) return ; while ( ePreview.firstChild ) ePreview.removeChild( ePreview.firstChild ) ; if ( GetE('txtUrl').value.length == 0 ) ePreview.innerHTML = ' ' ; else { var oDoc = ePreview.ownerDocument || ePreview.document ; var e = oDoc.createElement( 'EMBED' ) ; SetAttribute( e, 'src', GetE('txtUrl').value ) ; SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ; SetAttribute( e, 'width', '100%' ) ; SetAttribute( e, 'height', '100%' ) ; ePreview.appendChild( e ) ; } } // function BrowseServer() { OpenFileBrowser( FCKConfig.FlashBrowserURL, FCKConfig.FlashBrowserWindowWidth, FCKConfig.FlashBrowserWindowHeight ) ; } function SetUrl( url, width, height ) { GetE('txtUrl').value = url ; if ( width ) GetE('txtWidth').value = width ; if ( height ) GetE('txtHeight').value = height ; UpdatePreview() ; dialog.SetSelectedTab( 'Info' ) ; } function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) { // Remove animation window.parent.Throbber.Hide() ; GetE( 'divUpload' ).style.display = '' ; switch ( errorNumber ) { case 0 : // No errors alert( 'Your file has been successfully uploaded' ) ; break ; case 1 : // Custom error alert( customMsg ) ; return ; case 101 : // Custom warning alert( customMsg ) ; break ; case 201 : alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ; break ; case 202 : alert( 'Invalid file type' ) ; return ; case 203 : alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ; return ; case 500 : alert( 'The connector is disabled' ) ; break ; default : alert( 'Error on file upload. Error number: ' + errorNumber ) ; return ; } SetUrl( fileUrl ) ; GetE('frmUpload').reset() ; } var oUploadAllowedExtRegex = new RegExp( FCKConfig.FlashUploadAllowedExtensions, 'i' ) ; var oUploadDeniedExtRegex = new RegExp( FCKConfig.FlashUploadDeniedExtensions, 'i' ) ; function CheckUpload() { var sFile = GetE('txtUploadFile').value ; if ( sFile.length == 0 ) { alert( 'Please select a file to upload' ) ; return false ; } if ( ( FCKConfig.FlashUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) || ( FCKConfig.FlashUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) ) { OnUploadCompleted( 202 ) ; return false ; } // Show animation window.parent.Throbber.Show( 100 ) ; GetE( 'divUpload' ).style.display = 'none' ; return true ; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_div.html0000644000175000017500000002505011471562004030021 0ustar achapmanachapman
Style
  Stylesheet Classes
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dialog/fck_button.html0000755000175000017500000000604611471562004030561 0ustar achapmanachapman Button Properties
Name
Text (Value)
Type
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dtd/0000755000175000017500000000000011473031633025041 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dtd/fck_xhtml10transitional.js0000755000175000017500000001122511471562006032154 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Transitional. * This file was automatically generated from the file: xhtml10-transitional.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; A = {isindex:1, fieldset:1} ; B = {input:1, button:1, select:1, textarea:1, label:1} ; C = X({a:1}, B) ; D = X({iframe:1}, C) ; E = {hr:1, ul:1, menu:1, div:1, blockquote:1, noscript:1, table:1, center:1, address:1, dir:1, pre:1, h5:1, dl:1, h4:1, noframes:1, h6:1, ol:1, h1:1, h3:1, h2:1} ; F = {ins:1, del:1, script:1} ; G = X({b:1, acronym:1, bdo:1, 'var':1, '#':1, abbr:1, code:1, br:1, i:1, cite:1, kbd:1, u:1, strike:1, s:1, tt:1, strong:1, q:1, samp:1, em:1, dfn:1, span:1}, F) ; H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small:1}, G) ; I = X({p:1}, H) ; J = X({iframe:1}, H, B) ; K = {img:1, noscript:1, br:1, kbd:1, center:1, button:1, basefont:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, font:1, '#':1, select:1, menu:1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, iframe:1, strong:1, textarea:1, noframes:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, strike:1, dir:1, map:1, dl:1, applet:1, del:1, isindex:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, u:1, s:1, tt:1, address:1, q:1, pre:1, p:1, em:1, dfn:1} ; L = X({a:1}, J) ; M = {tr:1} ; N = {'#':1} ; O = X({param:1}, K) ; P = X({form:1}, A, D, E, I) ; Q = {li:1} ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: P, td: P, br: {}, th: P, center: P, kbd: L, button: X(I, E), basefont: {}, h5: L, h4: L, samp: L, h6: L, ol: Q, h1: L, h3: L, option: N, h2: L, form: X(A, D, E, I), select: {optgroup:1, option:1}, font: J, // Changed from L to J (see (1)) ins: P, menu: Q, abbr: L, label: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, code: L, script: N, tfoot: M, cite: L, li: P, input: {}, iframe: P, strong: J, // Changed from L to J (see (1)) textarea: N, noframes: P, big: J, // Changed from L to J (see (1)) small: J, // Changed from L to J (see (1)) span: J, // Changed from L to J (see (1)) hr: {}, dt: L, sub: J, // Changed from L to J (see (1)) optgroup: {option:1}, param: {}, bdo: L, 'var': J, // Changed from L to J (see (1)) div: P, object: O, sup: J, // Changed from L to J (see (1)) dd: P, strike: J, // Changed from L to J (see (1)) area: {}, dir: Q, map: X({area:1, form:1, p:1}, A, F, E), applet: O, dl: {dt:1, dd:1}, del: P, isindex: {}, fieldset: X({legend:1}, K), thead: M, ul: Q, acronym: L, b: J, // Changed from L to J (see (1)) a: J, blockquote: P, caption: L, i: J, // Changed from L to J (see (1)) u: J, // Changed from L to J (see (1)) tbody: M, s: L, address: X(D, I), tt: J, // Changed from L to J (see (1)) legend: L, q: L, pre: X(G, C), p: L, em: J, // Changed from L to J (see (1)) dfn: L } ; })() ; /* Notes: (1) According to the DTD, many elements, like accept elements inside of them. But, to produce better output results, we have manually changed the map to avoid breaking the links on pieces, having "this is a link test", instead of "this is a link test". */ zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dtd/fck_xhtml10strict.js0000755000175000017500000000655111471562006030763 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Strict. * This file was automatically generated from the file: xhtml10-strict.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; A = {ins:1, del:1, script:1} ; B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ; C = X({fieldset:1}, B) ; D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ; E = X({img:1, object:1}, D) ; F = {input:1, button:1, textarea:1, select:1, label:1} ; G = X({a:1}, F) ; H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ; I = X({form:1, fieldset:1}, B, E, G) ; J = {tr:1} ; K = {'#':1} ; L = X(E, G) ; M = {li:1} ; N = X({form:1}, A, C) ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: N, td: I, br: {}, th: I, kbd: L, button: X(B, E), h5: L, h4: L, samp: L, h6: L, ol: M, h1: L, h3: L, option: K, h2: L, form: X(A, C), select: {optgroup:1, option:1}, ins: I, abbr: L, label: L, code: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, script: K, tfoot: J, cite: L, li: I, input: {}, strong: L, textarea: K, big: L, small: L, span: L, dt: L, hr: {}, sub: L, optgroup: {option:1}, bdo: L, param: {}, 'var': L, div: I, object: X({param:1}, H), sup: L, dd: I, area: {}, map: X({form:1, area:1}, A, C), dl: {dt:1, dd:1}, del: I, fieldset: X({legend:1}, H), thead: J, ul: M, acronym: L, b: L, a: X({img:1, object:1}, D, F), blockquote: N, caption: L, i: L, tbody: J, address: L, tt: L, legend: L, q: L, pre: X({a:1}, D, F), p: L, em: L, dfn: L } ; })() ; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/dtd/fck_dtd_test.html0000755000175000017500000000166111471562006030374 0ustar achapmanachapman DTD Test Page

DTD Contents

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/fckeditor.original.html0000755000175000017500000004246011471562006030743 0ustar achapmanachapman FCKeditor
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/0000755000175000017500000000000011473031633026540 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/0000755000175000017500000000000011473031633030223 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/0000755000175000017500000000000011473031633031647 5ustar achapmanachapman././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmactualfolder.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmactu0000755000175000017500000000457311471562005033247 0ustar achapmanachapman Folder path
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmupload.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmuplo0000755000175000017500000000717311471562005033271 0ustar achapmanachapman File Upload
Upload a new file in this folder
 
././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmresourceslist.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmreso0000755000175000017500000001161411471562005033255 0ustar achapmanachapman Resources ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000000011473031633033114 5ustar achapmanachapman././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/spacer.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000005311471562005033117 0ustar achapmanachapmanGIF89a€ÿÿÿ!ù,D;././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/Folder32.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000043111471562005033117 0ustar achapmanachapmanGIF89a ³ ÿÿ÷11œœÎÎcÿΜÿÿÿÿÿœÿÿÿ!ù , Æ0ÉI«½˜è½þq dI˜f‹ª!´4òÂQì|ïs@`î@,Èä!Õž&I:ENhIÊÝz …AVû¤¨V1‹üõnÃãZÝšÃ×lÄ\ï½—£rS\~Zf|‡hR„€…ˆf‹u|\]ngiqtP“z–`j4‰’ˆUœžq‘€›ŠŸ”®‡[g“g¨«‰²z„¯U†¥Žw™f†Ã³²‹¼œ‚ÆÁ¢ÏÏʹ¦>ÕÖ×= ÜÝÞßàáÜ8äåæçèéç;././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/FolderOpened32.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000041011471562005033114 0ustar achapmanachapmanGIF89a ¢€€øøøÌÌf™™ÿÌ™ÿÿ™ÿÿÿ!ù, ÍxºÜþ0ÊÙˆ½—Jºï¡=œažg82%êêÚ¾…Y‡X.²ÁëŸ`gÀ£ÙŽ5C-¹$³Ÿ+‰48QæQÉå.•Wxœ NŽpÍþ ¡·Tªå:ã„y•úð?T>‚7iz4_gJ†Dyt^(uoƒ”gi˜[™“[as}‚J_¤O¡©H•¬Ÿ'Š’°gh³PS^§6ºª¼­¨¾°Ág–X¡ÀÉÂÂWP·¸]‹ÒœOÅdÞcܳãäåæç+éêëì ;././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/FolderUp.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000020411471562005033115 0ustar achapmanachapmanGIF89a¢÷÷÷ÿÿÎÿΜœœÎÎcÿÿœÿÿÿ!ù,IxºÜ;÷@¥Œéù EÊpèU“™eÆ› ìáÂF,{}ç@χyvÈU«"‰/PG[&¯‚ª-Ä q¦`0eL&';././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/FolderOpened.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000020411471562005033115 0ustar achapmanachapmanGIF89a¢ÎÎcÿΜœœÿÿœÿÿÿÿÿÿ!ù,IhºÜ,ºGjÓ2z'Q¤l^i@¡qe;¤aoA¶Á¤Ìv9]­§ºyr€ÀVd!uI˜jõLF—S™¬05p¿`pfLn$;././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/ButtonArrow.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000021211471562005033114 0ustar achapmanachapmanGIF89a ³¤¤¤"""QQQ~~~eeeóóóµµµ(((FFF333ÿÿÿ!ù, 7p(Ä*S7ÓœcˆâqKM)<, *L.µ¡ L-8AKÆ@=?" ÑKL IåæC 3DK1I(FôF2GÓð4B ôÁHKt0Ñp@D; ˜¸"ÄÁ%,Lâ#J0ˆ°‰“ŒP€ÄÈ9R¤&Í›4k%Z³§Ož;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/fla.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000057611471562005033131 0ustar achapmanachapmanGIF89aÕ(¥!JJJkkkÎRR1ZÿccÆÆÎ­ç9)½JRsBRBk!JÖ1Î1!)Rs{BB9c„JRkBRZJZÎ1111”œBB)9J1Jc)B­ïccZZZï÷ï÷RJçJ9ŒŒŒÆ){{{ïçïÿÿÿÿÿÿ!ù(,›@ŠDxŽÀIÈ’JP4`X6Q‚´ô)JÕkÚ5YL¦0ÓS’~ºÊ“œ´.GK¢ü‰.d8#mP"{L# ˆ‚&…|( !RB#”  #ކ(!  !™›¨«  ¦|#!¯ !#z##rsL! «¿DDWÆ¿WLA;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/pdf.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000034611471562005033124 0ustar achapmanachapmanGIF89aÄ猌çBBç­­ÞÖÖ眜çkkÞÎÎÞçççµµçJJç))çµ½ç9Bç11ï99çssçccïRRïBJçZZç½½ç{{ç„„ïZZçRZÿÞÞÞÿÿÿ!ù,c`'ndYf™¨n\ë¶™–š4ÉÅò¦í<Ïžº^åÊÔh¯Ô蕼n«ƒðTvˆ-ÅÃu€.[ Œr¢á`V¢%¨ ˆ$Ιžgq €q‡E*(!;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/gif.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000017511471562005033124 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿ„ÿÿÿ!ù,BXZÔþk‘@+%QMÁ{pÑÖqÕcžÎ ®,Û¨¯ÐÚ>ÔùŠw;Boø[½r¿™QØjªPÐF(0}¦–,F%;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/jpg.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000017511471562005033124 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿ„„ÿÿÿ!ù,BXZÔþk‘@+%QMÁ{pÑÖqÕcžÎ ®,Û ,¬œúÂꬻDžÏ8à Äá^5ãÏÖk9™¨h(0}¦–,Fm;././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/js.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000021311471562005033115 0ustar achapmanachapmanGIF89a¢„„ÆÆÆÿÿ„„„ÿÿÿ!ù,P8ºÜ4%Æ&Óeˆ²m´ÐT$H È¡—f#IÌ'j«W]“@:ש½2 ‰%„™8® DðØt¯A 0 lk͆mÏèôxÍž%;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/vsd.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000021011471562005033112 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿÿÿÿÿ!ù,MX Ü®°B+BÍû%Ù`"I ¨ rÖ¼D ’›iñÌV%.—@Š özD¸\‰'ŒQŠ#á˧êX9È$Z‘i¹ÝÌbJ&‹%©´:;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/zip.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000035311471562005033122 0ustar achapmanachapmanGIF89aÄÿçµÞÞÿ­ÿ½Jÿ­!ÿÿ÷kÆÿkŒÿÿÿŒÿÖŒÿ÷Ö”ÞÿÆk1RŒÖÿc”Þ”ÿÿÿÿÿÿÿ!ù,h %ŽSi6#%­Ôô,Kª" Ó˜üã « 5qLT‘¤#ŽÅ£D©È ¨YX6!ÙÖvêe Àᨪ 0cÁZi™€Nyø’Ï–rÁd4|)-x‚ƒ} ‡ƒ. ŒŠŒŽ“!;././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/html.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000115511471562005033123 0ustar achapmanachapmanGIF89aæMcœÎÎÎÿ½Îÿkkœ„¥Æ­Îÿs­Þ)s¥RR„s„µ½Îç)„Î¥Æç!œçï÷ÿJ­ïk½ïçï÷)ŒÆ9”ÞB­ÿµÎÿÞïÿ{„­1½÷µÖï9ŒÎ)”çBÎÿJ{­Bc„Îçÿ9c½Þÿ1œïœµÞ½Þ÷½Ö÷1BZ1Bk”Æÿc”µ)¥ïŒïÿ1­ï!{½ss¥s÷ÿ9œçsÖÿ­ÎïÖïÿ)”ï1”ïÆÖÖkŒ­9­÷1œÞsÖïÆç÷!ŒÎ÷ÿÿ1ŒÞ)µ÷ç÷ÿ1sµ9k”cc”RRŒÆçÿZZŒRŒ½)ZŒŒ­Össsÿÿÿÿÿÿ!ùM,Ê€M‚J„…„ ‚‰ƒLŒL Š‹L6„ 0’JHžHL¤‰HH+/L>KM)<, *L.µ¡ L-8AKÆ@=?" ÑKL IåæC 3DK1I(FôF2GÓð4B ôÁHKt0Ñp@D; ˜¸"ÄÁ%,Lâ#J0ˆ°‰“ŒP€ÄÈ9R¤&Í›4k%Z³§Ož;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/mdb.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000022211471562005033115 0ustar achapmanachapmanGIF89a¢„„„„„„ÆÆÆÿÿÿÿÿÿ!ù,Wh ܮЀB+D‰°;W‘V% "¡ ÀMJ Yp{V4Ky7YFòLNT/÷ªÄ’ÃÚM01Í¢¾ÒíJôx¹™Å,IV†%Z (»“gŒjNW%;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/doc.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000021411471562005033116 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿÿÿÿÿ!ù,QX Ü®°B+C‰±;‘V%PCúy^àAº‰gG0GÔàãÀmµæx1Î÷Šõx”S%Yª0ƒ«¬ô–Y”\Í®¤j‰AàtZŒQ¹Ý ;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/rdp.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000113611471562005033122 0ustar achapmanachapmanGIF89aæ\÷÷÷”””ÖÖÖ”çÿÞÞÞ„ÞÿÆÆÆœçÿœœ¥BJcZÎÿB½ÿÖÖÞ{Öÿ„„µ¥¥ÎŒŒÆÆÆÞ„„Œïï便¥µµµœœµœœ­””½ŒŒÎœœœµµÎ!­ÿccÎ{{¥­½ÎµµÖ9½ÿŒ¥Ö””­{½÷­Þ”Zµ÷{{έïÿ­÷ÿÎÎÞkk„{{{ŒÞÿ„„„„„œÖÖï½Öﭭέ­Þs”ÞBµÿ„„­cµïœÆ÷ZZc””ÆkÖÿc¥çZÆÿœœÆ””œsœÖÆÆÎŒœÞZ½÷ZZ¥µÖç­ÎÞss{„„ÎŒŒ¥sÖÿÞÞïJ½ÿR­÷­­Öµ÷ÿRÆÿcÎÿŒŒœk¥çcc¥­µÆÎÎέ­­çççcccÿÿÿÿÿÿ!ù\,»€\‚\-ƒˆˆXXYH‰ŠXZWYW:Z‚Œ/BVG%ŸY[F.*P)­Ž[²2 AZZ½YX RK <=ŸÈ@D> àQNŸ‚È#78! M '5ä‚WT6$CU ñ&ôˆÈAE‡"ñ¸P¢Ç O’dð™KD˜aGÂrJ`­ˆ°áG¿H µH˜ƒÅI”å,’ ;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/png.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000017511471562005033124 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿ€ÿÿÿ!ù,BXZÔþk‘@+%QMÁ{pÑÖqÕcžÎ ®,Û œ*ÈòüÎ8=«÷ç6l…nD,Øj®PÐF(0}¦–,F%;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/avi.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000037111471562005033122 0ustar achapmanachapmanGIF89aÄΜ111cccÎ1cœœœÎ÷÷÷œœcµµµÿÿÎcc1ÎÎcZZZBBBΜcœœ1ïÖÆÎœÎÎΜcœc1ccœ11œÿÎÿœ„„„ÆÆÆÿÿÿÿÿÿ!ù,v 'bdiŠ(‡mì–µ˜&Zt]ë*[—³H‹ð‚ÉhŽ^dP¡ âË•¼l”J€bÀµŒ¼+e¬ ¬X`+–Ya$Нôµ¢%<¤ñj†N(lx+y<  6D.TCŒ8y(&&SF’-˜_2#ž›*H£¤!;././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000000011473031634033115 5ustar achapmanachapman././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/htm.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000276711471562005033135 0ustar achapmanachapmanGIF89a ÷œç÷ÿï÷ÿJ­Þ)”ç)œç1JsÖïÿ­Îÿkkœ1sµRŒ½ss¥{„­cœÎcc”1œï÷÷÷½Þ÷c”µ¥Æçc„¥­Ö÷RRŒ½ÎÿZZŒBc„ZZ”1”ï!{½µÆÖJÖÿ{œ½œïÿµÞÿŒ­ÖµÎÿs­Þ”½ç­Îï9¥÷1¥÷ŒÖï)¥ç­½Î9”ÞJ{­BÆ÷cµÞR½ÿŒïÿ)­ïÎç÷­­ÿJ”έÖÿs„µ9­÷9µï)µï1R{)¥ï”¥ÎœµÞµÖïsÖÿïï÷9„ÆŒœµRÖ÷)ŒçBZ{)µ÷Æç÷)”Þ„¥Æœ­ÖµÖ÷Jk”!”çÖç÷)œï”½Ö1½÷!œçRkŒB­ÿ1µ÷kŒ­ZsŒ9s¥cÎÿ!ŒÎ!Js­÷ÿ”çÿ)ZŒ”Æÿs÷ÿ¥çÿ„ÆÞ{œ­)ŒÆ„çÿ½ÎçJ­ï)s¥BµÿZ­çÆÞ÷1µÿ1­ÿÞçïÖçÿÖÞï9µ÷)”ïÆçï)„Þ)­ÿ9ŒÎ”÷ÿ1ŒÞÆÖïÞ÷ÿ{Æç9œçsŒœ9½ÿcçÿ¥Þï!R{!ŒÞ”ÞïRR„ÆÖÞ9½÷ZÎÿµÖÿ{Æÿ)„Î9k”k½ï)ŒÞ1­÷çï÷ÎÞ÷BÎÿ1œÞ9œ÷ÆçÿÞïÿÎçÿ÷ÿÿ½Þÿsssÿÿÿÿÿÿ!ùœ, ÿ9 h£`… &N˜à£á’%=zÜH±¢@0›2jÌ¡cÇ oD±HãFLSbºá¥ÉŠ%6aš)s¦Í›+ÁpùR`Lœ@o.ÐâÆNžœJ@ú¦ƒ $t˜‰ƒªz*µ’^h @Bœ3h¨¥Á@ÓËâÊàgˆ!L48 oß mI H(†™0D$y¨ñN_$":øý¸¢/]ð€ȃ”#GrY€‰ˆ3xývKQ@Œ.)ð!â∌Û:D¯øÑá €ß¿W·"ö "ÊlQ¡‚rZô¶<øÖßôÂÃ*C†$ÿpN W"Q¯~áú@@Rp÷@Ëžß+88@ tK8‚{Ù²I¸DZ2ÞœC=4à€Ø)°‰ ê@T *ðÀˆU‘X8Ø(À!2ð@€I@aElÐG#|`À@®Øb .è Â[ ä’L*ùÁ%—iÀ, ´‰9HÁÃN,ò”`†yI%3„iÀ%8ÀÚX!ãƒ$æ Ô)D $0b¦Éš“´ñ P@èH Õ‘# 0€0FQð¦ŸI`eà€Âs °A<€"1ˆÑ&T¢êªhÀš*dÔ 8œðÀ¸>€‚Z”JKD°*«°ÆAp’œàljÀ„¡Ä™ «êÅ Ä aÁEy°€†k4ňÀD&ðÆ ï°–FÉ ÄÀ\ È;A¼+¯¼ôbÇÁkäÉWHðÄ"LPÁÁ‡pE-PÐ+T0ÂA6$o£œ‰Æõ¾ä€%pÌ@æªdRóÍ6ç¼1I 0°ÀÏ `å€`@tÑhP´…`W‘&PG-õÔTGÔÕXs;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/fla.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000166211471562005033126 0ustar achapmanachapmanGIF89a æBÖïJJJÞÿ)ÖÖÖZZZï÷÷kkkµµµÿ19c{!!!JŒÿBÆÆÎ)R÷÷便¥÷ï÷111œœœ¥{{{BB÷µ­­”ccÎ1Zï!sBRRsƵµ„ZZc!)„BBZ„B19{99­””Œcc{RRÖÎΔµœssJ!)œ„„ZÆ)„1)Ö1¥!­9BRœ1!çÞÞsÎï÷Œ{{{ïçïÿÿÿÿÿÿ!ùB, ÿ€B‚B==>‡‡‹Ž@ƒ“”‚>A˜™š›’••A?¤¥?£¦?Ÿ ƒ—£<³§¥£££ž¯°²µ¤<¨Ê·ê?ÚÌ?³…ú=@ñ¡AÔIÃç+ÈÀüüQ"'KV$NŒ q!Ä/L>ú"GPB lpØ`@‹V•p#¦a96Ôà@€ pp°Aå©–•Œºà`G€xhaÁjñCàò”ŽP  Á‚ L2èÂr.vdåªÇÿ P»á§Æ å0ÐLª€@%䰃ĩŒ 'QsÆÀæV4š.hð`.€õÌN2VàÉÇ^,ˆð`ðvŠa‡Ú K˜xàá(a ™P­t#Ü×6tˆ ãA€„w¤H ÊD&cïðÂøä§Q0¯DmTtDˆÀ"C͹;ˆ(€ñ.%pA4|(Z3ù`PЦyuµˆà@<ð@R ˆ Á)˜ô'HwÕ$` 00*ÀA=™L |åA LP° bn’ £‹A8(5$æXâxðpF0^A¡2¾+jÛ5P@†° AÓÑN €ÀÂx0 ú®0È˼P~WÞpBP@°AõQ²颜 9 @h`@˜°è Ô·Ú¯>­ÿ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/jpg.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000071711471562005033126 0ustar achapmanachapmanGIF89a ³A²AP\QíñïR§Î©©°77:ÒÕÕBcœ!!!ÆÆÆ„„„„„ÿÿÿÿÿÿÿ!ù, ÿðÉùœ½8gʧK`(ŽŠÓ4NÇ}gëºIÙ¦’fß–<×KïÿÀ C·sü\‹–ïôÚ*ÁFOš¬‡Š¬Ö2«ÔÞg”à.­a´Ïô*—Žát2͆™ƒxá«áÆù1{n*XZ…†{|Cƒ    Œˆ‰ )1 “mŠœ“¤ ¥ ” ªš°¿Á··¸¥•©™Â¿²±ÓŹ'‚Ͱ ‘!ä²ÐÆÉÝÍ–. 㼯À³Ø“Ì¼Ž Òü pàU±I‘Q²O€´0`@‚y·ô)\Hà„€| xöëÀ§]UÚÈÑÑD‹(~2€XXz@Ð1Á¸ $Fê§€›A5`u|g@À£P &nó( iŸÄ.øäTÀÍŽ0ZiêàÀéÍh¯ÐÆêØU]‰±+J ­RÓ¦]CX­ãÔ€i°bQLxïŸÃp9ZÌxq;././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/js.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000042211471562005033117 0ustar achapmanachapmanGIF89a ¢„„ÆÆÆ„„„ÿÿÿÿÿÿÿÿ!ù, ×h*ÜþPɹн8cA(Z¨1W‰h!œi€©²åËíÁäX‚PhÛ .GË Ô0‹À`J-, ¤ÌsÂ$3×U€‰ÙJºRê´ÀɹÚI ¿Ç„‹yR¯ÛCMzr/˜»°«§¿›q^NX¥Áɹ’Ê®È\¸¦ÑÓÔgnw4x¯ªäCËâ7çÕé)¶Þïðð„åôõå ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/vsd.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000042511471562005033122 0ustar achapmanachapmanGIF89a ¢„„„ÆÆÆÿÿÿÿÿÿÿ!ù, ÚXºÜþpI«¥±Â'^÷€I_ª¦“É p,Ïh{$é*t¯œnjœ"p*ñj³ ¨V™MS1zü(CŸ’`LÞʤH°(˜ÝdZª»‘qtÇj¥ß½)xSlt mJypˆk+‡‚=GxŒkŽ@Š’6@•–^U# TF™¦~>>†|Ÿ™Ž©Qj“ ; L²§”†µ(«¬t­¼ XFu ÂŤ¦`mÊ7Ñ8ŒuÏËÌ}#ÃXÎÈ…´ÐÌäÖÒèÓêæ¶¬îï¬Übdôõöô'ù ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/zip.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000056011471562005033122 0ustar achapmanachapmanGIF89a ÄÞ”c”ŒÖÿÿ÷ÖÿÆk”Þ1RÿÖŒÿ組„„ÞÞÿ½Jÿ­!ÿ­kŒÿkÆÿÿÿ÷ÿÿŒ„„ÆÆÆÿÿÿÿÿÿÿ!ù, íà%^Riž¨9®¬(Yp,Ï–TµøKﰔܸ•ŽG“L~ÁÑ({Á%³{&¥S[e»N™(KÇå¾áem© …âá8ƒÅJä@0”¹v€‚Z”JKD°*«°ÆAp’œàljÀ„¡Ä™ «êÅ Ä aÁEy°€†k4ňÀD&ðÆ ï°–FÉ ÄÀ\ È;A¼+¯¼ôbÇÁkäÉWHðÄ"LPÁÁ‡pE-PÐ+T0ÂA6$o£œ‰Æõ¾ä€%pÌ@æªdRóÍ6ç¼1I 0°ÀÏ `å€`@tÑhP´…`W‘&PG-õÔTGÔÕXs;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/mdb.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000042211471562005033117 0ustar achapmanachapmanGIF89a ¢„„„„„„ÆÆÆÿÿÿÿÿÿ!ù, ×hºþ0>F)(8ë]©àŘó1B®jË’Àà1nÍ®p!ŸFJj¾‘h§PmnÕ`Ét2Ä æeL5™‚vK0fl‚Wãä Ò­XêœåÍy¼‹æÑYÚúâ­ppz]xwI8†rƒ>l…€WWs‰J‘’:ha*ŽGm?:“„¢‡¨‚›k¬-q“°e”`¬¯on²< "y?¹!$¨·ªgÀzŠ£¿¼ÈPXÊÁ¢Ð»Á™M¤Æ¦¾º ÌÛfÝ ßàdâ ×é‘ç\íîï[ òóôõö ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/doc.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000040411471562005033117 0ustar achapmanachapmanGIF89a ¢„„„ÆÆÆÿÿÿÿÿÿÿ!ù, ÉXºþ0>F) 8ëMÀ¨àŘó1ƒ®jË’@à1nÍ®0!ŸEJj¾L`(Ãìª_&)$Št³›­¦–ج”ÐâÞ¬ºM@ˆuphA Ö¥½jÕEÅ ɾij4Z‰dIR8^uDmepp"}Jn‚’{t‡—vny›LgjF„J–˜€¡ƒzŸ ‰©ƒ¥‡d! J‰²~¯˜±O³µ»M¸—º½$¿Å«Ã¡¶Æb< ¼ÎÌÀÓUÐ 1ÂÛÈ(ZßàáX äåæçè ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/rdp.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000272511471562005033127 0ustar achapmanachapmanGIF89a ÷©ïïïççç÷÷÷ÆÆÆ­­­ŒŒŒsÖÿÎÎΜœœÖÖÖœœÆµµµ{Öÿ””””çÿ„„„„ÞÿcÎÿŒÞÿœœÎœïÿŒŒ¥„„µµµÎÎÎÞŒŒÎkÎÿZÆÿB½ÿccÆ{{œœœ½ŒŒ­””Æ””œœçÿ{{Î¥¥Î½½½ÖÖÞœœ­J½ÿRÆÿ­ïÿ9½ÿ½½ÞJÆÿ9µÿ¥¥¥kkµ½½ÎZÎÿss½kkÎZZk½½Ö¥ïÿ­÷ÿBJZ)µÿ„„ŒBJR¥¥½„„­ŒŒ”{{¥µ÷ÿççﭭΔ¥½¥¥Æ„„”sŒÎµµÖkks½÷ÿ)­ÿÆÆÖ­­½ŒŒµÎÿÿœœÞssŒZc„””Δ”½­­ÖŒŒ½­ÿ¥¥Ö1µÿss„­­Æss”„„½œœµœœ¥””¥””­„„Ækk„ÆÆÎR½ÿ”¥Î„„œcc”cc„„¥Î­ÞÆkk”¥­Þ¥ÆÖs­Ö19Jk”ÖsÆÿ”œµR­÷kkœ¥ÿ½ÎïZZZ„„΄”Æ”Æ÷ÆÆÞÆÿÿs­ç9BRµµÞJµÿc¥ç­­µZ­÷{{­RRµ½ï÷ŒŒÖ„”½k½÷{{{{{„!¥ÿcc­kk{œµçZ¥ïÎÎÖk¥ç„ÎïJRZJRcBBB¥Ö焌ÖsssJJJ„”ÎJ­ïœ½Ös½ïRœÞŒÎ掠ÆsÎÿÞÞÞcccÿÿÿÿÿÿ!ù©, ÿS (ðAƒ*\8Ðà˜8Ű¢ÂF4àE‹ d„˜€#>*DÈ Eêá´1ÀIT x|Áƒ 'Dˆ(¸"Ee*‘ 2u*`R*œ(D˜(Ó䯅 @XXÄǃÑ À8¥„ÀMSOÈ(¦B…:mà°YAa”× ÂF\ð ST ˆ¦(M‰ @ù#„®„C* ¨Éñ)*CŠX’0G!K–Éc„‘kÞ´œ€)PÀ±"GŽ¥@@¹¤Í¿OÀp"£ FPXNa„ xdúÛòe`|`e6rà%@ÿ`` Ò”§L­~zT0ÄÑÐ6„û Èk äFå©(_(E7¬1Côà ƒD0ƒ!wuŠ(dXàQüðÃg¨°A$j!‰¨`G F¥rÊ) <ñÄDâÁG‘‚ "n0à ¤è°¸Ð‹§ˆDcX „Ÿ™ÂŽ.LIä “ÔÐ"Aéq¡€lQ‚(Zhñ h²ð €lBƒ[ ÔZ€@?T1Lìàç ŒH¢H S¢Cœ©@§Xà…'x`…}¼ABˆ¤!Ç‹ ͹èÐÁ#tä1Á¥¤ §¢eJ –²ALÄ{Ô k wµú)~ H C`J Y , ! è) ðª¬&¦$ÑdàElñì)Ž4P@#œ$ÀµÆ6Ñ‚%”P¸EY„ä)ØÀ¾haÐ\Bd ªÐ)2pd¬)'`pCeÈ`ÁA\bðÁ>œÀpÃ_ ÀÇ]ôpñ‘d€àCÀ\¡€!‹<ò‘/Ú ³ ˜èpèËöÞ‹$H<÷,P@;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/png.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000072011471562005033120 0ustar achapmanachapmanGIF89a ³ÒÕÕBcœR§Î©©°A²Aíñï77:P\Q!!!ÆÆÆ„„„€ÿÿÿÿÿÿÿ!ù, ÿðÉùœ½8gʧK`(ŽŠÓ4NÇ}gëºIÙ¦’fß–<×KïÿÀ C·süZ½F2©ô m•㲩lþ†Š¬öy<1Uðuâú¬b/Õùj$ÌËsÜË~½KÁ¼Þdâþmw*XZ†‡mnC„    ‰Š )1 ‘ ”Ž}›”¥ ¦ • «±ÀÂø¸¹¦–ªšÃÀ³²Ôƺ'ƒÎ± ’!å³ÑÇÊŽÞΗ. ä½°Á´Ù”ͽ Ó v ,c”$-¢0„_i pôpí[ÈpÀ‰} D4 XP0¾²Ä±ã#ŠTà€±´ô€ÀcrBM”äOA·ƒ;kÄò@H¢PäöqVÒ ?‹a4êiœa¸ÚÔÁÁSœÒ`¥•åÑëºdW< ¥6š%§N½†¸Êç$ÓbɪD¸0_@ˆãr8ĸ1ã;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/avi.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000070611471562005033124 0ustar achapmanachapmanGIF89a Ä11c11œc1œcccΜÎÎÿ¥Î÷ÿÎ1ÆÞÆ¥¥¥ÎœcÎïÿœccJJJRRRÎÎcœœcÿÿ÷cœœÎÎÿÎcœcÿÿœccœÿÎÿœ„„„ÆÆÆÿÿÿÿÿÿ!ù, ÿ 'Žžfžhz’,«up,ÏÆµøKï°y“– pHÌèfš ˆÁP ¦tjܽ”?“!8ƒ !C&s¯›ML‡m3‰¸ b™sZ­®ÅÚo wyFiIi5‘’„„su ŒIŽ”\——† Ž&|¡0£p¦§˜‡ˆJJ­}±³¥¶¸¼ž½¾•¨ÃtÇÇ4²Ê†¸Œ{È2Ô¤ ©  0ÚÜ&¶`°[7?Ùåˆåq¨XECnÌX2 @6YHyä1V«u*]|ûhóbY#Y&t…RTÐ?Þ`ͺ’‡Óo1G lIÕcT“²jÝ* ‡×¯`ÊÅ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/ppt.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000037611471562005033127 0ustar achapmanachapmanGIF89a ¢„„„„„ÆÆÆÿÿÿÿÿÿÿ!ù, Ãhºþ0>F)(8ë]À¨àŘó1‘®jË’€à1nÍ®p!ŸFJj)pXÂ쪂ͥ äŒ3ß¡‡ÂÒ`Ë$[Mfò§ ¤Ô‚cM“^§ÛÖ|gÌÒÌTí~›¿_NX…egmF`kvrS8cŽˆ|‘m:…Dwqv“~ˆ—{v:qK‘™šŠp!¤?f­®#°"eFª«¥±²´½¿ ¶w¸ª‡¼Á¬µËÉÍÎ̹Ԛ< ]ÙÚÛ\ Þßàáâ ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/swf.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000132511471562005033122 0ustar achapmanachapmanGIF89a Õ2JJJk{ŒÞçç÷÷ïÎÖÞ1R½½½ï÷÷kkkZZZ­­­ÎÎÖ!BÎÎ΄”œ””œZs„111{ŒœµÆÎ¥µÆk„”½ÆÖJkŒœ¥­µ½Rk{Z„ïï÷{„ŒRs”¥­)Rœ­½Jc{cs{µ½Îk{”kŒ¥”œ¥Z{”Zk„ÞÞçÖÖÖŒŒŒï÷ï{{{ïçïÿÿÿÿÿÿ!ù2, ÿ@™ÅrDB™h&0¡tJuŮج6ÒˆR¿2DìE.¿Ææ`ÕW¯¯–ü\ŽÍ1¶×-³Æéd-htW++{`#hcg-hx†mnV/˜Œ/Žc“†ˆnb™ccs¦qP0¬­.` pt-œ´-D¹,0¯_bqvžvtœ/»½T¤§c""µÀǼ`“Ã++Ö1Ȱ¦-+ *!+‚ØÉS±bhz`ÂÃLíB íJ‹  Xà† ,¤ iÝ—XZ<P &¨PàÄ“T&½è`AÀò, | ]$ˆ/ð0F’"@CAÄ¥@BA@B‚‰À@ |à…Ðr€4‡[• …ØB¸Öv8iÞßàvã"IL9jïâÕíRòåëôîø÷óŠýa·oJ„ƒ*<ˆHßï84¸°"†!B$(‡Å9EÜ8Q£@ŽRª\ɲeJ}jbÊœI³‡Í›8sž;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/exe.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000025211471562005033120 0ustar achapmanachapmanGIF89a ¢ÆÆÆ„„„ÿÿÿÿÿÿÿÿ!ù, oXºÜþ0ÊI«½8ë ŸC~Î œ‚葪‰ªÛÌ€Š¦p5Fi 8ëM¨àŘó1®jË’à1nÍ®Bžg—|6’&Ãø*‚‹—LŽD„#ñÖiUuXß`Ëm*o͘F0ÎDåwy-›Í§šýÍÚáik­ýîGã{K*d~QxA`kWvXpa‚)„nFˆO.)…•~grB„:ˆ`¤š‡#¥¤§f;F?(®YQ¯¢°!†…··¹››¡p¿µ´¼¯¾P§»¶ÈgÄÌFΚÐʳ¡wÉBÝÃ×ÞÝÖÙåX± \êëìí ïðñòó ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/dll.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000040211471562005033115 0ustar achapmanachapmanGIF89a ¢„„ÆÆÆ„„„ÿÿÿÿÿÿÿÿ!ù, Çh*ÜþOÉ)E¹8k,ýÖ&fŒ÷UcZAw.êhµ&‹!}†7Iü@[/¨¡†£¢×SRxœAJ%a¤âêW9'ÐêtªM^ ÐNgLX›—ÒÀˆ™zÏÐö4Dæk¾Gu-\?v€Xs[z„‘ŠŒh‡?†lRŠ—a…žS” )…¤­«¨x*¬R‰©#³ˆ›†°p‡¿\ÀO=tºHʱÌÍÁÏ–ÎÒÆ`Õ¹xÛÜÝÞßÜg@ãäåæ5 ;././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/default.icon.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000026111471562005033120 0ustar achapmanachapmanGIF89a ¢ÆÆÆ„„„ÿÿÿÿÿÿ!ù, vHJÑþ®Iø8kýÖ&f÷-á8@w*©ºY­ ÊëUŸ1Î ÀàÍ'ØPÄâ–T‡ÍͳM'½êàŠÔf¸L/Ì—eó­’ÛÑ·z ËÕwsÞΞï½Zn}x…zlŠ‹ŒŽ‹hA’“”•& ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/bmp.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000130511471562005033120 0ustar achapmanachapmanGIF89a Õ1111÷÷÷)))ccc999ZZZ1c1çççïïï1œ11Î1µµµRRRœÎœsssBBBcœÎ¥¥¥1cœÎÎÎcœcJJJÖÖÖœœœccœœœÎÞÞÞcÎc11cÎïÿœÎÎÎÿΔ””ÆÞÆÎÎÿcœœ1ccÿÿ1œÎ¥Î÷!!!ÆÆÆ„„„ÿÿÿÿÿÿÿÿ!ù1, ÿÀ˜pƒÈd’ÈÂVШtÊ‚½^°&óyíz½«j7+TšÏFñ¸ìj»ßð8L½†¹»í«KwÏÍEwy{„/„‡.s,‹Œwz……mOS+Žƒ‘ƒ†pV_—Uœœšož`˜qªr_/ h°H­ ZŠŒ·¸­®sµ+ #,¾º»,NYF+ Â--  ³¼Î*0 *×--ì+Ÿ¼**õøú* îíÚ)8ðAZ0ò‰àW …"(p@A‹4¸p…V‘z0`‚É*X€QËœ@æ%D“^Hi.ÀÊâ ÄtR@Þ‹_:LˆSBJV\pƒG'4$HŠ"‚ôˆ°Â@Ê•®:apT"¡o@ ¬Øy€ ¯&0Ø À BŠøÐ@‚W,ôý»E[ 2œ ±B‚ òŽu| ™2‘„`àƒ(pd€ãÂ1¼"·^$lH ‹> 0íÒ<,`xÕ ²ÿ Ã¼Ì ç{í g dO¥{‘.Î)°°Ð³„Œ«ÞÀ}¬ÿîŀˀ;././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/32/swt.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000132411471562005033121 0ustar achapmanachapmanGIF89a Õ2JJJk{ŒÞçç÷÷ïÎÖÞ1R½½½ï÷÷kkkZZZ­­­ÎÎÖ!BÎÎ΄”œ””œZs„111{ŒœµÆÎ¥µÆk„”½ÆÖJkŒœ¥­µ½Rk{Z„ïï÷{„ŒRs”¥­)Rœ­½Jc{cs{µ½Îk{”kŒ¥”œ¥Z{”Zk„ÞÞçÖÖÖŒŒŒï÷ï{{{ïçïÿÿÿÿÿÿ!ù2, ÿ@™PÆb¹ŽG"±L8ØpJºbجviH«UDìE.¿Ææ`åS¯ã–ü\ŽÍ1ö×-»¾Ztd-htX++{`#hcg€€hx‡mnW/™/c”‡‰nbšcq’t-Q0­®.` Xdq--E»,0°aqvŸ’©/½¿T¥Á/""¶cÈ`”’++Ö1ÙU²+ *!+ƒÇ¾±X´À@=0áa§z!І¥Å Å8Pà† ,¤ ‘iY¹¨—ƒGT¨pâŒÉ)”^t° à@ñ

kì Ç»VO(“©L®Ÿ‘ÄZf¶¦P—YT\Åõ§V%–°2àša_Lj½N;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/dll.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000020411471562005033115 0ustar achapmanachapmanGIF89a¢„„ÿÿÆÆÆ„„„ÿÿÿÿÿÿ!ù,Ih³Üöp”I§ðÉJEÁG$Š©M@p‚ªLDàVqÄòZ² !öùåVIoð:ÎFbÁ¹ý¦ATꤥF¿à¨¬D.«;././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/default.icon.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000016111471562005033117 0ustar achapmanachapmanGIF89a¢ÆÆÆ„„„ÿÿÿÿÿÿ!ù,6HÜ®pI'QV †ÁF ¤Š`*!j­š«žî0³µ ·òžß1'ôÕ†€¤r ,9Ÿ¦;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/bmp.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000017611471562005033125 0ustar achapmanachapmanGIF89a¢„„„ÆÆÆÿÿÿÿÿÿÿ!ù,CXZÔþk‘@+%QMÁ{pÑÖqÕcžÎ ®,Û œ*Èð<¼sÞÁ!‹+‘ ;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/swt.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000060411471562005033121 0ustar achapmanachapmanGIF89aÕ'1RZZZŒœ¥kkkï÷÷ÎÖÞk{Œ{Œœ!RsÎÎÎŒ¥µµÆÎkŒ¥Jk„”œÖÖÖÞÞçcs{JZsœ­½!BÎÎÖ÷÷ïBc111Rk{½ÆÖRsï÷ïJJJ¥µÆÞççk„”ŒŒŒJc{{{{ïçïÿÿÿÿÿÿ!ù',¡ÀÓi4ŽŽIÈŽH¤´„I,›§‰…vHV¬Vº%u¤af ôr8J“|¤îÚCx]x6ˆDd!zL€%„{'" %B  $’¡ "œ…’ ³ª %  ª' »%rsL DEX  XLA;././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/mp3.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000037111471562005033122 0ustar achapmanachapmanGIF89aÄΜ111cccÎ1cœœœÎ÷÷÷œœcµµµÿÿÎcc1ÎÎcZZZBBBΜcœœ1ïÖÆÎœÎÎΜcœc1ccœ11œÿÎÿœ„„„ÆÆÆÿÿÿÿÿÿ!ù,v 'bdiŠ(‡mì–µ˜&Zt]ë*[—³H‹ð‚ÉhŽ^dP¡ âË•¼l”J€bÀµŒ¼+e¬ ¬X`+–Ya$Нôµ¢%<¤ñj†N(lx+y<  6D.TCŒ8y(&&SF’-˜_2#ž›*H£¤!;././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/icons/cs.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/images/0000755000175000017500000000020011471562005033111 0ustar achapmanachapmanGIF89a¢„„„„ÆÆÆÿÿÿÿÿÿ!ù,EXÜ®p‘IeQÖjIðÑÇuÄ`ÐX+%¨"®ä§ÜF·<Õ®˜f·ëi^ÈO("q¼¤ÒØt.SÒ¬ðÄí 3`H;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/js/0000755000175000017500000000000011473031634032264 5ustar achapmanachapman././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/js/common.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/js/comm0000755000175000017500000000365011471562005033150 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Common objects and functions shared by all pages that compose the * File Browser dialog window. */ // Automatically detect the correct document.domain (#1919). (function() { var d = document.domain ; while ( true ) { // Test if we can access a parent property. try { var test = window.top.opener.document.domain ; break ; } catch( e ) {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... d = d.replace( /.*?(?:\.|$)/, '' ) ; if ( d.length == 0 ) break ; // It was not able to detect the domain. try { document.domain = d ; } catch (e) { break ; } } })() ; function AddSelectOption( selectElement, optionText, optionValue ) { var oOption = document.createElement("OPTION") ; oOption.text = optionText ; oOption.value = optionValue ; selectElement.options.add(oOption) ; return oOption ; } var oConnector = window.parent.oConnector ; var oIcons = window.parent.oIcons ; function StringBuilder( value ) { this._Strings = new Array( value || '' ) ; } StringBuilder.prototype.Append = function( value ) { if ( value ) this._Strings.push( value ) ; } StringBuilder.prototype.ToString = function() { return this._Strings.join( '' ) ; } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/js/fckxml.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/js/fckx0000755000175000017500000000752511471562005033155 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKXml object that is used for XML data calls * and XML processing. * * This script is shared by almost all pages that compose the * File Browser frameset. */ var FCKXml = function() {} FCKXml.prototype.GetHttpRequest = function() { // Gecko / IE7 try { return new XMLHttpRequest(); } catch(e) {} // IE6 try { return new ActiveXObject( 'Msxml2.XMLHTTP' ) ; } catch(e) {} // IE5 try { return new ActiveXObject( 'Microsoft.XMLHTTP' ) ; } catch(e) {} return null ; } FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer ) { var oFCKXml = this ; var bAsync = ( typeof(asyncFunctionPointer) == 'function' ) ; var oXmlHttp = this.GetHttpRequest() ; oXmlHttp.open( "GET", urlToCall, bAsync ) ; if ( bAsync ) { oXmlHttp.onreadystatechange = function() { if ( oXmlHttp.readyState == 4 ) { var oXml ; try { // this is the same test for an FF2 bug as in fckxml_gecko.js // but we've moved the responseXML assignment into the try{} // so we don't even have to check the return status codes. var test = oXmlHttp.responseXML.firstChild ; oXml = oXmlHttp.responseXML ; } catch ( e ) { try { oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; } catch ( e ) {} } if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' ) { alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' + 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' + 'Requested URL:\n' + urlToCall + '\n\n' + 'Response text:\n' + oXmlHttp.responseText ) ; return ; } oFCKXml.DOMDocument = oXml ; asyncFunctionPointer( oFCKXml ) ; } } } oXmlHttp.send( null ) ; if ( ! bAsync ) { if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ) this.DOMDocument = oXmlHttp.responseXML ; else { alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ; } } } FCKXml.prototype.SelectNodes = function( xpath ) { if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE return this.DOMDocument.selectNodes( xpath ) ; else // Gecko { var aNodeArray = new Array(); var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; if ( xPathResult ) { var oNode = xPathResult.iterateNext() ; while( oNode ) { aNodeArray[aNodeArray.length] = oNode ; oNode = xPathResult.iterateNext(); } } return aNodeArray ; } } FCKXml.prototype.SelectSingleNode = function( xpath ) { if ( navigator.userAgent.indexOf('MSIE') >= 0 ) // IE return this.DOMDocument.selectSingleNode( xpath ) ; else // Gecko { var xPathResult = this.DOMDocument.evaluate( xpath, this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); if ( xPathResult && xPathResult.singleNodeValue ) return xPathResult.singleNodeValue ; else return null ; } } ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/browser.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/browser0000755000175000017500000001374111471562005033266 0ustar achapmanachapman FCKeditor - Resources Browser ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmcreatefolder.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmcrea0000755000175000017500000000575211471562005033225 0ustar achapmanachapman Create Folder
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmfolders.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmfold0000755000175000017500000001301011471562005033221 0ustar achapmanachapman Folders
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/browser.csszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/browser0000755000175000017500000000302211471562005033255 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * CSS styles used by all pages that compose the File Browser. */ body { background-color: #f1f1e3; margin-top:0; margin-bottom:0; } form { margin: 0; padding: 0; } .Frame { background-color: #f1f1e3; border: thin inset #f1f1e3; } body.FileArea { background-color: #ffffff; margin: 10px; } body, td, input, select { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } .ActualFolder { font-weight: bold; font-size: 14px; } .PopupButtons { border-top: #d5d59d 1px solid; background-color: #e3e3c7; padding: 7px 10px 7px 10px; } .Button, button { color: #3b3b1f; border: #737357 1px solid; background-color: #c7c78f; } .FolderListCurrentFolder img { background-image: url(images/FolderOpened.gif); } .FolderListFolder img { background-image: url(images/Folder.gif); } .fullHeight { height: 100%; } ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmresourcetype.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/browser/default/frmreso0000755000175000017500000000355311471562005033260 0ustar achapmanachapman Available types
Resource Type
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/0000755000175000017500000000000011473031634030716 5ustar achapmanachapman././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/uploadtest.htmlzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/uploadtest.h0000755000175000017500000001271411471562006033263 0ustar achapmanachapman FCKeditor - Uploaders Tests
Select the "File Uploader" to use:
Resource Type
Current Folder:
       Custom Uploader URL:

Upload a new file:

       Uploaded File URL:

Post URL:  
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/0000755000175000017500000000000011473031634032037 5ustar achapmanachapman././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/upload.lassozope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/upload0000755000175000017500000001401711471562005033253 0ustar achapmanachapman[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the "File Uploader" for Lasso. */ /*..................................................................... Include global configuration. See config.lasso for details. */ include('config.lasso'); /*..................................................................... Convert query string parameters to variables and initialize output. */ var( 'Type' = (Encode_HTML: action_param('Type')), 'CurrentFolder' = "/", 'ServerPath' = action_param('ServerPath'), 'NewFile' = null, 'NewFileName' = string, 'OrigFilePath' = string, 'NewFilePath' = string, 'errorNumber' = 0, 'customMsg' = '' ); $Type == '' ? $Type = 'File'; /*..................................................................... Calculate the path to the current folder. */ $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); var('currentFolderURL' = $ServerPath + $config->find('Subdirectories')->find(action_param('Type')) + $CurrentFolder ); $currentFolderURL = string_replace($currentFolderURL, -find='//', -replace='/'); /*..................................................................... Custom tag sets the HTML response. */ define_tag( 'sendresults', -namespace='fck_', -priority='replace', -required='errorNumber', -type='integer', -optional='fileUrl', -type='string', -optional='fileName', -type='string', -optional='customMsg', -type='string', -description='Sets the HTML response for the FCKEditor Quick Upload feature.' ); $__html_reply__ = ' '; /define_tag; if($CurrentFolder->(Find: '..') || (String_FindRegExp: $CurrentFolder, -Find='(/\\.)|(//)|[\\\\:\\*\\?\\""\\<\\>\\|]|\\000|[\u007F]|[\u0001-\u001F]')); $errorNumber = 102; /if; if($config->find('Enabled')); /*................................................................. Process an uploaded file. */ inline($connection); /*............................................................. Was a file actually uploaded? */ if($errorNumber != '102'); file_uploads->size ? $NewFile = file_uploads->get(1) | $errorNumber = 202; /if; if($errorNumber == 0); /*......................................................... Split the file's extension from the filename in order to follow the API's naming convention for duplicate files. (Test.txt, Test(1).txt, Test(2).txt, etc.) */ $NewFileName = $NewFile->find('OrigName'); $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\.(?![^.]*$)', -replace='_'); $OrigFilePath = $currentFolderURL + $NewFileName; $NewFilePath = $OrigFilePath; local('fileExtension') = '.' + $NewFile->find('OrigExtension'); local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; /*......................................................... Make sure the file extension is allowed. */ local('allowedExt') = $config->find('AllowedExtensions')->find($Type); local('deniedExt') = $config->find('DeniedExtensions')->find($Type); if($allowedExt->Size > 0 && $allowedExt !>> $NewFile->find('OrigExtension')); $errorNumber = 202; else($deniedExt->Size > 0 && $deniedExt >> $NewFile->find('OrigExtension')); $errorNumber = 202; else; /*..................................................... Rename the target path until it is unique. */ while(file_exists($NewFilePath)); $NewFileName = #shortFileName + '(' + loop_count + ')' + #fileExtension; $NewFilePath = $currentFolderURL + $NewFileName; /while; /*..................................................... Copy the uploaded file to its final location. */ file_copy($NewFile->find('path'), $NewFilePath); /*..................................................... Set the error code for the response. */ select(file_currenterror( -errorcode)); case(0); $OrigFilePath != $NewFilePath ? $errorNumber = 201; case; $errorNumber = 202; /select; /if; /if; if ($errorNumber != 0 && $errorNumber != 201); $NewFilePath = ""; /if; /inline; else; $errorNumber = 1; $customMsg = 'This file uploader is disabled. Please check the "editor/filemanager/upload/lasso/config.lasso" file.'; /if; fck_sendresults( -errorNumber=$errorNumber, -fileUrl=$NewFilePath, -customMsg=$customMsg ); ] ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/config.lassozope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/config0000755000175000017500000000446711471562005033244 0ustar achapmanachapman[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration file for the File Manager Connector for Lasso. */ /*..................................................................... The connector uses the file tags, which require authentication. Enter a valid username and password from Lasso admin for a group with file tags permissions for uploads and the path you define in UserFilesPath below. */ var('connection') = array( -username='xxxxxxxx', -password='xxxxxxxx' ); /*..................................................................... Set the base path for files that users can upload and browse (relative to server root). Set which file extensions are allowed and/or denied for each file type. */ var('config') = map( 'Enabled' = false, 'UserFilesPath' = '/userfiles/', 'Subdirectories' = map( 'File' = 'File/', 'Image' = 'Image/', 'Flash' = 'Flash/', 'Media' = 'Media/' ), 'AllowedExtensions' = map( 'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'), 'Image' = array('bmp','gif','jpeg','jpg','png'), 'Flash' = array('swf','flv'), 'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv') ), 'DeniedExtensions' = map( 'File' = array(), 'Image' = array(), 'Flash' = array(), 'Media' = array() ) ); ] ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/connector.lassozope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/lasso/connec0000755000175000017500000002657211471562005033245 0ustar achapmanachapman[//lasso /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the File Manager Connector for Lasso. */ /*..................................................................... Include global configuration. See config.lasso for details. */ include('config.lasso'); /*..................................................................... Translate current date/time to GMT for custom header. */ var('headerDate') = date_localtogmt(date)->format('%a, %d %b %Y %T GMT'); /*..................................................................... Convert query string parameters to variables and initialize output. */ var( 'Command' = (Encode_HTML: action_param('Command')), 'Type' = (Encode_HTML: action_param('Type')), 'CurrentFolder' = action_param('CurrentFolder'), 'ServerPath' = action_param('ServerPath'), 'NewFolderName' = action_param('NewFolderName'), 'NewFile' = null, 'NewFileName' = string, 'OrigFilePath' = string, 'NewFilePath' = string, 'commandData' = string, 'folders' = '\t\n', 'files' = '\t\n', 'errorNumber' = integer, 'responseType' = 'xml', 'uploadResult' = '0' ); /*..................................................................... Custom tag sets the HTML response. */ define_tag( 'htmlreply', -namespace='fck_', -priority='replace', -required='uploadResult', -optional='NewFilePath', -type='string', -description='Sets the HTML response for the FCKEditor File Upload feature.' ); $__html_reply__ = '\ '; else; $__html_reply__ = $__html_reply__ + '\ window.parent.OnUploadCompleted(' + $uploadResult + ',"",""); '; /if; /define_tag; /*..................................................................... Calculate the path to the current folder. */ $ServerPath == '' ? $ServerPath = $config->find('UserFilesPath'); var('currentFolderURL' = $ServerPath + $config->find('Subdirectories')->find(action_param('Type')) + $CurrentFolder ); $currentFolderURL = string_replace($currentFolderURL, -find='//', -replace='/'); if (!$config->find('Subdirectories')->find(action_param('Type'))); if($Command == 'FileUpload'); $responseType = 'html'; $uploadResult = '1'; fck_htmlreply( -uploadResult=$uploadResult ); else; $errorNumber = 1; $commandData += '\n'; /if; else if($CurrentFolder->(Find: '..') || (String_FindRegExp: $CurrentFolder, -Find='(/\\.)|(//)|[\\\\:\\*\\?\\""\\<\\>\\|]|\\000|[\u007F]|[\u0001-\u001F]')); if($Command == 'FileUpload'); $responseType = 'html'; $uploadResult = '102'; fck_htmlreply( -uploadResult=$uploadResult ); else; $errorNumber = 102; $commandData += '\n'; /if; else; /*..................................................................... Build the appropriate response per the 'Command' parameter. Wrap the entire process in an inline for file tag permissions. */ if($config->find('Enabled')); inline($connection); select($Command); /*............................................................. List all subdirectories in the 'Current Folder' directory. */ case('GetFolders'); $commandData += '\t\n'; iterate(file_listdirectory($currentFolderURL), local('this')); #this->endswith('/') ? $commandData += '\t\t\n'; /iterate; $commandData += '\t\n'; /*............................................................. List both files and folders in the 'Current Folder' directory. Include the file sizes in kilobytes. */ case('GetFoldersAndFiles'); iterate(file_listdirectory($currentFolderURL), local('this')); if(#this->endswith('/')); $folders += '\t\t\n'; else; local('size') = file_getsize($currentFolderURL + #this); if($size>0); $size = $size/1024; if ($size==0); $size = 1; /if; /if; $files += '\t\t\n'; /if; /iterate; $folders += '\t\n'; $files += '\t\n'; $commandData += $folders + $files; /*............................................................. Create a directory 'NewFolderName' within the 'Current Folder.' */ case('CreateFolder'); $NewFolderName = (String_ReplaceRegExp: $NewFolderName, -find='\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); var('newFolder' = $currentFolderURL + $NewFolderName + '/'); file_create($newFolder); /*......................................................... Map Lasso's file error codes to FCKEditor's error codes. */ select(file_currenterror( -errorcode)); case(0); $errorNumber = 0; case( -9983); $errorNumber = 101; case( -9976); $errorNumber = 102; case( -9977); $errorNumber = 102; case( -9961); $errorNumber = 103; case; $errorNumber = 110; /select; $commandData += '\n'; /*............................................................. Process an uploaded file. */ case('FileUpload'); /*......................................................... This is the only command that returns an HTML response. */ $responseType = 'html'; /*......................................................... Was a file actually uploaded? */ if(file_uploads->size); $NewFile = file_uploads->get(1); else; $uploadResult = '202'; /if; if($uploadResult == '0'); /*..................................................... Split the file's extension from the filename in order to follow the API's naming convention for duplicate files. (Test.txt, Test(1).txt, Test(2).txt, etc.) */ $NewFileName = $NewFile->find('OrigName'); $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); $NewFileName = (String_ReplaceRegExp: $NewFileName, -find='\\.(?![^.]*$)', -replace='_'); $OrigFilePath = $currentFolderURL + $NewFileName; $NewFilePath = $OrigFilePath; local('fileExtension') = '.' + $NewFile->find('OrigExtension'); #fileExtension = (String_ReplaceRegExp: #fileExtension, -find='\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|\\000|[\u007F]|[\u0001-\u001F]', -replace='_'); local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&; /*..................................................... Make sure the file extension is allowed. */ local('allowedExt') = $config->find('AllowedExtensions')->find($Type); local('deniedExt') = $config->find('DeniedExtensions')->find($Type); if($allowedExt->Size > 0 && $allowedExt !>> $NewFile->find('OrigExtension')); $uploadResult = '202'; else($deniedExt->Size > 0 && $deniedExt >> $NewFile->find('OrigExtension')); $uploadResult = '202'; else; /*................................................. Rename the target path until it is unique. */ while(file_exists($NewFilePath)); $NewFilePath = $currentFolderURL + #shortFileName + '(' + loop_count + ')' + #fileExtension; /while; /*................................................. Copy the uploaded file to its final location. */ file_copy($NewFile->find('path'), $NewFilePath); /*................................................. Set the error code for the response. Note whether the file had to be renamed. */ select(file_currenterror( -errorcode)); case(0); $OrigFilePath != $NewFilePath ? $uploadResult = 201; case; $uploadResult = file_currenterror( -errorcode); /select; /if; /if; fck_htmlreply( -uploadResult=$uploadResult, -NewFilePath=$NewFilePath ); case; $errorNumber = 1; $commandData += '\n'; /select; /inline; else; $errorNumber = 1; $commandData += '\n'; /if; /if; /*..................................................................... Send a custom header for xml responses. */ if($responseType == 'xml'); header; ] HTTP/1.0 200 OK Date: [$headerDate] Server: Lasso Professional [lasso_version( -lassoversion)] Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: [$headerDate] Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Content-Type: text/xml; charset=utf-8 [//lasso /header; /* Set the content type encoding for Lasso. */ content_type('text/xml; charset=utf-8'); /* Wrap the response as XML and output. */ $__html_reply__ = '\ '; if($errorNumber != '102'); $__html_reply__ += ''; else; $__html_reply__ += ''; /if; if($errorNumber != '102'); $__html_reply__ += ''; /if; $__html_reply__ += $commandData + ' '; /if; ] zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/0000755000175000017500000000000011473031634031346 5ustar achapmanachapman././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckconnector.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckconnec0000755000175000017500000000504411471562006033230 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Base Connector for Python (CGI and WSGI). See config.py for configuration settings """ import cgi, os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins import config as Config class FCKeditorConnectorBase( object ): "The base connector class. Subclass it to extend functionality (see Zope example)" def __init__(self, environ=None): "Constructor: Here you should parse request fields, initialize variables, etc." self.request = FCKeditorRequest(environ) # Parse request self.headers = [] # Clean Headers if environ: self.environ = environ else: self.environ = os.environ # local functions def setHeader(self, key, value): self.headers.append ((key, value)) return class FCKeditorRequest(object): "A wrapper around the request object" def __init__(self, environ): if environ: # WSGI self.request = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ, keep_blank_values=1) self.environ = environ else: # plain old cgi self.environ = os.environ self.request = cgi.FieldStorage() if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ: if self.environ['REQUEST_METHOD'].upper()=='POST': # we are in a POST, but GET query_string exists # cgi parses by default POST data, so parse GET QUERY_STRING too self.get_request = cgi.FieldStorage(fp=None, environ={ 'REQUEST_METHOD':'GET', 'QUERY_STRING':self.environ['QUERY_STRING'], }, ) else: self.get_request={} def has_key(self, key): return self.request.has_key(key) or self.get_request.has_key(key) def get(self, key, default=None): if key in self.request.keys(): field = self.request[key] elif key in self.get_request.keys(): field = self.get_request[key] else: return default if hasattr(field,"filename") and field.filename: #file upload, do not convert return value return field else: return field.value ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/htaccess.txtzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/htaccess.0000755000175000017500000000125411471562006033151 0ustar achapmanachapman# replace the name of this file to .htaccess (if using apache), # and set the proper options and paths according your enviroment Allow from all # If using mod_python uncomment this: PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path" # Recomended: WSGI application running with mod_python and modpython_gateway SetHandler python-program PythonHandler modpython_gateway::handler PythonOption wsgi.application wsgi::App # Emulated CGI with mod_python and cgihandler #AddHandler mod_python .py #PythonHandler mod_python.cgihandler # Plain old CGI #Options +ExecCGI #AddHandler cgi-script py zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/zope.py0000755000175000017500000001257111471562006032706 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python and Zope. This code was not tested at all. It just was ported from pre 2.5 release, so for further reference see \editor\filemanager\browser\default\connectors\py\connector.py in previous releases. """ from fckutil import * from connector import * import config as Config class FCKeditorConnectorZope(FCKeditorConnector): """ Zope versiof FCKeditorConnector """ # Allow access (Zope) __allow_access_to_unprotected_subobjects__ = 1 def __init__(self, context=None): """ Constructor """ FCKeditorConnector.__init__(self, environ=None) # call superclass constructor # Instance Attributes self.context = context self.request = FCKeditorRequest(context) def getZopeRootContext(self): if self.zopeRootContext is None: self.zopeRootContext = self.context.getPhysicalRoot() return self.zopeRootContext def getZopeUploadContext(self): if self.zopeUploadContext is None: folderNames = self.userFilesFolder.split("/") c = self.getZopeRootContext() for folderName in folderNames: if (folderName <> ""): c = c[folderName] self.zopeUploadContext = c return self.zopeUploadContext def setHeader(self, key, value): self.context.REQUEST.RESPONSE.setHeader(key, value) def getFolders(self, resourceType, currentFolder): # Open the folders node s = "" s += """""" zopeFolder = self.findZopeFolder(resourceType, currentFolder) for (name, o) in zopeFolder.objectItems(["Folder"]): s += """""" % ( convertToXmlAttribute(name) ) # Close the folders node s += """""" return s def getZopeFoldersAndFiles(self, resourceType, currentFolder): folders = self.getZopeFolders(resourceType, currentFolder) files = self.getZopeFiles(resourceType, currentFolder) s = folders + files return s def getZopeFiles(self, resourceType, currentFolder): # Open the files node s = "" s += """""" zopeFolder = self.findZopeFolder(resourceType, currentFolder) for (name, o) in zopeFolder.objectItems(["File","Image"]): s += """""" % ( convertToXmlAttribute(name), ((o.get_size() / 1024) + 1) ) # Close the files node s += """""" return s def findZopeFolder(self, resourceType, folderName): # returns the context of the resource / folder zopeFolder = self.getZopeUploadContext() folderName = self.removeFromStart(folderName, "/") folderName = self.removeFromEnd(folderName, "/") if (resourceType <> ""): try: zopeFolder = zopeFolder[resourceType] except: zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=resourceType, title=resourceType) zopeFolder = zopeFolder[resourceType] if (folderName <> ""): folderNames = folderName.split("/") for folderName in folderNames: zopeFolder = zopeFolder[folderName] return zopeFolder def createFolder(self, resourceType, currentFolder): # Find out where we are zopeFolder = self.findZopeFolder(resourceType, currentFolder) errorNo = 0 errorMsg = "" if self.request.has_key("NewFolderName"): newFolder = self.request.get("NewFolderName", None) zopeFolder.manage_addProduct["OFSP"].manage_addFolder(id=newFolder, title=newFolder) else: errorNo = 102 return self.sendErrorNode ( errorNo, errorMsg ) def uploadFile(self, resourceType, currentFolder, count=None): zopeFolder = self.findZopeFolder(resourceType, currentFolder) file = self.request.get("NewFile", None) fileName = self.getFileName(file.filename) fileNameOnly = self.removeExtension(fileName) fileExtension = self.getExtension(fileName).lower() if (count): nid = "%s.%s.%s" % (fileNameOnly, count, fileExtension) else: nid = fileName title = nid try: zopeFolder.manage_addProduct['OFSP'].manage_addFile( id=nid, title=title, file=file.read() ) except: if (count): count += 1 else: count = 1 return self.zopeFileUpload(resourceType, currentFolder, count) return self.sendUploadResults( 0 ) class FCKeditorRequest(object): "A wrapper around the request object" def __init__(self, context=None): r = context.REQUEST self.request = r def has_key(self, key): return self.request.has_key(key) def get(self, key, default=None): return self.request.get(key, default) """ Running from zope, you will need to modify this connector. If you have uploaded the FCKeditor into Zope (like me), you need to move this connector out of Zope, and replace the "connector" with an alias as below. The key to it is to pass the Zope context in, as we then have a like to the Zope context. ## Script (Python) "connector.py" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=*args, **kws ##title=ALIAS ## import Products.zope as connector return connector.FCKeditorConnectorZope(context=context).doResponse() """ ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckoutput.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckoutput0000755000175000017500000000752311471562006033327 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). """ from time import gmtime, strftime import string def escape(text, replace=string.replace): """ Converts the special characters '<', '>', and '&'. RFC 1866 specifies that these characters be represented in HTML as < > and & respectively. In Python 1.5 we use the new string.replace() function for speed. """ text = replace(text, '&', '&') # must be done 1st text = replace(text, '<', '<') text = replace(text, '>', '>') text = replace(text, '"', '"') return text def convertToXmlAttribute(value): if (value is None): value = "" return escape(value) class BaseHttpMixin(object): def setHttpHeaders(self, content_type='text/xml'): "Purpose: to prepare the headers for the xml to return" # Prevent the browser from caching the result. # Date in the past self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT') # always modified self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime())) # HTTP/1.1 self.setHeader('Cache-Control','no-store, no-cache, must-revalidate') self.setHeader('Cache-Control','post-check=0, pre-check=0') # HTTP/1.0 self.setHeader('Pragma','no-cache') # Set the response format. self.setHeader( 'Content-Type', content_type + '; charset=utf-8' ) return class BaseXmlMixin(object): def createXmlHeader(self, command, resourceType, currentFolder, url): "Purpose: returns the xml header" self.setHttpHeaders() # Create the XML document header s = """""" # Create the main connector node s += """""" % ( command, resourceType ) # Add the current folder node s += """""" % ( convertToXmlAttribute(currentFolder), convertToXmlAttribute(url), ) return s def createXmlFooter(self): "Purpose: returns the xml footer" return """""" def sendError(self, number, text): "Purpose: in the event of an error, return an xml based error" self.setHttpHeaders() return ("""""" + """""" + self.sendErrorNode (number, text) + """""" ) def sendErrorNode(self, number, text): if number != 1: return """""" % (number) else: return """""" % (number, convertToXmlAttribute(text)) class BaseHtmlMixin(object): def sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ): self.setHttpHeaders("text/html") "This is the function that sends the results of the uploading process" "Minified version of the document.domain automatic fix script (#1919)." "The original script can be found at _dev/domain_fix_template.js" return """""" % { 'errorNumber': errorNo, 'fileUrl': fileUrl.replace ('"', '\\"'), 'fileName': fileName.replace ( '"', '\\"' ) , 'customMsg': customMsg.replace ( '"', '\\"' ), } ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckutil.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckutil.p0000755000175000017500000001041011471562006033167 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Utility functions for the File Manager Connector for Python """ import string, re import os import config as Config # Generic manipulation functions def removeExtension(fileName): index = fileName.rindex(".") newFileName = fileName[0:index] return newFileName def getExtension(fileName): index = fileName.rindex(".") + 1 fileExtension = fileName[index:] return fileExtension def removeFromStart(string, char): return string.lstrip(char) def removeFromEnd(string, char): return string.rstrip(char) # Path functions def combinePaths( basePath, folder ): return removeFromEnd( basePath, '/' ) + '/' + removeFromStart( folder, '/' ) def getFileName(filename): " Purpose: helper function to extrapolate the filename " for splitChar in ["/", "\\"]: array = filename.split(splitChar) if (len(array) > 1): filename = array[-1] return filename def sanitizeFolderName( newFolderName ): "Do a cleanup of the folder name to avoid possible problems" # Remove . \ / | : ? * " < > and control characters return re.sub( '\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[\x00-\x1f\x7f-\x9f]', '_', newFolderName ) def sanitizeFileName( newFileName ): "Do a cleanup of the file name to avoid possible problems" # Replace dots in the name with underscores (only one dot can be there... security issue). if ( Config.ForceSingleExtension ): # remove dots newFileName = re.sub ( '\\.(?![^.]*$)', '_', newFileName ) ; newFileName = newFileName.replace('\\','/') # convert windows to unix path newFileName = os.path.basename (newFileName) # strip directories # Remove \ / | : ? * return re.sub ( '\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[\x00-\x1f\x7f-\x9f]/', '_', newFileName ) def getCurrentFolder(currentFolder): if not currentFolder: currentFolder = '/' # Check the current folder syntax (must begin and end with a slash). if (currentFolder[-1] <> "/"): currentFolder += "/" if (currentFolder[0] <> "/"): currentFolder = "/" + currentFolder # Ensure the folder path has no double-slashes while '//' in currentFolder: currentFolder = currentFolder.replace('//','/') # Check for invalid folder paths (..) if '..' in currentFolder or '\\' in currentFolder: return None # Check for invalid folder paths (..) if re.search( '(/\\.)|(//)|([\\\\:\\*\\?\\""\\<\\>\\|]|[\x00-\x1F]|[\x7f-\x9f])', currentFolder ): return None return currentFolder def mapServerPath( environ, url): " Emulate the asp Server.mapPath function. Given an url path return the physical directory that it corresponds to " # This isn't correct but for the moment there's no other solution # If this script is under a virtual directory or symlink it will detect the problem and stop return combinePaths( getRootPath(environ), url ) def mapServerFolder(resourceTypePath, folderPath): return combinePaths ( resourceTypePath , folderPath ) def getRootPath(environ): "Purpose: returns the root path on the server" # WARNING: this may not be thread safe, and doesn't work w/ VirtualServer/mod_python # Use Config.UserFilesAbsolutePath instead if environ.has_key('DOCUMENT_ROOT'): return environ['DOCUMENT_ROOT'] else: realPath = os.path.realpath( './' ) selfPath = environ['SCRIPT_FILENAME'] selfPath = selfPath [ : selfPath.rfind( '/' ) ] selfPath = selfPath.replace( '/', os.path.sep) position = realPath.find(selfPath) # This can check only that this script isn't run from a virtual dir # But it avoids the problems that arise if it isn't checked raise realPath if ( position < 0 or position <> len(realPath) - len(selfPath) or realPath[ : position ]==''): raise Exception('Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/py/config.py".') return realPath[ : position ] ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/connector.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/connector0000755000175000017500000001002611471562006033265 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). See config.py for configuration settings """ import os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorConnector( FCKeditorConnectorBase, GetFoldersCommandMixin, GetFoldersAndFilesCommandMixin, CreateFolderCommandMixin, UploadFileCommandMixin, BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ): "The Standard connector class." def doResponse(self): "Main function. Process the request, set headers and return a string as response." s = "" # Check if this connector is disabled if not(Config.Enabled): return self.sendError(1, "This connector is disabled. Please check the connector configurations in \"editor/filemanager/connectors/py/config.py\" and try again.") # Make sure we have valid inputs for key in ("Command","Type","CurrentFolder"): if not self.request.has_key (key): return # Get command, resource type and current folder command = self.request.get("Command") resourceType = self.request.get("Type") currentFolder = getCurrentFolder(self.request.get("CurrentFolder")) # Check for invalid paths if currentFolder is None: if (command == "FileUpload"): return self.sendUploadResults( errorNo = 102, customMsg = "" ) else: return self.sendError(102, "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendError( 1, 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendError( 1, 'Invalid type specified' ) # Setup paths if command == "QuickUpload": self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] else: self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType] self.webUserFilesFolder = Config.FileTypesPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here if (command == "FileUpload"): return self.uploadFile(resourceType, currentFolder) # Create Url url = combinePaths( self.webUserFilesFolder, currentFolder ) # Begin XML s += self.createXmlHeader(command, resourceType, currentFolder, url) # Execute the command selector = {"GetFolders": self.getFolders, "GetFoldersAndFiles": self.getFoldersAndFiles, "CreateFolder": self.createFolder, } s += selector[command](resourceType, currentFolder) s += self.createXmlFooter() return s # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorConnector() data = conn.doResponse() for header in conn.headers: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception() ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/config.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/config.py0000755000175000017500000001544511471562006033201 0ustar achapmanachapman#!/usr/bin/env python """ * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration file for the File Manager Connector for Python """ # INSTALLATION NOTE: You must set up your server environment accordingly to run # python scripts. This connector requires Python 2.4 or greater. # # Supported operation modes: # * WSGI (recommended): You'll need apache + mod_python + modpython_gateway # or any web server capable of the WSGI python standard # * Plain Old CGI: Any server capable of running standard python scripts # (although mod_python is recommended for performance) # This was the previous connector version operation mode # # If you're using Apache web server, replace the htaccess.txt to to .htaccess, # and set the proper options and paths. # For WSGI and mod_python, you may need to download modpython_gateway from: # http://projects.amor.org/misc/svn/modpython_gateway.py and copy it in this # directory. # SECURITY: You must explicitly enable this "connector". (Set it to "True"). # WARNING: don't just set "ConfigIsEnabled = True", you must be sure that only # authenticated users can access this file or use some kind of session checking. Enabled = False # Path to user files relative to the document root. UserFilesPath = '/userfiles/' # Fill the following value it you prefer to specify the absolute path for the # user files directory. Useful if you are using a virtual directory, symbolic # link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. # Attention: The above 'UserFilesPath' must point to the same directory. # WARNING: GetRootPath may not work in virtual or mod_python configurations, and # may not be thread safe. Use this configuration parameter instead. UserFilesAbsolutePath = '' # Due to security issues with Apache modules, it is recommended to leave the # following setting enabled. ForceSingleExtension = True # What the user can do with this connector ConfigAllowedCommands = [ 'QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder' ] # Allowed Resource Types ConfigAllowedTypes = ['File', 'Image', 'Flash', 'Media'] # After file is uploaded, sometimes it is required to change its permissions # so that it was possible to access it at the later time. # If possible, it is recommended to set more restrictive permissions, like 0755. # Set to 0 to disable this feature. # Note: not needed on Windows-based servers. ChmodOnUpload = 0755 # See comments above. # Used when creating folders that does not exist. ChmodOnFolderCreate = 0755 # Do not touch this 3 lines, see "Configuration settings for each Resource Type" AllowedExtensions = {}; DeniedExtensions = {}; FileTypesPath = {}; FileTypesAbsolutePath = {}; QuickUploadPath = {}; QuickUploadAbsolutePath = {}; # Configuration settings for each Resource Type # # - AllowedExtensions: the possible extensions that can be allowed. # If it is empty then any file type can be uploaded. # - DeniedExtensions: The extensions that won't be allowed. # If it is empty then no restrictions are done here. # # For a file to be uploaded it has to fulfill both the AllowedExtensions # and DeniedExtensions (that's it: not being denied) conditions. # # - FileTypesPath: the virtual folder relative to the document root where # these resources will be located. # Attention: It must start and end with a slash: '/' # # - FileTypesAbsolutePath: the physical path to the above folder. It must be # an absolute path. # If it's an empty string then it will be autocalculated. # Useful if you are using a virtual directory, symbolic link or alias. # Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. # Attention: The above 'FileTypesPath' must point to the same directory. # Attention: It must end with a slash: '/' # # # - QuickUploadPath: the virtual folder relative to the document root where # these resources will be uploaded using the Upload tab in the resources # dialogs. # Attention: It must start and end with a slash: '/' # # - QuickUploadAbsolutePath: the physical path to the above folder. It must be # an absolute path. # If it's an empty string then it will be autocalculated. # Useful if you are using a virtual directory, symbolic link or alias. # Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. # Attention: The above 'QuickUploadPath' must point to the same directory. # Attention: It must end with a slash: '/' AllowedExtensions['File'] = ['7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'] DeniedExtensions['File'] = [] FileTypesPath['File'] = UserFilesPath + 'file/' FileTypesAbsolutePath['File'] = (not UserFilesAbsolutePath == '') and (UserFilesAbsolutePath + 'file/') or '' QuickUploadPath['File'] = FileTypesPath['File'] QuickUploadAbsolutePath['File'] = FileTypesAbsolutePath['File'] AllowedExtensions['Image'] = ['bmp','gif','jpeg','jpg','png'] DeniedExtensions['Image'] = [] FileTypesPath['Image'] = UserFilesPath + 'image/' FileTypesAbsolutePath['Image'] = (not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'image/' or '' QuickUploadPath['Image'] = FileTypesPath['Image'] QuickUploadAbsolutePath['Image']= FileTypesAbsolutePath['Image'] AllowedExtensions['Flash'] = ['swf','flv'] DeniedExtensions['Flash'] = [] FileTypesPath['Flash'] = UserFilesPath + 'flash/' FileTypesAbsolutePath['Flash'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'flash/' or '' QuickUploadPath['Flash'] = FileTypesPath['Flash'] QuickUploadAbsolutePath['Flash']= FileTypesAbsolutePath['Flash'] AllowedExtensions['Media'] = ['aiff','asf','avi','bmp','fla', 'flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv'] DeniedExtensions['Media'] = [] FileTypesPath['Media'] = UserFilesPath + 'media/' FileTypesAbsolutePath['Media'] = ( not UserFilesAbsolutePath == '') and UserFilesAbsolutePath + 'media/' or '' QuickUploadPath['Media'] = FileTypesPath['Media'] QuickUploadAbsolutePath['Media']= FileTypesAbsolutePath['Media'] ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/upload.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/upload.py0000755000175000017500000000565011471562006033215 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This is the "File Uploader" for Python """ import os from fckutil import * from fckcommands import * # default command's implementation from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorQuickUpload( FCKeditorConnectorBase, UploadFileCommandMixin, BaseHttpMixin, BaseHtmlMixin): def doResponse(self): "Main function. Process the request, set headers and return a string as response." # Check if this connector is disabled if not(Config.Enabled): return self.sendUploadResults(1, "This file uploader is disabled. Please check the \"editor/filemanager/connectors/py/config.py\"") command = 'QuickUpload' # The file type (from the QueryString, by default 'File'). resourceType = self.request.get('Type','File') currentFolder = "/" # Check for invalid paths if currentFolder is None: return self.sendUploadResults(102, '', '', "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendUploadResults( 1, '', '', 'Invalid type specified' ) # Setup paths self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFoldercreateServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here return self.uploadFile(resourceType, currentFolder) # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorQuickUpload() data = conn.doResponse() for header in conn.headers: if not header is None: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception() ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckcommands.pyzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/fckcomman0000755000175000017500000001427711471562006033245 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). """ import os try: # Windows needs stdio set for binary mode for file upload to work. import msvcrt msvcrt.setmode (0, os.O_BINARY) # stdin = 0 msvcrt.setmode (1, os.O_BINARY) # stdout = 1 except ImportError: pass from fckutil import * from fckoutput import * import config as Config class GetFoldersCommandMixin (object): def getFolders(self, resourceType, currentFolder): """ Purpose: command to recieve a list of folders """ # Map the virtual path to our local server serverPath = mapServerFolder(self.userFilesFolder,currentFolder) s = """""" # Open the folders node for someObject in os.listdir(serverPath): someObjectPath = mapServerFolder(serverPath, someObject) if os.path.isdir(someObjectPath): s += """""" % ( convertToXmlAttribute(someObject) ) s += """""" # Close the folders node return s class GetFoldersAndFilesCommandMixin (object): def getFoldersAndFiles(self, resourceType, currentFolder): """ Purpose: command to recieve a list of folders and files """ # Map the virtual path to our local server serverPath = mapServerFolder(self.userFilesFolder,currentFolder) # Open the folders / files node folders = """""" files = """""" for someObject in os.listdir(serverPath): someObjectPath = mapServerFolder(serverPath, someObject) if os.path.isdir(someObjectPath): folders += """""" % ( convertToXmlAttribute(someObject) ) elif os.path.isfile(someObjectPath): size = os.path.getsize(someObjectPath) if size > 0: size = round(size/1024) if size < 1: size = 1 files += """""" % ( convertToXmlAttribute(someObject), size ) # Close the folders / files node folders += """""" files += """""" return folders + files class CreateFolderCommandMixin (object): def createFolder(self, resourceType, currentFolder): """ Purpose: command to create a new folder """ errorNo = 0; errorMsg =''; if self.request.has_key("NewFolderName"): newFolder = self.request.get("NewFolderName", None) newFolder = sanitizeFolderName (newFolder) try: newFolderPath = mapServerFolder(self.userFilesFolder, combinePaths(currentFolder, newFolder)) self.createServerFolder(newFolderPath) except Exception, e: errorMsg = str(e).decode('iso-8859-1').encode('utf-8') # warning with encodigns!!! if hasattr(e,'errno'): if e.errno==17: #file already exists errorNo=0 elif e.errno==13: # permission denied errorNo = 103 elif e.errno==36 or e.errno==2 or e.errno==22: # filename too long / no such file / invalid name errorNo = 102 else: errorNo = 110 else: errorNo = 102 return self.sendErrorNode ( errorNo, errorMsg ) def createServerFolder(self, folderPath): "Purpose: physically creates a folder on the server" # No need to check if the parent exists, just create all hierachy try: permissions = Config.ChmodOnFolderCreate if not permissions: os.makedirs(folderPath) except AttributeError: #ChmodOnFolderCreate undefined permissions = 0755 if permissions: oldumask = os.umask(0) os.makedirs(folderPath,mode=0755) os.umask( oldumask ) class UploadFileCommandMixin (object): def uploadFile(self, resourceType, currentFolder): """ Purpose: command to upload files to server (same as FileUpload) """ errorNo = 0 if self.request.has_key("NewFile"): # newFile has all the contents we need newFile = self.request.get("NewFile", "") # Get the file name newFileName = newFile.filename newFileName = sanitizeFileName( newFileName ) newFileNameOnly = removeExtension(newFileName) newFileExtension = getExtension(newFileName).lower() allowedExtensions = Config.AllowedExtensions[resourceType] deniedExtensions = Config.DeniedExtensions[resourceType] if (allowedExtensions): # Check for allowed isAllowed = False if (newFileExtension in allowedExtensions): isAllowed = True elif (deniedExtensions): # Check for denied isAllowed = True if (newFileExtension in deniedExtensions): isAllowed = False else: # No extension limitations isAllowed = True if (isAllowed): # Upload to operating system # Map the virtual path to the local server path currentFolderPath = mapServerFolder(self.userFilesFolder, currentFolder) i = 0 while (True): newFilePath = os.path.join (currentFolderPath,newFileName) if os.path.exists(newFilePath): i += 1 newFileName = "%s(%d).%s" % ( newFileNameOnly, i, newFileExtension ) errorNo= 201 # file renamed else: # Read file contents and write to the desired path (similar to php's move_uploaded_file) fout = file(newFilePath, 'wb') while (True): chunk = newFile.file.read(100000) if not chunk: break fout.write (chunk) fout.close() if os.path.exists ( newFilePath ): doChmod = False try: doChmod = Config.ChmodOnUpload permissions = Config.ChmodOnUpload except AttributeError: #ChmodOnUpload undefined doChmod = True permissions = 0755 if ( doChmod ): oldumask = os.umask(0) os.chmod( newFilePath, permissions ) os.umask( oldumask ) newFileUrl = combinePaths(self.webUserFilesFolder, currentFolder) + newFileName return self.sendUploadResults( errorNo , newFileUrl, newFileName ) else: return self.sendUploadResults( errorNo = 202, customMsg = "" ) else: return self.sendUploadResults( errorNo = 202, customMsg = "No File" ) zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/py/wsgi.py0000755000175000017500000000304311471562006032674 0ustar achapmanachapman#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector/QuickUpload for Python (WSGI wrapper). See config.py for configuration settings """ from connector import FCKeditorConnector from upload import FCKeditorQuickUpload import cgitb from cStringIO import StringIO # Running from WSGI capable server (recomended) def App(environ, start_response): "WSGI entry point. Run the connector" if environ['SCRIPT_NAME'].endswith("connector.py"): conn = FCKeditorConnector(environ) elif environ['SCRIPT_NAME'].endswith("upload.py"): conn = FCKeditorQuickUpload(environ) else: start_response ("200 Ok", [('Content-Type','text/html')]) yield "Unknown page requested: " yield environ['SCRIPT_NAME'] return try: # run the connector data = conn.doResponse() # Start WSGI response: start_response ("200 Ok", conn.headers) # Send response text yield data except: start_response("500 Internal Server Error",[("Content-type","text/html")]) file = StringIO() cgitb.Hook(file = file).handle() yield file.getvalue() zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/0000755000175000017500000000000011473031634031505 5ustar achapmanachapman././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/config.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/config.p0000755000175000017500000001720611471562005033143 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/io.php0000755000175000017500000002177511471562005032643 0ustar achapmanachapman 0 ) return $Config['QuickUploadAbsolutePath'][$resourceType] ; // Map the "UserFiles" path to a local directory. return Server_MapPath( $Config['QuickUploadPath'][$resourceType] ) ; } else { if ( strlen( $Config['FileTypesAbsolutePath'][$resourceType] ) > 0 ) return $Config['FileTypesAbsolutePath'][$resourceType] ; // Map the "UserFiles" path to a local directory. return Server_MapPath( $Config['FileTypesPath'][$resourceType] ) ; } } function GetUrlFromPath( $resourceType, $folderPath, $sCommand ) { return CombinePaths( GetResourceTypePath( $resourceType, $sCommand ), $folderPath ) ; } function RemoveExtension( $fileName ) { return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ; } function ServerMapFolder( $resourceType, $folderPath, $sCommand ) { // Get the resource type directory. $sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ; // Ensure that the directory exists. $sErrorMsg = CreateServerFolder( $sResourceTypePath ) ; if ( $sErrorMsg != '' ) SendError( 1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})" ) ; // Return the resource type directory combined with the required path. return CombinePaths( $sResourceTypePath , $folderPath ) ; } function GetParentFolder( $folderPath ) { $sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ; return preg_replace( $sPattern, '', $folderPath ) ; } function CreateServerFolder( $folderPath, $lastFolder = null ) { global $Config ; $sParent = GetParentFolder( $folderPath ) ; // Ensure the folder path has no double-slashes, or mkdir may fail on certain platforms while ( strpos($folderPath, '//') !== false ) { $folderPath = str_replace( '//', '/', $folderPath ) ; } // Check if the parent exists, or create it. if ( !file_exists( $sParent ) ) { //prevents agains infinite loop when we can't create root folder if ( !is_null( $lastFolder ) && $lastFolder === $sParent) { return "Can't create $folderPath directory" ; } $sErrorMsg = CreateServerFolder( $sParent, $folderPath ) ; if ( $sErrorMsg != '' ) return $sErrorMsg ; } if ( !file_exists( $folderPath ) ) { // Turn off all error reporting. error_reporting( 0 ) ; $php_errormsg = '' ; // Enable error tracking to catch the error. ini_set( 'track_errors', '1' ) ; if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] ) { mkdir( $folderPath ) ; } else { $permissions = 0777 ; if ( isset( $Config['ChmodOnFolderCreate'] ) ) { $permissions = $Config['ChmodOnFolderCreate'] ; } // To create the folder with 0777 permissions, we need to set umask to zero. $oldumask = umask(0) ; mkdir( $folderPath, $permissions ) ; umask( $oldumask ) ; } $sErrorMsg = $php_errormsg ; // Restore the configurations. ini_restore( 'track_errors' ) ; ini_restore( 'error_reporting' ) ; return $sErrorMsg ; } else return '' ; } function GetRootPath() { if (!isset($_SERVER)) { global $_SERVER; } $sRealPath = realpath( './' ) ; // #2124 ensure that no slash is at the end $sRealPath = rtrim($sRealPath,"\\/"); $sSelfPath = $_SERVER['PHP_SELF'] ; $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; $sSelfPath = str_replace( '/', DIRECTORY_SEPARATOR, $sSelfPath ) ; $position = strpos( $sRealPath, $sSelfPath ) ; // This can check only that this script isn't run from a virtual dir // But it avoids the problems that arise if it isn't checked if ( $position === false || $position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) SendError( 1, 'Sorry, can\'t map "UserFilesPath" to a physical path. You must set the "UserFilesAbsolutePath" value in "editor/filemanager/connectors/php/config.php".' ) ; return substr( $sRealPath, 0, $position ) ; } // Emulate the asp Server.mapPath function. // given an url path return the physical directory that it corresponds to function Server_MapPath( $path ) { // This function is available only for Apache if ( function_exists( 'apache_lookup_uri' ) ) { $info = apache_lookup_uri( $path ) ; return $info->filename . $info->path_info ; } // This isn't correct but for the moment there's no other solution // If this script is under a virtual directory or symlink it will detect the problem and stop return GetRootPath() . $path ; } function IsAllowedExt( $sExtension, $resourceType ) { global $Config ; // Get the allowed and denied extensions arrays. $arAllowed = $Config['AllowedExtensions'][$resourceType] ; $arDenied = $Config['DeniedExtensions'][$resourceType] ; if ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) return false ; if ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) return false ; return true ; } function IsAllowedType( $resourceType ) { global $Config ; if ( !in_array( $resourceType, $Config['ConfigAllowedTypes'] ) ) return false ; return true ; } function IsAllowedCommand( $sCommand ) { global $Config ; if ( !in_array( $sCommand, $Config['ConfigAllowedCommands'] ) ) return false ; return true ; } function GetCurrentFolder() { if (!isset($_GET)) { global $_GET; } $sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? $_GET['CurrentFolder'] : '/' ; // Check the current folder syntax (must begin and start with a slash). if ( !preg_match( '|/$|', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ; // Ensure the folder path has no double-slashes while ( strpos ($sCurrentFolder, '//') !== false ) { $sCurrentFolder = str_replace ('//', '/', $sCurrentFolder) ; } // Check for invalid folder paths (..) if ( strpos( $sCurrentFolder, '..' ) || strpos( $sCurrentFolder, "\\" )) SendError( 102, '' ) ; if ( preg_match(",(/\.)|[[:cntrl:]]|(//)|(\\\\)|([\:\*\?\"\<\>\|]),", $sCurrentFolder)) SendError( 102, '' ) ; return $sCurrentFolder ; } // Do a cleanup of the folder name to avoid possible problems function SanitizeFolderName( $sNewFolderName ) { $sNewFolderName = stripslashes( $sNewFolderName ) ; // Remove . \ / | : ? * " < > $sNewFolderName = preg_replace( '/\\.|\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFolderName ) ; return $sNewFolderName ; } // Do a cleanup of the file name to avoid possible problems function SanitizeFileName( $sNewFileName ) { global $Config ; $sNewFileName = stripslashes( $sNewFileName ) ; // Replace dots in the name with underscores (only one dot can be there... security issue). if ( $Config['ForceSingleExtension'] ) $sNewFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sNewFileName ) ; // Remove \ / | : ? * " < > $sNewFileName = preg_replace( '/\\\\|\\/|\\||\\:|\\?|\\*|"|<|>|[[:cntrl:]]/', '_', $sNewFileName ) ; return $sNewFileName ; } // This is the function that sends the results of the uploading process. function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' ) { // Minified version of the document.domain automatic fix script (#1919). // The original script can be found at _dev/domain_fix_template.js echo << (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); EOF; if ($errorNumber && $errorNumber != 201) { $fileUrl = ""; $fileName = ""; } $rpl = array( '\\' => '\\\\', '"' => '\\"' ) ; echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ; echo '' ; exit ; } ?> ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/basexml.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/basexml.0000755000175000017500000000505411471562005033147 0ustar achapmanachapman' ; // Create the main "Connector" node. echo '' ; // Add the current folder node. echo '' ; $GLOBALS['HeaderSent'] = true ; } function CreateXmlFooter() { echo '' ; } function SendError( $number, $text ) { if ( $_GET['Command'] == 'FileUpload' ) SendUploadResults( $number, "", "", $text ) ; if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] ) { SendErrorNode( $number, $text ) ; CreateXmlFooter() ; } else { SetXmlHeaders() ; // Create the XML document header echo '' ; echo '' ; SendErrorNode( $number, $text ) ; echo '' ; } exit ; } function SendErrorNode( $number, $text ) { if ($text) echo '' ; else echo '' ; } ?> ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/connector.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/connecto0000755000175000017500000000442411471562005033246 0ustar achapmanachapman ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/util.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/util.php0000755000175000017500000001210411471562005033173 0ustar achapmanachapman $val ) { $lcaseHtmlExtensions[$key] = strtolower( $val ) ; } return in_array( $ext, $lcaseHtmlExtensions ) ; } /** * Detect HTML in the first KB to prevent against potential security issue with * IE/Safari/Opera file type auto detection bug. * Returns true if file contain insecure HTML code at the beginning. * * @param string $filePath absolute path to file * @return boolean */ function DetectHtml( $filePath ) { $fp = @fopen( $filePath, 'rb' ) ; //open_basedir restriction, see #1906 if ( $fp === false || !flock( $fp, LOCK_SH ) ) { return -1 ; } $chunk = fread( $fp, 1024 ) ; flock( $fp, LOCK_UN ) ; fclose( $fp ) ; $chunk = strtolower( $chunk ) ; if (!$chunk) { return false ; } $chunk = trim( $chunk ) ; if ( preg_match( "/= 4.0.7 if ( function_exists( 'version_compare' ) ) { $sCurrentVersion = phpversion(); if ( version_compare( $sCurrentVersion, "4.2.0" ) >= 0 ) { $imageCheckExtensions[] = "tiff"; $imageCheckExtensions[] = "tif"; } if ( version_compare( $sCurrentVersion, "4.3.0" ) >= 0 ) { $imageCheckExtensions[] = "swc"; } if ( version_compare( $sCurrentVersion, "4.3.2" ) >= 0 ) { $imageCheckExtensions[] = "jpc"; $imageCheckExtensions[] = "jp2"; $imageCheckExtensions[] = "jpx"; $imageCheckExtensions[] = "jb2"; $imageCheckExtensions[] = "xbm"; $imageCheckExtensions[] = "wbmp"; } } if ( !in_array( $extension, $imageCheckExtensions ) ) { return true; } if ( @getimagesize( $filePath ) === false ) { return false ; } return true; } ?> ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/phpcompat.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/phpcompa0000755000175000017500000000054711471562005033247 0ustar achapmanachapman' ; } closedir( $oCurrentFolder ) ; } // Open the "Folders" node. echo "" ; natcasesort( $aFolders ) ; foreach ( $aFolders as $sFolder ) echo $sFolder ; // Close the "Folders" node. echo "" ; } function GetFoldersAndFiles( $resourceType, $currentFolder ) { // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFoldersAndFiles' ) ; // Arrays that will hold the folders and files names. $aFolders = array() ; $aFiles = array() ; $oCurrentFolder = @opendir( $sServerDir ) ; if ($oCurrentFolder !== false) { while ( $sFile = readdir( $oCurrentFolder ) ) { if ( $sFile != '.' && $sFile != '..' ) { if ( is_dir( $sServerDir . $sFile ) ) $aFolders[] = '' ; else { $iFileSize = @filesize( $sServerDir . $sFile ) ; if ( !$iFileSize ) { $iFileSize = 0 ; } if ( $iFileSize > 0 ) { $iFileSize = round( $iFileSize / 1024 ) ; if ( $iFileSize < 1 ) $iFileSize = 1 ; } $aFiles[] = '' ; } } } closedir( $oCurrentFolder ) ; } // Send the folders natcasesort( $aFolders ) ; echo '' ; foreach ( $aFolders as $sFolder ) echo $sFolder ; echo '' ; // Send the files natcasesort( $aFiles ) ; echo '' ; foreach ( $aFiles as $sFiles ) echo $sFiles ; echo '' ; } function CreateFolder( $resourceType, $currentFolder ) { if (!isset($_GET)) { global $_GET; } $sErrorNumber = '0' ; $sErrorMsg = '' ; if ( isset( $_GET['NewFolderName'] ) ) { $sNewFolderName = $_GET['NewFolderName'] ; $sNewFolderName = SanitizeFolderName( $sNewFolderName ) ; if ( strpos( $sNewFolderName, '..' ) !== FALSE ) $sErrorNumber = '102' ; // Invalid folder name. else { // Map the virtual path to the local server path of the current folder. $sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'CreateFolder' ) ; if ( is_writable( $sServerDir ) ) { $sServerDir .= $sNewFolderName ; $sErrorMsg = CreateServerFolder( $sServerDir ) ; switch ( $sErrorMsg ) { case '' : $sErrorNumber = '0' ; break ; case 'Invalid argument' : case 'No such file or directory' : $sErrorNumber = '102' ; // Path too long. break ; default : $sErrorNumber = '110' ; break ; } } else $sErrorNumber = '103' ; } } else $sErrorNumber = '102' ; // Create the "Error" node. echo '' ; } function FileUpload( $resourceType, $currentFolder, $sCommand ) { if (!isset($_FILES)) { global $_FILES; } $sErrorNumber = '0' ; $sFileName = '' ; if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) ) { global $Config ; $oFile = $_FILES['NewFile'] ; // Map the virtual path to the local server path. $sServerDir = ServerMapFolder( $resourceType, $currentFolder, $sCommand ) ; // Get the uploaded file name. $sFileName = $oFile['name'] ; $sFileName = SanitizeFileName( $sFileName ) ; $sOriginalFileName = $sFileName ; // Get the extension. $sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ; $sExtension = strtolower( $sExtension ) ; if ( isset( $Config['SecureImageUploads'] ) ) { if ( ( $isImageValid = IsImageValid( $oFile['tmp_name'], $sExtension ) ) === false ) { $sErrorNumber = '202' ; } } if ( isset( $Config['HtmlExtensions'] ) ) { if ( !IsHtmlExtension( $sExtension, $Config['HtmlExtensions'] ) && ( $detectHtml = DetectHtml( $oFile['tmp_name'] ) ) === true ) { $sErrorNumber = '202' ; } } // Check if it is an allowed extension. if ( !$sErrorNumber && IsAllowedExt( $sExtension, $resourceType ) ) { $iCounter = 0 ; while ( true ) { $sFilePath = $sServerDir . $sFileName ; if ( is_file( $sFilePath ) ) { $iCounter++ ; $sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ; $sErrorNumber = '201' ; } else { move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; if ( is_file( $sFilePath ) ) { if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) { break ; } $permissions = 0777; if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) { $permissions = $Config['ChmodOnUpload'] ; } $oldumask = umask(0) ; chmod( $sFilePath, $permissions ) ; umask( $oldumask ) ; } break ; } } if ( file_exists( $sFilePath ) ) { //previous checks failed, try once again if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid( $sFilePath, $sExtension ) === false ) { @unlink( $sFilePath ) ; $sErrorNumber = '202' ; } else if ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml( $sFilePath ) === true ) { @unlink( $sFilePath ) ; $sErrorNumber = '202' ; } } } else $sErrorNumber = '202' ; } else $sErrorNumber = '202' ; $sFileUrl = CombinePaths( GetResourceTypePath( $resourceType, $sCommand ) , $currentFolder ) ; $sFileUrl = CombinePaths( $sFileUrl, $sFileName ) ; SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; exit ; } ?> ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/upload.phpzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/php/upload.p0000755000175000017500000000317511471562005033162 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/test.html0000755000175000017500000001305011471562006032565 0ustar achapmanachapman FCKeditor - Connectors Tests
Connector:
    Current Folder
    Resource Type

Get Folders     Get Folders and Files     Create Folder    
File Upload

URL:
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/0000755000175000017500000000000011473031634031671 5ustar achapmanachapman././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/upload.aspxzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/upload.0000755000175000017500000000230511471562006033161 0ustar achapmanachapman<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Uploader" AutoEventWireup="false" %> <%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> <%-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the Uploader for ASP.NET. * * The code of this page if included in the FCKeditor.Net package, * in the FredCK.FCKeditorV2.dll assemblyfile. So to use it you must * include that DLL in your "bin" directory. * * To download the FCKeditor.Net package, go to our official web site: * http://www.fckeditor.net --%> ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/config.ascxzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/config.0000755000175000017500000001201511471562006033141 0ustar achapmanachapman<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Config" %> <%-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Configuration file for the File Browser Connector for ASP.NET. --%> ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/connector.aspxzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/aspx/connect0000755000175000017500000000232511471562006033252 0ustar achapmanachapman<%@ Page Language="c#" Trace="false" Inherits="FredCK.FCKeditorV2.FileBrowser.Connector" AutoEventWireup="false" %> <%@ Register Src="config.ascx" TagName="Config" TagPrefix="FCKeditor" %> <%-- * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the File Browser Connector for ASP.NET. * * The code of this page if included in the FCKeditor.Net package, * in the FredCK.FCKeditorV2.dll assembly file. So to use it you must * include that DLL in your "bin" directory. * * To download the FCKeditor.Net package, go to our official web site: * http://www.fckeditor.net --%> zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/0000755000175000017500000000000011473031634031660 5ustar achapmanachapman././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/upload_fck.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/upload_0000755000175000017500000004325311471562005033237 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### # image data save dir $img_dir = './temp/'; # File size max(unit KB) $MAX_CONTENT_SIZE = 30000; # After file is uploaded, sometimes it is required to change its permissions # so that it was possible to access it at the later time. # If possible, it is recommended to set more restrictive permissions, like 0755. # Set to 0 to disable this feature. $CHMOD_ON_UPLOAD = 0777; # See comments above. # Used when creating folders that does not exist. $CHMOD_ON_FOLDER_CREATE = 0755; # Filelock (1=use,0=not use) $PM{'flock'} = '1'; # upload Content-Type list my %UPLOAD_CONTENT_TYPE_LIST = ( 'image/(x-)?png' => 'png', # PNG image 'image/p?jpe?g' => 'jpg', # JPEG image 'image/gif' => 'gif', # GIF image 'image/x-xbitmap' => 'xbm', # XBM image 'image/(x-(MS-)?)?bmp' => 'bmp', # Windows BMP image 'image/pict' => 'pict', # Macintosh PICT image 'image/tiff' => 'tif', # TIFF image 'application/pdf' => 'pdf', # PDF image 'application/x-shockwave-flash' => 'swf', # Shockwave Flash 'video/(x-)?msvideo' => 'avi', # Microsoft Video 'video/quicktime' => 'mov', # QuickTime Video 'video/mpeg' => 'mpeg', # MPEG Video 'video/x-mpeg2' => 'mpv2', # MPEG2 Video 'audio/(x-)?midi?' => 'mid', # MIDI Audio 'audio/(x-)?wav' => 'wav', # WAV Audio 'audio/basic' => 'au', # ULAW Audio 'audio/mpeg' => 'mpga', # MPEG Audio 'application/(x-)?zip(-compressed)?' => 'zip', # ZIP Compress 'text/html' => 'html', # HTML 'text/plain' => 'txt', # TEXT '(?:application|text)/(?:rtf|richtext)' => 'rtf', # RichText 'application/msword' => 'doc', # Microsoft Word 'application/vnd.ms-excel' => 'xls', # Microsoft Excel '' ); # Upload is permitted. # A regular expression is possible. my %UPLOAD_EXT_LIST = ( 'png' => 'PNG image', 'p?jpe?g|jpe|jfif|pjp' => 'JPEG image', 'gif' => 'GIF image', 'xbm' => 'XBM image', 'bmp|dib|rle' => 'Windows BMP image', 'pi?ct' => 'Macintosh PICT image', 'tiff?' => 'TIFF image', 'pdf' => 'PDF image', 'swf' => 'Shockwave Flash', 'avi' => 'Microsoft Video', 'moo?v|qt' => 'QuickTime Video', 'm(p(e?gv?|e|v)|1v)' => 'MPEG Video', 'mp(v2|2v)' => 'MPEG2 Video', 'midi?|kar|smf|rmi|mff' => 'MIDI Audio', 'wav' => 'WAVE Audio', 'au|snd' => 'ULAW Audio', 'mp(e?ga|2|a|3)|abs' => 'MPEG Audio', 'zip' => 'ZIP Compress', 'lzh' => 'LZH Compress', 'cab' => 'CAB Compress', 'd?html?' => 'HTML', 'rtf|rtx' => 'RichText', 'txt|text' => 'Text', '' ); # sjis or euc my $CHARCODE = 'sjis'; $TRANS_2BYTE_CODE = 0; ############################################################################## # Summary # # Form Read input # # Parameters # Returns # Memo ############################################################################## sub read_input { eval("use File::Copy;"); eval("use File::Path;"); my ($FORM) = @_; if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { mkdir("$img_dir"); } else { umask(000); if (defined $CHMOD_ON_FOLDER_CREATE) { mkdir("$img_dir",$CHMOD_ON_FOLDER_CREATE); } else { mkdir("$img_dir",0777); } } undef $img_data_exists; undef @NEWFNAMES; undef @NEWFNAME_DATA; if($ENV{'CONTENT_LENGTH'} > 10000000 || $ENV{'CONTENT_LENGTH'} > $MAX_CONTENT_SIZE * 1024) { &upload_error( 'Size Error', sprintf( "Transmitting size is too large.MAX %d KB Now Size %d KB(%d bytes Over)", $MAX_CONTENT_SIZE, int($ENV{'CONTENT_LENGTH'} / 1024), $ENV{'CONTENT_LENGTH'} - $MAX_CONTENT_SIZE * 1024 ) ); } my $Buffer; if($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data/) { # METHOD POST only return unless($ENV{'CONTENT_LENGTH'}); binmode(STDIN); # STDIN A pause character is detected.'(MacIE3.0 boundary of $ENV{'CONTENT_TYPE'} cannot be trusted.) my $Boundary = ; $Boundary =~ s/\x0D\x0A//; $Boundary = quotemeta($Boundary); while() { if(/^\s*Content-Disposition:/i) { my($name,$ContentType,$FileName); # form data get if(/\bname="([^"]+)"/i || /\bname=([^\s:;]+)/i) { $name = $1; $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; &Encode(\$name); } if(/\bfilename="([^"]*)"/i || /\bfilename=([^\s:;]*)/i) { $FileName = $1 || 'unknown'; } # head read while() { last if(! /\w/); if(/^\s*Content-Type:\s*"([^"]+)"/i || /^\s*Content-Type:\s*([^\s:;]+)/i) { $ContentType = $1; } } # body read $value = ""; while() { last if(/^$Boundary/o); $value .= $_; }; $lastline = $_; $value =~s /\x0D\x0A$//; if($value ne '') { if($FileName || $ContentType) { $img_data_exists = 1; ( $FileName, # $Ext, # $Length, # $ImageWidth, # $ImageHeight, # $ContentName # ) = &CheckContentType(\$value,$FileName,$ContentType); $FORM{$name} = $FileName; $new_fname = $FileName; push(@NEWFNAME_DATA,"$FileName\t$Ext\t$Length\t$ImageWidth\t$ImageHeight\t$ContentName"); # Multi-upload correspondence push(@NEWFNAMES,$new_fname); open(OUT,">$img_dir/$new_fname"); binmode(OUT); eval "flock(OUT,2);" if($PM{'flock'} == 1); print OUT $value; eval "flock(OUT,8);" if($PM{'flock'} == 1); close(OUT); } elsif($name) { $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; &Encode(\$value,'trans'); $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } } }; last if($lastline =~ /^$Boundary\-\-/o); } } elsif($ENV{'CONTENT_LENGTH'}) { read(STDIN,$Buffer,$ENV{'CONTENT_LENGTH'}); } foreach(split(/&/,$Buffer),split(/&/,$ENV{'QUERY_STRING'})) { my($name, $value) = split(/=/); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; &Encode(\$name); &Encode(\$value,'trans'); $FORM{$name} .= "\0" if(defined($FORM{$name})); $FORM{$name} .= $value; } } ############################################################################## # Summary # # CheckContentType # # Parameters # Returns # Memo ############################################################################## sub CheckContentType { my($DATA,$FileName,$ContentType) = @_; my($Ext,$ImageWidth,$ImageHeight,$ContentName,$Infomation); my $DataLength = length($$DATA); # An unknown file type $_ = $ContentType; my $UnknownType = ( !$_ || /^application\/(x-)?macbinary$/i || /^application\/applefile$/i || /^application\/octet-stream$/i || /^text\/plane$/i || /^x-unknown-content-type/i ); # MacBinary(Mac Unnecessary data are deleted.) if($UnknownType || $ENV{'HTTP_USER_AGENT'} =~ /Macintosh|Mac_/) { if($DataLength > 128 && !unpack("C",substr($$DATA,0,1)) && !unpack("C",substr($$DATA,74,1)) && !unpack("C",substr($$DATA,82,1)) ) { my $MacBinary_ForkLength = unpack("N", substr($$DATA, 83, 4)); # ForkLength Get my $MacBinary_FileName = quotemeta(substr($$DATA, 2, unpack("C",substr($$DATA, 1, 1)))); if($MacBinary_FileName && $MacBinary_ForkLength && $DataLength >= $MacBinary_ForkLength + 128 && ($FileName =~ /$MacBinary_FileName/i || substr($$DATA,102,4) eq 'mBIN')) { # DATA TOP 128byte MacBinary!! $$DATA = substr($$DATA,128,$MacBinary_ForkLength); my $ResourceLength = $DataLength - $MacBinary_ForkLength - 128; $DataLength = $MacBinary_ForkLength; } } } # A file name is changed into EUC. # &jcode::convert(\$FileName,'euc',$FormCodeDefault); # &jcode::h2z_euc(\$FileName); $FileName =~ s/^.*\\//; # Windows, Mac $FileName =~ s/^.*\///; # UNIX $FileName =~ s/&/&/g; $FileName =~ s/"/"/g; $FileName =~ s//>/g; # # if($CHARCODE ne 'euc') { # &jcode::convert(\$FileName,$CHARCODE,'euc'); # } # An extension is extracted and it changes into a small letter. my $FileExt; if($FileName =~ /\.(\w+)$/) { $FileExt = $1; $FileExt =~ tr/A-Z/a-z/; } # Executable file detection (ban on upload) if($$DATA =~ /^MZ/) { $Ext = 'exe'; } # text if(!$Ext && ($UnknownType || $ContentType =~ /^text\//i || $ContentType =~ /^application\/(?:rtf|richtext)$/i || $ContentType =~ /^image\/x-xbitmap$/i) && ! $$DATA =~ /[\000-\006\177\377]/) { # $$DATA =~ s/\x0D\x0A/\n/g; # $$DATA =~ tr/\x0D\x0A/\n\n/; # # if( # $$DATA =~ /<\s*SCRIPT(?:.|\n)*?>/i # || $$DATA =~ /<\s*(?:.|\n)*?\bONLOAD\s*=(?:.|\n)*?>/i # || $$DATA =~ /<\s*(?:.|\n)*?\bONCLICK\s*=(?:.|\n)*?>/i # ) { # $Infomation = '(JavaScript contains)'; # } # if($$DATA =~ /<\s*TABLE(?:.|\n)*?>/i # || $$DATA =~ /<\s*BLINK(?:.|\n)*?>/i # || $$DATA =~ /<\s*MARQUEE(?:.|\n)*?>/i # || $$DATA =~ /<\s*OBJECT(?:.|\n)*?>/i # || $$DATA =~ /<\s*EMBED(?:.|\n)*?>/i # || $$DATA =~ /<\s*FRAME(?:.|\n)*?>/i # || $$DATA =~ /<\s*APPLET(?:.|\n)*?>/i # || $$DATA =~ /<\s*FORM(?:.|\n)*?>/i # || $$DATA =~ /<\s*(?:.|\n)*?\bSRC\s*=(?:.|\n)*?>/i # || $$DATA =~ /<\s*(?:.|\n)*?\bDYNSRC\s*=(?:.|\n)*?>/i # ) { # $Infomation = '(the HTML tag which is not safe is included)'; # } if($FileExt =~ /^txt$/i || $FileExt =~ /^cgi$/i || $FileExt =~ /^pl$/i) { # Text File $Ext = 'txt'; } elsif($ContentType =~ /^text\/html$/i || $FileExt =~ /html?/i || $$DATA =~ /<\s*HTML(?:.|\n)*?>/i) { # HTML File $Ext = 'html'; } elsif($ContentType =~ /^image\/x-xbitmap$/i || $FileExt =~ /^xbm$/i) { # XBM(x-BitMap) Image my $XbmName = $1; my ($XbmWidth, $XbmHeight); if($$DATA =~ /\#define\s*$XbmName\_width\s*(\d+)/i) { $XbmWidth = $1; } if($$DATA =~ /\#define\s*$XbmName\_height\s*(\d+)/i) { $XbmHeight = $1; } if($XbmWidth && $XbmHeight) { $Ext = 'xbm'; $ImageWidth = $XbmWidth; $ImageHeight = $XbmHeight; } } else { # $Ext = 'txt'; } } # image if(!$Ext && ($UnknownType || $ContentType =~ /^image\//i)) { # PNG if($$DATA =~ /^\x89PNG\x0D\x0A\x1A\x0A/) { if(substr($$DATA, 12, 4) eq 'IHDR') { $Ext = 'png'; ($ImageWidth, $ImageHeight) = unpack("N2", substr($$DATA, 16, 8)); } } elsif($$DATA =~ /^GIF8(?:9|7)a/) { # GIF89a(modified), GIF89a, GIF87a $Ext = 'gif'; ($ImageWidth, $ImageHeight) = unpack("v2", substr($$DATA, 6, 4)); } elsif($$DATA =~ /^II\x2a\x00\x08\x00\x00\x00/ || $$DATA =~ /^MM\x00\x2a\x00\x00\x00\x08/) { # TIFF $Ext = 'tif'; } elsif($$DATA =~ /^BM/) { # BMP $Ext = 'bmp'; } elsif($$DATA =~ /^\xFF\xD8\xFF/ || $$DATA =~ /JFIF/) { # JPEG my $HeaderPoint = index($$DATA, "\xFF\xD8\xFF", 0); my $Point = $HeaderPoint + 2; while($Point < $DataLength) { my($Maker, $MakerType, $MakerLength) = unpack("C2n",substr($$DATA,$Point,4)); if($Maker != 0xFF || $MakerType == 0xd9 || $MakerType == 0xda) { last; } elsif($MakerType >= 0xC0 && $MakerType <= 0xC3) { $Ext = 'jpg'; ($ImageHeight, $ImageWidth) = unpack("n2", substr($$DATA, $Point + 5, 4)); if($HeaderPoint > 0) { $$DATA = substr($$DATA, $HeaderPoint); $DataLength = length($$DATA); } last; } else { $Point += $MakerLength + 2; } } } } # audio if(!$Ext && ($UnknownType || $ContentType =~ /^audio\//i)) { # MIDI Audio if($$DATA =~ /^MThd/) { $Ext = 'mid'; } elsif($$DATA =~ /^\x2esnd/) { # ULAW Audio $Ext = 'au'; } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { my $HeaderPoint = index($$DATA, "RIFF", 0); $_ = substr($$DATA, $HeaderPoint + 8, 8); if(/^WAVEfmt $/) { # WAVE if(unpack("V",substr($$DATA, $HeaderPoint + 16, 4)) == 16) { $Ext = 'wav'; } else { # RIFF WAVE MP3 $Ext = 'mp3'; } } elsif(/^RMIDdata$/) { # RIFF MIDI $Ext = 'rmi'; } elsif(/^RMP3data$/) { # RIFF MP3 $Ext = 'rmp'; } if($ContentType =~ /^audio\//i) { $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; } } } # a binary file unless ($Ext) { # PDF image if($$DATA =~ /^\%PDF/) { # Picture size is not measured. $Ext = 'pdf'; } elsif($$DATA =~ /^FWS/) { # Shockwave Flash $Ext = 'swf'; } elsif($$DATA =~ /^RIFF/ || $$DATA =~ /^ID3/ && $$DATA =~ /RIFF/) { my $HeaderPoint = index($$DATA, "RIFF", 0); $_ = substr($$DATA,$HeaderPoint + 8, 8); # AVI if(/^AVI LIST$/) { $Ext = 'avi'; } if($ContentType =~ /^video\//i) { $Infomation .= '(RIFF '. substr($$DATA, $HeaderPoint + 8, 4). ')'; } } elsif($$DATA =~ /^PK/) { # ZIP Compress File $Ext = 'zip'; } elsif($$DATA =~ /^MSCF/) { # CAB Compress File $Ext = 'cab'; } elsif($$DATA =~ /^Rar\!/) { # RAR Compress File $Ext = 'rar'; } elsif(substr($$DATA, 2, 5) =~ /^\-lh(\d+|d)\-$/) { # LHA Compress File $Infomation .= "(lh$1)"; $Ext = 'lzh'; } elsif(substr($$DATA, 325, 25) eq "Apple Video Media Handler" || substr($$DATA, 325, 30) eq "Apple \x83\x72\x83\x66\x83\x49\x81\x45\x83\x81\x83\x66\x83\x42\x83\x41\x83\x6E\x83\x93\x83\x68\x83\x89") { # QuickTime $Ext = 'mov'; } } # Header analysis failure unless ($Ext) { # It will be followed if it applies for the MIME type from the browser. foreach (keys %UPLOAD_CONTENT_TYPE_LIST) { next unless ($_); if($ContentType =~ /^$_$/i) { $Ext = $UPLOAD_CONTENT_TYPE_LIST{$_}; $ContentName = &CheckContentExt($Ext); if( grep {$_ eq $Ext;} ( 'png', 'gif', 'jpg', 'xbm', 'tif', 'bmp', 'pdf', 'swf', 'mov', 'zip', 'cab', 'lzh', 'rar', 'mid', 'rmi', 'au', 'wav', 'avi', 'exe' ) ) { $Infomation .= ' / Header analysis failure'; } if($Ext ne $FileExt && &CheckContentExt($FileExt) eq $ContentName) { $Ext = $FileExt; } last; } } # a MIME type is unknown--It judges from an extension. unless ($Ext) { $ContentName = &CheckContentExt($FileExt); if($ContentName) { $Ext = $FileExt; $Infomation .= ' / MIME type is unknown('. $ContentType. ')'; last; } } } # $ContentName = &CheckContentExt($Ext) unless($ContentName); # if($Ext && $ContentName) { # $ContentName .= $Infomation; # } else { # &upload_error( # 'Extension Error', # "$FileName A not corresponding extension ($Ext)
The extension which can be responded ". join(',', sort values(%UPLOAD_EXT_LIST)) # ); # } # # SSI Tag Deletion # if($Ext =~ /.?html?/ && $$DATA =~ /<\!/) { # foreach ( # 'config', # 'echo', # 'exec', # 'flastmod', # 'fsize', # 'include' # ) { # $$DATA =~ s/\#\s*$_/\&\#35\;$_/ig # } # } return ( $FileName, $Ext, int($DataLength / 1024 + 1), $ImageWidth, $ImageHeight, $ContentName ); } ############################################################################## # Summary # # Extension discernment # # Parameters # Returns # Memo ############################################################################## sub CheckContentExt { my($Ext) = @_; my $ContentName; foreach (keys %UPLOAD_EXT_LIST) { next unless ($_); if($_ && $Ext =~ /^$_$/) { $ContentName = $UPLOAD_EXT_LIST{$_}; last; } } return $ContentName; } ############################################################################## # Summary # # Form decode # # Parameters # Returns # Memo ############################################################################## sub Encode { my($value,$Trans) = @_; # my $FormCode = &jcode::getcode($value) || $FormCodeDefault; # $FormCodeDefault ||= $FormCode; # # if($Trans && $TRANS_2BYTE_CODE) { # if($FormCode ne 'euc') { # &jcode::convert($value, 'euc', $FormCode); # } # &jcode::tr( # $value, # "\xA3\xB0-\xA3\xB9\xA3\xC1-\xA3\xDA\xA3\xE1-\xA3\xFA", # '0-9A-Za-z' # ); # if($CHARCODE ne 'euc') { # &jcode::convert($value,$CHARCODE,'euc'); # } # } else { # if($CHARCODE ne $FormCode) { # &jcode::convert($value,$CHARCODE,$FormCode); # } # } # if($CHARCODE eq 'euc') { # &jcode::h2z_euc($value); # } elsif($CHARCODE eq 'sjis') { # &jcode::h2z_sjis($value); # } } ############################################################################## # Summary # # Error Msg # # Parameters # Returns # Memo ############################################################################## sub upload_error { local($error_message) = $_[0]; local($error_message2) = $_[1]; print "Content-type: text/html\n\n"; print< Error Message
Error Message

    $error_message

    $error_message2
EOF &rm_tmp_uploaded_files; # Image Temporary deletion exit; } ############################################################################## # Summary # # Image Temporary deletion # # Parameters # Returns # Memo ############################################################################## sub rm_tmp_uploaded_files { if($img_data_exists == 1){ sleep 1; foreach $fname_list(@NEWFNAMES) { if(-e "$img_dir/$fname_list") { unlink("$img_dir/$fname_list"); } } } } 1; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/upload.cgizope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/upload.0000755000175000017500000000407111471562005033151 0ustar achapmanachapman#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### ## # ATTENTION: To enable this connector, look for the "SECURITY" comment in config.pl. ## ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require 'util.pl'; require 'io.pl'; require 'basexml.pl'; require 'commands.pl'; require 'upload_fck.pl'; require 'config.pl'; &read_input(); &DoResponse(); sub DoResponse { # Get the main request information. $sCommand = 'FileUpload'; $sResourceType = &specialchar_cnv($FORM{'Type'}); $sCurrentFolder = "/"; if ($sResourceType eq '') { $sResourceType = 'File' ; } if ( !($sResourceType =~ /^(File|Image|Flash|Media)$/) ) { SendError( 1, "Invalid type specified" ) ; } # File Upload doesn't have to Return XML, so it must be intercepted before anything. if($sCommand eq 'FileUpload') { FileUpload($sResourceType,$sCurrentFolder); return ; } } ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/commands.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/command0000755000175000017500000001261011471562005033223 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### sub GetFolders { local($resourceType, $currentFolder) = @_; # Map the virtual path to the local server path. $sServerDir = &ServerMapFolder($resourceType, $currentFolder); print ""; # Open the "Folders" node. opendir(DIR,"$sServerDir"); @files = grep(!/^\.\.?$/,readdir(DIR)); closedir(DIR); foreach $sFile (@files) { if($sFile != '.' && $sFile != '..' && (-d "$sServerDir$sFile")) { $cnv_filename = &ConvertToXmlAttribute($sFile); print ''; } } print ""; # Close the "Folders" node. } sub GetFoldersAndFiles { local($resourceType, $currentFolder) = @_; # Map the virtual path to the local server path. $sServerDir = &ServerMapFolder($resourceType,$currentFolder); # Initialize the output buffers for "Folders" and "Files". $sFolders = ''; $sFiles = ''; opendir(DIR,"$sServerDir"); @files = grep(!/^\.\.?$/,readdir(DIR)); closedir(DIR); foreach $sFile (@files) { if($sFile ne '.' && $sFile ne '..') { if(-d "$sServerDir$sFile") { $cnv_filename = &ConvertToXmlAttribute($sFile); $sFolders .= '' ; } else { ($iFileSize,$refdate,$filedate,$fileperm) = (stat("$sServerDir$sFile"))[7,8,9,2]; if($iFileSize > 0) { $iFileSize = int($iFileSize / 1024); if($iFileSize < 1) { $iFileSize = 1; } } $cnv_filename = &ConvertToXmlAttribute($sFile); $sFiles .= '' ; } } } print $sFolders ; print ''; # Close the "Folders" node. print $sFiles ; print ''; # Close the "Files" node. } sub CreateFolder { local($resourceType, $currentFolder) = @_; $sErrorNumber = '0' ; $sErrorMsg = '' ; if($FORM{'NewFolderName'} ne "") { $sNewFolderName = $FORM{'NewFolderName'}; $sNewFolderName =~ s/\.|\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; # Map the virtual path to the local server path of the current folder. $sServerDir = &ServerMapFolder($resourceType, $currentFolder); if(-w $sServerDir) { $sServerDir .= $sNewFolderName; $sErrorMsg = &CreateServerFolder($sServerDir); if($sErrorMsg == 0) { $sErrorNumber = '0'; } elsif($sErrorMsg eq 'Invalid argument' || $sErrorMsg eq 'No such file or directory') { $sErrorNumber = '102'; #// Path too long. } else { $sErrorNumber = '110'; } } else { $sErrorNumber = '103'; } } else { $sErrorNumber = '102' ; } # Create the "Error" node. $cnv_errmsg = &ConvertToXmlAttribute($sErrorMsg); print ''; } sub FileUpload { eval("use File::Copy;"); local($resourceType, $currentFolder) = @_; $allowedExtensions = $allowedExtensions{$resourceType}; $sErrorNumber = '0' ; $sFileName = '' ; if($new_fname) { # Map the virtual path to the local server path. $sServerDir = &ServerMapFolder($resourceType,$currentFolder); # Get the uploaded file name. $sFileName = $new_fname; $sFileName =~ s/\\|\/|\||\:|\?|\*|\"|<|>|[[:cntrl:]]/_/g; $sFileName =~ s/\.(?![^.]*$)/_/g; $ext = ''; if($sFileName =~ /([^\\\/]*)\.(.*)$/) { $ext = $2; } $allowedRegex = qr/^($allowedExtensions)$/i; if (!($ext =~ $allowedRegex)) { SendUploadResults('202', '', '', ''); } $sOriginalFileName = $sFileName; $iCounter = 0; while(1) { $sFilePath = $sServerDir . $sFileName; if(-e $sFilePath) { $iCounter++ ; ($path,$BaseName,$ext) = &RemoveExtension($sOriginalFileName); $sFileName = $BaseName . '(' . $iCounter . ').' . $ext; $sErrorNumber = '201'; } else { copy("$img_dir/$new_fname","$sFilePath"); if (defined $CHMOD_ON_UPLOAD) { if ($CHMOD_ON_UPLOAD) { umask(000); chmod($CHMOD_ON_UPLOAD,$sFilePath); } } else { umask(000); chmod(0777,$sFilePath); } unlink("$img_dir/$new_fname"); last; } } } else { $sErrorNumber = '202' ; } $sFileName =~ s/"/\\"/g; SendUploadResults($sErrorNumber, $GLOBALS{'UserFilesPath'}.$resourceType.$currentFolder.$sFileName, $sFileName, ''); } sub SendUploadResults { local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_; # Minified version of the document.domain automatic fix script (#1919). # The original script can be found at _dev/domain_fix_template.js # Note: in Perl replace \ with \\ and $ with \$ print < (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); EOF print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;'; print ''; exit ; } 1; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/basexml.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/basexml0000755000175000017500000000324611471562005033245 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### sub CreateXmlHeader { local($command,$resourceType,$currentFolder) = @_; # Create the XML document header. print ''; # Create the main "Connector" node. print ''; # Add the current folder node. print ''; } sub CreateXmlFooter { print ''; } sub SendError { local( $number, $text ) = @_; print << "_HTML_HEAD_"; Content-Type:text/xml; charset=utf-8 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT _HTML_HEAD_ # Create the XML document header print '' ; if ($text) { print '' ; } else { print '' ; } exit ; } 1; ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/connector.cgizope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/connect0000755000175000017500000000636011471562005033243 0ustar achapmanachapman#!/usr/bin/env perl ##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### ## # ATTENTION: To enable this connector, look for the "SECURITY" comment in config.pl. ## ## START: Hack for Windows (Not important to understand the editor code... Perl specific). if(Windows_check()) { chdir(GetScriptPath($0)); } sub Windows_check { # IIS,PWS(NT/95) $www_server_os = $^O; # Win98 & NT(SP4) if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; } # AnHTTPd/Omni/IIS if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; } # Win Apache if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; } if($www_server_os=~ /win/i) { return(1); } return(0); } sub GetScriptPath { local($path) = @_; if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; } $path; } ## END: Hack for IIS require 'util.pl'; require 'io.pl'; require 'basexml.pl'; require 'commands.pl'; require 'upload_fck.pl'; require 'config.pl'; &read_input(); &DoResponse(); sub DoResponse { if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") { return ; } # Get the main request informaiton. $sCommand = &specialchar_cnv($FORM{'Command'}); $sResourceType = &specialchar_cnv($FORM{'Type'}); $sCurrentFolder = $FORM{'CurrentFolder'}; if ( !($sCommand =~ /^(FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder)$/) ) { SendError( 1, "Command not allowed" ) ; } if ( !($sResourceType =~ /^(File|Image|Flash|Media)$/) ) { SendError( 1, "Invalid type specified" ) ; } # Check the current folder syntax (must begin and start with a slash). if(!($sCurrentFolder =~ /\/$/)) { $sCurrentFolder .= '/'; } if(!($sCurrentFolder =~ /^\//)) { $sCurrentFolder = '/' . $sCurrentFolder; } # Check for invalid folder paths (..) if ( $sCurrentFolder =~ /(?:\.\.|\\)/ ) { SendError( 102, "" ) ; } if ( $sCurrentFolder =~ /(\/\.)|[[:cntrl:]]|(\/\/)|(\\\\)|([\:\*\?\"\<\>\|])/ ) { SendError( 102, "" ) ; } # File Upload doesn't have to Return XML, so it must be intercepted before anything. if($sCommand eq 'FileUpload') { FileUpload($sResourceType,$sCurrentFolder); return ; } print << "_HTML_HEAD_"; Content-Type:text/xml; charset=utf-8 Pragma: no-cache Cache-Control: no-cache Expires: Thu, 01 Dec 1994 16:00:00 GMT _HTML_HEAD_ &CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder); # Execute the required command. if($sCommand eq 'GetFolders') { &GetFolders($sResourceType,$sCurrentFolder); } elsif($sCommand eq 'GetFoldersAndFiles') { &GetFoldersAndFiles($sResourceType,$sCurrentFolder); } elsif($sCommand eq 'CreateFolder') { &CreateFolder($sResourceType,$sCurrentFolder); } &CreateXmlFooter(); exit ; } ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/config.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/config.0000644000175000017500000000270011471562005033124 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### ## # SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR. ## &SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/connectors/perl/config.cgi" file' ) ; $GLOBALS{'UserFilesPath'} = '/userfiles/'; # Map the "UserFiles" path to a local directory. $rootpath = &GetRootPath(); $GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'}; %allowedExtensions = ("File", "7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip", "Image", "bmp|gif|jpeg|jpg|png", "Flash", "swf|flv", "Media", "aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv" ); ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/util.plzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/util.pl0000755000175000017500000000247711471562005033206 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### sub RemoveFromStart { local($sourceString, $charToRemove) = @_; $sPattern = '^' . $charToRemove . '+' ; $sourceString =~ s/^$charToRemove+//g; return $sourceString; } sub RemoveFromEnd { local($sourceString, $charToRemove) = @_; $sPattern = $charToRemove . '+$' ; $sourceString =~ s/$charToRemove+$//g; return $sourceString; } sub ConvertToXmlAttribute { local($value) = @_; return(&specialchar_cnv($value)); } sub specialchar_cnv { local($ch) = @_; $ch =~ s/&/&/g; # & $ch =~ s/\"/"/g; #" $ch =~ s/\'/'/g; # ' $ch =~ s//>/g; # > return($ch); } sub JS_cnv { local($ch) = @_; $ch =~ s/\"/\\\"/g; #" return($ch); } 1; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/perl/io.pl0000755000175000017500000000533611471562005032635 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the File Manager Connector for Perl. ##### sub GetUrlFromPath { local($resourceType, $folderPath) = @_; if($resourceType eq '') { $rmpath = &RemoveFromEnd($GLOBALS{'UserFilesPath'},'/'); return("$rmpath$folderPath"); } else { return("$GLOBALS{'UserFilesPath'}$resourceType$folderPath"); } } sub RemoveExtension { local($fileName) = @_; local($path, $base, $ext); if($fileName !~ /\./) { $fileName .= '.'; } if($fileName =~ /([^\\\/]*)\.(.*)$/) { $base = $1; $ext = $2; if($fileName =~ /(.*)$base\.$ext$/) { $path = $1; } } return($path,$base,$ext); } sub ServerMapFolder { local($resourceType,$folderPath) = @_; # Get the resource type directory. $sResourceTypePath = $GLOBALS{'UserFilesDirectory'} . $resourceType . '/'; # Ensure that the directory exists. &CreateServerFolder($sResourceTypePath); # Return the resource type directory combined with the required path. $rmpath = &RemoveFromStart($folderPath,'/'); return("$sResourceTypePath$rmpath"); } sub GetParentFolder { local($folderPath) = @_; $folderPath =~ s/[\/][^\/]+[\/]?$//g; return $folderPath; } sub CreateServerFolder { local($folderPath) = @_; $sParent = &GetParentFolder($folderPath); # Check if the parent exists, or create it. if(!(-e $sParent)) { $sErrorMsg = &CreateServerFolder($sParent); if($sErrorMsg == 1) { return(1); } } if(!(-e $folderPath)) { if (defined $CHMOD_ON_FOLDER_CREATE && !$CHMOD_ON_FOLDER_CREATE) { mkdir("$folderPath"); } else { umask(000); if (defined $CHMOD_ON_FOLDER_CREATE) { mkdir("$folderPath",$CHMOD_ON_FOLDER_CREATE); } else { mkdir("$folderPath",0777); } } return(0); } else { return(1); } } sub GetRootPath { #use Cwd; # my $dir = getcwd; # print $dir; # $dir =~ s/$ENV{'DOCUMENT_ROOT'}//g; # print $dir; # return($dir); # $wk = $0; # $wk =~ s/\/connector\.cgi//g; # if($wk) { # $current_dir = $wk; # } else { # $current_dir = `pwd`; # } # return($current_dir); use Cwd; if($ENV{'DOCUMENT_ROOT'}) { $dir = $ENV{'DOCUMENT_ROOT'}; } else { my $dir = getcwd; $workdir =~ s/\/connector\.cgi//g; $dir =~ s/$workdir//g; } return($dir); } 1; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/0000755000175000017500000000000011473031634031501 5ustar achapmanachapman././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/connector.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/connecto0000755000175000017500000000461711471562005033246 0ustar achapmanachapman<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit Response.Buffer = True %> <% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This is the File Manager Connector for ASP. %> <% If ( ConfigIsEnabled = False ) Then SendError 1, "This connector is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" End If DoResponse Sub DoResponse() Dim sCommand, sResourceType, sCurrentFolder ' Get the main request information. sCommand = Request.QueryString("Command") sResourceType = Request.QueryString("Type") If ( sResourceType = "" ) Then sResourceType = "File" sCurrentFolder = GetCurrentFolder() ' Check if it is an allowed command if ( Not IsAllowedCommand( sCommand ) ) then SendError 1, "The """ & sCommand & """ command isn't allowed" end if ' Check if it is an allowed resource type. if ( Not IsAllowedType( sResourceType ) ) Then SendError 1, "Invalid type specified" end if ' File Upload doesn't have to Return XML, so it must be intercepted before anything. If ( sCommand = "FileUpload" ) Then FileUpload sResourceType, sCurrentFolder, sCommand Exit Sub End If SetXmlHeaders CreateXmlHeader sCommand, sResourceType, sCurrentFolder, GetUrlFromPath( sResourceType, sCurrentFolder, sCommand) ' Execute the required command. Select Case sCommand Case "GetFolders" GetFolders sResourceType, sCurrentFolder Case "GetFoldersAndFiles" GetFoldersAndFiles sResourceType, sCurrentFolder Case "CreateFolder" CreateFolder sResourceType, sCurrentFolder End Select CreateXmlFooter Response.End End Sub %> ././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/commands.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/commands0000755000175000017500000001317611471562005033237 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This file include the functions that handle the Command requests ' in the ASP Connector. %> <% Sub GetFolders( resourceType, currentFolder ) ' Map the virtual path to the local server path. Dim sServerDir sServerDir = ServerMapFolder( resourceType, currentFolder, "GetFolders" ) ' Open the "Folders" node. Response.Write "" Dim oFSO, oCurrentFolder, oFolders, oFolder Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) if not (oFSO.FolderExists( sServerDir ) ) then Set oFSO = Nothing SendError 102, currentFolder end if Set oCurrentFolder = oFSO.GetFolder( sServerDir ) Set oFolders = oCurrentFolder.SubFolders For Each oFolder in oFolders Response.Write "" Next Set oFSO = Nothing ' Close the "Folders" node. Response.Write "" End Sub Sub GetFoldersAndFiles( resourceType, currentFolder ) ' Map the virtual path to the local server path. Dim sServerDir sServerDir = ServerMapFolder( resourceType, currentFolder, "GetFoldersAndFiles" ) Dim oFSO, oCurrentFolder, oFolders, oFolder, oFiles, oFile Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) if not (oFSO.FolderExists( sServerDir ) ) then Set oFSO = Nothing SendError 102, currentFolder end if Set oCurrentFolder = oFSO.GetFolder( sServerDir ) Set oFolders = oCurrentFolder.SubFolders Set oFiles = oCurrentFolder.Files ' Open the "Folders" node. Response.Write "" For Each oFolder in oFolders Response.Write "" Next ' Close the "Folders" node. Response.Write "" ' Open the "Files" node. Response.Write "" For Each oFile in oFiles Dim iFileSize iFileSize = Round( oFile.size / 1024 ) If ( iFileSize < 1 AND oFile.size <> 0 ) Then iFileSize = 1 Response.Write "" Next ' Close the "Files" node. Response.Write "" End Sub Sub CreateFolder( resourceType, currentFolder ) Dim sErrorNumber Dim sNewFolderName sNewFolderName = Request.QueryString( "NewFolderName" ) sNewFolderName = SanitizeFolderName( sNewFolderName ) If ( sNewFolderName = "" OR InStr( 1, sNewFolderName, ".." ) > 0 ) Then sErrorNumber = "102" Else ' Map the virtual path to the local server path of the current folder. Dim sServerDir sServerDir = ServerMapFolder( resourceType, CombineLocalPaths(currentFolder, sNewFolderName), "CreateFolder" ) On Error Resume Next CreateServerFolder sServerDir Dim iErrNumber, sErrDescription iErrNumber = err.number sErrDescription = err.Description On Error Goto 0 Select Case iErrNumber Case 0 sErrorNumber = "0" Case 52 sErrorNumber = "102" ' Invalid Folder Name. Case 70 sErrorNumber = "103" ' Security Error. Case 76 sErrorNumber = "102" ' Path too long. Case Else sErrorNumber = "110" End Select End If ' Create the "Error" node. Response.Write "" End Sub Sub FileUpload( resourceType, currentFolder, sCommand ) Dim oUploader Set oUploader = New NetRube_Upload oUploader.MaxSize = 0 oUploader.Allowed = ConfigAllowedExtensions.Item( resourceType ) oUploader.Denied = ConfigDeniedExtensions.Item( resourceType ) oUploader.HtmlExtensions = ConfigHtmlExtensions oUploader.GetData Dim sErrorNumber sErrorNumber = "0" Dim sFileName, sOriginalFileName, sExtension sFileName = "" If oUploader.ErrNum > 0 Then sErrorNumber = "202" Else ' Map the virtual path to the local server path. Dim sServerDir sServerDir = ServerMapFolder( resourceType, currentFolder, sCommand ) Dim oFSO Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) if not (oFSO.FolderExists( sServerDir ) ) then sErrorNumber = "102" else ' Get the uploaded file name. sFileName = oUploader.File( "NewFile" ).Name sExtension = oUploader.File( "NewFile" ).Ext sFileName = SanitizeFileName( sFileName ) sOriginalFileName = sFileName Dim iCounter iCounter = 0 Do While ( True ) Dim sFilePath sFilePath = CombineLocalPaths(sServerDir, sFileName) If ( oFSO.FileExists( sFilePath ) ) Then iCounter = iCounter + 1 sFileName = RemoveExtension( sOriginalFileName ) & "(" & iCounter & ")." & sExtension sErrorNumber = "201" Else oUploader.SaveAs "NewFile", sFilePath If oUploader.ErrNum > 0 Then sErrorNumber = "202" Exit Do End If Loop end if End If Set oUploader = Nothing dim sFileUrl sFileUrl = CombinePaths( GetResourceTypePath( resourceType, sCommand ) , currentFolder ) sFileUrl = CombinePaths( sFileUrl, sFileName ) If ( sErrorNumber = "0" or sErrorNumber = "201" ) then SendUploadResults sErrorNumber, sFileUrl, sFileName, "" Else SendUploadResults sErrorNumber, "", "", "" End If End Sub %> zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/io.asp0000755000175000017500000001706711471562005032632 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This file include IO specific functions used by the ASP Connector. %> <% function CombinePaths( sBasePath, sFolder) sFolder = replace(sFolder, "\", "/") CombinePaths = RemoveFromEnd( sBasePath, "/" ) & "/" & RemoveFromStart( sFolder, "/" ) end function function CombineLocalPaths( sBasePath, sFolder) sFolder = replace(sFolder, "/", "\") ' The RemoveFrom* functions use RegExp, so we must escape the \ CombineLocalPaths = RemoveFromEnd( sBasePath, "\\" ) & "\" & RemoveFromStart( sFolder, "\\" ) end function Function GetResourceTypePath( resourceType, sCommand ) if ( sCommand = "QuickUpload") then GetResourceTypePath = ConfigQuickUploadPath.Item( resourceType ) else GetResourceTypePath = ConfigFileTypesPath.Item( resourceType ) end if end Function Function GetResourceTypeDirectory( resourceType, sCommand ) if ( sCommand = "QuickUpload") then if ( ConfigQuickUploadAbsolutePath.Item( resourceType ) <> "" ) then GetResourceTypeDirectory = ConfigQuickUploadAbsolutePath.Item( resourceType ) else ' Map the "UserFiles" path to a local directory. GetResourceTypeDirectory = Server.MapPath( ConfigQuickUploadPath.Item( resourceType ) ) end if else if ( ConfigFileTypesAbsolutePath.Item( resourceType ) <> "" ) then GetResourceTypeDirectory = ConfigFileTypesAbsolutePath.Item( resourceType ) else ' Map the "UserFiles" path to a local directory. GetResourceTypeDirectory = Server.MapPath( ConfigFileTypesPath.Item( resourceType ) ) end if end if end Function Function GetUrlFromPath( resourceType, folderPath, sCommand ) GetUrlFromPath = CombinePaths( GetResourceTypePath( resourceType, sCommand ), folderPath ) End Function Function RemoveExtension( fileName ) RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 ) End Function Function ServerMapFolder( resourceType, folderPath, sCommand ) Dim sResourceTypePath ' Get the resource type directory. sResourceTypePath = GetResourceTypeDirectory( resourceType, sCommand ) ' Ensure that the directory exists. CreateServerFolder sResourceTypePath ' Return the resource type directory combined with the required path. ServerMapFolder = CombineLocalPaths( sResourceTypePath, folderPath ) End Function Sub CreateServerFolder( folderPath ) Dim oFSO Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" ) Dim sParent sParent = oFSO.GetParentFolderName( folderPath ) ' If folderPath is a network path (\\server\folder\) then sParent is an empty string. ' Get out. if (sParent = "") then exit sub ' Check if the parent exists, or create it. If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent ) If ( oFSO.FolderExists( folderPath ) = False ) Then On Error resume next oFSO.CreateFolder( folderPath ) if err.number<>0 then dim sErrorNumber Dim iErrNumber, sErrDescription iErrNumber = err.number sErrDescription = err.Description On Error Goto 0 Select Case iErrNumber Case 52 sErrorNumber = "102" ' Invalid Folder Name. Case 70 sErrorNumber = "103" ' Security Error. Case 76 sErrorNumber = "102" ' Path too long. Case Else sErrorNumber = "110" End Select SendError sErrorNumber, "CreateServerFolder(" & folderPath & ") : " & sErrDescription end if End If Set oFSO = Nothing End Sub Function IsAllowedExt( extension, resourceType ) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True Dim sAllowed, sDenied sAllowed = ConfigAllowedExtensions.Item( resourceType ) sDenied = ConfigDeniedExtensions.Item( resourceType ) IsAllowedExt = True If sDenied <> "" Then oRE.Pattern = sDenied IsAllowedExt = Not oRE.Test( extension ) End If If IsAllowedExt And sAllowed <> "" Then oRE.Pattern = sAllowed IsAllowedExt = oRE.Test( extension ) End If Set oRE = Nothing End Function Function IsAllowedType( resourceType ) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = False oRE.Global = True oRE.Pattern = "^(" & ConfigAllowedTypes & ")$" IsAllowedType = oRE.Test( resourceType ) Set oRE = Nothing End Function Function IsAllowedCommand( sCommand ) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True oRE.Pattern = "^(" & ConfigAllowedCommands & ")$" IsAllowedCommand = oRE.Test( sCommand ) Set oRE = Nothing End Function function GetCurrentFolder() dim sCurrentFolder dim oRegex sCurrentFolder = Request.QueryString("CurrentFolder") If ( sCurrentFolder = "" ) Then sCurrentFolder = "/" ' Check the current folder syntax (must begin and start with a slash). If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/" If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder ' Check for invalid folder paths (..) If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sCurrentFolder, "\" ) <> 0) Then SendError 102, "" End If Set oRegex = New RegExp oRegex.Global = True oRegex.Pattern = "(/\.)|(//)|([\\:\*\?\""\<\>\|]|[\u0000-\u001F]|\u007F)" if (oRegex.Test(sCurrentFolder)) Then SendError 102, "" End If GetCurrentFolder = sCurrentFolder end function ' Do a cleanup of the folder name to avoid possible problems function SanitizeFolderName( sNewFolderName ) Dim oRegex Set oRegex = New RegExp oRegex.Global = True ' remove . \ / | : ? * " < > and control characters oRegex.Pattern = "(\.|\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)" SanitizeFolderName = oRegex.Replace( sNewFolderName, "_" ) Set oRegex = Nothing end function ' Do a cleanup of the file name to avoid possible problems function SanitizeFileName( sNewFileName ) Dim oRegex Set oRegex = New RegExp oRegex.Global = True if ( ConfigForceSingleExtension = True ) then oRegex.Pattern = "\.(?![^.]*$)" sNewFileName = oRegex.Replace( sNewFileName, "_" ) end if ' remove \ / | : ? * " < > and control characters oRegex.Pattern = "(\\|\/|\||:|\?|\*|""|\<|\>|[\u0000-\u001F]|\u007F)" SanitizeFileName = oRegex.Replace( sNewFileName, "_" ) Set oRegex = Nothing end function ' This is the function that sends the results of the uploading process. Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg ) Response.Clear Response.Write "" Response.End End Sub %> ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/config.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/config.a0000755000175000017500000001306511471562005033117 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' Configuration file for the File Manager Connector for ASP. %> <% ' SECURITY: You must explicitly enable this "connector" (set it to "True"). ' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only ' authenticated users can access this file or use some kind of session checking. Dim ConfigIsEnabled ConfigIsEnabled = False ' Path to user files relative to the document root. ' This setting is preserved only for backward compatibility. ' You should look at the settings for each resource type to get the full potential Dim ConfigUserFilesPath ConfigUserFilesPath = "/userfiles/" ' Due to security issues with Apache modules, it is recommended to leave the ' following setting enabled. Dim ConfigForceSingleExtension ConfigForceSingleExtension = true ' What the user can do with this connector Dim ConfigAllowedCommands ConfigAllowedCommands = "QuickUpload|FileUpload|GetFolders|GetFoldersAndFiles|CreateFolder" ' Allowed Resource Types Dim ConfigAllowedTypes ConfigAllowedTypes = "File|Image|Flash|Media" ' For security, HTML is allowed in the first Kb of data for files having the ' following extensions only. Dim ConfigHtmlExtensions ConfigHtmlExtensions = "html|htm|xml|xsd|txt|js" ' ' Configuration settings for each Resource Type ' ' - AllowedExtensions: the possible extensions that can be allowed. ' If it is empty then any file type can be uploaded. ' ' - DeniedExtensions: The extensions that won't be allowed. ' If it is empty then no restrictions are done here. ' ' For a file to be uploaded it has to fulfill both the AllowedExtensions ' and DeniedExtensions (that's it: not being denied) conditions. ' ' - FileTypesPath: the virtual folder relative to the document root where ' these resources will be located. ' Attention: It must start and end with a slash: '/' ' ' - FileTypesAbsolutePath: the physical path to the above folder. It must be ' an absolute path. ' If it's an empty string then it will be autocalculated. ' Useful if you are using a virtual directory, symbolic link or alias. ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. ' Attention: The above 'FileTypesPath' must point to the same directory. ' Attention: It must end with a slash: '/' ' ' - QuickUploadPath: the virtual folder relative to the document root where ' these resources will be uploaded using the Upload tab in the resources ' dialogs. ' Attention: It must start and end with a slash: '/' ' ' - QuickUploadAbsolutePath: the physical path to the above folder. It must be ' an absolute path. ' If it's an empty string then it will be autocalculated. ' Useful if you are using a virtual directory, symbolic link or alias. ' Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. ' Attention: The above 'QuickUploadPath' must point to the same directory. ' Attention: It must end with a slash: '/' ' Dim ConfigAllowedExtensions, ConfigDeniedExtensions, ConfigFileTypesPath, ConfigFileTypesAbsolutePath, ConfigQuickUploadPath, ConfigQuickUploadAbsolutePath Set ConfigAllowedExtensions = CreateObject( "Scripting.Dictionary" ) Set ConfigDeniedExtensions = CreateObject( "Scripting.Dictionary" ) Set ConfigFileTypesPath = CreateObject( "Scripting.Dictionary" ) Set ConfigFileTypesAbsolutePath = CreateObject( "Scripting.Dictionary" ) Set ConfigQuickUploadPath = CreateObject( "Scripting.Dictionary" ) Set ConfigQuickUploadAbsolutePath = CreateObject( "Scripting.Dictionary" ) ConfigAllowedExtensions.Add "File", "7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip" ConfigDeniedExtensions.Add "File", "" ConfigFileTypesPath.Add "File", ConfigUserFilesPath & "file/" ConfigFileTypesAbsolutePath.Add "File", "" ConfigQuickUploadPath.Add "File", ConfigUserFilesPath ConfigQuickUploadAbsolutePath.Add "File", "" ConfigAllowedExtensions.Add "Image", "bmp|gif|jpeg|jpg|png" ConfigDeniedExtensions.Add "Image", "" ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/" ConfigFileTypesAbsolutePath.Add "Image", "" ConfigQuickUploadPath.Add "Image", ConfigUserFilesPath ConfigQuickUploadAbsolutePath.Add "Image", "" ConfigAllowedExtensions.Add "Flash", "swf|flv" ConfigDeniedExtensions.Add "Flash", "" ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/" ConfigFileTypesAbsolutePath.Add "Flash", "" ConfigQuickUploadPath.Add "Flash", ConfigUserFilesPath ConfigQuickUploadAbsolutePath.Add "Flash", "" ConfigAllowedExtensions.Add "Media", "aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv" ConfigDeniedExtensions.Add "Media", "" ConfigFileTypesPath.Add "Media", ConfigUserFilesPath & "media/" ConfigFileTypesAbsolutePath.Add "Media", "" ConfigQuickUploadPath.Add "Media", ConfigUserFilesPath ConfigQuickUploadAbsolutePath.Add "Media", "" %> ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/class_upload.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/class_up0000755000175000017500000002320111471562005033235 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' These are the classes used to handle ASP upload without using third ' part components (OCX/DLL). %> <% '********************************************** ' File: NetRube_Upload.asp ' Version: NetRube Upload Class Version 2.3 Build 20070528 ' Author: NetRube ' Email: NetRube@126.com ' Date: 05/28/2007 ' Comments: The code for the Upload. ' This can free usage, but please ' not to delete this copyright information. ' If you have a modification version, ' Please send out a duplicate to me. '********************************************** ' 文件å: NetRube_Upload.asp ' 版本: NetRube Upload Class Version 2.3 Build 20070528 ' 作者: NetRube(网络乡巴佬) ' 电å­é‚®ä»¶: NetRube@126.com ' 日期: 2007å¹´05月28æ—¥ ' 声明: 文件上传类 ' 本上传类å¯ä»¥è‡ªç”±ä½¿ç”¨ï¼Œä½†è¯·ä¿ç•™æ­¤ç‰ˆæƒå£°æ˜Žä¿¡æ¯ ' 如果您对本上传类进行修改增强, ' 请å‘é€ä¸€ä»½ç»™ä¿ºã€‚ '********************************************** Class NetRube_Upload Public File, Form Private oSourceData Private nMaxSize, nErr, sAllowed, sDenied, sHtmlExtensions Private Sub Class_Initialize nErr = 0 nMaxSize = 1048576 Set File = Server.CreateObject("Scripting.Dictionary") File.CompareMode = 1 Set Form = Server.CreateObject("Scripting.Dictionary") Form.CompareMode = 1 Set oSourceData = Server.CreateObject("ADODB.Stream") oSourceData.Type = 1 oSourceData.Mode = 3 oSourceData.Open End Sub Private Sub Class_Terminate Form.RemoveAll Set Form = Nothing File.RemoveAll Set File = Nothing oSourceData.Close Set oSourceData = Nothing End Sub Public Property Get Version Version = "NetRube Upload Class Version 2.3 Build 20070528" End Property Public Property Get ErrNum ErrNum = nErr End Property Public Property Let MaxSize(nSize) nMaxSize = nSize End Property Public Property Let Allowed(sExt) sAllowed = sExt End Property Public Property Let Denied(sExt) sDenied = sExt End Property Public Property Let HtmlExtensions(sExt) sHtmlExtensions = sExt End Property Public Sub GetData Dim aCType aCType = Split(Request.ServerVariables("HTTP_CONTENT_TYPE"), ";") if ( uBound(aCType) < 0 ) then nErr = 1 Exit Sub end if If aCType(0) <> "multipart/form-data" Then nErr = 1 Exit Sub End If Dim nTotalSize nTotalSize = Request.TotalBytes If nTotalSize < 1 Then nErr = 2 Exit Sub End If If nMaxSize > 0 And nTotalSize > nMaxSize Then nErr = 3 Exit Sub End If 'Thankful long(yrl031715@163.com) 'Fix upload large file. '********************************************** ' 修正作者:long ' è”系邮件: yrl031715@163.com ' 修正时间:2007å¹´5月6æ—¥ ' 修正说明:由于iis6çš„Content-Length 头信æ¯ä¸­åŒ…å«çš„请求长度超过了 AspMaxRequestEntityAllowed 的值(默认200K), IIS 将返回一个 403 错误信æ¯. ' 直接导致在iis6下调试FCKeditor上传功能时,一旦文件超过200K,上传文件时文件管ç†å™¨å¤±åŽ»å“åº”ï¼Œå—æ­¤å½±å“,文件的快速上传功能也存在在缺陷。 ' 在å‚考 å®çމ çš„ Aspæ— ç»„ä»¶ä¸Šä¼ å¸¦è¿›åº¦æ¡ æ¼”ç¤ºç¨‹åºåŽä½œå‡ºå¦‚下修改,以修正在iis6下的错误。 Dim nTotalBytes, nPartBytes, ReadBytes ReadBytes = 0 nTotalBytes = Request.TotalBytes '循环分å—è¯»å– Do While ReadBytes < nTotalBytes '分å—è¯»å– nPartBytes = 64 * 1024 'åˆ†æˆæ¯å—64k If nPartBytes + ReadBytes > nTotalBytes Then nPartBytes = nTotalBytes - ReadBytes End If oSourceData.Write Request.BinaryRead(nPartBytes) ReadBytes = ReadBytes + nPartBytes Loop '********************************************** oSourceData.Position = 0 Dim oTotalData, oFormStream, sFormHeader, sFormName, bCrLf, nBoundLen, nFormStart, nFormEnd, nPosStart, nPosEnd, sBoundary oTotalData = oSourceData.Read bCrLf = ChrB(13) & ChrB(10) sBoundary = MidB(oTotalData, 1, InStrB(1, oTotalData, bCrLf) - 1) nBoundLen = LenB(sBoundary) + 2 nFormStart = nBoundLen Set oFormStream = Server.CreateObject("ADODB.Stream") Do While (nFormStart + 2) < nTotalSize nFormEnd = InStrB(nFormStart, oTotalData, bCrLf & bCrLf) + 3 With oFormStream .Type = 1 .Mode = 3 .Open oSourceData.Position = nFormStart oSourceData.CopyTo oFormStream, nFormEnd - nFormStart .Position = 0 .Type = 2 .CharSet = "UTF-8" sFormHeader = .ReadText .Close End With nFormStart = InStrB(nFormEnd, oTotalData, sBoundary) - 1 nPosStart = InStr(22, sFormHeader, " name=", 1) + 7 nPosEnd = InStr(nPosStart, sFormHeader, """") sFormName = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) If InStr(45, sFormHeader, " filename=", 1) > 0 Then Set File(sFormName) = New NetRube_FileInfo File(sFormName).FormName = sFormName File(sFormName).Start = nFormEnd File(sFormName).Size = nFormStart - nFormEnd - 2 nPosStart = InStr(nPosEnd, sFormHeader, " filename=", 1) + 11 nPosEnd = InStr(nPosStart, sFormHeader, """") File(sFormName).ClientPath = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) File(sFormName).Name = Mid(File(sFormName).ClientPath, InStrRev(File(sFormName).ClientPath, "\") + 1) File(sFormName).Ext = LCase(Mid(File(sFormName).Name, InStrRev(File(sFormName).Name, ".") + 1)) nPosStart = InStr(nPosEnd, sFormHeader, "Content-Type: ", 1) + 14 nPosEnd = InStr(nPosStart, sFormHeader, vbCr) File(sFormName).MIME = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart) Else With oFormStream .Type = 1 .Mode = 3 .Open oSourceData.Position = nFormEnd oSourceData.CopyTo oFormStream, nFormStart - nFormEnd - 2 .Position = 0 .Type = 2 .CharSet = "UTF-8" Form(sFormName) = .ReadText .Close End With End If nFormStart = nFormStart + nBoundLen Loop oTotalData = "" Set oFormStream = Nothing End Sub Public Sub SaveAs(sItem, sFileName) If File(sItem).Size < 1 Then nErr = 2 Exit Sub End If If Not IsAllowed(File(sItem).Ext) Then nErr = 4 Exit Sub End If If InStr( LCase( sFileName ), "::$data" ) > 0 Then nErr = 4 Exit Sub End If Dim sFileExt, iFileSize sFileExt = File(sItem).Ext iFileSize = File(sItem).Size ' Check XSS. If Not IsHtmlExtension( sFileExt ) Then ' Calculate the size of data to load (max 1Kb). Dim iXSSSize iXSSSize = iFileSize If iXSSSize > 1024 Then iXSSSize = 1024 End If ' Read the data. Dim sData oSourceData.Position = File(sItem).Start sData = oSourceData.Read( iXSSSize ) ' Byte Array sData = ByteArray2Text( sData ) ' String ' Sniff HTML data. If SniffHtml( sData ) Then nErr = 4 Exit Sub End If End If Dim oFileStream Set oFileStream = Server.CreateObject("ADODB.Stream") With oFileStream .Type = 1 .Mode = 3 .Open oSourceData.Position = File(sItem).Start oSourceData.CopyTo oFileStream, File(sItem).Size .Position = 0 .SaveToFile sFileName, 2 .Close End With Set oFileStream = Nothing End Sub Private Function IsAllowed(sExt) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True If sDenied = "" Then oRE.Pattern = sAllowed IsAllowed = (sAllowed = "") Or oRE.Test(sExt) Else oRE.Pattern = sDenied IsAllowed = Not oRE.Test(sExt) End If Set oRE = Nothing End Function Private Function IsHtmlExtension( sExt ) If sHtmlExtensions = "" Then Exit Function End If Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True oRE.Pattern = sHtmlExtensions IsHtmlExtension = oRE.Test(sExt) Set oRE = Nothing End Function Private Function SniffHtml( sData ) Dim oRE Set oRE = New RegExp oRE.IgnoreCase = True oRE.Global = True Dim aPatterns aPatterns = Array( " ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/upload.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/upload.a0000755000175000017500000000353411471562005033136 0ustar achapmanachapman<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit Response.Buffer = True %> <% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This is the "File Uploader" for ASP. %> <% Sub SendError( number, text ) SendUploadResults number, "", "", text End Sub ' Check if this uploader has been enabled. If ( ConfigIsEnabled = False ) Then SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" End If Dim sCommand, sResourceType, sCurrentFolder sCommand = "QuickUpload" sResourceType = Request.QueryString("Type") If ( sResourceType = "" ) Then sResourceType = "File" sCurrentFolder = "/" ' Is Upload enabled? if ( Not IsAllowedCommand( sCommand ) ) then SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed" end if ' Check if it is an allowed resource type. if ( Not IsAllowedType( sResourceType ) ) Then SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed" end if FileUpload sResourceType, sCurrentFolder, sCommand %> ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/basexml.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/basexml.0000755000175000017500000000366611471562005033152 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This file include the functions that create the base XML output. %> <% Sub SetXmlHeaders() ' Cleans the response buffer. Response.Clear() ' Prevent the browser from caching the result. Response.CacheControl = "no-cache" ' Set the response format. Response.CodePage = 65001 Response.CharSet = "UTF-8" Response.ContentType = "text/xml" End Sub Sub CreateXmlHeader( command, resourceType, currentFolder, url ) ' Create the XML document header. Response.Write "" ' Create the main "Connector" node. Response.Write "" ' Add the current folder node. Response.Write "" End Sub Sub CreateXmlFooter() Response.Write "" End Sub Sub SendError( number, text ) SetXmlHeaders ' Create the XML document header. Response.Write "" If text <> "" then Response.Write "" else Response.Write "" end if Response.End End Sub %> ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/util.aspzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/asp/util.asp0000755000175000017500000000264411471562005033173 0ustar achapmanachapman<% ' FCKeditor - The text editor for Internet - http://www.fckeditor.net ' Copyright (C) 2003-2009 Frederico Caldeira Knabben ' ' == BEGIN LICENSE == ' ' Licensed under the terms of any of the following licenses at your ' choice: ' ' - GNU General Public License Version 2 or later (the "GPL") ' http://www.gnu.org/licenses/gpl.html ' ' - GNU Lesser General Public License Version 2.1 or later (the "LGPL") ' http://www.gnu.org/licenses/lgpl.html ' ' - Mozilla Public License Version 1.1 or later (the "MPL") ' http://www.mozilla.org/MPL/MPL-1.1.html ' ' == END LICENSE == ' ' This file include generic functions used by the ASP Connector. %> <% Function RemoveFromStart( sourceString, charToRemove ) Dim oRegex Set oRegex = New RegExp oRegex.Pattern = "^" & charToRemove & "+" RemoveFromStart = oRegex.Replace( sourceString, "" ) End Function Function RemoveFromEnd( sourceString, charToRemove ) Dim oRegex Set oRegex = New RegExp oRegex.Pattern = charToRemove & "+$" RemoveFromEnd = oRegex.Replace( sourceString, "" ) End Function Function ConvertToXmlAttribute( value ) ConvertToXmlAttribute = Replace( value, "&", "&" ) End Function Function InArray( value, sourceArray ) Dim i For i = 0 to UBound( sourceArray ) If sourceArray(i) = value Then InArray = True Exit Function End If Next InArray = False End Function %> zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/0000755000175000017500000000000011473031634031463 5ustar achapmanachapman././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfczope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/ImageObj0000755000175000017500000003014611471562005033071 0ustar achapmanachapman ././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_comma0000755000175000017500000001767311471562005033172 0ustar achapmanachapman sFileExt = GetExtension( sFileName ) ; sFilePart = RemoveExtension( sFileName ); while( fileExists( sServerDir & sFileName ) ) { counter = counter + 1; sFileName = sFilePart & '(#counter#).' & CFFILE.ClientFileExt; errorNumber = 201; } while( i lte qDir.recordCount ) { if( compareNoCase( qDir.type[i], "FILE" ) and not listFind( ".,..", qDir.name[i] ) ) { folders = folders & '' ; } i = i + 1; } #folders# while( i lte qDir.recordCount ) { if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind( ".,..", qDir.name[i] ) ) { folders = folders & '' ; } else if( not compareNoCase( qDir.type[i], "FILE" ) ) { fileSizeKB = round(qDir.size[i] / 1024) ; files = files & '' ; } i = i + 1 ; } #folders# #files# sNewFolderName = SanitizeFolderName( sNewFolderName ) ; ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_uploa0000755000175000017500000000436011471562005033203 0ustar achapmanachapman ././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_conne0000755000175000017500000000543411471562005033170 0ustar achapmanachapman ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/image.cfczope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/image.cf0000755000175000017500000013373111471562005033071 0ustar achapmanachapman paths = arrayNew(1); paths[1] = expandPath("metadata-extractor-2.3.1.jar"); loader = createObject("component", "javaloader.JavaLoader").init(paths); //at this stage we only have access to the class, but we don't have an instance JpegMetadataReader = loader.create("com.drew.imaging.jpeg.JpegMetadataReader"); myMetaData = JpegMetadataReader.readMetadata(inFile); directories = myMetaData.getDirectoryIterator(); while (directories.hasNext()) { currentDirectory = directories.next(); tags = currentDirectory.getTagIterator(); while (tags.hasNext()) { currentTag = tags.next(); if (currentTag.getTagName() DOES NOT CONTAIN "Unknown") { //leave out the junk data queryAddRow(retQry); querySetCell(retQry,"dirName",replace(currentTag.getDirectoryName(),' ','_','ALL')); tagName = replace(currentTag.getTagName(),' ','','ALL'); tagName = replace(tagName,'/','','ALL'); querySetCell(retQry,"tagName",tagName); querySetCell(retQry,"tagValue",currentTag.getDescription()); } } } return retQry; resizedImage = CreateObject("java", "java.awt.image.BufferedImage"); at = CreateObject("java", "java.awt.geom.AffineTransform"); op = CreateObject("java", "java.awt.image.AffineTransformOp"); w = img.getWidth(); h = img.getHeight(); if (preserveAspect and cropToExact and newHeight gt 0 and newWidth gt 0) { if (w / h gt newWidth / newHeight){ newWidth = 0; } else if (w / h lt newWidth / newHeight){ newHeight = 0; } } else if (preserveAspect and newHeight gt 0 and newWidth gt 0) { if (w / h gt newWidth / newHeight){ newHeight = 0; } else if (w / h lt newWidth / newHeight){ newWidth = 0; } } if (newWidth gt 0 and newHeight eq 0) { scale = newWidth / w; w = newWidth; h = round(h*scale); } else if (newHeight gt 0 and newWidth eq 0) { scale = newHeight / h; h = newHeight; w = round(w*scale); } else if (newHeight gt 0 and newWidth gt 0) { w = newWidth; h = newHeight; } else { retVal = throw( retVal.errorMessage); return retVal; } resizedImage.init(javacast("int",w),javacast("int",h),img.getType()); w = w / img.getWidth(); h = h / img.getHeight(); op.init(at.getScaleInstance(javacast("double",w),javacast("double",h)), rh); // resizedImage = op.createCompatibleDestImage(img, img.getColorModel()); op.filter(img, resizedImage); imgInfo = getimageinfo(resizedImage, ""); if (imgInfo.errorCode gt 0) { return imgInfo; } cropOffsetX = max( Int( (imgInfo.width/2) - (newWidth/2) ), 0 ); cropOffsetY = max( Int( (imgInfo.height/2) - (newHeight/2) ), 0 ); // There is a chance that the image is exactly the correct // width and height and don't need to be cropped if ( preserveAspect and cropToExact and (imgInfo.width IS NOT specifiedWidth OR imgInfo.height IS NOT specifiedHeight) ) { // Get the correct offset to get the center of the image cropOffsetX = max( Int( (imgInfo.width/2) - (specifiedWidth/2) ), 0 ); cropOffsetY = max( Int( (imgInfo.height/2) - (specifiedHeight/2) ), 0 ); cropImageResult = crop( resizedImage, "", "", cropOffsetX, cropOffsetY, specifiedWidth, specifiedHeight ); if ( cropImageResult.errorCode GT 0) { return cropImageResult; } else { resizedImage = cropImageResult.img; } } if (outputFile eq "") { retVal.img = resizedImage; return retVal; } else { saveImage = writeImage(outputFile, resizedImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } if (fromX + newWidth gt img.getWidth() OR fromY + newHeight gt img.getHeight() ) { retval = throw( "The cropped image dimensions go beyond the original image dimensions."); return retVal; } croppedImage = img.getSubimage(javaCast("int", fromX), javaCast("int", fromY), javaCast("int", newWidth), javaCast("int", newHeight) ); if (outputFile eq "") { retVal.img = croppedImage; return retVal; } else { saveImage = writeImage(outputFile, croppedImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } rotatedImage = CreateObject("java", "java.awt.image.BufferedImage"); at = CreateObject("java", "java.awt.geom.AffineTransform"); op = CreateObject("java", "java.awt.image.AffineTransformOp"); iw = img.getWidth(); h = iw; ih = img.getHeight(); w = ih; if(arguments.degrees eq 180) { w = iw; h = ih; } x = (w/2)-(iw/2); y = (h/2)-(ih/2); rotatedImage.init(javacast("int",w),javacast("int",h),img.getType()); at.rotate(arguments.degrees * 0.0174532925,w/2,h/2); at.translate(x,y); op.init(at, rh); op.filter(img, rotatedImage); if (outputFile eq "") { retVal.img = rotatedImage; return retVal; } else { saveImage = writeImage(outputFile, rotatedImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } if (outputFile eq "") { retVal = throw( "The convert method requires a valid output filename."); return retVal; } else { saveImage = writeImage(outputFile, img, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } /* JPEG output method handles compression */ out = createObject("java", "java.io.BufferedOutputStream"); fos = createObject("java", "java.io.FileOutputStream"); fos.init(tempOutputFile); out.init(fos); JPEGCodec = createObject("java", "com.sun.image.codec.jpeg.JPEGCodec"); encoder = JPEGCodec.createJPEGEncoder(out); param = encoder.getDefaultJPEGEncodeParam(img); param.setQuality(quality, false); encoder.setJPEGEncodeParam(param); encoder.encode(img); out.close(); flippedImage = CreateObject("java", "java.awt.image.BufferedImage"); at = CreateObject("java", "java.awt.geom.AffineTransform"); op = CreateObject("java", "java.awt.image.AffineTransformOp"); flippedImage.init(img.getWidth(), img.getHeight(), img.getType()); if (direction eq "horizontal") { at = at.getScaleInstance(-1, 1); at.translate(-img.getWidth(), 0); } else { at = at.getScaleInstance(1,-1); at.translate(0, -img.getHeight()); } op.init(at, rh); op.filter(img, flippedImage); if (outputFile eq "") { retVal.img = flippedImage; return retVal; } else { saveImage = writeImage(outputFile, flippedImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } // initialize the blur filter variables.blurFilter.init(arguments.blurAmount); // move the source image into the destination image // so we can repeatedly blur it. destImage = srcImage; for (i=1; i lte iterations; i=i+1) { // do the blur i times destImage = variables.blurFilter.filter(destImage); } if (outputFile eq "") { // return the image object retVal.img = destImage; return retVal; } else { // write the image object to the specified file. saveImage = writeImage(outputFile, destImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } // initialize the sharpen filter variables.sharpenFilter.init(); destImage = variables.sharpenFilter.filter(srcImage); if (outputFile eq "") { // return the image object retVal.img = destImage; return retVal; } else { // write the image object to the specified file. saveImage = writeImage(outputFile, destImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } // initialize the posterize filter variables.posterizeFilter.init(arguments.amount); destImage = variables.posterizeFilter.filter(srcImage); if (outputFile eq "") { // return the image object retVal.img = destImage; return retVal; } else { // write the image object to the specified file. saveImage = writeImage(outputFile, destImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } // load objects bgImage = CreateObject("java", "java.awt.image.BufferedImage"); fontImage = CreateObject("java", "java.awt.image.BufferedImage"); overlayImage = CreateObject("java", "java.awt.image.BufferedImage"); Color = CreateObject("java","java.awt.Color"); font = createObject("java","java.awt.Font"); font_stream = createObject("java","java.io.FileInputStream"); ac = CreateObject("Java", "java.awt.AlphaComposite"); // set up basic needs fontColor = Color.init(javacast("int", rgb.red), javacast("int", rgb.green), javacast("int", rgb.blue)); if (fontDetails.fontFile neq "") { font_stream.init(arguments.fontDetails.fontFile); font = font.createFont(font.TRUETYPE_FONT, font_stream); font = font.deriveFont(javacast("float",arguments.fontDetails.size)); } else { font.init(fontDetails.fontName, evaluate(fontDetails.style), fontDetails.size); } // get font metrics using a 1x1 bufferedImage fontImage.init(1,1,img.getType()); g2 = fontImage.createGraphics(); g2.setRenderingHints(getRenderingHints()); fc = g2.getFontRenderContext(); bounds = font.getStringBounds(content,fc); g2 = img.createGraphics(); g2.setRenderingHints(getRenderingHints()); g2.setFont(font); g2.setColor(fontColor); // in case you want to change the alpha // g2.setComposite(ac.getInstance(ac.SRC_OVER, 0.50)); // the location (arguments.fontDetails.size+y) doesn't really work // the way I want it to. g2.drawString(content,javacast("int",x),javacast("int",arguments.fontDetails.size+y)); if (outputFile eq "") { retVal.img = img; return retVal; } else { saveImage = writeImage(outputFile, img, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } at = CreateObject("java", "java.awt.geom.AffineTransform"); op = CreateObject("java", "java.awt.image.AffineTransformOp"); ac = CreateObject("Java", "java.awt.AlphaComposite"); gfx = originalImage.getGraphics(); gfx.setComposite(ac.getInstance(ac.SRC_OVER, alpha)); at.init(); // op.init(at,op.TYPE_BILINEAR); op.init(at, rh); gfx.drawImage(wmImage, op, javaCast("int",arguments.placeAtX), javacast("int", arguments.placeAtY)); gfx.dispose(); if (outputFile eq "") { retVal.img = originalImage; return retVal; } else { saveImage = writeImage(outputFile, originalImage, jpegCompression); if (saveImage.errorCode gt 0) { return saveImage; } else { return retVal; } } // convert the image to a specified BufferedImage type and return it var width = bImage.getWidth(); var height = bImage.getHeight(); var newImage = createObject("java","java.awt.image.BufferedImage").init(javacast("int",width), javacast("int",height), javacast("int",type)); // int[] rgbArray = new int[width*height]; var rgbArray = variables.arrObj.newInstance(variables.intClass, javacast("int",width*height)); bImage.getRGB( javacast("int",0), javacast("int",0), javacast("int",width), javacast("int",height), rgbArray, javacast("int",0), javacast("int",width) ); newImage.setRGB( javacast("int",0), javacast("int",0), javacast("int",width), javacast("int",height), rgbArray, javacast("int",0), javacast("int",width) ); return newImage; ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_util.0000755000175000017500000000762211471562005033122 0ustar achapmanachapman > ././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf5_conn0000755000175000017500000002524011471562005033105 0ustar achapmanachapman userFilesPath = config.userFilesPath; if ( userFilesPath eq "" ) { userFilesPath = "/userfiles/"; } // make sure the user files path is correctly formatted userFilesPath = replace(userFilesPath, "\", "/", "ALL"); userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); if ( right(userFilesPath,1) NEQ "/" ) { userFilesPath = userFilesPath & "/"; } if ( left(userFilesPath,1) NEQ "/" ) { userFilesPath = "/" & userFilesPath; } // make sure the current folder is correctly formatted url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); if ( right(url.currentFolder,1) neq "/" ) { url.currentFolder = url.currentFolder & "/"; } if ( left(url.currentFolder,1) neq "/" ) { url.currentFolder = "/" & url.currentFolder; } if ( find("/",getBaseTemplatePath()) neq 0 ) { fs = "/"; } else { fs = "\"; } // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. if ( len(config.serverPath) ) { serverPath = config.serverPath; if ( right(serverPath,1) neq fs ) { serverPath = serverPath & fs; } } else { serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); } rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; xmlContent = ""; // append to this string to build content invalidName = false; "> ])', url.currentFolder)> "> '> "> i=1; folders = ""; while( i lte qDir.recordCount ) { if( not compareNoCase( qDir.type[i], "FILE" )) break; if( not listFind(".,..", qDir.name[i]) ) folders = folders & ''; i=i+1; } xmlContent = xmlContent & '' & folders & ''; i=1; folders = ""; files = ""; while( i lte qDir.recordCount ) { if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) { folders = folders & ''; } else if( not compareNoCase( qDir.type[i], "FILE" ) ) { fileSizeKB = round(qDir.size[i] / 1024); files = files & ''; } i=i+1; } xmlContent = xmlContent & '' & folders & ''; xmlContent = xmlContent & '' & files & ''; newFolderName = url.newFolderName; if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) { // Munge folder name same way as we do the filename // This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8 newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all"); newFolderName = reReplace(newFolderName, "_{2,}", "_", "all"); newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all"); newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all"); newFolderName = reReplace(newFolderName, '\.+', "_", "all" ); } '> xmlHeader = ''; if (invalidName) { xmlHeader = xmlHeader & ''; } else { xmlHeader = xmlHeader & ''; xmlHeader = xmlHeader & ''; } xmlFooter = ''; #xmlHeader##xmlContent##xmlFooter# ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_basex0000755000175000017500000000544411471562005033171 0ustar achapmanachapman ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/config.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/config.c0000755000175000017500000001741211471562005033103 0ustar achapmanachapman Config = StructNew() ; // SECURITY: You must explicitly enable this "connector". (Set enabled to "true") Config.Enabled = false ; // Path to uploaded files relative to the document root. Config.UserFilesPath = "/userfiles/" ; // Use this to force the server path if FCKeditor is not running directly off // the root of the application or the FCKeditor directory in the URL is a virtual directory // or a symbolic link / junction // Example: C:\inetpub\wwwroot\myDocs\ Config.ServerPath = "" ; // Due to security issues with Apache modules, it is recommended to leave the // following setting enabled. Config.ForceSingleExtension = true ; // Perform additional checks for image files - if set to true, validate image size // (This feature works in MX 6.0 and above) Config.SecureImageUploads = true; // What the user can do with this connector Config.ConfigAllowedCommands = "QuickUpload,FileUpload,GetFolders,GetFoldersAndFiles,CreateFolder" ; //Allowed Resource Types Config.ConfigAllowedTypes = "File,Image,Flash,Media" ; // For security, HTML is allowed in the first Kb of data for files having the // following extensions only. // (This feature works in MX 6.0 and above)) Config.HtmlExtensions = "html,htm,xml,xsd,txt,js" ; //Due to known issues with GetTempDirectory function, it is //recommended to set this vairiable to a valid directory //instead of using the GetTempDirectory function //(used by MX 6.0 and above) Config.TempDirectory = GetTempDirectory(); // Configuration settings for each Resource Type // // - AllowedExtensions: the possible extensions that can be allowed. // If it is empty then any file type can be uploaded. // - DeniedExtensions: The extensions that won't be allowed. // If it is empty then no restrictions are done here. // // For a file to be uploaded it has to fulfill both the AllowedExtensions // and DeniedExtensions (that's it: not being denied) conditions. // // - FileTypesPath: the virtual folder relative to the document root where // these resources will be located. // Attention: It must start and end with a slash: '/' // // - FileTypesAbsolutePath: the physical path to the above folder. It must be // an absolute path. // If it's an empty string then it will be autocalculated. // Usefull if you are using a virtual directory, symbolic link or alias. // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. // Attention: The above 'FileTypesPath' must point to the same directory. // Attention: It must end with a slash: '/' // // // - QuickUploadPath: the virtual folder relative to the document root where // these resources will be uploaded using the Upload tab in the resources // dialogs. // Attention: It must start and end with a slash: '/' // // - QuickUploadAbsolutePath: the physical path to the above folder. It must be // an absolute path. // If it's an empty string then it will be autocalculated. // Usefull if you are using a virtual directory, symbolic link or alias. // Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. // Attention: The above 'QuickUploadPath' must point to the same directory. // Attention: It must end with a slash: '/' Config.AllowedExtensions = StructNew() ; Config.DeniedExtensions = StructNew() ; Config.FileTypesPath = StructNew() ; Config.FileTypesAbsolutePath = StructNew() ; Config.QuickUploadPath = StructNew() ; Config.QuickUploadAbsolutePath = StructNew() ; Config.AllowedExtensions["File"] = "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip" ; Config.DeniedExtensions["File"] = "" ; Config.FileTypesPath["File"] = Config.UserFilesPath & 'file/' ; Config.FileTypesAbsolutePath["File"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'file/') ) ; Config.QuickUploadPath["File"] = Config.FileTypesPath["File"] ; Config.QuickUploadAbsolutePath["File"] = Config.FileTypesAbsolutePath["File"] ; Config.AllowedExtensions["Image"] = "bmp,gif,jpeg,jpg,png" ; Config.DeniedExtensions["Image"] = "" ; Config.FileTypesPath["Image"] = Config.UserFilesPath & 'image/' ; Config.FileTypesAbsolutePath["Image"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'image/') ) ; Config.QuickUploadPath["Image"] = Config.FileTypesPath["Image"] ; Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ; Config.AllowedExtensions["Flash"] = "swf,flv" ; Config.DeniedExtensions["Flash"] = "" ; Config.FileTypesPath["Flash"] = Config.UserFilesPath & 'flash/' ; Config.FileTypesAbsolutePath["Flash"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'flash/') ) ; Config.QuickUploadPath["Flash"] = Config.FileTypesPath["Flash"] ; Config.QuickUploadAbsolutePath["Flash"] = Config.FileTypesAbsolutePath["Flash"] ; Config.AllowedExtensions["Media"] = "aiff,asf,avi,bmp,fla,flv,gif,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,png,qt,ram,rm,rmi,rmvb,swf,tif,tiff,wav,wma,wmv" ; Config.DeniedExtensions["Media"] = "" ; Config.FileTypesPath["Media"] = Config.UserFilesPath & 'media/' ; Config.FileTypesAbsolutePath["Media"] = iif( Config.ServerPath eq "", de(""), de(Config.ServerPath & 'media/') ) ; Config.QuickUploadPath["Media"] = Config.FileTypesPath["Media"] ; Config.QuickUploadAbsolutePath["Media"] = Config.FileTypesAbsolutePath["Media"] ; function structCopyKeys(stFrom, stTo) { for ( key in stFrom ) { if ( isStruct(stFrom[key]) ) { structCopyKeys(stFrom[key],stTo[key]); } else { stTo[key] = stFrom[key]; } } } structCopyKeys(FCKeditor, config); ././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf_io.cf0000755000175000017500000002476311471562005033072 0ustar achapmanachapman ])', sCurrentFolder)> +|[[:cntrl:]]+', "_", "all" )> var chunk = ""; var fileReaderClass = ""; var fileReader = ""; var file = ""; var done = false; var counter = 0; var byteArray = ""; if( not fileExists( ARGUMENTS.fileName ) ) { return "" ; } if (REQUEST.CFVersion gte 8) { file = FileOpen( ARGUMENTS.fileName, "readbinary" ) ; byteArray = FileRead( file, 1024 ) ; chunk = toString( toBinary( toBase64( byteArray ) ) ) ; FileClose( file ) ; } else { fileReaderClass = createObject("java", "java.io.FileInputStream"); fileReader = fileReaderClass.init(fileName); while(not done) { char = fileReader.read(); counter = counter + 1; if ( char eq -1 or counter eq ARGUMENTS.bytes) { done = true; } else { chunk = chunk & chr(char) ; } } } +|[[:cntrl:]]+', "_", "all" )> ././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/connector.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/connecto0000755000175000017500000000175511471562005033230 0ustar achapmanachapman ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/upload.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/upload.c0000755000175000017500000000174111471562005033120 0ustar achapmanachapman ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfmzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/filemanager/connectors/cfm/cf5_uplo0000755000175000017500000002602311471562005033127 0ustar achapmanachapman function SendUploadResults(errorNumber, fileUrl, fileName, customMsg) { WriteOutput(''); } ])', url.currentFolder)> userFilesPath = config.userFilesPath; if ( userFilesPath eq "" ) { userFilesPath = "/userfiles/"; } // make sure the user files path is correctly formatted userFilesPath = replace(userFilesPath, "\", "/", "ALL"); userFilesPath = replace(userFilesPath, '//', '/', 'ALL'); if ( right(userFilesPath,1) NEQ "/" ) { userFilesPath = userFilesPath & "/"; } if ( left(userFilesPath,1) NEQ "/" ) { userFilesPath = "/" & userFilesPath; } // make sure the current folder is correctly formatted url.currentFolder = replace(url.currentFolder, "\", "/", "ALL"); url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL'); if ( right(url.currentFolder,1) neq "/" ) { url.currentFolder = url.currentFolder & "/"; } if ( left(url.currentFolder,1) neq "/" ) { url.currentFolder = "/" & url.currentFolder; } if (find("/",getBaseTemplatePath())) { fs = "/"; } else { fs = "\"; } // Get the base physical path to the web root for this application. The code to determine the path automatically assumes that // the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a // virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary. if ( len(config.serverPath) ) { serverPath = config.serverPath; if ( right(serverPath,1) neq fs ) { serverPath = serverPath & fs; } } else { serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"") & replace(userFilesPath,"/",fs,"all"); } rootPath = left( serverPath, Len(serverPath) - Len(userFilesPath) ) ; errorNumber = 0; fileName = cffile.ClientFileName ; fileExt = cffile.ServerFileExt ; fileExisted = false ; // munge filename for html download. Only a-z, 0-9, _, - and . are allowed if( reFind("[^A-Za-z0-9_\-\.]", fileName) ) { fileName = reReplace(fileName, "[^A-Za-z0-9\-\.]", "_", "ALL"); fileName = reReplace(fileName, "_{2,}", "_", "ALL"); fileName = reReplace(fileName, "([^_]+)_+$", "\1", "ALL"); fileName = reReplace(fileName, "$_([^_]+)$", "\1", "ALL"); } // remove additional dots from file name if( isDefined("Config.ForceSingleExtension") and Config.ForceSingleExtension ) fileName = replace( fileName, '.', "_", "all" ) ; // When the original filename already exists, add numbers (0), (1), (2), ... at the end of the filename. if( compare( cffile.ServerFileName, fileName ) ) { counter = 0; tmpFileName = fileName; while( fileExists("#currentFolderPath##fileName#.#fileExt#") ) { fileExisted = true ; counter = counter + 1 ; fileName = tmpFileName & '(#counter#)' ; } } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/fckdialog.html0000755000175000017500000005460311471562006027113 0ustar achapmanachapman
   
zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/0000755000175000017500000000000011473031634025534 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/arrow_rtl.gif0000755000175000017500000000006111471562005030235 0ustar achapmanachapmanGIF89a€!ù,Œq˺i(;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/spacer.gif0000755000175000017500000000005311471562005027500 0ustar achapmanachapmanGIF89a€!ù,D;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/0000755000175000017500000000000011473031633027035 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/0000755000175000017500000000000011473031634027633 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/omg_smile.gif0000755000175000017500000000052611471562005032302 0ustar achapmanachapmanGIF89aÄÿÿÿÿûðÔßÿÀÜÀ¦Êðÿ˜ÿÿߪÔߪԿªªŸª€€€ÿÿUÿßUÔßUÿ¿UÔ¿UÔŸUªŸUÿßÿ¿Ô¿ÔŸ€€ªUªª_UUU!ù ,Ó`!Ž…á<Ž \§ãÓuÛÃ0Nw‰ivE¤³XܘQloAz†Ëq½IÑíé D˜ŒÈ÷f^Õ€K7a†–Øâ%81 7h ‚F Vn €†cL6Œ8’xh††T6†§£² ­78# f¿"6 ±ÑS0»©q£T0"î>ýîB;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/devil_smile.gif0000755000175000017500000000067411471562005032627 0ustar achapmanachapmanGIF89aÕÿÿÿÿûðÿßÿÔßÿÀÜÀÿ˜ÿÔ¿ªÔŸªª¿ªªŸª€€€Ôªªª*ÿUª*ªÔŸUÿUÔUÿ_UÔ_UªUª_Uÿ?UÔ?UÔUª?UªUÿ?Ô?Ôª?ªUUU!ù ,ÙÀ‚ТŠáX €¦Ð°±D§šãÊ4|< £%²¤ ¦zýh>™ä„ƒéP4¼eY0ä-##"ƒ#b…"#PF… ‘ [G†…’!‘‚VG…#•³#|B " „""ŒF¨!ŽÌ aFŸ‘!ž#ÈBŸ¾‚‘‹G¡Ã¸Ü¥G ž³• R >X£@éNMhX€ãÆ‚„h € A8;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/cake.gif0000755000175000017500000000070511471562005031231 0ustar achapmanachapmanGIF89aÕÿÿÿÿûðÿßÿÔßÿÌÌÿÀÜÀ¦Êðÿ˜ÿÿÿªÿߪÔߪÿ¿ªÔ¿ªÿŸªª¿ª  ¤ªŸª€€€ªª*_ª*?ª*ªÿÿUÿßUÔßUÔ¿UÔŸUªŸUÔŸÿUÔUÿ_UÔ_UªUª_Uÿ?UÔ?Uÿ_ªÿ?Ô?U_U*?U_!ù ,âÀƒPx‹ÆdT8 ¤frX§ó#Ê:ºSÃ$. ­÷ f¨%ö Ú˜©#+xI jŠF,   !B& §¥)M * !&¶ "M& ´ ÈÆ² "¥ÅË Ù*ΠØá­ذÏ*Æìíî¬À!!¶ìÞ« ,!R B°aâÁ´RL¨0Á!`ÐS‘"„Š)88㥠ƒ3 ;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/thumbs_down.gif0000755000175000017500000000174011471562005032657 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,½“ 8ÐU©T_\˜ÌàÁeÌ–•*¥Š¡+W©J¹zÆìÙ3>ËŽ•B0PUFUË =SÉqÙ2>¥L Lå2å³e7q.ë³3Âd4u®*Ñ%L’ÉÕ„æ2gMž}*­©³©Q£†–rgW£#ª 4q+Õ§IMö !²OûðéÓGR†÷àºìó.ÃdªJñ5vŒÏ¿ Ç– j-bJ‘yïçc±eÃ^ž9QåÍÉÜú,Á€;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/cry_smile.gif0000755000175000017500000000073111471562005032313 0ustar achapmanachapmanGIF89aÕÿÿÿÿûðÔßÿÌÌÿÀÜÀªßÿ¦Êðÿ˜ÿÿߪÔߪÿ¿ªÔ¿ªª¿ªªŸª€€€ª_ªU_ªU?ªUªÿÿUÿßUÔßUÿ¿UÔ¿UÔŸUª¿UªŸUÿßÿ¿Ô¿ÔŸªUª_Uª?Uªª_ª?U_UU?U_?!ù ,öÀƒpx@\0q9ÌŒ*J¥rd ”ÑÆí^"JÁ€HŒ´‚I-ˆj23A7ÏÏp•€êR#&uBP]RkSccŽ]( S(‚Q›l–® | %%T( ¸d³!c q%"T'SSS%! ¬ÝÏÑâC!«í*Ñ"' „D€âB± D”øpႵ\<@q¢!¹xH;˜ŠcEiϤ¥b"òYŸŒ—¡”†òdÅ@öþxr&Í–þýëS2YËT|ˆ¶Œˆ±´Ž)£.ãÃGd&ðúRÕ²fÍŠÎj]ˆb˳"—-C¥¬Ï2´g­U¶¬T ¨"éˆt6’îÚ­ÉPµ¤“Šï³TtQ¡:ÖZ2„†KÑ %7ñ2e¤v D…ø™²Rxê*õ™pW¡¡ºŒ¸Ÿ:t Læ£ê¡ªR«•!^{Ìuí‡S•"õy4 R¨§V(P)U€;././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/embaressed_smile.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/embaressed_smile.0000755000175000017500000000206511471562005033144 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,þ“ L†‚ ´TL ¢(5°!A&R-{FñY)(\9LvÚDiÏ@V̳LcCh¥€”6­O Š¡5|ˆIŸ}ì¡àCQÙ3RŸõù·d  y¦r–*U2GcÜ”6”èÍgË”•råjÙP{}ŒþÈYÖT¤T-;¶,PŸi[º] ꘰c|HæëLŠÃ:ýúUŠ”±>ÇŒ…ú꯲_¾8ý2v¬U¥ŽõuF‘sªÀƒI K -q©‰0• öKôa©Ž±­h6•1½ F3ˆj*:À£ÐQ¶Ìp)e} DI|Y*eÊšjUvÙ¡«R¨”õ>®•TU¦*Lª{Ÿ­áºRÕ§}*“ ;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/shades_smile.gif0000755000175000017500000000204311471562005032763 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,þ“  ZªT¨ \¸ðÙ²g!¦ZÆàCiÏ0F|–ÊCh1ŠÜÈš@A1”JZ >*éñ!µL)Ä€O%€-RúP¯O2r8ˆô^‹zø,sÆ'ž«¡PIà  J«eË`¤‚ gˆ0Uö|¦Lªe}BUéb *=W:¬IªªI*[ö6hÊH’tV“0)SŸñá3`rå©„ëãñ!•WÔQ{5ì[e¥H•¨zÀ«ÿø”z‹ê*eœ ¢*…'‹lÚ¶q«bèj6áeÆh—ê3¼b²TªIA/*Gç]© ŧO*;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/sad_smile.gif0000755000175000017500000000201711471562005032264 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,ì“ ˜ Ú²TË \8ðÙ²gŸ!LÅP Aˆ­že„xÐÕBhCFŒè,•ÂËZ¥êÓ'UÄT|Z.#Õ"Lø´’ö¬ |RLæòY x(E<Š¢Ï3e¥ äÙçß?¥ûØ»Šj*U)!²êTìÖ>Ë –*ª±O ÉìŠväH¸»¢ dïH„ÊR)›©*ªˆ­P•¢Ã˜T×À¤ú(DXòã@¥HÕ¡“j ¤rN»Ìk(:¦=Z$•JïA¨ÊPÁ,LÐ)¯^c{-Š6ÃT™KÍ,ŧ‚Š¡©’HU4†;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/tounge_smile.gif0000755000175000017500000000203711471562005033020 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,ü“ ˜ Ú²TË \8ðÙ²gÒ¤=s˜Š¡@h© FÔ81•«…Ð8JÜ(ñY*…Sõ Mâ4U+3N$Õ°Ï?{}"J dï_ ‰. $È'Äg}ŠþZ ZÈLå„È'êRgËP©šØ>Ò¦=ËâÐeÊ¥’¦’Jƈ*Èĺ¬ÔÑ#êE;4äÑ¿%Ÿ9{¦l)UÉPéXŸ*Y—Røp@Ÿe—-§žÂ©J¥<8€O©<|:-Ö)²PbÄZŠOjaÆý¢Ó1AW¥×¥SÇ×1a¾òXL†°°²}Ö9P4™¨P) ÝÅiWL8} U#ø¨_0…Ü瀠¶&C)õ2?‚l|›q£.È æ)»+Ïá„ñÈ¥s/3BU™0Ý3º`žNŸ[D@M¶m;././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/confused_smile.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/confused_smile.gi0000755000175000017500000000050211471562005033152 0ustar achapmanachapmanGIF89aÄÿÿÿÿûðÀÜÀÿ˜ÿÿߪÔߪÿ¿ªÔ¿ª  ¤ªŸªÿÿUÿßUÿ¿UÔ¿UÔŸUªŸUÿßÿ¿Ô¿ÔŸªŸÔUªUª_Uª?UÔªª_ª?U!ù ,¿à ŽÁ4 A®ãÂ,в¸ + Ã|S¬/&›5T-Áò ȇÇc6iÍ€e÷hi"FÌ’ðLÇÄtá eDg ÷ ,.Éa6ö®Y 90L ;Ї. |“;3–…M–O›3./2– … ?ˆ  ’®#F­˜˜?"¿Ÿ ˜Ÿ… £$Ï „'Ô, Û ¡É6%QR,!;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/teeth_smile.gif0000755000175000017500000000205011471562005032623 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,þ“ ˜ Ú³TË \8ZŸVЦMKhCРÙû×gÚ³iþýkåj!´V}D’&1%Ç„ŸA „‚IGƒ4™zVj Li}PÔã%ñˆ.K%0Õ4h©úàq1*ŸT2SeüÈò£ÇiÒ"4˜JÕ²§h¿>•&óÙ³eËJ9•–êêG®'£bu¸Lfj|ª¤‚x0jYà:9Ï«E¯øôgÀãxªJÖ7Õ€ö¨Q{EÚž½«Ë'Ó 5+Ó°Ue)u°gS·©ªðQåJ6Úq4Ôê¶Ô€>¨ßÚLЩ„oû&LUŠ9Cê¡Å-¨äEŒªõYî`@;././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/whatchutalkingabout_smile.gifzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/whatchutalkingabo0000755000175000017500000000201211471562005033252 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,ç“ ˜ Ú²TË \8ðÙ²gÒ¤=s˜Š¡@ULP (%QZ*U-„Æ$•G¥môÈÄA“Ò E”6-åÄg¥J[¨O “Sùì³ì ÀeÒú¸ú­OÄg–º ä,'4ˆþ¡øçbŸLþ:¨êaR©žFý‡ 2ec%¶š ¢Ãž?‹þ´Ûñ©Ä›Ë”ñ¼Ê÷¦aeÏ“ùÐðÄ¿£Ê™¬îcÇΊNh ª›tB‡†Bçªe¡\ „–*3`ÍŠETUJ°²T’ò‘Í0U©Ó’IEµ8šª@ÈU½b;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/kiss.gif0000755000175000017500000000172211471562005031277 0ustar achapmanachapmanGIF89a÷€€€€€€€€€€€€ÀÜÀ¦Êð*?ª*?ÿ*_*_U*_ª*_ÿ**U*ª*ÿ*Ÿ*ŸU*Ÿª*Ÿÿ*¿*¿U*¿ª*¿ÿ*ß*ßU*ߪ*ßÿ*ÿ*ÿU*ÿª*ÿÿUUUUªUÿUUUUªUÿU?U?UU?ªU?ÿU_U_UU_ªU_ÿUUUUªUÿUŸUŸUUŸªUŸÿU¿U¿UU¿ªU¿ÿUßUßUUߪUßÿUÿUÿUUÿªUÿÿUªÿUªÿ??U?ª?ÿ__U_ª_ÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿÿUÿªÿÿªªUªªªÿªªUªªªÿª?ª?Uª?ªª?ÿª_ª_Uª_ªª_ÿªªUªªªÿªŸªŸUªŸªªŸÿª¿ª¿Uª¿ªª¿ÿªßªßUªßªªßÿªÿªÿUªÿªªÿÿÔÔUÔªÔÿÔÔUÔªÔÿÔ?Ô?UÔ?ªÔ?ÿÔ_Ô_UÔ_ªÔ_ÿÔÔUÔªÔÿÔŸÔŸUÔŸªÔŸÿÔ¿Ô¿UÔ¿ªÔ¿ÿÔßÔßUÔߪÔßÿÔÿÔÿUÔÿªÔÿÿÿUÿªÿÿUÿªÿÿÿ?ÿ?Uÿ?ªÿ?ÿÿ_ÿ_Uÿ_ªÿ_ÿÿÿUÿªÿÿÿŸÿŸUÿŸªÿŸÿÿ¿ÿ¿Uÿ¿ªÿ¿ÿÿßÿßUÿߪÿßÿÿÿUÿÿªÌÌÿÿÌÿ3ÿÿfÿÿ™ÿÿÌÿÿUªÿŸŸUŸªŸÿ¿¿U¿ª¿ÿßßUߪßÿÿUÿª**U*ª*ÿ**U*ª*ÿ*?*?Uÿûð  ¤€€€ÿÿÿÿÿÿÿÿÿÿÿÿ!ù É,¯“ H° Áƒ*DØ©ª:-ìä«¡)StuzÅ3_¿8u´«S(ƒC1ûE1HL Ol’¥/d83éÚU1Àµj #$g†\$†n x#•Q# #‰Ig£u‚ ! ‡# "¥ h^³c^`iymPbPÉv‰‰˜pmy‰U$OšO\À#˜¶ Y”ú‡˜äBf½É’%`„gMÆÀƒ-œtM„$ðP!& <&%iH Ÿg|tòLµuÙ±RU%öYÉu*ÏR‚BkVã±T`f•ÚµŸc-“™ZÛ5TŸ@‚î™bz&Ï> þÞS… ñ+„JÙý+H!/"PeHf“_e¾;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/smiley/msn/lightbulb.gif0000755000175000017500000000045711471562005032306 0ustar achapmanachapmanGIF89aÄÿÿÿÿûðÿßÿÔßÿÌÌÿÀÜÀ¦Êðÿ˜ÿÿÿªÿߪÔߪԿªÔŸªª¿ª  ¤ªŸª€€€ŸªÿÿUÿßUÔ¿UÔŸUªŸU€€ªUª_Uª_UU_U*_UU?U!ù ,¬ V$¹œcIjÇ’¥íBQÕ£bËX G±$„€íJ¾@p"I (ªôC$šBá‰7] ˜Â PQaX–«¡T’mçÂèe·‹Úkª $vx S$Vm 0*Y‘S~RS,}B™) %8£\ 0)†H›$´Â‡S³6ˇ³šÒËrÄ$!;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/arrow_ltr.gif0000755000175000017500000000006111471562005030235 0ustar achapmanachapmanGIF89a€ÿÿÿ!ù,Diì«T(;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/images/anchor.gif0000755000175000017500000000027011471562005027476 0ustar achapmanachapmanGIF89a³ –––€€ÿÿ™ÿÿÿÌÿ™™ÿÿÌ33ÌÌÿÿÿ!ù ,e0IiÐA3#Ãë(‡ Å‘l”1‰r‚…¸d ÌF}á°ÃÎêÙ€:žïöJÞÆ‹€@îFÄ’„8/̬íPÚUàÒÁKžˆ•ÃzU-O6µ•¡skö]rB‚„;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/wsc/0000755000175000017500000000000011473031634025063 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/wsc/ciframe.html0000644000175000017500000000307111471562006027360 0ustar achapmanachapman

zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/wsc/tmpFrameset.html0000644000175000017500000000464311471562006030247 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/wsc/w.html0000644000175000017500000001321111471562006026215 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/js/0000755000175000017500000000000011473031634024703 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/js/fckeditorcode_gecko.js0000755000175000017500000077652411471562006031246 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This file has been compressed for better performance. The original source * can be found at "editor/_source". */ var FCK_STATUS_NOTLOADED=window.parent.FCK_STATUS_NOTLOADED=0;var FCK_STATUS_ACTIVE=window.parent.FCK_STATUS_ACTIVE=1;var FCK_STATUS_COMPLETE=window.parent.FCK_STATUS_COMPLETE=2;var FCK_TRISTATE_OFF=window.parent.FCK_TRISTATE_OFF=0;var FCK_TRISTATE_ON=window.parent.FCK_TRISTATE_ON=1;var FCK_TRISTATE_DISABLED=window.parent.FCK_TRISTATE_DISABLED=-1;var FCK_UNKNOWN=window.parent.FCK_UNKNOWN=-9;var FCK_TOOLBARITEM_ONLYICON=window.parent.FCK_TOOLBARITEM_ONLYICON=0;var FCK_TOOLBARITEM_ONLYTEXT=window.parent.FCK_TOOLBARITEM_ONLYTEXT=1;var FCK_TOOLBARITEM_ICONTEXT=window.parent.FCK_TOOLBARITEM_ICONTEXT=2;var FCK_EDITMODE_WYSIWYG=window.parent.FCK_EDITMODE_WYSIWYG=0;var FCK_EDITMODE_SOURCE=window.parent.FCK_EDITMODE_SOURCE=1;var FCK_IMAGES_PATH='images/';var FCK_SPACER_PATH='images/spacer.gif';var CTRL=1000;var SHIFT=2000;var ALT=4000;var FCK_STYLE_BLOCK=0;var FCK_STYLE_INLINE=1;var FCK_STYLE_OBJECT=2; String.prototype.Contains=function(A){return (this.indexOf(A)>-1);};String.prototype.Equals=function(){var A=arguments;if (A.length==1&&A[0].pop) A=A[0];for (var i=0;iC) return false;if (B){var E=new RegExp(A+'$','i');return E.test(this);}else return (D==0||this.substr(C-D,D)==A);};String.prototype.Remove=function(A,B){var s='';if (A>0) s=this.substring(0,A);if (A+B=7),IsIE6:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=6),IsSafari:s.Contains(' applewebkit/'),IsOpera:!!window.opera,IsAIR:s.Contains(' adobeair/'),IsMac:s.Contains('macintosh')};(function(A){A.IsGecko=(navigator.product=='Gecko')&&!A.IsSafari&&!A.IsOpera;A.IsGeckoLike=(A.IsGecko||A.IsSafari||A.IsOpera);if (A.IsGecko){var B=s.match(/rv:(\d+\.\d+)/);var C=B&&parseFloat(B[1]);if (C){A.IsGecko10=(C<1.8);A.IsGecko19=(C>1.8);}}})(FCKBrowserInfo); var FCKURLParams={};(function(){var A=document.location.search.substr(1).split('&');for (var i=0;i';if (!FCKRegexLib.HtmlOpener.test(A)) A=''+A+'';if (!FCKRegexLib.HeadOpener.test(A)) A=A.replace(FCKRegexLib.HtmlOpener,'$&');return A;}else{var B=FCKConfig.DocType+'0&&!FCKRegexLib.Html4DocType.test(FCKConfig.DocType)) B+=' style="overflow-y: scroll"';B+='>'+A+'';return B;}},ConvertToDataFormat:function(A,B,C,D){var E=FCKXHtml.GetXHTML(A,!B,D);if (C&&FCKRegexLib.EmptyOutParagraph.test(E)) return '';return E;},FixHtml:function(A){return A;}}; var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasFocus:false,DataProcessor:new FCKDataProcessor(),GetInstanceObject:(function(){var w=window;return function(name){return w[name];}})(),AttachToOnSelectionChange:function(A){this.Events.AttachEvent('OnSelectionChange',A);},GetLinkedFieldValue:function(){return this.LinkedField.value;},GetParentForm:function(){return this.LinkedField.form;},StartupValue:'',IsDirty:function(){if (this.EditMode==1) return (this.StartupValue!=this.EditingArea.Textarea.value);else{if (!this.EditorDocument) return false;return (this.StartupValue!=this.EditorDocument.body.innerHTML);}},ResetIsDirty:function(){if (this.EditMode==1) this.StartupValue=this.EditingArea.Textarea.value;else if (this.EditorDocument.body) this.StartupValue=this.EditorDocument.body.innerHTML;},StartEditor:function(){this.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';var A=FCK.KeystrokeHandler=new FCKKeystrokeHandler();A.OnKeystroke=_FCK_KeystrokeHandler_OnKeystroke;A.SetKeystrokes(FCKConfig.Keystrokes);if (FCKBrowserInfo.IsIE7){if ((CTRL+86) in A.Keystrokes) A.SetKeystrokes([CTRL+86,true]);if ((SHIFT+45) in A.Keystrokes) A.SetKeystrokes([SHIFT+45,true]);};A.SetKeystrokes([CTRL+8,true]);this.EditingArea=new FCKEditingArea(document.getElementById('xEditingArea'));this.EditingArea.FFSpellChecker=FCKConfig.FirefoxSpellChecker;this.SetData(this.GetLinkedFieldValue(),true);FCKTools.AddEventListener(document,"keydown",this._TabKeyHandler);this.AttachToOnSelectionChange(_FCK_PaddingNodeListener);if (FCKBrowserInfo.IsGecko) this.AttachToOnSelectionChange(this._ExecCheckEmptyBlock);},Focus:function(){FCK.EditingArea.Focus();},SetStatus:function(A){this.Status=A;if (A==1){FCKFocusManager.AddWindow(window,true);if (FCKBrowserInfo.IsIE) FCKFocusManager.AddWindow(window.frameElement,true);if (FCKConfig.StartupFocus) FCK.Focus();};this.Events.FireEvent('OnStatusChange',A);},FixBody:function(){var A=FCKConfig.EnterMode;if (A!='p'&&A!='div') return;var B=this.EditorDocument;if (!B) return;var C=B.body;if (!C) return;FCKDomTools.TrimNode(C);var D=C.firstChild;var E;while (D){var F=false;switch (D.nodeType){case 1:var G=D.nodeName.toLowerCase();if (!FCKListsLib.BlockElements[G]&&G!='li'&&!D.getAttribute('_fckfakelement')&&D.getAttribute('_moz_dirty')==null) F=true;break;case 3:if (E||D.nodeValue.Trim().length>0) F=true;break;case 8:if (E) F=true;break;};if (F){var H=D.parentNode;if (!E) E=H.insertBefore(B.createElement(A),D);E.appendChild(H.removeChild(D));D=E.nextSibling;}else{if (E){FCKDomTools.TrimNode(E);E=null;};D=D.nextSibling;}};if (E) FCKDomTools.TrimNode(E);},GetData:function(A){if (FCK.EditMode==1) return FCK.EditingArea.Textarea.value;this.FixBody();var B=FCK.EditorDocument;if (!B) return null;var C=FCKConfig.FullPage;var D=FCK.DataProcessor.ConvertToDataFormat(C?B.documentElement:B.body,!C,FCKConfig.IgnoreEmptyParagraphValue,A);D=FCK.ProtectEventsRestore(D);if (FCKBrowserInfo.IsIE) D=D.replace(FCKRegexLib.ToReplace,'$1');if (C){if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) D=FCK.DocTypeDeclaration+'\n'+D;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) D=FCK.XmlDeclaration+'\n'+D;};return FCKConfig.ProtectedSource.Revert(D);},UpdateLinkedField:function(){var A=FCK.GetXHTML(FCKConfig.FormatOutput);if (FCKConfig.HtmlEncodeOutput) A=FCKTools.HTMLEncode(A);FCK.LinkedField.value=A;FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');},RegisteredDoubleClickHandlers:{},OnDoubleClick:function(A){var B=FCK.RegisteredDoubleClickHandlers[A.tagName.toUpperCase()];if (B){for (var i=0;i0?'|ABBR|XML|EMBED|OBJECT':'ABBR|XML|EMBED|OBJECT';var C;if (B.length>0){C=new RegExp('<('+B+')(?!\w|:)','gi');A=A.replace(C,'','gi');A=A.replace(C,'<\/FCK:$1>');};B='META';if (FCKBrowserInfo.IsIE) B+='|HR';C=new RegExp('<(('+B+')(?=\\s|>|/)[\\s\\S]*?)/?>','gi');A=A.replace(C,'');return A;},SetData:function(A,B){this.EditingArea.Mode=FCK.EditMode;if (FCKBrowserInfo.IsIE&&FCK.EditorDocument){FCK.EditorDocument.detachEvent("onselectionchange",Doc_OnSelectionChange);};FCKTempBin.Reset();FCK.Selection.Release();if (FCK.EditMode==0){this._ForceResetIsDirty=(B===true);A=FCKConfig.ProtectedSource.Protect(A);A=FCK.DataProcessor.ConvertToHtml(A);A=A.replace(FCKRegexLib.InvalidSelfCloseTags,'$1>');A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(A)) A=A.replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);var C='';if (!FCKConfig.FullPage) C+=_FCK_GetEditorAreaStyleTags();if (FCKBrowserInfo.IsIE) C+=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C+=FCKTools.GetStyleHtml(FCK_ShowTableBordersCSS,true);C+=FCKTools.GetStyleHtml(FCK_InternalCSS,true);A=A.replace(FCKRegexLib.HeadCloser,C+'$&');this.EditingArea.OnLoad=_FCK_EditingArea_OnLoad;this.EditingArea.Start(A);}else{FCK.EditorWindow=null;FCK.EditorDocument=null;FCKDomTools.PaddingNode=null;this.EditingArea.OnLoad=null;this.EditingArea.Start(A);this.EditingArea.Textarea._FCKShowContextMenu=true;FCK.EnterKeyHandler=null;if (B) this.ResetIsDirty();FCK.KeystrokeHandler.AttachToElement(this.EditingArea.Textarea);this.EditingArea.Textarea.focus();FCK.Events.FireEvent('OnAfterSetHTML');};if (FCKBrowserInfo.IsGecko) window.onresize();},RedirectNamedCommands:{},ExecuteNamedCommand:function(A,B,C,D){if (!D) FCKUndo.SaveUndoStep();if (!C&&FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};if (!D) FCKUndo.SaveUndoStep();},GetNamedCommandState:function(A){try{if (FCKBrowserInfo.IsSafari&&FCK.EditorWindow&&A.IEquals('Paste')) return 0;if (!FCK.EditorDocument.queryCommandEnabled(A)) return -1;else{return FCK.EditorDocument.queryCommandState(A)?1:0;}}catch (e){return 0;}},GetNamedCommandValue:function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==-1) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';},Paste:function(A){if (FCK.Status!=2||!FCK.Events.FireEvent('OnPaste')) return false;return A||FCK._ExecPaste();},PasteFromWord:function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');},Preview:function(){var A;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) A=FCK.TempBaseTag+FCK.GetXHTML();else A=FCK.GetXHTML();}else{A=FCKConfig.DocType+''+FCK.TempBaseTag+''+FCKLang.Preview+''+_FCK_GetEditorAreaStyleTags()+''+FCK.GetXHTML()+'';};var B=FCKConfig.ScreenWidth*0.8;var C=FCKConfig.ScreenHeight*0.7;var D=(FCKConfig.ScreenWidth-B)/2;var E='';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A;E='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.opener._FCKHtmlToLoad );document.close() ;window.opener._FCKHtmlToLoad = null ;})() )';};var F=window.open(E,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+B+',height='+C+',left='+D);if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){F.document.write(A);F.document.close();}},SwitchEditMode:function(A){var B=(FCK.EditMode==0);var C=FCK.IsDirty();var D;if (B){FCKCommands.GetCommand('ShowBlocks').SaveState();if (!A&&FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();D=FCK.GetXHTML(FCKConfig.FormatSource);if (FCKBrowserInfo.IsIE) FCKTempBin.ToHtml();if (D==null) return false;}else D=this.EditingArea.Textarea.value;FCK.EditMode=B?1:0;FCK.SetData(D,!C);FCK.Focus();FCKTools.RunFunction(FCK.ToolbarSet.RefreshModeState,FCK.ToolbarSet);return true;},InsertElement:function(A){if (typeof A=='string') A=this.EditorDocument.createElement(A);var B=A.nodeName.toLowerCase();FCKSelection.Restore();var C=new FCKDomRange(this.EditorWindow);C.MoveToSelection();C.DeleteContents();if (FCKListsLib.BlockElements[B]!=null){if (C.StartBlock){if (C.CheckStartOfBlock()) C.MoveToPosition(C.StartBlock,3);else if (C.CheckEndOfBlock()) C.MoveToPosition(C.StartBlock,4);else C.SplitBlock();};C.InsertNode(A);var D=FCKDomTools.GetNextSourceElement(A,false,null,['hr','br','param','img','area','input'],true);if (!D&&FCKConfig.EnterMode!='br'){D=this.EditorDocument.body.appendChild(this.EditorDocument.createElement(FCKConfig.EnterMode));if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);};if (FCKListsLib.EmptyElements[B]==null) C.MoveToElementEditStart(A);else if (D) C.MoveToElementEditStart(D);else C.MoveToPosition(A,4);if (FCKBrowserInfo.IsGeckoLike){if (D) FCKDomTools.ScrollIntoView(D,false);FCKDomTools.ScrollIntoView(A,false);}}else{C.InsertNode(A);C.SetStart(A,4);C.SetEnd(A,4);};C.Select();C.Release();this.Focus();return A;},_InsertBlockElement:function(A){},_IsFunctionKey:function(A){if (A>=16&&A<=20) return true;if (A==27||(A>=33&&A<=40)) return true;if (A==45) return true;return false;},_KeyDownListener:function(A){if (!A) A=FCK.EditorWindow.event;if (FCK.EditorWindow){if (!FCK._IsFunctionKey(A.keyCode)&&!(A.ctrlKey||A.metaKey)&&!(A.keyCode==46)) FCK._KeyDownUndo();};return true;},_KeyDownUndo:function(){if (!FCKUndo.Typing){FCKUndo.SaveUndoStep();FCKUndo.Typing=true;FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.TypesCount++;FCKUndo.Changed=1;if (FCKUndo.TypesCount>FCKUndo.MaxTypes){FCKUndo.TypesCount=0;FCKUndo.SaveUndoStep();}},_TabKeyHandler:function(A){if (!A) A=window.event;var B=A.keyCode;if (B==9&&FCK.EditMode!=0){if (FCKBrowserInfo.IsIE){var C=document.selection.createRange();if (C.parentElement()!=FCK.EditingArea.Textarea) return true;C.text='\t';C.select();}else{var a=[];var D=FCK.EditingArea.Textarea;var E=D.selectionStart;var F=D.selectionEnd;a.push(D.value.substr(0,E));a.push('\t');a.push(D.value.substr(F));D.value=a.join('');D.setSelectionRange(E+1,E+1);};if (A.preventDefault) return A.preventDefault();return A.returnValue=false;};return true;}};FCK.Events=new FCKEvents(FCK);FCK.GetHTML=FCK.GetXHTML=FCK.GetData;FCK.SetHTML=FCK.SetData;FCK.InsertElementAndGetIt=FCK.CreateElement=FCK.InsertElement;function _FCK_ProtectEvents_ReplaceTags(A){return A.replace(FCKRegexLib.EventAttributes,_FCK_ProtectEvents_ReplaceEvents);};function _FCK_ProtectEvents_ReplaceEvents(A,B){return ' '+B+'_fckprotectedatt="'+encodeURIComponent(A)+'"';};function _FCK_ProtectEvents_RestoreEvents(A,B){return decodeURIComponent(B);};function _FCK_MouseEventsListener(A){if (!A) A=window.event;if (A.type=='mousedown') FCK.MouseDownFlag=true;else if (A.type=='mouseup') FCK.MouseDownFlag=false;else if (A.type=='mousemove') FCK.Events.FireEvent('OnMouseMove',A);};function _FCK_PaddingNodeListener(){if (FCKConfig.EnterMode.IEquals('br')) return;FCKDomTools.EnforcePaddingNode(FCK.EditorDocument,FCKConfig.EnterMode);if (!FCKBrowserInfo.IsIE&&FCKDomTools.PaddingNode){var A=FCKSelection.GetSelection();if (A&&A.rangeCount==1){var B=A.getRangeAt(0);if (B.collapsed&&B.startContainer==FCK.EditorDocument.body&&B.startOffset==0){B.selectNodeContents(FCKDomTools.PaddingNode);B.collapse(true);A.removeAllRanges();A.addRange(B);}}}else if (FCKDomTools.PaddingNode){var C=FCKSelection.GetParentElement();var D=FCKDomTools.PaddingNode;if (C&&C.nodeName.IEquals('body')){if (FCK.EditorDocument.body.childNodes.length==1&&FCK.EditorDocument.body.firstChild==D){if (FCKSelection._GetSelectionDocument(FCK.EditorDocument.selection)!=FCK.EditorDocument) return;var B=FCK.EditorDocument.body.createTextRange();var F=false;if (!D.childNodes.firstChild){D.appendChild(FCKTools.GetElementDocument(D).createTextNode('\ufeff'));F=true;};B.moveToElementText(D);B.select();if (F) B.pasteHTML('');}}}};function _FCK_EditingArea_OnLoad(){FCK.EditorWindow=FCK.EditingArea.Window;FCK.EditorDocument=FCK.EditingArea.Document;if (FCKBrowserInfo.IsIE) FCKTempBin.ToElements();FCK.InitializeBehaviors();FCK.MouseDownFlag=false;FCKTools.AddEventListener(FCK.EditorDocument,'mousemove',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mouseup',_FCK_MouseEventsListener);if (FCKBrowserInfo.IsSafari){var A=function(evt){if (!(evt.ctrlKey||evt.metaKey)) return;if (FCK.EditMode!=0) return;switch (evt.keyCode){case 89:FCKUndo.Redo();break;case 90:FCKUndo.Undo();break;}};FCKTools.AddEventListener(FCK.EditorDocument,'keyup',A);};FCK.EnterKeyHandler=new FCKEnterKey(FCK.EditorWindow,FCKConfig.EnterMode,FCKConfig.ShiftEnterMode,FCKConfig.TabSpaces);FCK.KeystrokeHandler.AttachToElement(FCK.EditorDocument);if (FCK._ForceResetIsDirty) FCK.ResetIsDirty();if (FCKBrowserInfo.IsIE&&FCK.HasFocus) FCK.EditorDocument.body.setActive();FCK.OnAfterSetHTML();FCKCommands.GetCommand('ShowBlocks').RestoreState();if (FCK.Status!=0) return;FCK.SetStatus(1);};function _FCK_GetEditorAreaStyleTags(){return FCKTools.GetStyleHtml(FCKConfig.EditorAreaCSS)+FCKTools.GetStyleHtml(FCKConfig.EditorAreaStyles);};function _FCK_KeystrokeHandler_OnKeystroke(A,B){if (FCK.Status!=2) return false;if (FCK.EditMode==0){switch (B){case 'Paste':return!FCK.Paste();case 'Cut':FCKUndo.SaveUndoStep();return false;}}else{if (B.Equals('Paste','Undo','Redo','SelectAll','Cut')) return false;};var C=FCK.Commands.GetCommand(B);if (C.GetState()==-1) return false;return (C.Execute.apply(C,FCKTools.ArgumentsToArray(arguments,2))!==false);};(function(){var A=window.parent.document;var B=A.getElementById(FCK.Name);var i=0;while (B||i==0){if (B&&B.tagName.toLowerCase().Equals('input','textarea')){FCK.LinkedField=B;break;};B=A.getElementsByName(FCK.Name)[i++];}})();var FCKTempBin={Elements:[],AddElement:function(A){var B=this.Elements.length;this.Elements[B]=A;return B;},RemoveElement:function(A){var e=this.Elements[A];this.Elements[A]=null;return e;},Reset:function(){var i=0;while (i '+this.Elements[i].outerHTML+'';this.Elements[i].isHtml=true;}},ToElements:function(){var A=FCK.EditorDocument.createElement('div');for (var i=0;i40) return;};var C=function(H){if (H.nodeType!=1) return false;var D=H.tagName.toLowerCase();return (FCKListsLib.BlockElements[D]||FCKListsLib.EmptyElements[D]);};var E=function(){var F=FCKSelection.GetSelection();var G=F.getRangeAt(0);if (!G||!G.collapsed) return;var H=G.endContainer;if (H.nodeType!=3) return;if (H.nodeValue.length!=G.endOffset) return;var I=H.parentNode.tagName.toLowerCase();if (!(I=='a'||(!FCKBrowserInfo.IsOpera&&String(H.parentNode.contentEditable)=='false')||(!(FCKListsLib.BlockElements[I]||FCKListsLib.NonEmptyBlockElements[I])&&B==35))) return;var J=FCKTools.GetNextTextNode(H,H.parentNode,C);if (J) return;G=FCK.EditorDocument.createRange();J=FCKTools.GetNextTextNode(H,H.parentNode.parentNode,C);if (J){if (FCKBrowserInfo.IsOpera&&B==37) return;G.setStart(J,0);G.setEnd(J,0);}else{while (H.parentNode&&H.parentNode!=FCK.EditorDocument.body&&H.parentNode!=FCK.EditorDocument.documentElement&&H==H.parentNode.lastChild&&(!FCKListsLib.BlockElements[H.parentNode.tagName.toLowerCase()]&&!FCKListsLib.NonEmptyBlockElements[H.parentNode.tagName.toLowerCase()])) H=H.parentNode;if (FCKListsLib.BlockElements[I]||FCKListsLib.EmptyElements[I]||H==FCK.EditorDocument.body){G.setStart(H,H.childNodes.length);G.setEnd(H,H.childNodes.length);}else{var K=H.nextSibling;while (K){if (K.nodeType!=1){K=K.nextSibling;continue;};var L=K.tagName.toLowerCase();if (FCKListsLib.BlockElements[L]||FCKListsLib.EmptyElements[L]||FCKListsLib.NonEmptyBlockElements[L]) break;K=K.nextSibling;};var M=FCK.EditorDocument.createTextNode('');if (K) H.parentNode.insertBefore(M,K);else H.parentNode.appendChild(M);G.setStart(M,0);G.setEnd(M,0);}};F.removeAllRanges();F.addRange(G);FCK.Events.FireEvent("OnSelectionChange");};setTimeout(E,1);};this.ExecOnSelectionChangeTimer=function(){if (FCK.LastOnChangeTimer) window.clearTimeout(FCK.LastOnChangeTimer);FCK.LastOnChangeTimer=window.setTimeout(FCK.ExecOnSelectionChange,100);};this.EditorDocument.addEventListener('mouseup',this.ExecOnSelectionChange,false);this.EditorDocument.addEventListener('keyup',this.ExecOnSelectionChangeTimer,false);this._DblClickListener=function(e){FCK.OnDoubleClick(e.target);e.stopPropagation();};this.EditorDocument.addEventListener('dblclick',this._DblClickListener,true);this.EditorDocument.addEventListener('keydown',this._KeyDownListener,false);if (FCKBrowserInfo.IsGecko){this.EditorWindow.addEventListener('dragdrop',this._ExecDrop,true);}else if (FCKBrowserInfo.IsSafari){this.EditorDocument.addEventListener('dragover',function (evt){ if (!FCK.MouseDownFlag&&FCK.Config.ForcePasteAsPlainText) evt.returnValue=false;},true);this.EditorDocument.addEventListener('drop',this._ExecDrop,true);this.EditorDocument.addEventListener('mousedown',function(ev){var N=ev.srcElement;if (N.nodeName.IEquals('IMG','HR','INPUT','TEXTAREA','SELECT')){FCKSelection.SelectNode(N);}},true);this.EditorDocument.addEventListener('mouseup',function(ev){if (ev.srcElement.nodeName.IEquals('INPUT','TEXTAREA','SELECT')) ev.preventDefault()},true);this.EditorDocument.addEventListener('click',function(ev){if (ev.srcElement.nodeName.IEquals('INPUT','TEXTAREA','SELECT')) ev.preventDefault()},true);};if (FCKBrowserInfo.IsGecko||FCKBrowserInfo.IsOpera){this.EditorDocument.addEventListener('keypress',this._ExecCheckCaret,false);this.EditorDocument.addEventListener('click',this._ExecCheckCaret,false);};FCK.ContextMenu._InnerContextMenu.SetMouseClickWindow(FCK.EditorWindow);FCK.ContextMenu._InnerContextMenu.AttachToElement(FCK.EditorDocument);};FCK.MakeEditable=function(){this.EditingArea.MakeEditable();};function Document_OnContextMenu(e){if (!e.target._FCKShowContextMenu) e.preventDefault();};document.oncontextmenu=Document_OnContextMenu;FCK._BaseGetNamedCommandState=FCK.GetNamedCommandState;FCK.GetNamedCommandState=function(A){switch (A){case 'Unlink':return FCKSelection.HasAncestorNode('A')?0:-1;default:return FCK._BaseGetNamedCommandState(A);}};FCK.RedirectNamedCommands={Print:true,Paste:true};FCK.ExecuteRedirectedNamedCommand=function(A,B){switch (A){case 'Print':FCK.EditorWindow.print();break;case 'Paste':try{if (FCKBrowserInfo.IsSafari) throw '';if (FCK.Paste()) FCK.ExecuteNamedCommand('Paste',null,true);}catch (e) {if (FCKConfig.ForcePasteAsPlainText) FCK.PasteAsPlainText();else FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.Paste,'dialog/fck_paste.html',400,330,'Security');};break;default:FCK.ExecuteNamedCommand(A,B);}};FCK._ExecPaste=function(){FCKUndo.SaveUndoStep();if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;};return true;};FCK.InsertHtml=function(A){var B=FCK.EditorDocument,range;A=FCKConfig.ProtectedSource.Protect(A);A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGecko){A=A.replace(/ $/,'$&');var C=new FCKDocumentFragment(this.EditorDocument);C.AppendHtml(A);var D=C.RootNode.lastChild;range=new FCKDomRange(this.EditorWindow);range.MoveToSelection();range.DeleteContents();range.InsertNode(C.RootNode);range.MoveToPosition(D,4);}else B.execCommand('inserthtml',false,A);this.Focus();if (!range){range=new FCKDomRange(this.EditorWindow);range.MoveToSelection();};var E=range.CreateBookmark();FCKDocumentProcessor.Process(B);try{range.MoveToBookmark(E);range.Select();}catch (e) {};this.Events.FireEvent("OnSelectionChange");};FCK.PasteAsPlainText=function(){FCKTools.RunFunction(FCKDialog.OpenDialog,FCKDialog,['FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText']);};FCK.GetClipboardHTML=function(){return '';};FCK.CreateLink=function(A,B){var C=[];if (FCKSelection.GetSelection().isCollapsed) return C;FCK.ExecuteNamedCommand('Unlink',null,false,!!B);if (A.length>0){var D='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',D,false,!!B);var E=this.EditorDocument.evaluate("//a[@href='"+D+"']",this.EditorDocument.body,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for (var i=0;i0&&!isNaN(E)) this.PageConfig[D]=parseInt(E,10);else this.PageConfig[D]=E;}};function FCKConfig_LoadPageConfig(){var A=FCKConfig.PageConfig;for (var B in A) FCKConfig[B]=A[B];};function FCKConfig_PreProcess(){var A=FCKConfig;if (A.AllowQueryStringDebug){try{if ((/fckdebug=true/i).test(window.top.location.search)) A.Debug=true;}catch (e) { }};if (!A.PluginsPath.EndsWith('/')) A.PluginsPath+='/';var B=A.ToolbarComboPreviewCSS;if (!B||B.length==0) A.ToolbarComboPreviewCSS=A.EditorAreaCSS;A.RemoveAttributesArray=(A.RemoveAttributes||'').split(',');if (!FCKConfig.SkinEditorCSS||FCKConfig.SkinEditorCSS.length==0) FCKConfig.SkinEditorCSS=FCKConfig.SkinPath+'fck_editor.css';if (!FCKConfig.SkinDialogCSS||FCKConfig.SkinDialogCSS.length==0) FCKConfig.SkinDialogCSS=FCKConfig.SkinPath+'fck_dialog.css';};FCKConfig.ToolbarSets={};FCKConfig.Plugins={};FCKConfig.Plugins.Items=[];FCKConfig.Plugins.Add=function(A,B,C){FCKConfig.Plugins.Items.push([A,B,C]);};FCKConfig.ProtectedSource={};FCKConfig.ProtectedSource._CodeTag=(new Date()).valueOf();FCKConfig.ProtectedSource.RegexEntries=[//g,//gi,//gi];FCKConfig.ProtectedSource.Add=function(A){this.RegexEntries.push(A);};FCKConfig.ProtectedSource.Protect=function(A){var B=this._CodeTag;function _Replace(protectedSource){var C=FCKTempBin.AddElement(protectedSource);return '';};for (var i=0;i|>)","g");return A.replace(D,_Replace);};FCKConfig.GetBodyAttributes=function(){var A='';if (this.BodyId&&this.BodyId.length>0) A+=' id="'+this.BodyId+'"';if (this.BodyClass&&this.BodyClass.length>0) A+=' class="'+this.BodyClass+'"';return A;};FCKConfig.ApplyBodyAttributes=function(A){if (this.BodyId&&this.BodyId.length>0) A.id=FCKConfig.BodyId;if (this.BodyClass&&this.BodyClass.length>0) A.className+=' '+FCKConfig.BodyClass;}; var FCKDebug={Output:function(){},OutputObject:function(){}}; var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i0) return true;}else if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E'+styleDef+'';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="

";var H="

";var I="
";if (C){G="
  • ";H="
  • ";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';}; FCKTools.CancelEvent=function(e){if (e) e.preventDefault();};FCKTools.DisableSelection=function(A){if (FCKBrowserInfo.IsGecko) A.style.MozUserSelect='none';else if (FCKBrowserInfo.IsSafari) A.style.KhtmlUserSelect='none';else A.style.userSelect='none';};FCKTools._AppendStyleSheet=function(A,B){var e=A.createElement('LINK');e.rel='stylesheet';e.type='text/css';e.href=B;A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var e=A.createElement("STYLE");e.appendChild(A.createTextNode(B));A.getElementsByTagName("HEAD")[0].appendChild(e);return e;};FCKTools.ClearElementAttributes=function(A){for (var i=0;i0) B[B.length]=D;C(parent.childNodes[i]);}};C(A);return B;};FCKTools.RemoveOuterTags=function(e){var A=e.ownerDocument.createDocumentFragment();for (var i=0;i','text/xml');FCKDomTools.RemoveNode(B.firstChild);return B;};return null;};FCKTools.GetScrollPosition=function(A){return { X:A.pageXOffset,Y:A.pageYOffset };};FCKTools.AddEventListener=function(A,B,C){A.addEventListener(B,C,false);};FCKTools.RemoveEventListener=function(A,B,C){A.removeEventListener(B,C,false);};FCKTools.AddEventListenerEx=function(A,B,C,D){A.addEventListener(B,function(e){C.apply(A,[e].concat(D||[]));},false);};FCKTools.GetViewPaneSize=function(A){return { Width:A.innerWidth,Height:A.innerHeight };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.getAttribute('style');if (D&&D.length>0){C.Inline=D;A.setAttribute('style','',0);};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';if (B.Inline) A.setAttribute('style',B.Inline,0);else A.removeAttribute('style',0);FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=function(id){return A.document.getElementById(id);};};FCKTools.AppendElement=function(A,B){return A.appendChild(A.ownerDocument.createElement(B));};FCKTools.GetElementPosition=function(A,B){var c={ X:0,Y:0 };var C=B||window;var D=FCKTools.GetElementWindow(A);var E=null;while (A){var F=D.getComputedStyle(A,'').position;if (F&&F!='static'&&A.style.zIndex!=FCKConfig.FloatingPanelsZIndex) break;c.X+=A.offsetLeft-A.scrollLeft;c.Y+=A.offsetTop-A.scrollTop;if (!FCKBrowserInfo.IsOpera){var G=E;while (G&&G!=A){c.X-=G.scrollLeft;c.Y-=G.scrollTop;G=G.parentNode;}};E=A;if (A.offsetParent) A=A.offsetParent;else{if (D!=C){A=D.frameElement;E=null;if (A) D=FCKTools.GetElementWindow(A);}else{c.X+=A.scrollLeft;c.Y+=A.scrollTop;break;}}};return c;}; var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.4.1",VersionBuild : "23187",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup); var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/]/i,HtmlOpener:/]*>/i,HeadOpener:/]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| )(<\/\1>)?$/,TagBody:/>]+))/gi,ProtectUrlsA:/]+))/gi,ProtectUrlsArea:/]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/}; var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }}; var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',is:'Icelandic',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i':'gt','ˆ':'circ','Ëœ':'tilde',' ':'ensp',' ':'emsp',' ':'thinsp','‌':'zwnj','â€':'zwj','‎':'lrm','â€':'rlm','–':'ndash','—':'mdash','‘':'lsquo','’':'rsquo','‚':'sbquo','“':'ldquo','â€':'rdquo','„':'bdquo','†':'dagger','‡':'Dagger','‰':'permil','‹':'lsaquo','›':'rsaquo','€':'euro'};for (e in FCKXHtmlEntities.Entities) A+=e;if (FCKConfig.IncludeLatinEntities){B={'À':'Agrave','Ã':'Aacute','Â':'Acirc','Ã':'Atilde','Ä':'Auml','Ã…':'Aring','Æ':'AElig','Ç':'Ccedil','È':'Egrave','É':'Eacute','Ê':'Ecirc','Ë':'Euml','ÃŒ':'Igrave','Ã':'Iacute','ÃŽ':'Icirc','Ã':'Iuml','Ã':'ETH','Ñ':'Ntilde','Ã’':'Ograve','Ó':'Oacute','Ô':'Ocirc','Õ':'Otilde','Ö':'Ouml','Ø':'Oslash','Ù':'Ugrave','Ú':'Uacute','Û':'Ucirc','Ü':'Uuml','Ã':'Yacute','Þ':'THORN','ß':'szlig','à':'agrave','á':'aacute','â':'acirc','ã':'atilde','ä':'auml','Ã¥':'aring','æ':'aelig','ç':'ccedil','è':'egrave','é':'eacute','ê':'ecirc','ë':'euml','ì':'igrave','í':'iacute','î':'icirc','ï':'iuml','ð':'eth','ñ':'ntilde','ò':'ograve','ó':'oacute','ô':'ocirc','õ':'otilde','ö':'ouml','ø':'oslash','ù':'ugrave','ú':'uacute','û':'ucirc','ü':'uuml','ý':'yacute','þ':'thorn','ÿ':'yuml','Å’':'OElig','Å“':'oelig','Å ':'Scaron','Å¡':'scaron','Ÿ':'Yuml'};for (e in B){FCKXHtmlEntities.Entities[e]=B[e];A+=e;};B=null;};if (FCKConfig.IncludeGreekEntities){B={'Α':'Alpha','Î’':'Beta','Γ':'Gamma','Δ':'Delta','Ε':'Epsilon','Ζ':'Zeta','Η':'Eta','Θ':'Theta','Ι':'Iota','Κ':'Kappa','Λ':'Lambda','Μ':'Mu','Î':'Nu','Ξ':'Xi','Ο':'Omicron','Π':'Pi','Ρ':'Rho','Σ':'Sigma','Τ':'Tau','Î¥':'Upsilon','Φ':'Phi','Χ':'Chi','Ψ':'Psi','Ω':'Omega','α':'alpha','β':'beta','γ':'gamma','δ':'delta','ε':'epsilon','ζ':'zeta','η':'eta','θ':'theta','ι':'iota','κ':'kappa','λ':'lambda','μ':'mu','ν':'nu','ξ':'xi','ο':'omicron','Ï€':'pi','Ï':'rho','Ï‚':'sigmaf','σ':'sigma','Ï„':'tau','Ï…':'upsilon','φ':'phi','χ':'chi','ψ':'psi','ω':'omega','\u03d1':'thetasym','\u03d2':'upsih','\u03d6':'piv'};for (e in B){FCKXHtmlEntities.Entities[e]=B[e];A+=e;};B=null;}}else{FCKXHtmlEntities.Entities={'>':'gt'};A='>';A+=' ';};var C='['+A+']';if (FCKConfig.ProcessNumericEntities) C='[^ -~]|'+C;var D=FCKConfig.AdditionalNumericEntities;if (D&&D.length>0) C+='|'+FCKConfig.AdditionalNumericEntities;FCKXHtmlEntities.EntitiesRegex=new RegExp(C,'g');}; var FCKXHtml={};FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(A,B,C){FCKDomTools.CheckAndRemovePaddingNode(FCKTools.GetElementDocument(A),FCKConfig.EnterMode);FCKXHtmlEntities.Initialize();this._NbspEntity=(FCKConfig.ProcessHTMLEntities?'nbsp':'#160');var D=FCK.IsDirty();FCKXHtml.SpecialBlocks=[];this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (B) this._AppendNode(this.MainNode,A);else this._AppendChildNodes(this.MainNode,A,false);var E=this._GetMainXmlString();this.XML=null;if (FCKBrowserInfo.IsSafari) E=E.replace(/^/,'');E=E.substr(7,E.length-15).Trim();if (FCKConfig.DocType.length>0&&FCKRegexLib.HtmlDocType.test(FCKConfig.DocType)) E=E.replace(FCKRegexLib.SpaceNoClose,'>');else E=E.replace(FCKRegexLib.SpaceNoClose,' />');if (FCKConfig.ForceSimpleAmpersand) E=E.replace(FCKRegexLib.ForceSimpleAmpersand,'&');if (C) E=FCKCodeFormatter.Format(E);for (var i=0;i0;if (C) A.appendChild(this.XML.createTextNode(B.replace(FCKXHtmlEntities.EntitiesRegex,FCKXHtml_GetEntity)));return C;};function FCKXHtml_GetEntity(A){var B=FCKXHtmlEntities.Entities[A]||('#'+A.charCodeAt(0));return '#?-:'+B+';';};FCKXHtml.TagProcessors={a:function(A,B){if (B.innerHTML.Trim().length==0&&!B.name) return false;var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);};A=FCKXHtml._AppendChildNodes(A,B,false);return A;},area:function(A,B){var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (!A.attributes.getNamedItem('coords')){var D=B.getAttribute('coords',2);if (D&&D!='0,0,0') FCKXHtml._AppendAttribute(A,'coords',D);};if (!A.attributes.getNamedItem('shape')){var E=B.getAttribute('shape',2);if (E&&E.length>0) FCKXHtml._AppendAttribute(A,'shape',E.toLowerCase());}};return A;},body:function(A,B){A=FCKXHtml._AppendChildNodes(A,B,false);A.removeAttribute('spellcheck');return A;},iframe:function(A,B){var C=B.innerHTML;if (FCKBrowserInfo.IsGecko) C=FCKTools.HTMLDecode(C);C=C.replace(/\s_fcksavedurl="[^"]*"/g,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},img:function(A,B){if (!A.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(A,'alt','');var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'src',C);if (B.style.width) A.removeAttribute('width');if (B.style.height) A.removeAttribute('height');return A;},li:function(A,B,C){if (C.nodeName.IEquals(['ul','ol'])) return FCKXHtml._AppendChildNodes(A,B,true);var D=FCKXHtml.XML.createElement('ul');B._fckxhtmljob=null;do{FCKXHtml._AppendNode(D,B);do{B=FCKDomTools.GetNextSibling(B);} while (B&&B.nodeType==3&&B.nodeValue.Trim().length==0)} while (B&&B.nodeName.toLowerCase()=='li') return D;},ol:function(A,B,C){if (B.innerHTML.Trim().length==0) return false;var D=C.lastChild;if (D&&D.nodeType==3) D=D.previousSibling;if (D&&D.nodeName.toUpperCase()=='LI'){B._fckxhtmljob=null;FCKXHtml._AppendNode(D,B);return false;};A=FCKXHtml._AppendChildNodes(A,B);return A;},pre:function (A,B){var C=B.firstChild;if (C&&C.nodeType==3) A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem('\r\n')));FCKXHtml._AppendChildNodes(A,B,true);return A;},script:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/javascript');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.text)));return A;},span:function(A,B){if (B.innerHTML.length==0) return false;A=FCKXHtml._AppendChildNodes(A,B,false);return A;},style:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/css');var C=B.innerHTML;if (FCKBrowserInfo.IsIE) C=C.replace(/^(\r\n|\n|\r)/,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},title:function(A,B){A.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return A;}};FCKXHtml.TagProcessors.ul=FCKXHtml.TagProcessors.ol; FCKXHtml._GetMainXmlString=function(){return (new XMLSerializer()).serializeToString(this.MainNode);};FCKXHtml._AppendAttributes=function(A,B,C){var D=B.attributes;for (var n=0;n]*\>/gi;A.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.NewLineTags=/\<(BR|HR)[^\>]*\>/gi;A.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;A.LineSplitter=/\s*\n+\s*/g;A.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL|DL)[ \/\>]/i;A.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL|DL)[ \>]/i;A.FormatIndentatorRemove=new RegExp('^'+FCKConfig.FormatIndentator);A.ProtectedTags=/(]*>)([\s\S]*?)(<\/PRE>)/gi;};FCKCodeFormatter._ProtectData=function(A,B,C,D){return B+'___FCKpd___'+(FCKCodeFormatter.ProtectedData.push(C)-1)+D;};FCKCodeFormatter.Format=function(A){if (!this.Regex) this.Init();FCKCodeFormatter.ProtectedData=[];var B=A.replace(this.Regex.ProtectedTags,FCKCodeFormatter._ProtectData);B=B.replace(this.Regex.BlocksOpener,'\n$&');B=B.replace(this.Regex.BlocksCloser,'$&\n');B=B.replace(this.Regex.NewLineTags,'$&\n');B=B.replace(this.Regex.MainTags,'\n$&\n');var C='';var D=B.split(this.Regex.LineSplitter);B='';for (var i=0;iB[i]) return 1;};if (A.lengthB.length) return 1;return 0;};FCKUndo._CheckIsBookmarksEqual=function(A,B){if (!(A&&B)) return false;if (FCKBrowserInfo.IsIE){var C=A[1].search(A[0].StartId);var D=B[1].search(B[0].StartId);var E=A[1].search(A[0].EndId);var F=B[1].search(B[0].EndId);return C==D&&E==F;}else{return this._CompareCursors(A.Start,B.Start)==0&&this._CompareCursors(A.End,B.End)==0;}};FCKUndo.SaveUndoStep=function(){if (FCK.EditMode!=0||this.SaveLocked) return;if (this.SavedData.length) this.Changed=true;var A=FCK.EditorDocument.body.innerHTML;var B=this._GetBookmark();this.SavedData=this.SavedData.slice(0,this.CurrentIndex+1);if (this.CurrentIndex>0&&A==this.SavedData[this.CurrentIndex][0]&&this._CheckIsBookmarksEqual(B,this.SavedData[this.CurrentIndex][1])) return;else if (this.CurrentIndex==0&&this.SavedData.length&&A==this.SavedData[0][0]){this.SavedData[0][1]=B;return;};if (this.CurrentIndex+1>=FCKConfig.MaxUndoLevels) this.SavedData.shift();else this.CurrentIndex++;this.SavedData[this.CurrentIndex]=[A,B];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.CheckUndoState=function(){return (this.Changed||this.CurrentIndex>0);};FCKUndo.CheckRedoState=function(){return (this.CurrentIndex<(this.SavedData.length-1));};FCKUndo.Undo=function(){if (this.CheckUndoState()){if (this.CurrentIndex==(this.SavedData.length-1)){this.SaveUndoStep();};this._ApplyUndoLevel(--this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo.Redo=function(){if (this.CheckRedoState()){this._ApplyUndoLevel(++this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo._ApplyUndoLevel=function(A){var B=this.SavedData[A];if (!B) return;if (FCKBrowserInfo.IsIE){if (B[1]&&B[1][1]) FCK.SetInnerHtml(B[1][1]);else FCK.SetInnerHtml(B[0]);}else FCK.EditorDocument.body.innerHTML=B[0];this._SelectBookmark(B[1]);this.TypesCount=0;this.Changed=false;this.Typing=false;}; var FCKEditingArea=function(A){this.TargetElement=A;this.Mode=0;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKEditingArea_Cleanup);};FCKEditingArea.prototype.Start=function(A,B){var C=this.TargetElement;var D=FCKTools.GetElementDocument(C);while(C.firstChild) C.removeChild(C.firstChild);if (this.Mode==0){if (FCK_IS_CUSTOM_DOMAIN) A=''+A;if (FCKBrowserInfo.IsIE) A=A.replace(/(]*?)\s*\/?>(?!\s*<\/base>)/gi,'$1>');else if (!B){var E=A.match(FCKRegexLib.BeforeBody);var F=A.match(FCKRegexLib.AfterBody);if (E&&F){var G=A.substr(E[1].length,A.length-E[1].length-F[1].length);A=E[1]+' '+F[1];if (FCKBrowserInfo.IsGecko&&(G.length==0||FCKRegexLib.EmptyParagraph.test(G))) G='
    ';this._BodyHTML=G;}else this._BodyHTML=A;};var H=this.IFrame=D.createElement('iframe');var I='';H.frameBorder=0;H.style.width=H.style.height='100%';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A.replace(//i,''+I);H.src='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.parent._FCKHtmlToLoad );document.close() ;window.parent._FCKHtmlToLoad = null ;})() )';}else if (!FCKBrowserInfo.IsGecko){H.src='javascript:void(0)';};C.appendChild(H);this.Window=H.contentWindow;if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){var J=this.Window.document;J.open();J.write(A.replace(//i,''+I));J.close();};if (FCKBrowserInfo.IsAIR) FCKAdobeAIR.EditingArea_Start(J,A);if (FCKBrowserInfo.IsGecko10&&!B){this.Start(A,true);return;};if (H.readyState&&H.readyState!='completed'){var K=this;setTimeout(function(){try{K.Window.document.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;};K.Window._FCKEditingArea=K;FCKEditingArea_CompleteStart.call(K.Window);},0);}else{this.Window._FCKEditingArea=this;if (FCKBrowserInfo.IsGecko10) this.Window.setTimeout(FCKEditingArea_CompleteStart,500);else FCKEditingArea_CompleteStart.call(this.Window);}}else{var L=this.Textarea=D.createElement('textarea');L.className='SourceField';L.dir='ltr';FCKDomTools.SetElementStyles(L,{width:'100%',height:'100%',border:'none',resize:'none',outline:'none'});C.appendChild(L);L.value=A;FCKTools.RunFunction(this.OnLoad);}};function FCKEditingArea_CompleteStart(){if (!this.document.body){this.setTimeout(FCKEditingArea_CompleteStart,50);return;};var A=this._FCKEditingArea;A.Document=A.Window.document;A.MakeEditable();FCKTools.RunFunction(A.OnLoad);};FCKEditingArea.prototype.MakeEditable=function(){var A=this.Document;if (FCKBrowserInfo.IsIE){A.body.disabled=true;A.body.contentEditable=true;A.body.removeAttribute("disabled");}else{try{A.body.spellcheck=(this.FFSpellChecker!==false);if (this._BodyHTML){A.body.innerHTML=this._BodyHTML;A.body.offsetLeft;this._BodyHTML=null;};A.designMode='on';A.execCommand('enableObjectResizing',false,!FCKConfig.DisableObjectResizing);A.execCommand('enableInlineTableEditing',false,!FCKConfig.DisableFFTableHandles);}catch (e){FCKTools.AddEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);}}};function FCKEditingArea_Document_AttributeNodeModified(A){var B=A.currentTarget.contentWindow._FCKEditingArea;if (B._timer) window.clearTimeout(B._timer);B._timer=FCKTools.SetTimeout(FCKEditingArea_MakeEditableByMutation,1000,B);};function FCKEditingArea_MakeEditableByMutation(){delete this._timer;FCKTools.RemoveEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);this.MakeEditable();};FCKEditingArea.prototype.Focus=function(){try{if (this.Mode==0){if (FCKBrowserInfo.IsIE) this._FocusIE();else this.Window.focus();}else{var A=FCKTools.GetElementDocument(this.Textarea);if ((!A.hasFocus||A.hasFocus())&&A.activeElement==this.Textarea) return;this.Textarea.focus();}}catch(e) {}};FCKEditingArea.prototype._FocusIE=function(){this.Document.body.setActive();this.Window.focus();var A=this.Document.selection.createRange();var B=A.parentElement();var C=B.nodeName.toLowerCase();if (B.childNodes.length>0||!(FCKListsLib.BlockElements[C]||FCKListsLib.NonEmptyBlockElements[C])){return;};A=new FCKDomRange(this.Window);A.MoveToElementEditStart(B);A.Select();};function FCKEditingArea_Cleanup(){if (this.Document) this.Document.body.innerHTML="";this.TargetElement=null;this.IFrame=null;this.Document=null;this.Textarea=null;if (this.Window){this.Window._FCKEditingArea=null;this.Window=null;}}; var FCKKeystrokeHandler=function(A){this.Keystrokes={};this.CancelCtrlDefaults=(A!==false);};FCKKeystrokeHandler.prototype.AttachToElement=function(A){FCKTools.AddEventListenerEx(A,'keydown',_FCKKeystrokeHandler_OnKeyDown,this);if (FCKBrowserInfo.IsGecko10||FCKBrowserInfo.IsOpera||(FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac)) FCKTools.AddEventListenerEx(A,'keypress',_FCKKeystrokeHandler_OnKeyPress,this);};FCKKeystrokeHandler.prototype.SetKeystrokes=function(){for (var i=0;i40))){B._CancelIt=true;if (A.preventDefault) return A.preventDefault();A.returnValue=false;A.cancelBubble=true;return false;};return true;};function _FCKKeystrokeHandler_OnKeyPress(A,B){if (B._CancelIt){if (A.preventDefault) return A.preventDefault();return false;};return true;}; FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1};L=X({a:1},J);M={tr:1};N={'#':1};O=X({param:1},K);P=X({form:1},A,D,E,I);Q={li:1};return {col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:P,td:P,br:{},th:P,center:P,kbd:L,button:X(I,E),basefont:{},h5:L,h4:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X(A,D,E,I),select:{optgroup:1,option:1},font:J,ins:P,menu:Q,abbr:L,label:L,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:L,script:N,tfoot:M,cite:L,li:P,input:{},iframe:P,strong:J,textarea:N,noframes:P,big:J,small:J,span:J,hr:{},dt:L,sub:J,optgroup:{option:1},param:{},bdo:L,'var':J,div:P,object:O,sup:J,dd:P,strike:J,area:{},dir:Q,map:X({area:1,form:1,p:1},A,F,E),applet:O,dl:{dt:1,dd:1},del:P,isindex:{},fieldset:X({legend:1},K),thead:M,ul:Q,acronym:L,b:J,a:J,blockquote:P,caption:L,i:J,u:J,tbody:M,s:L,address:X(D,I),tt:J,legend:L,q:L,pre:X(G,C),p:L,em:J,dfn:L};})(); var FCKStyle=function(A){this.Element=(A.Element||'span').toLowerCase();this._StyleDesc=A;};FCKStyle.prototype={GetType:function(){var A=this.GetType_$;if (A!=undefined) return A;var B=this.Element;if (B=='#'||FCKListsLib.StyleBlockElements[B]) A=0;else if (FCKListsLib.StyleObjectElements[B]) A=2;else A=1;return (this.GetType_$=A);},ApplyToSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.ApplyToRange(B,true);},ApplyToRange:function(A,B,C){switch (this.GetType()){case 0:this.ApplyToRange=this._ApplyBlockStyle;break;case 1:this.ApplyToRange=this._ApplyInlineStyle;break;default:return;};this.ApplyToRange(A,B,C);},ApplyToObject:function(A){if (!A) return;this.BuildElement(null,A);},RemoveFromSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.RemoveFromRange(B,true);},RemoveFromRange:function(A,B,C){var D;var E=this._GetAttribsForComparison();var F=this._GetOverridesForComparison();if (A.CheckIsCollapsed()){var D=A.CreateBookmark(true);var H=A.GetBookmarkNode(D,true);var I=new FCKElementPath(H.parentNode);var J=[];var K=!FCKDomTools.GetNextSibling(H);var L=K||!FCKDomTools.GetPreviousSibling(H);var M;var N=-1;for (var i=0;i=0;i--){var E=D[i];for (var F in B){if (FCKDomTools.HasAttribute(E,F)){switch (F){case 'style':this._RemoveStylesFromElement(E);break;case 'class':if (FCKDomTools.GetAttributeValue(E,F)!=this.GetFinalAttributeValue(F)) continue;default:FCKDomTools.RemoveAttribute(E,F);}}};this._RemoveOverrides(E,C[this.Element]);this._RemoveNoAttribElement(E);};for (var G in C){if (G!=this.Element){D=A.getElementsByTagName(G);for (var i=D.length-1;i>=0;i--){var E=D[i];this._RemoveOverrides(E,C[G]);this._RemoveNoAttribElement(E);}}}},_RemoveStylesFromElement:function(A){var B=A.style.cssText;var C=this.GetFinalStyleValue();if (B.length>0&&C.length==0) return;C='(^|;)\\s*('+C.replace(/\s*([^ ]+):.*?(;|$)/g,'$1|').replace(/\|$/,'')+'):[^;]+';var D=new RegExp(C,'gi');B=B.replace(D,'').Trim();if (B.length==0||B==';') FCKDomTools.RemoveAttribute(A,'style');else A.style.cssText=B.replace(D,'');},_RemoveOverrides:function(A,B){var C=B&&B.Attributes;if (C){for (var i=0;i0) C.style.cssText=this.GetFinalStyleValue();return C;},_CompareAttributeValues:function(A,B,C){if (A=='style'&&B&&C){B=B.replace(/;$/,'').toLowerCase();C=C.replace(/;$/,'').toLowerCase();};return (B==C||((B===null||B==='')&&(C===null||C==='')))},GetFinalAttributeValue:function(A){var B=this._StyleDesc.Attributes;var B=B?B[A]:null;if (!B&&A=='style') return this.GetFinalStyleValue();if (B&&this._Variables) B=B.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);return B;},GetFinalStyleValue:function(){var A=this._GetStyleText();if (A.length>0&&this._Variables){A=A.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);A=FCKTools.NormalizeCssText(A);};return A;},_GetVariableReplace:function(){return this._Variables[arguments[2]]||arguments[0];},SetVariable:function(A,B){var C=this._Variables;if (!C) C=this._Variables={};this._Variables[A]=B;},_FromPre:function(A,B,C){var D=B.innerHTML;D=D.replace(/(\r\n|\r)/g,'\n');D=D.replace(/^[ \t]*\n/,'');D=D.replace(/\n$/,'');D=D.replace(/^[ \t]+|[ \t]+$/g,function(match,offset,s){if (match.length==1) return ' ';else if (offset==0) return new Array(match.length).join(' ')+' ';else return ' '+new Array(match.length).join(' ');});var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag){value=value.replace(/\n/g,'
    ');value=value.replace(/[ \t]{2,}/g,function (match){return new Array(match.length).join(' ')+' ';});};F.push(value);});C.innerHTML=F.join('');return C;},_ToPre:function(A,B,C){var D=B.innerHTML.Trim();D=D.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'
    ');var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag) value=value.replace(/([ \t\n\r]+| )/g,' ');else if (isTag&&value=='
    ') value='\n';F.push(value);});if (FCKBrowserInfo.IsIE){var G=A.createElement('div');G.appendChild(C);C.outerHTML='
    \n'+F.join('')+'
    ';C=G.removeChild(G.firstChild);}else C.innerHTML=F.join('');return C;},_CheckAndMergePre:function(A,B){if (A!=FCKDomTools.GetPreviousSourceElement(B,true)) return;var C=A.innerHTML.replace(/\n$/,'')+'\n\n'+B.innerHTML.replace(/^\n/,'');if (FCKBrowserInfo.IsIE) B.outerHTML='
    '+C+'
    ';else B.innerHTML=C;FCKDomTools.RemoveNode(A);},_CheckAndSplitPre:function(A){var B;var C=A.firstChild;C=C&&C.nextSibling;while (C){var D=C.nextSibling;if (D&&D.nextSibling&&C.nodeName.IEquals('br')&&D.nodeName.IEquals('br')){FCKDomTools.RemoveNode(C);C=D.nextSibling;FCKDomTools.RemoveNode(D);B=FCKDomTools.InsertAfterNode(B||A,FCKDomTools.CloneElement(A));continue;};if (B){C=C.previousSibling;FCKDomTools.MoveNode(C.nextSibling,B);};C=C.nextSibling;}},_ApplyBlockStyle:function(A,B,C){var D;if (B) D=A.CreateBookmark();var E=new FCKDomRangeIterator(A);E.EnforceRealBlocks=true;var F;var G=A.Window.document;var H;while((F=E.GetNextParagraph())){var I=this.BuildElement(G);var J=I.nodeName.IEquals('pre');var K=F.nodeName.IEquals('pre');var L=J&&!K;var M=!J&&K;if (L) I=this._ToPre(G,F,I);else if (M) I=this._FromPre(G,F,I);else FCKDomTools.MoveChildren(F,I);F.parentNode.insertBefore(I,F);FCKDomTools.RemoveNode(F);if (J){if (H) this._CheckAndMergePre(H,I);H=I;}else if (M) this._CheckAndSplitPre(I);};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},_ApplyInlineStyle:function(A,B,C){var D=A.Window.document;if (A.CheckIsCollapsed()){var E=this.BuildElement(D);A.InsertNode(E);A.MoveToPosition(E,2);A.Select();return;};var F=this.Element;var G=FCK.DTD[F]||FCK.DTD.span;var H=this._GetAttribsForComparison();var I;A.Expand('inline_elements');var J=A.CreateBookmark(true);var K=A.GetBookmarkNode(J,true);var L=A.GetBookmarkNode(J,false);A.Release(true);var M=FCKDomTools.GetNextSourceNode(K,true);while (M){var N=false;var O=M.nodeType;var P=O==1?M.nodeName.toLowerCase():null;if (!P||G[P]){if ((FCK.DTD[M.parentNode.nodeName.toLowerCase()]||FCK.DTD.span)[F]||!FCK.DTD[F]){if (!A.CheckHasRange()) A.SetStart(M,3);if (O!=1||M.childNodes.length==0){var Q=M;var R=Q.parentNode;while (Q==R.lastChild&&G[R.nodeName.toLowerCase()]){Q=R;};A.SetEnd(Q,4);if (Q==Q.parentNode.lastChild&&!G[Q.parentNode.nodeName.toLowerCase()]) N=true;}else{A.SetEnd(M,3);}}else N=true;}else N=true;M=FCKDomTools.GetNextSourceNode(M);if (M==L){M=null;N=true;};if (N&&A.CheckHasRange()&&!A.CheckIsCollapsed()){I=this.BuildElement(D);A.ExtractContents().AppendTo(I);if (I.innerHTML.RTrim().length>0){A.InsertNode(I);this.RemoveFromElement(I);this._MergeSiblings(I,this._GetAttribsForComparison());if (!FCKBrowserInfo.IsIE) I.normalize();};A.Release(true);}};this._FixBookmarkStart(K);if (B) A.SelectBookmark(J);if (C) A.MoveToBookmark(J);},_FixBookmarkStart:function(A){var B;while ((B=A.nextSibling)){if (B.nodeType==1&&FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){if (!B.firstChild) FCKDomTools.RemoveNode(B);else FCKDomTools.MoveNode(A,B,true);continue;};if (B.nodeType==3&&B.length==0){FCKDomTools.RemoveNode(B);continue;};break;}},_MergeSiblings:function(A,B){if (!A||A.nodeType!=1||!FCKListsLib.InlineNonEmptyElements[A.nodeName.toLowerCase()]) return;this._MergeNextSibling(A,B);this._MergePreviousSibling(A,B);},_MergeNextSibling:function(A,B){var C=A.nextSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.nextSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.lastChild;if (D) FCKDomTools.MoveNode(A.nextSibling,A);FCKDomTools.MoveChildren(C,A);FCKDomTools.RemoveNode(C);if (E) this._MergeNextSibling(E);}}},_MergePreviousSibling:function(A,B){var C=A.previousSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.previousSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.firstChild;if (D) FCKDomTools.MoveNode(A.previousSibling,A,true);FCKDomTools.MoveChildren(C,A,true);FCKDomTools.RemoveNode(C);if (E) this._MergePreviousSibling(E);}}},_GetStyleText:function(){var A=this._StyleDesc.Styles;var B=(this._StyleDesc.Attributes?this._StyleDesc.Attributes['style']||'':'');if (B.length>0) B+=';';for (var C in A) B+=C+':'+A[C]+';';if (B.length>0&&!(/#\(/.test(B))){B=FCKTools.NormalizeCssText(B);};return (this._GetStyleText=function() { return B;})();},_GetAttribsForComparison:function(){var A=this._GetAttribsForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Attributes;if (B){for (var C in B){A[C.toLowerCase()]=B[C].toLowerCase();}};if (this._GetStyleText().length>0){A['style']=this._GetStyleText().toLowerCase();};FCKTools.AppendLengthProperty(A,'_length');return (this._GetAttribsForComparison_$=A);},_GetOverridesForComparison:function(){var A=this._GetOverridesForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Overrides;if (B){if (!FCKTools.IsArray(B)) B=[B];for (var i=0;i0) return true;};B=B.nextSibling;};return false;}}; var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i0){if (D.nodeType==3){var G=D.nodeValue.substr(0,E).Trim();if (G.length!=0) return A.IsStartOfBlock=false;}else F=D.childNodes[E-1];};if (!F) F=FCKDomTools.GetPreviousSourceNode(D,true,null,C);while (F){switch (F.nodeType){case 1:if (!FCKListsLib.InlineChildReqElements[F.nodeName.toLowerCase()]) return A.IsStartOfBlock=false;break;case 3:if (F.nodeValue.Trim().length>0) return A.IsStartOfBlock=false;};F=FCKDomTools.GetPreviousSourceNode(F,false,null,C);};return A.IsStartOfBlock=true;},CheckEndOfBlock:function(A){var B=this._Cache.IsEndOfBlock;if (B!=undefined) return B;var C=this.EndBlock||this.EndBlockLimit;var D=this._Range.endContainer;var E=this._Range.endOffset;var F;if (D.nodeType==3){var G=D.nodeValue;if (E0) return this._Cache.IsEndOfBlock=false;};F=FCKDomTools.GetNextSourceNode(F,false,null,C);};if (A) this.Select();return this._Cache.IsEndOfBlock=true;},CreateBookmark:function(A){var B={StartId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'S',EndId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'E'};var C=this.Window.document;var D;var E;var F;if (!this.CheckIsCollapsed()){E=C.createElement('span');E.style.display='none';E.id=B.EndId;E.setAttribute('_fck_bookmark',true);E.innerHTML=' ';F=this.Clone();F.Collapse(false);F.InsertNode(E);};D=C.createElement('span');D.style.display='none';D.id=B.StartId;D.setAttribute('_fck_bookmark',true);D.innerHTML=' ';F=this.Clone();F.Collapse(true);F.InsertNode(D);if (A){B.StartNode=D;B.EndNode=E;};if (E){this.SetStart(D,4);this.SetEnd(E,3);}else this.MoveToPosition(D,4);return B;},GetBookmarkNode:function(A,B){var C=this.Window.document;if (B) return A.StartNode||C.getElementById(A.StartId);else return A.EndNode||C.getElementById(A.EndId);},MoveToBookmark:function(A,B){var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);this.SetStart(C,3);if (!B) FCKDomTools.RemoveNode(C);if (D){this.SetEnd(D,3);if (!B) FCKDomTools.RemoveNode(D);}else this.Collapse(true);this._UpdateElementInfo();},CreateBookmark2:function(){if (!this._Range) return { "Start":0,"End":0 };var A={"Start":[this._Range.startOffset],"End":[this._Range.endOffset]};var B=this._Range.startContainer.previousSibling;var C=this._Range.endContainer.previousSibling;var D=this._Range.startContainer;var E=this._Range.endContainer;while (B&&B.nodeType==3&&D.nodeType==3){A.Start[0]+=B.length;D=B;B=B.previousSibling;}while (C&&C.nodeType==3&&E.nodeType==3){A.End[0]+=C.length;E=C;C=C.previousSibling;};if (D.nodeType==1&&D.childNodes[A.Start[0]]&&D.childNodes[A.Start[0]].nodeType==3){var F=D.childNodes[A.Start[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};D=F;A.Start[0]=G;};if (E.nodeType==1&&E.childNodes[A.End[0]]&&E.childNodes[A.End[0]].nodeType==3){var F=E.childNodes[A.End[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};E=F;A.End[0]=G;};A.Start=FCKDomTools.GetNodeAddress(D,true).concat(A.Start);A.End=FCKDomTools.GetNodeAddress(E,true).concat(A.End);return A;},MoveToBookmark2:function(A){var B=FCKDomTools.GetNodeFromAddress(this.Window.document,A.Start.slice(0,-1),true);var C=FCKDomTools.GetNodeFromAddress(this.Window.document,A.End.slice(0,-1),true);this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var D=A.Start[A.Start.length-1];var E=A.End[A.End.length-1];while (B.nodeType==3&&D>B.length){if (!B.nextSibling||B.nextSibling.nodeType!=3) break;D-=B.length;B=B.nextSibling;}while (C.nodeType==3&&E>C.length){if (!C.nextSibling||C.nextSibling.nodeType!=3) break;E-=C.length;C=C.nextSibling;};this._Range.setStart(B,D);this._Range.setEnd(C,E);this._UpdateElementInfo();},MoveToPosition:function(A,B){this.SetStart(A,B);this.Collapse(true);},SetStart:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setStart(A,0);break;case 2:D.setStart(A,A.childNodes.length);break;case 3:D.setStartBefore(A);break;case 4:D.setStartAfter(A);};if (!C) this._UpdateElementInfo();},SetEnd:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setEnd(A,0);break;case 2:D.setEnd(A,A.childNodes.length);break;case 3:D.setEndBefore(A);break;case 4:D.setEndAfter(A);};if (!C) this._UpdateElementInfo();},Expand:function(A){var B,oSibling;switch (A){case 'inline_elements':if (this._Range.startOffset==0){B=this._Range.startContainer;if (B.nodeType!=1) B=B.previousSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setStartBefore(B);if (B!=B.parentNode.firstChild) break;B=B.parentNode;}}};B=this._Range.endContainer;var C=this._Range.endOffset;if ((B.nodeType==3&&C>=B.nodeValue.length)||(B.nodeType==1&&C>=B.childNodes.length)||(B.nodeType!=1&&B.nodeType!=3)){if (B.nodeType!=1) B=B.nextSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setEndAfter(B);if (B!=B.parentNode.lastChild) break;B=B.parentNode;}}};break;case 'block_contents':case 'list_contents':var D=FCKListsLib.BlockBoundaries;if (A=='list_contents'||FCKConfig.EnterMode=='br') D=FCKListsLib.ListBoundaries;if (this.StartBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents') this.SetStart(this.StartBlock,1);else{B=this._Range.startContainer;if (B.nodeType==1){var E=B.childNodes[this._Range.startOffset];if (E) B=FCKDomTools.GetPreviousSourceNode(E,true);else B=B.lastChild||B;}while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setStartBefore(B);B=B.previousSibling||B.parentNode;}};if (this.EndBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents'&&this.EndBlock.nodeName.toLowerCase()!='li') this.SetEnd(this.EndBlock,2);else{B=this._Range.endContainer;if (B.nodeType==1) B=B.childNodes[this._Range.endOffset]||B.lastChild;while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setEndAfter(B);B=B.nextSibling||B.parentNode;};if (B&&B.nodeName.toLowerCase()=='br') this._Range.setEndAfter(B);};this._UpdateElementInfo();}},SplitBlock:function(A){var B=A||FCKConfig.EnterMode;if (!this._Range) this.MoveToSelection();if (this.StartBlockLimit==this.EndBlockLimit){var C=this.StartBlock;var D=this.EndBlock;var E=null;if (B!='br'){if (!C){C=this.FixBlock(true,B);D=this.EndBlock;};if (!D) D=this.FixBlock(false,B);};var F=(C!=null&&this.CheckStartOfBlock());var G=(D!=null&&this.CheckEndOfBlock());if (!this.CheckIsEmpty()) this.DeleteContents();if (C&&D&&C==D){if (G){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(D,4);D=null;}else if (F){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(C,3);C=null;}else{this.SetEnd(C,2);var H=this.ExtractContents();D=C.cloneNode(false);D.removeAttribute('id',false);H.AppendTo(D);FCKDomTools.InsertAfterNode(C,D);this.MoveToPosition(C,4);if (FCKBrowserInfo.IsGecko&&!C.nodeName.IEquals(['ul','ol'])) FCKTools.AppendBogusBr(C);}};return {PreviousBlock:C,NextBlock:D,WasStartOfBlock:F,WasEndOfBlock:G,ElementPath:E};};return null;},FixBlock:function(A,B){var C=this.CreateBookmark();this.Collapse(A);this.Expand('block_contents');var D=this.Window.document.createElement(B);this.ExtractContents().AppendTo(D);FCKDomTools.TrimNode(D);if (FCKDomTools.CheckIsEmptyElement(D,function(element) { return element.getAttribute('_fck_bookmark')!='true';})&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);this.InsertNode(D);this.MoveToBookmark(C);return D;},Release:function(A){if (!A) this.Window=null;this.StartNode=null;this.StartContainer=null;this.StartBlock=null;this.StartBlockLimit=null;this.EndNode=null;this.EndContainer=null;this.EndBlock=null;this.EndBlockLimit=null;this._Range=null;this._Cache=null;},CheckHasRange:function(){return!!this._Range;},GetTouchedStartNode:function(){var A=this._Range;var B=A.startContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.startOffset]||B;},GetTouchedEndNode:function(){var A=this._Range;var B=A.endContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.endOffset-1]||B;}}; FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);var A=this.Window.getSelection();if (A&&A.rangeCount>0){this._Range=FCKW3CRange.CreateFromRange(this.Window.document,A.getRangeAt(0));this._UpdateElementInfo();}else if (this.Window.document) this.MoveToElementStart(this.Window.document.body);};FCKDomRange.prototype.Select=function(){var A=this._Range;if (A){var B=A.startContainer;if (A.collapsed&&B.nodeType==1&&B.childNodes.length==0) B.appendChild(A._Document.createTextNode(''));var C=this.Window.document.createRange();C.setStart(B,A.startOffset);try{C.setEnd(A.endContainer,A.endOffset);}catch (e){if (e.toString().Contains('NS_ERROR_ILLEGAL_VALUE')){A.collapse(true);C.setEnd(A.endContainer,A.endOffset);}else throw(e);};var D=this.Window.getSelection();D.removeAllRanges();D.addRange(C);}};FCKDomRange.prototype.SelectBookmark=function(A){var B=this.Window.document.createRange();var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);B.setStart(C.parentNode,FCKDomTools.GetIndexOf(C));FCKDomTools.RemoveNode(C);if (D){B.setEnd(D.parentNode,FCKDomTools.GetIndexOf(D));FCKDomTools.RemoveNode(D);};var E=this.Window.getSelection();E.removeAllRanges();E.addRange(B);}; var FCKDomRangeIterator=function(A){this.Range=A;this.ForceBrBreak=false;this.EnforceRealBlocks=false;};FCKDomRangeIterator.CreateFromSelection=function(A){var B=new FCKDomRange(A);B.MoveToSelection();return new FCKDomRangeIterator(B);};FCKDomRangeIterator.prototype={GetNextParagraph:function(){var A;var B;var C;var D;var E;var F=this.ForceBrBreak?FCKListsLib.ListBoundaries:FCKListsLib.BlockBoundaries;if (!this._LastNode){var B=this.Range.Clone();B.Expand(this.ForceBrBreak?'list_contents':'block_contents');this._NextNode=B.GetTouchedStartNode();this._LastNode=B.GetTouchedEndNode();B=null;};var H=this._NextNode;var I=this._LastNode;this._NextNode=null;while (H){var J=false;var K=(H.nodeType!=1);var L=false;if (!K){var M=H.nodeName.toLowerCase();if (F[M]&&(!FCKBrowserInfo.IsIE||H.scopeName=='HTML')){if (M=='br') K=true;else if (!B&&H.childNodes.length==0&&M!='hr'){A=H;C=H==I;break;};if (B){B.SetEnd(H,3,true);if (M!='br') this._NextNode=FCKDomTools.GetNextSourceNode(H,true,null,I)||H;};J=true;}else{if (H.firstChild){if (!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};H=H.firstChild;continue;};K=true;}}else if (H.nodeType==3){if (/^[\r\n\t ]+$/.test(H.nodeValue)) K=false;};if (K&&!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};C=((!J||K)&&H==I);if (B&&!J){while (!H.nextSibling&&!C){var N=H.parentNode;if (F[N.nodeName.toLowerCase()]){J=true;C=C||(N==I);break;};H=N;K=true;C=(H==I);L=true;}};if (K) B.SetEnd(H,4,true);if ((J||C)&&B){B._UpdateElementInfo();if (B.StartNode==B.EndNode&&B.StartNode.parentNode==B.StartBlockLimit&&B.StartNode.getAttribute&&B.StartNode.getAttribute('_fck_bookmark')) B=null;else break;};if (C) break;H=FCKDomTools.GetNextSourceNode(H,L,null,I);};if (!A){if (!B){this._NextNode=null;return null;};A=B.StartBlock;if (!A&&!this.EnforceRealBlocks&&B.StartBlockLimit.nodeName.IEquals('DIV','TH','TD')&&B.CheckStartOfBlock()&&B.CheckEndOfBlock()){A=B.StartBlockLimit;}else if (!A||(this.EnforceRealBlocks&&A.nodeName.toLowerCase()=='li')){A=this.Range.Window.document.createElement(FCKConfig.EnterMode=='p'?'p':'div');B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);B.InsertNode(A);D=true;E=true;}else if (A.nodeName.toLowerCase()!='li'){if (!B.CheckStartOfBlock()||!B.CheckEndOfBlock()){A=A.cloneNode(false);B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);var O=B.SplitBlock();D=!O.WasStartOfBlock;E=!O.WasEndOfBlock;B.InsertNode(A);}}else if (!C){this._NextNode=A==I?null:FCKDomTools.GetNextSourceNode(B.EndNode,true,null,I);return A;}};if (D){var P=A.previousSibling;if (P&&P.nodeType==1){if (P.nodeName.toLowerCase()=='br') P.parentNode.removeChild(P);else if (P.lastChild&&P.lastChild.nodeName.IEquals('br')) P.removeChild(P.lastChild);}};if (E){var Q=A.lastChild;if (Q&&Q.nodeType==1&&Q.nodeName.toLowerCase()=='br') A.removeChild(Q);};if (!this._NextNode) this._NextNode=(C||A==I)?null:FCKDomTools.GetNextSourceNode(A,true,null,I);return A;}}; var FCKDocumentFragment=function(A,B){this.RootNode=B||A.createDocumentFragment();};FCKDocumentFragment.prototype={AppendTo:function(A){A.appendChild(this.RootNode);},AppendHtml:function(A){var B=this.RootNode.ownerDocument.createElement('div');B.innerHTML=A;FCKDomTools.MoveChildren(B,this.RootNode);},InsertAfterNode:function(A){FCKDomTools.InsertAfterNode(A,this.RootNode);}}; var FCKW3CRange=function(A){this._Document=A;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;this.collapsed=true;};FCKW3CRange.CreateRange=function(A){return new FCKW3CRange(A);};FCKW3CRange.CreateFromRange=function(A,B){var C=FCKW3CRange.CreateRange(A);C.setStart(B.startContainer,B.startOffset);C.setEnd(B.endContainer,B.endOffset);return C;};FCKW3CRange.prototype={_UpdateCollapsed:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);},setStart:function(A,B){this.startContainer=A;this.startOffset=B;if (!this.endContainer){this.endContainer=A;this.endOffset=B;};this._UpdateCollapsed();},setEnd:function(A,B){this.endContainer=A;this.endOffset=B;if (!this.startContainer){this.startContainer=A;this.startOffset=B;};this._UpdateCollapsed();},setStartAfter:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setStartBefore:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A));},setEndAfter:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setEndBefore:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A));},collapse:function(A){if (A){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;};this.collapsed=true;},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.nodeType==3?A.data.length:A.childNodes.length);},insertNode:function(A){var B=this.startContainer;var C=this.startOffset;if (B.nodeType==3){B.splitText(C);if (B==this.endContainer) this.setEnd(B.nextSibling,this.endOffset-this.startOffset);FCKDomTools.InsertAfterNode(B,A);return;}else{B.insertBefore(A,B.childNodes[C]||null);if (B==this.endContainer){this.endOffset++;this.collapsed=false;}}},deleteContents:function(){if (this.collapsed) return;this._ExecContentsAction(0);},extractContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(1,A);return A;},cloneContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(2,A);return A;},_ExecContentsAction:function(A,B){var C=this.startContainer;var D=this.endContainer;var E=this.startOffset;var F=this.endOffset;var G=false;var H=false;if (D.nodeType==3) D=D.splitText(F);else{if (D.childNodes.length>0){if (F>D.childNodes.length-1){D=FCKDomTools.InsertAfterNode(D.lastChild,this._Document.createTextNode(''));H=true;}else D=D.childNodes[F];}};if (C.nodeType==3){C.splitText(E);if (C==D) D=C.nextSibling;}else{if (E==0){C=C.insertBefore(this._Document.createTextNode(''),C.firstChild);G=true;}else if (E>C.childNodes.length-1){C=C.appendChild(this._Document.createTextNode(''));G=true;}else C=C.childNodes[E].previousSibling;};var I=FCKDomTools.GetParents(C);var J=FCKDomTools.GetParents(D);var i,topStart,topEnd;for (i=0;i0&&levelStartNode!=D) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==D));if (!I[k]||levelStartNode.parentNode!=I[k].parentNode){currentNode=levelStartNode.previousSibling;while(currentNode){if (currentNode==I[k]||currentNode==C) break;currentSibling=currentNode.previousSibling;if (A==2) K.insertBefore(currentNode.cloneNode(true),K.firstChild);else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.insertBefore(currentNode,K.firstChild);};currentNode=currentSibling;}};if (K) K=levelClone;};if (A==2){var L=this.startContainer;if (L.nodeType==3){L.data+=L.nextSibling.data;L.parentNode.removeChild(L.nextSibling);};var M=this.endContainer;if (M.nodeType==3&&M.nextSibling){M.data+=M.nextSibling.data;M.parentNode.removeChild(M.nextSibling);}}else{if (topStart&&topEnd&&(C.parentNode!=topStart.parentNode||D.parentNode!=topEnd.parentNode)){var N=FCKDomTools.GetIndexOf(topEnd);if (G&&topEnd.parentNode==C.parentNode) N--;this.setStart(topEnd.parentNode,N);};this.collapse(true);};if(G) C.parentNode.removeChild(C);if(H&&D.parentNode) D.parentNode.removeChild(D);},cloneRange:function(){return FCKW3CRange.CreateFromRange(this._Document,this);}}; var FCKEnterKey=function(A,B,C,D){this.Window=A;this.EnterMode=B||'p';this.ShiftEnterMode=C||'br';var E=new FCKKeystrokeHandler(false);E._EnterKey=this;E.OnKeystroke=FCKEnterKey_OnKeystroke;E.SetKeystrokes([[13,'Enter'],[SHIFT+13,'ShiftEnter'],[8,'Backspace'],[CTRL+8,'CtrlBackspace'],[46,'Delete']]);this.TabText='';if (D>0||FCKBrowserInfo.IsSafari){while (D--) this.TabText+='\xa0';E.SetKeystrokes([9,'Tab']);};E.AttachToElement(A.document);};function FCKEnterKey_OnKeystroke(A,B){var C=this._EnterKey;try{switch (B){case 'Enter':return C.DoEnter();break;case 'ShiftEnter':return C.DoShiftEnter();break;case 'Backspace':return C.DoBackspace();break;case 'Delete':return C.DoDelete();break;case 'Tab':return C.DoTab();break;case 'CtrlBackspace':return C.DoCtrlBackspace();break;}}catch (e){};return false;};FCKEnterKey.prototype.DoEnter=function(A,B){FCKUndo.SaveUndoStep();this._HasShift=(B===true);var C=FCKSelection.GetParentElement();var D=new FCKElementPath(C);var E=A||this.EnterMode;if (E=='br'||D.Block&&D.Block.tagName.toLowerCase()=='pre') return this._ExecuteEnterBr();else return this._ExecuteEnterBlock(E);};FCKEnterKey.prototype.DoShiftEnter=function(){return this.DoEnter(this.ShiftEnterMode,true);};FCKEnterKey.prototype.DoBackspace=function(){var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};var C=B.CheckIsCollapsed();if (!C){if (FCKBrowserInfo.IsIE&&this.Window.document.selection.type.toLowerCase()=="control"){var D=this.Window.document.selection.createRange();for (var i=D.length-1;i>=0;i--){var E=D.item(i);E.parentNode.removeChild(E);};return true;};return false;};if (FCKBrowserInfo.IsIE){var F=FCKDomTools.GetPreviousSourceElement(B.StartNode,true);if (F&&F.nodeName.toLowerCase()=='br'){var G=B.Clone();G.SetStart(F,4);if (G.CheckIsEmpty()){F.parentNode.removeChild(F);return true;}}};var H=B.StartBlock;var I=B.EndBlock;if (B.StartBlockLimit==B.EndBlockLimit&&H&&I){if (!C){var J=B.CheckEndOfBlock();B.DeleteContents();if (H!=I){B.SetStart(I,1);B.SetEnd(I,1);};B.Select();A=(H==I);};if (B.CheckStartOfBlock()){var K=B.StartBlock;var L=FCKDomTools.GetPreviousSourceElement(K,true,['BODY',B.StartBlockLimit.nodeName],['UL','OL']);A=this._ExecuteBackspace(B,L,K);}else if (FCKBrowserInfo.IsGeckoLike){B.Select();}};B.Release();return A;};FCKEnterKey.prototype.DoCtrlBackspace=function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(this.Window);A.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(A,this.Window.document.body)){this._FixIESelectAllBug(A);return true;};return false;};FCKEnterKey.prototype._ExecuteBackspace=function(A,B,C){var D=false;if (!B&&C&&C.nodeName.IEquals('LI')&&C.parentNode.parentNode.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};if (B&&B.nodeName.IEquals('LI')){var E=FCKDomTools.GetLastChild(B,['UL','OL']);while (E){B=FCKDomTools.GetLastChild(E,'LI');E=FCKDomTools.GetLastChild(B,['UL','OL']);}};if (B&&C){if (C.nodeName.IEquals('LI')&&!B.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};var F=C.parentNode;var G=B.nodeName.toLowerCase();if (FCKListsLib.EmptyElements[G]!=null||G=='table'){FCKDomTools.RemoveNode(B);D=true;}else{FCKDomTools.RemoveNode(C);while (F.innerHTML.Trim().length==0){var H=F.parentNode;H.removeChild(F);F=H;};FCKDomTools.LTrimNode(C);FCKDomTools.RTrimNode(B);A.SetStart(B,2,true);A.Collapse(true);var I=A.CreateBookmark(true);if (!C.tagName.IEquals(['TABLE'])) FCKDomTools.MoveChildren(C,B);A.SelectBookmark(I);D=true;}};return D;};FCKEnterKey.prototype.DoDelete=function(){FCKUndo.SaveUndoStep();var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};if (B.CheckIsCollapsed()&&B.CheckEndOfBlock(FCKBrowserInfo.IsGeckoLike)){var C=B.StartBlock;var D=FCKTools.GetElementAscensor(C,'td');var E=FCKDomTools.GetNextSourceElement(C,true,[B.StartBlockLimit.nodeName],['UL','OL','TR'],true);if (D){var F=FCKTools.GetElementAscensor(E,'td');if (F!=D) return true;};A=this._ExecuteBackspace(B,C,E);};B.Release();return A;};FCKEnterKey.prototype.DoTab=function(){var A=new FCKDomRange(this.Window);A.MoveToSelection();var B=A._Range.startContainer;while (B){if (B.nodeType==1){var C=B.tagName.toLowerCase();if (C=="tr"||C=="td"||C=="th"||C=="tbody"||C=="table") return false;else break;};B=B.parentNode;};if (this.TabText){A.DeleteContents();A.InsertNode(this.Window.document.createTextNode(this.TabText));A.Collapse(false);A.Select();};return true;};FCKEnterKey.prototype._ExecuteEnterBlock=function(A,B){var C=B||new FCKDomRange(this.Window);var D=C.SplitBlock(A);if (D){var E=D.PreviousBlock;var F=D.NextBlock;var G=D.WasStartOfBlock;var H=D.WasEndOfBlock;if (F){if (F.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(F,F.parentNode);FCKDomTools.MoveNode(F,F.nextSibling,true);}}else if (E&&E.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(E,E.parentNode);C.MoveToElementEditStart(E.nextSibling);FCKDomTools.MoveNode(E,E.previousSibling);};if (!G&&!H){if (F.nodeName.IEquals('li')&&F.firstChild&&F.firstChild.nodeName.IEquals(['ul','ol'])) F.insertBefore(FCKTools.GetElementDocument(F).createTextNode('\xa0'),F.firstChild);if (F) C.MoveToElementEditStart(F);}else{if (G&&H&&E.tagName.toUpperCase()=='LI'){C.MoveToElementStart(E);this._OutdentWithSelection(E,C);C.Release();return true;};var I;if (E){var J=E.tagName.toUpperCase();if (!this._HasShift&&!(/^H[1-6]$/).test(J)){I=FCKDomTools.CloneElement(E);}}else if (F) I=FCKDomTools.CloneElement(F);if (!I) I=this.Window.document.createElement(A);var K=D.ElementPath;if (K){for (var i=0,len=K.Elements.length;i=0&&(C=B[i--])){if (C.name.length>0){if (C.innerHTML!==''){if (FCKBrowserInfo.IsIE) C.className+=' FCK__AnchorC';}else{var D=FCKDocumentProcessor_CreateFakeImage('FCK__Anchor',C.cloneNode(true));D.setAttribute('_fckanchor','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}}}};var FCKPageBreaksProcessor=FCKDocumentProcessor.AppendNew();FCKPageBreaksProcessor.ProcessDocument=function(A){var B=A.getElementsByTagName('DIV');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.style.pageBreakAfter=='always'&&C.childNodes.length==1&&C.childNodes[0].style&&C.childNodes[0].style.display=='none'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',C.cloneNode(true));C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};var FCKEmbedAndObjectProcessor=(function(){var A=[];var B=function(el){var C=el.cloneNode(true);var D;var E=D=FCKDocumentProcessor_CreateFakeImage('FCK__UnknownObject',C);FCKEmbedAndObjectProcessor.RefreshView(E,el);for (var i=0;i=0;i--) B(G[i]);};var H=function(doc){F('object',doc);F('embed',doc);};return FCKTools.Merge(FCKDocumentProcessor.AppendNew(),{ProcessDocument:function(doc){if (FCKBrowserInfo.IsGecko) FCKTools.RunFunction(H,this,[doc]);else H(doc);},RefreshView:function(placeHolder,original){if (original.getAttribute('width')>0) placeHolder.style.width=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('width'));if (original.getAttribute('height')>0) placeHolder.style.height=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('height'));},AddCustomHandler:function(func){A.push(func);}});})();FCK.GetRealElement=function(A){var e=FCKTempBin.Elements[A.getAttribute('_fckrealelement')];if (A.getAttribute('_fckflash')){if (A.style.width.length>0) e.width=FCKTools.ConvertStyleSizeToHtml(A.style.width);if (A.style.height.length>0) e.height=FCKTools.ConvertStyleSizeToHtml(A.style.height);};return e;};if (FCKBrowserInfo.IsIE){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('HR');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){var D=A.createElement('hr');D.mergeAttributes(C,true);FCKDomTools.InsertAfterNode(C,D);C.parentNode.removeChild(C);}}};FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('INPUT');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.type=='hidden'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__InputHidden',C.cloneNode(true));D.setAttribute('_fckinputhidden','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor.AddCustomHandler(function(A,B){if (!(A.nodeName.IEquals('embed')&&(A.type=='application/x-shockwave-flash'||/\.swf($|#|\?)/i.test(A.src)))) return;B.className='FCK__Flash';B.setAttribute('_fckflash','true',0);});if (FCKBrowserInfo.IsSafari){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByClassName?A.getElementsByClassName('Apple-style-span'):Array.prototype.filter.call(A.getElementsByTagName('span'),function(item){ return item.className=='Apple-style-span';});for (var i=B.length-1;i>=0;i--) FCKDomTools.RemoveNode(B[i],true);}}; var FCKSelection=FCK.Selection={GetParentBlock:function(){var A=this.GetParentElement();while (A){if (FCKListsLib.BlockBoundaries[A.nodeName.toLowerCase()]) break;A=A.parentNode;};return A;},ApplyStyle:function(A){FCKStyles.ApplyStyle(new FCKStyle(A));}}; FCKSelection.GetType=function(){var A='Text';var B;try { B=this.GetSelection();} catch (e) {};if (B&&B.rangeCount==1){var C=B.getRangeAt(0);if (C.startContainer==C.endContainer&&(C.endOffset-C.startOffset)==1&&C.startContainer.nodeType==1&&FCKListsLib.StyleObjectElements[C.startContainer.childNodes[C.startOffset].nodeName.toLowerCase()]){A='Control';}};return A;};FCKSelection.GetSelectedElement=function(){var A=!!FCK.EditorWindow&&this.GetSelection();if (!A||A.rangeCount<1) return null;var B=A.getRangeAt(0);if (B.startContainer!=B.endContainer||B.startContainer.nodeType!=1||B.startOffset!=B.endOffset-1) return null;var C=B.startContainer.childNodes[B.startOffset];if (C.nodeType!=1) return null;return C;};FCKSelection.GetParentElement=function(){if (this.GetType()=='Control') return FCKSelection.GetSelectedElement().parentNode;else{var A=this.GetSelection();if (A){if (A.anchorNode&&A.anchorNode==A.focusNode){var B=A.getRangeAt(0);if (B.collapsed||B.startContainer.nodeType==3) return A.anchorNode.parentNode;else return A.anchorNode;};var C=new FCKElementPath(A.anchorNode);var D=new FCKElementPath(A.focusNode);var E=null;var F=null;if (C.Elements.length>D.Elements.length){E=C.Elements;F=D.Elements;}else{E=D.Elements;F=C.Elements;};var G=E.length-F.length;for(var i=0;i0){var C=B.getRangeAt(A?0:(B.rangeCount-1));var D=A?C.startContainer:C.endContainer;return (D.nodeType==1?D:D.parentNode);}};return null;};FCKSelection.SelectNode=function(A){var B=FCK.EditorDocument.createRange();B.selectNode(A);var C=this.GetSelection();C.removeAllRanges();C.addRange(B);};FCKSelection.Collapse=function(A){var B=this.GetSelection();if (A==null||A===true) B.collapseToStart();else B.collapseToEnd();};FCKSelection.HasAncestorNode=function(A){var B=this.GetSelectedElement();if (!B&&FCK.EditorWindow){try { B=this.GetSelection().getRangeAt(0).startContainer;}catch(e){}}while (B){if (B.nodeType==1&&B.nodeName.IEquals(A)) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B;var C=this.GetSelectedElement();if (!C) C=this.GetSelection().getRangeAt(0).startContainer;while (C){if (C.nodeName.IEquals(A)) return C;C=C.parentNode;};return null;};FCKSelection.Delete=function(){var A=this.GetSelection();for (var i=0;i=0;i--){if (C[i]) FCKTableHandler.DeleteRows(C[i]);};return;};var E=FCKTools.GetElementAscensor(A,'TABLE');if (E.rows.length==1){FCKTableHandler.DeleteTable(E);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A){A=FCKSelection.GetSelectedElement();if (!A||A.tagName!='TABLE') A=FCKSelection.MoveToAncestorNode('TABLE');};if (!A) return;FCKSelection.SelectNode(A);FCKSelection.Collapse();if (A.parentNode.childNodes.length==1) A.parentNode.parentNode.removeChild(A.parentNode);else A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(A){var B=null;var C=this.GetSelectedCells();if (C&&C.length) B=C[A?0:(C.length-1)];if (!B) return;var D=FCKTools.GetElementAscensor(B,'TABLE');var E=B.cellIndex;for (var i=0;i=0;i--){if (B[i]) FCKTableHandler.DeleteColumns(B[i]);};return;};if (!A) return;var C=FCKTools.GetElementAscensor(A,'TABLE');var D=A.cellIndex;for (var i=C.rows.length-1;i>=0;i--){var E=C.rows[i];if (D==0&&E.cells.length==1){FCKTableHandler.DeleteRows(E);continue;};if (E.cells[D]) E.removeChild(E.cells[D]);}};FCKTableHandler.InsertCell=function(A,B){var C=null;var D=this.GetSelectedCells();if (D&&D.length) C=D[B?0:(D.length-1)];if (!C) return null;var E=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(E);if (!B&&C.cellIndex==C.parentNode.cells.length-1) C.parentNode.appendChild(E);else C.parentNode.insertBefore(E,B?C:C.nextSibling);return E;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(A.parentNode);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);}};FCKTableHandler._MarkCells=function(A,B){for (var i=0;i=E.height){for (D=F;D0){var L=K.removeChild(K.firstChild);if (L.nodeType!=1||(L.getAttribute('type',2)!='_moz'&&L.getAttribute('_moz_dirty')!=null)){I.appendChild(L);J++;}}};if (J>0) I.appendChild(FCK.EditorDocument.createElement('br'));};this._ReplaceCellsByMarker(C,'_SelectedCells',B);this._UnmarkCells(A,'_SelectedCells');this._InstallTableMap(C,B.parentNode.parentNode.parentNode);B.appendChild(I);if (FCKBrowserInfo.IsGeckoLike&&(!B.firstChild)) FCKTools.AppendBogusBr(B);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeRight=function(){var A=this.GetMergeRightTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCK.EditorDocument.createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));D.parentNode.removeChild(D);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeDown=function(){var A=this.GetMergeDownTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCKTools.GetElementDocument(B).createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));if (E.firstChild) E.insertBefore(FCK.EditorDocument.createElement('br'),E.firstChild);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.HorizontalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;if (F>1){var G=Math.ceil(F/2);var H=FCK.EditorDocument.createElement(B.nodeName);if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H);var I=E+G;var J=E+F;var K=isNaN(B.rowSpan)?1:B.rowSpan;for (var r=D;r1){B.rowSpan=Math.ceil(G/2);var H=D+Math.ceil(G/2);var I=C[H];var J=null;for (var i=E+1;i1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);B.parentNode.parentNode.parentNode.rows[H].insertBefore(K,J);}else{var L=B.parentNode.sectionRowIndex+1;var M=FCK.EditorDocument.createElement('tr');var N=B.parentNode.parentNode;if (N.rows.length>L) N.insertBefore(M,N.rows[L]);else N.appendChild(M);for (var i=0;i1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);M.appendChild(K);}};FCKTableHandler._GetCellIndexSpan=function(A,B,C){if (A.lengthE) E=j;if (D._colScanned===true) continue;if (A[i][j-1]==D) D.colSpan++;if (A[i][j+1]!=D) D._colScanned=true;}};for (var i=0;i<=E;i++){for (var j=0;j 
    ';var A=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',e);var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.SplitBlock();B.InsertNode(A);FCK.Events.FireEvent('OnSelectionChange');};FCKPageBreakCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKUnlinkCommand=function(){this.Name='Unlink';};FCKUnlinkCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGeckoLike){var A=FCK.Selection.MoveToAncestorNode('A');if (A) FCKTools.RemoveOuterTags(A);return;};FCK.ExecuteNamedCommand(this.Name);};FCKUnlinkCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState(this.Name);if (A==0&&FCK.EditMode==0){var B=FCKSelection.MoveToAncestorNode('A');var C=(B&&B.name.length>0&&B.href.length==0);if (C) A=-1;};return A;};var FCKVisitLinkCommand=function(){this.Name='VisitLink';};FCKVisitLinkCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState('Unlink');if (A==0){var B=FCKSelection.MoveToAncestorNode('A');if (!B.href) A=-1;};return A;},Execute:function(){var A=FCKSelection.MoveToAncestorNode('A');var B=A.getAttribute('_fcksavedurl')||A.getAttribute('href',2);if (!/:\/\//.test(B)){var C=FCKConfig.BaseHref;var D=FCK.GetInstanceObject('parent');if (!C){C=D.document.location.href;C=C.substring(0,C.lastIndexOf('/')+1);};if (/^\//.test(B)){try{C=C.match(/^.*:\/\/+[^\/]+/)[0];}catch (e){C=D.document.location.protocol+'://'+D.parent.document.location.host;}};B=C+B;};if (!window.open(B,'_blank')) alert(FCKLang.VisitLinkBlocked);}};var FCKSelectAllCommand=function(){this.Name='SelectAll';};FCKSelectAllCommand.prototype.Execute=function(){if (FCK.EditMode==0){FCK.ExecuteNamedCommand('SelectAll');}else{var A=FCK.EditingArea.Textarea;if (FCKBrowserInfo.IsIE){A.createTextRange().execCommand('SelectAll');}else{A.selectionStart=0;A.selectionEnd=A.value.length;};A.focus();}};FCKSelectAllCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKPasteCommand=function(){this.Name='Paste';};FCKPasteCommand.prototype={Execute:function(){if (FCKBrowserInfo.IsIE) FCK.Paste();else FCK.ExecuteNamedCommand('Paste');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}};var FCKRuleCommand=function(){this.Name='Rule';};FCKRuleCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();FCK.InsertElement('hr');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('InsertHorizontalRule');}};var FCKCutCopyCommand=function(A){this.Name=A?'Cut':'Copy';};FCKCutCopyCommand.prototype={Execute:function(){var A=false;if (FCKBrowserInfo.IsIE){var B=function(){A=true;};var C='on'+this.Name.toLowerCase();FCK.EditorDocument.body.attachEvent(C,B);FCK.ExecuteNamedCommand(this.Name);FCK.EditorDocument.body.detachEvent(C,B);}else{try{FCK.ExecuteNamedCommand(this.Name);A=true;}catch(e){}};if (!A) alert(FCKLang['PasteError'+this.Name]);},GetState:function(){return FCK.EditMode!=0?-1:FCK.GetNamedCommandState('Cut');}};var FCKAnchorDeleteCommand=function(){this.Name='AnchorDelete';};FCKAnchorDeleteCommand.prototype={Execute:function(){if (FCK.Selection.GetType()=='Control'){FCK.Selection.Delete();}else{var A=FCK.Selection.GetSelectedElement();if (A){if (A.tagName=='IMG'&&A.getAttribute('_fckanchor')) oAnchor=FCK.GetRealElement(A);else A=null;};if (!A){oAnchor=FCK.Selection.MoveToAncestorNode('A');if (oAnchor) FCK.Selection.SelectNode(oAnchor);};if (oAnchor.href.length!=0){oAnchor.removeAttribute('name');if (FCKBrowserInfo.IsIE) oAnchor.className=oAnchor.className.replace(FCKRegexLib.FCK_Class,'');return;};if (A){A.parentNode.removeChild(A);return;};if (oAnchor.innerHTML.length==0){oAnchor.parentNode.removeChild(oAnchor);return;};FCKTools.RemoveOuterTags(oAnchor);};if (FCKBrowserInfo.IsGecko) FCK.Selection.Collapse(true);},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Unlink');}};var FCKDeleteDivCommand=function(){};FCKDeleteDivCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCKSelection.GetParentElement();var B=new FCKElementPath(A);return B.BlockLimit&&B.BlockLimit.nodeName.IEquals('div')?0:-1;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCKDomTools.GetSelectedDivContainers();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();for (var i=0;i\n \n
    \n '+FCKLang.ColorAutomatic+'\n \n ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_AutoOnClick,this);if (!FCKBrowserInfo.IsIE) C.style.width='96%';var G=FCKConfig.FontColors.toString().split(',');var H=0;while (H
    ';if (H>=G.length) C.style.visibility='hidden';else FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_OnClick,[this,L]);}};if (FCKConfig.EnableMoreFontColors){E=D.insertRow(-1).insertCell(-1);E.colSpan=8;C=E.appendChild(CreateSelectionDiv());C.innerHTML='
    '+FCKLang.ColorMoreColors+'
    ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_MoreOnClick,this);};if (!FCKBrowserInfo.IsIE) C.style.width='96%';}; var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}; var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCK.EditMode!=0||FCKConfig.ForcePasteAsPlainText) return -1;else return FCK.GetNamedCommandState('Paste');}; var FCKTableCommand=function(A){this.Name=A;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (!FCKBrowserInfo.IsGecko){switch (this.Name){case 'TableMergeRight':return FCKTableHandler.MergeRight();case 'TableMergeDown':return FCKTableHandler.MergeDown();}};switch (this.Name){case 'TableInsertRowAfter':return FCKTableHandler.InsertRow(false);case 'TableInsertRowBefore':return FCKTableHandler.InsertRow(true);case 'TableDeleteRows':return FCKTableHandler.DeleteRows();case 'TableInsertColumnAfter':return FCKTableHandler.InsertColumn(false);case 'TableInsertColumnBefore':return FCKTableHandler.InsertColumn(true);case 'TableDeleteColumns':return FCKTableHandler.DeleteColumns();case 'TableInsertCellAfter':return FCKTableHandler.InsertCell(null,false);case 'TableInsertCellBefore':return FCKTableHandler.InsertCell(null,true);case 'TableDeleteCells':return FCKTableHandler.DeleteCells();case 'TableMergeCells':return FCKTableHandler.MergeCells();case 'TableHorizontalSplitCell':return FCKTableHandler.HorizontalSplitCell();case 'TableVerticalSplitCell':return FCKTableHandler.VerticalSplitCell();case 'TableDelete':return FCKTableHandler.DeleteTable();default:return alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));}};FCKTableCommand.prototype.GetState=function(){if (FCK.EditorDocument!=null&&FCKSelection.HasAncestorNode('TABLE')){switch (this.Name){case 'TableHorizontalSplitCell':case 'TableVerticalSplitCell':if (FCKTableHandler.GetSelectedCells().length==1) return 0;else return -1;case 'TableMergeCells':if (FCKTableHandler.CheckIsSelectionRectangular()&&FCKTableHandler.GetSelectedCells().length>1) return 0;else return -1;case 'TableMergeRight':return FCKTableHandler.GetMergeRightTarget()?0:-1;case 'TableMergeDown':return FCKTableHandler.GetMergeDownTarget()?0:-1;default:return 0;}}else return -1;}; var FCKFitWindow=function(){this.Name='FitWindow';};FCKFitWindow.prototype.Execute=function(){var A=window.frameElement;var B=A.style;var C=parent;var D=C.document.documentElement;var E=C.document.body;var F=E.style;var G;var H,oEditorScrollPos;if (FCK.EditMode==0){H=new FCKDomRange(FCK.EditorWindow);H.MoveToSelection();oEditorScrollPos=FCKTools.GetScrollPosition(FCK.EditorWindow);}else{var I=FCK.EditingArea.Textarea;H=!FCKBrowserInfo.IsIE&&[I.selectionStart,I.selectionEnd];oEditorScrollPos=[I.scrollLeft,I.scrollTop];};if (!this.IsMaximized){if(FCKBrowserInfo.IsIE) C.attachEvent('onresize',FCKFitWindow_Resize);else C.addEventListener('resize',FCKFitWindow_Resize,true);this._ScrollPos=FCKTools.GetScrollPosition(C);G=A;while((G=G.parentNode)){if (G.nodeType==1){G._fckSavedStyles=FCKTools.SaveStyles(G);G.style.zIndex=FCKConfig.FloatingPanelsZIndex-1;}};if (FCKBrowserInfo.IsIE){this.documentElementOverflow=D.style.overflow;D.style.overflow='hidden';F.overflow='hidden';}else{F.overflow='hidden';F.width='0px';F.height='0px';};this._EditorFrameStyles=FCKTools.SaveStyles(A);var J=FCKTools.GetViewPaneSize(C);B.position="absolute";A.offsetLeft;B.zIndex=FCKConfig.FloatingPanelsZIndex-1;B.left="0px";B.top="0px";B.width=J.Width+"px";B.height=J.Height+"px";if (!FCKBrowserInfo.IsIE){B.borderRight=B.borderBottom="9999px solid white";B.backgroundColor="white";};C.scrollTo(0,0);var K=FCKTools.GetWindowPosition(C,A);if (K.x!=0) B.left=(-1*K.x)+"px";if (K.y!=0) B.top=(-1*K.y)+"px";this.IsMaximized=true;}else{if(FCKBrowserInfo.IsIE) C.detachEvent("onresize",FCKFitWindow_Resize);else C.removeEventListener("resize",FCKFitWindow_Resize,true);G=A;while((G=G.parentNode)){if (G._fckSavedStyles){FCKTools.RestoreStyles(G,G._fckSavedStyles);G._fckSavedStyles=null;}};if (FCKBrowserInfo.IsIE) D.style.overflow=this.documentElementOverflow;FCKTools.RestoreStyles(A,this._EditorFrameStyles);C.scrollTo(this._ScrollPos.X,this._ScrollPos.Y);this.IsMaximized=false;};FCKToolbarItems.GetItem('FitWindow').RefreshState();if (FCK.EditMode==0) FCK.EditingArea.MakeEditable();FCK.Focus();if (FCK.EditMode==0){H.Select();FCK.EditorWindow.scrollTo(oEditorScrollPos.X,oEditorScrollPos.Y);}else{if (!FCKBrowserInfo.IsIE){I.selectionStart=H[0];I.selectionEnd=H[1];};I.scrollLeft=oEditorScrollPos[0];I.scrollTop=oEditorScrollPos[1];}};FCKFitWindow.prototype.GetState=function(){if (FCKConfig.ToolbarLocation!='In') return -1;else return (this.IsMaximized?1:0);};function FCKFitWindow_Resize(){var A=FCKTools.GetViewPaneSize(parent);var B=window.frameElement.style;B.width=A.Width+'px';B.height=A.Height+'px';}; var FCKListCommand=function(A,B){this.Name=A;this.TagName=B;};FCKListCommand.prototype={GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=FCKSelection.GetBoundaryParentElement(true);var B=A;while (B){if (B.nodeName.IEquals(['ul','ol'])) break;B=B.parentNode;};if (B&&B.nodeName.IEquals(this.TagName)) return 1;else return 0;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCK.EditorDocument;var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=this.GetState();if (C==0){FCKDomTools.TrimNode(A.body);if (!A.body.firstChild){var D=A.createElement('p');A.body.appendChild(D);B.MoveToNodeContents(D);}};var E=B.CreateBookmark();var F=[];var G={};var H=new FCKDomRangeIterator(B);var I;H.ForceBrBreak=(C==0);var J=true;var K=null;while (J){while ((I=H.GetNextParagraph())){var L=new FCKElementPath(I);var M=null;var N=false;var O=L.BlockLimit;for (var i=L.Elements.length-1;i>=0;i--){var P=L.Elements[i];if (P.nodeName.IEquals(['ol','ul'])){if (O._FCK_ListGroupObject) O._FCK_ListGroupObject=null;var Q=P._FCK_ListGroupObject;if (Q) Q.contents.push(I);else{Q={ 'root':P,'contents':[I] };F.push(Q);FCKDomTools.SetElementMarker(G,P,'_FCK_ListGroupObject',Q);};N=true;break;}};if (N) continue;var R=O;if (R._FCK_ListGroupObject) R._FCK_ListGroupObject.contents.push(I);else{var Q={ 'root':R,'contents':[I] };FCKDomTools.SetElementMarker(G,R,'_FCK_ListGroupObject',Q);F.push(Q);}};if (FCKBrowserInfo.IsIE) J=false;else{if (K==null){K=[];var T=FCKSelection.GetSelection();if (T&&F.length==0) K.push(T.getRangeAt(0));for (var i=1;T&&i0){var Q=F.shift();if (C==0){if (Q.root.nodeName.IEquals(['ul','ol'])) this._ChangeListType(Q,G,W);else this._CreateList(Q,W);}else if (C==1&&Q.root.nodeName.IEquals(['ul','ol'])) this._RemoveList(Q,G);};for (var i=0;iC[i-1].indent+1){var H=C[i-1].indent+1-C[i].indent;var I=C[i].indent;while (C[i]&&C[i].indent>=I){C[i].indent+=H;i++;};i--;}};var J=FCKDomTools.ArrayToList(C,B);if (A.root.nextSibling==null||A.root.nextSibling.nodeName.IEquals('br')){if (J.listNode.lastChild.nodeName.IEquals('br')) J.listNode.removeChild(J.listNode.lastChild);};A.root.parentNode.replaceChild(J.listNode,A.root);}}; var FCKJustifyCommand=function(A){this.AlignValue=A;var B=FCKConfig.ContentLangDirection.toLowerCase();this.IsDefaultAlign=(A=='left'&&B=='ltr')||(A=='right'&&B=='rtl');var C=this._CssClassName=(function(){var D=FCKConfig.JustifyClasses;if (D){switch (A){case 'left':return D[0]||null;case 'center':return D[1]||null;case 'right':return D[2]||null;case 'justify':return D[3]||null;}};return null;})();if (C&&C.length>0) this._CssClassRegex=new RegExp('(?:^|\\s+)'+C+'(?=$|\\s)');};FCKJustifyCommand._GetClassNameRegex=function(){var A=FCKJustifyCommand._ClassRegex;if (A!=undefined) return A;var B=[];var C=FCKConfig.JustifyClasses;if (C){for (var i=0;i<4;i++){var D=C[i];if (D&&D.length>0) B.push(D);}};if (B.length>0) A=new RegExp('(?:^|\\s+)(?:'+B.join('|')+')(?=$|\\s)');else A=null;return FCKJustifyCommand._ClassRegex=A;};FCKJustifyCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(FCK.EditorWindow);A.MoveToSelection();var B=this.GetState();if (B==-1) return;var C=A.CreateBookmark();var D=this._CssClassName;var E=new FCKDomRangeIterator(A);var F;while ((F=E.GetNextParagraph())){F.removeAttribute('align');if (D){var G=F.className.replace(FCKJustifyCommand._GetClassNameRegex(),'');if (B==0){if (G.length>0) G+=' ';F.className=G+D;}else if (G.length==0) FCKDomTools.RemoveAttribute(F,'class');}else{var H=F.style;if (B==0) H.textAlign=this.AlignValue;else{H.textAlign='';if (H.cssText.length==0) F.removeAttribute('style');}}};A.MoveToBookmark(C);A.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;var C;if (FCKBrowserInfo.IsIE) C=B.currentStyle.textAlign;else C=FCK.EditorWindow.getComputedStyle(B,'').getPropertyValue('text-align');C=C.replace(/(-moz-|-webkit-|start|auto)/i,'');if ((!C&&this.IsDefaultAlign)||C==this.AlignValue) return 1;return 0;}}; var FCKIndentCommand=function(A,B){this.Name=A;this.Offset=B;this.IndentCSSProperty=FCKConfig.ContentLangDirection.IEquals('ltr')?'marginLeft':'marginRight';};FCKIndentCommand._InitIndentModeParameters=function(){if (FCKConfig.IndentClasses&&FCKConfig.IndentClasses.length>0){this._UseIndentClasses=true;this._IndentClassMap={};for (var i=0;i0?H+' ':'')+FCKConfig.IndentClasses[G-1];}else{var I=parseInt(E.style[this.IndentCSSProperty],10);if (isNaN(I)) I=0;I+=this.Offset;I=Math.max(I,0);I=Math.ceil(I/this.Offset)*this.Offset;E.style[this.IndentCSSProperty]=I?I+FCKConfig.IndentUnit:'';if (E.getAttribute('style')=='') E.removeAttribute('style');}}},_IndentList:function(A,B){var C=A.StartContainer;var D=A.EndContainer;while (C&&C.parentNode!=B) C=C.parentNode;while (D&&D.parentNode!=B) D=D.parentNode;if (!C||!D) return;var E=C;var F=[];var G=false;while (G==false){if (E==D) G=true;F.push(E);E=E.nextSibling;};if (F.length<1) return;var H=FCKDomTools.GetParents(B);for (var i=0;iN;i++) M[i].indent+=I;var O=FCKDomTools.ArrayToList(M);if (O) B.parentNode.replaceChild(O.listNode,B);FCKDomTools.ClearAllMarkers(L);}}; var FCKBlockQuoteCommand=function(){};FCKBlockQuoteCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=this.GetState();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();if (FCKBrowserInfo.IsIE){var D=B.GetBookmarkNode(C,true);var E=B.GetBookmarkNode(C,false);var F;if (D&&D.parentNode.nodeName.IEquals('blockquote')&&!D.previousSibling){F=D;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]) FCKDomTools.MoveNode(D,F,true);}};if (E&&E.parentNode.nodeName.IEquals('blockquote')&&!E.previousSibling){F=E;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]){if (F.firstChild==D) FCKDomTools.InsertAfterNode(D,E);else FCKDomTools.MoveNode(E,F,true);}}}};var G=new FCKDomRangeIterator(B);var H;if (A==0){var I=[];while ((H=G.GetNextParagraph())) I.push(H);if (I.length<1){para=B.Window.document.createElement(FCKConfig.EnterMode.IEquals('p')?'p':'div');B.InsertNode(para);para.appendChild(B.Window.document.createTextNode('\ufeff'));B.MoveToBookmark(C);B.MoveToNodeContents(para);B.Collapse(true);C=B.CreateBookmark();I.push(para);};var J=I[0].parentNode;var K=[];for (var i=0;i0){H=I.shift();while (H.parentNode!=J) H=H.parentNode;if (H!=L) K.push(H);L=H;}while (K.length>0){H=K.shift();if (H.nodeName.IEquals('blockquote')){var M=FCKTools.GetElementDocument(H).createDocumentFragment();while (H.firstChild){M.appendChild(H.removeChild(H.firstChild));I.push(M.lastChild);};H.parentNode.replaceChild(M,H);}else I.push(H);};var N=B.Window.document.createElement('blockquote');J.insertBefore(N,I[0]);while (I.length>0){H=I.shift();N.appendChild(H);}}else if (A==1){var O=[];var P={};while ((H=G.GetNextParagraph())){var Q=null;var R=null;while (H.parentNode){if (H.parentNode.nodeName.IEquals('blockquote')){Q=H.parentNode;R=H;break;};H=H.parentNode;};if (Q&&R&&!R._fckblockquotemoveout){O.push(R);FCKDomTools.SetElementMarker(P,R,'_fckblockquotemoveout',true);}};FCKDomTools.ClearAllMarkers(P);var S=[];var T=[],P={};var U=function(N){for (var i=0;i0){var W=O.shift();var N=W.parentNode;if (W==W.parentNode.firstChild) N.parentNode.insertBefore(N.removeChild(W),N);else if (W==W.parentNode.lastChild) N.parentNode.insertBefore(N.removeChild(W),N.nextSibling);else FCKDomTools.BreakParent(W,W.parentNode,B);if (!N._fckbqprocessed){T.push(N);FCKDomTools.SetElementMarker(P,N,'_fckbqprocessed',true);};S.push(W);};for (var i=T.length-1;i>=0;i--){var N=T[i];if (U(N)) FCKDomTools.RemoveNode(N);};FCKDomTools.ClearAllMarkers(P);if (FCKConfig.EnterMode.IEquals('br')){while (S.length){var W=S.shift();var a=true;if (W.nodeName.IEquals('div')){var M=FCKTools.GetElementDocument(W).createDocumentFragment();var c=a&&W.previousSibling&&!FCKListsLib.BlockBoundaries[W.previousSibling.nodeName.toLowerCase()];if (a&&c) M.appendChild(FCKTools.GetElementDocument(W).createElement('br'));var d=W.nextSibling&&!FCKListsLib.BlockBoundaries[W.nextSibling.nodeName.toLowerCase()];while (W.firstChild) M.appendChild(W.removeChild(W.firstChild));if (d) M.appendChild(FCKTools.GetElementDocument(W).createElement('br'));W.parentNode.replaceChild(M,W);a=false;}}}};B.MoveToBookmark(C);B.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;for (var i=0;i';B.open();B.write(''+F+'<\/head><\/body><\/html>');B.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.Panel_Contructor(B,window.document.location);FCKTools.AddEventListenerEx(E,'focus',FCKPanel_Window_OnFocus,this);FCKTools.AddEventListenerEx(E,'blur',FCKPanel_Window_OnBlur,this);};B.dir=FCKLang.Dir;FCKTools.AddEventListener(B,'contextmenu',FCKTools.CancelEvent);this.MainNode=B.body.appendChild(B.createElement('DIV'));this.MainNode.style.cssFloat=this.IsRTL?'right':'left';};FCKPanel.prototype.AppendStyleSheet=function(A){FCKTools.AppendStyleSheet(this.Document,A);};FCKPanel.prototype.Preload=function(x,y,A){if (this._Popup) this._Popup.show(x,y,0,0,A);};FCKPanel.prototype.ResizeForSubpanel=function(A,B,C){if (!FCKBrowserInfo.IsIE7) return false;if (!this._Popup.isOpen){this.Subpanel=null;return false;};if (B==0&&C==0){if (this.Subpanel!==A) return false;this.Subpanel=null;this.IncreasedX=0;}else{this.Subpanel=A;if ((this.IncreasedX>=B)&&(this.IncreasedY>=C)) return false;this.IncreasedX=Math.max(this.IncreasedX,B);this.IncreasedY=Math.max(this.IncreasedY,C);};var x=this.ShowRect.x;var w=this.IncreasedX;if (this.IsRTL) x=x-w;var D=this.ShowRect.w+w;var E=Math.max(this.ShowRect.h,this.IncreasedY);if (this.ParentPanel) this.ParentPanel.ResizeForSubpanel(this,D,E);this._Popup.show(x,this.ShowRect.y,D,E,this.RelativeElement);return this.IsRTL;};FCKPanel.prototype.Show=function(x,y,A,B,C){var D;var E=this.MainNode;if (this._Popup){this._Popup.show(x,y,0,0,A);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (FCKBrowserInfo.IsIE7){if (this.ParentPanel&&this.ParentPanel.ResizeForSubpanel(this,D,E.offsetHeight)){FCKTools.RunFunction(this.Show,this,[x,y,A]);return;}};if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=(x*-1)+A.offsetWidth-D;};if (FCKBrowserInfo.IsIE7){this.ShowRect={x:x,y:y,w:D,h:E.offsetHeight};this.IncreasedX=0;this.IncreasedY=0;this.RelativeElement=A;};this._Popup.show(x,y,D,E.offsetHeight,A);if (this.OnHide){if (this._Timer) CheckPopupOnHide.call(this,true);this._Timer=FCKTools.SetInterval(CheckPopupOnHide,100,this);}}else{if (typeof(FCK.ToolbarSet.CurrentInstance.FocusManager)!='undefined') FCK.ToolbarSet.CurrentInstance.FocusManager.Lock();if (this.ParentPanel){this.ParentPanel.Lock();FCKPanel_Window_OnBlur(null,this.ParentPanel);};if (FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac){this._IFrame.scrolling='';FCKTools.RunFunction(function(){ this._IFrame.scrolling='no';},this);};if (FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel&&FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel!=this) FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel.Hide(false,true);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (!B) this._IFrame.width=1;if (!C) this._IFrame.height=1;D=E.offsetWidth||E.firstChild.offsetWidth;var F=FCKTools.GetDocumentPosition(this._Window,A.nodeType==9?(FCKTools.IsStrictMode(A)?A.documentElement:A.body):A);var G=FCKDomTools.GetPositionedAncestor(this._IFrame.parentNode);if (G){var H=FCKTools.GetDocumentPosition(FCKTools.GetElementWindow(G),G);F.x-=H.x;F.y-=H.y;};if (this.IsRTL&&!this.IsContextMenu) x=(x*-1);x+=F.x;y+=F.y;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=x+A.offsetWidth-D;}else{var I=FCKTools.GetViewPaneSize(this._Window);var J=FCKTools.GetScrollPosition(this._Window);var K=I.Height+J.Y;var L=I.Width+J.X;if ((x+D)>L) x-=x+D-L;if ((y+E.offsetHeight)>K) y-=y+E.offsetHeight-K;};FCKDomTools.SetElementStyles(this._IFrame,{left:x+'px',top:y+'px'});this._IFrame.contentWindow.focus();this._IsOpened=true;var M=this;this._resizeTimer=setTimeout(function(){var N=E.offsetWidth||E.firstChild.offsetWidth;var O=E.offsetHeight;M._IFrame.style.width=N+'px';M._IFrame.style.height=O+'px';},0);FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel=this;};FCKTools.RunFunction(this.OnShow,this);};FCKPanel.prototype.Hide=function(A,B){if (this._Popup) this._Popup.hide();else{if (!this._IsOpened||this._LockCounter>0) return;if (typeof(FCKFocusManager)!='undefined'&&!B) FCKFocusManager.Unlock();this._IFrame.style.width=this._IFrame.style.height='0px';this._IsOpened=false;if (this._resizeTimer){clearTimeout(this._resizeTimer);this._resizeTimer=null;};if (this.ParentPanel) this.ParentPanel.Unlock();if (!A) FCKTools.RunFunction(this.OnHide,this);}};FCKPanel.prototype.CheckIsOpened=function(){if (this._Popup) return this._Popup.isOpen;else return this._IsOpened;};FCKPanel.prototype.CreateChildPanel=function(){var A=this._Popup?FCKTools.GetDocumentWindow(this.Document):this._Window;var B=new FCKPanel(A);B.ParentPanel=this;return B;};FCKPanel.prototype.Lock=function(){this._LockCounter++;};FCKPanel.prototype.Unlock=function(){if (--this._LockCounter==0&&!this.HasFocus) this.Hide();};function FCKPanel_Window_OnFocus(e,A){A.HasFocus=true;};function FCKPanel_Window_OnBlur(e,A){A.HasFocus=false;if (A._LockCounter==0) FCKTools.RunFunction(A.Hide,A);};function CheckPopupOnHide(A){if (A||!this._Popup.isOpen){window.clearInterval(this._Timer);this._Timer=null;if (this._Popup&&this.ParentPanel&&!A) this.ParentPanel.ResizeForSubpanel(this,0,0);FCKTools.RunFunction(this.OnHide,this);}};function FCKPanel_Cleanup(){this._Popup=null;this._Window=null;this.Document=null;this.MainNode=null;this.RelativeElement=null;}; var FCKIcon=function(A){var B=A?typeof(A):'undefined';switch (B){case 'number':this.Path=FCKConfig.SkinPath+'fck_strip.gif';this.Size=16;this.Position=A;break;case 'undefined':this.Path=FCK_SPACER_PATH;break;case 'string':this.Path=A;break;default:this.Path=A[0];this.Size=A[1];this.Position=A[2];}};FCKIcon.prototype.CreateIconElement=function(A){var B,eIconImage;if (this.Position){var C='-'+((this.Position-1)*this.Size)+'px';if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path;eIconImage.style.top=C;}else{B=A.createElement('IMG');B.src=FCK_SPACER_PATH;B.style.backgroundPosition='0px '+C;B.style.backgroundImage='url("'+this.Path+'")';}}else{if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path?this.Path:FCK_SPACER_PATH;}else{B=A.createElement('IMG');B.src=this.Path?this.Path:FCK_SPACER_PATH;}};B.className='TB_Button_Image';return B;}; var FCKToolbarButtonUI=function(A,B,C,D,E,F){this.Name=A;this.Label=B||A;this.Tooltip=C||this.Label;this.Style=E||0;this.State=F||0;this.Icon=new FCKIcon(D);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarButtonUI_Cleanup);};FCKToolbarButtonUI.prototype._CreatePaddingElement=function(A){var B=A.createElement('IMG');B.className='TB_Button_Padding';B.src=FCK_SPACER_PATH;return B;};FCKToolbarButtonUI.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this.MainElement=B.createElement('DIV');C.title=this.Tooltip;if (FCKBrowserInfo.IsGecko) C.onmousedown=FCKTools.CancelEvent;FCKTools.AddEventListenerEx(C,'mouseover',FCKToolbarButtonUI_OnMouseOver,this);FCKTools.AddEventListenerEx(C,'mouseout',FCKToolbarButtonUI_OnMouseOut,this);FCKTools.AddEventListenerEx(C,'click',FCKToolbarButtonUI_OnClick,this);this.ChangeState(this.State,true);if (this.Style==0&&!this.ShowArrow){C.appendChild(this.Icon.CreateIconElement(B));}else{var D=C.appendChild(B.createElement('TABLE'));D.cellPadding=0;D.cellSpacing=0;var E=D.insertRow(-1);var F=E.insertCell(-1);if (this.Style==0||this.Style==2) F.appendChild(this.Icon.CreateIconElement(B));else F.appendChild(this._CreatePaddingElement(B));if (this.Style==1||this.Style==2){F=E.insertCell(-1);F.className='TB_Button_Text';F.noWrap=true;F.appendChild(B.createTextNode(this.Label));};if (this.ShowArrow){if (this.Style!=0){E.insertCell(-1).appendChild(this._CreatePaddingElement(B));};F=E.insertCell(-1);var G=F.appendChild(B.createElement('IMG'));G.src=FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif';G.width=5;G.height=3;};F=E.insertCell(-1);F.appendChild(this._CreatePaddingElement(B));};A.appendChild(C);};FCKToolbarButtonUI.prototype.ChangeState=function(A,B){if (!B&&this.State==A) return;var e=this.MainElement;if (!e) return;switch (parseInt(A,10)){case 0:e.className='TB_Button_Off';break;case 1:e.className='TB_Button_On';break;case -1:e.className='TB_Button_Disabled';break;};this.State=A;};function FCKToolbarButtonUI_OnMouseOver(A,B){if (B.State==0) this.className='TB_Button_Off_Over';else if (B.State==1) this.className='TB_Button_On_Over';};function FCKToolbarButtonUI_OnMouseOut(A,B){if (B.State==0) this.className='TB_Button_Off';else if (B.State==1) this.className='TB_Button_On';};function FCKToolbarButtonUI_OnClick(A,B){if (B.OnClick&&B.State!=-1) B.OnClick(B);};function FCKToolbarButtonUI_Cleanup(){this.MainElement=null;}; var FCKToolbarButton=function(A,B,C,D,E,F,G){this.CommandName=A;this.Label=B;this.Tooltip=C;this.Style=D;this.SourceView=E?true:false;this.ContextSensitive=F?true:false;if (G==null) this.IconPath=FCKConfig.SkinPath+'toolbar/'+A.toLowerCase()+'.gif';else if (typeof(G)=='number') this.IconPath=[FCKConfig.SkinPath+'fck_strip.gif',16,G];else this.IconPath=G;};FCKToolbarButton.prototype.Create=function(A){this._UIButton=new FCKToolbarButtonUI(this.CommandName,this.Label,this.Tooltip,this.IconPath,this.Style);this._UIButton.OnClick=this.Click;this._UIButton._ToolbarButton=this;this._UIButton.Create(A);};FCKToolbarButton.prototype.RefreshState=function(){var A=this._UIButton;if (!A) return;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B==A.State) return;A.ChangeState(B);};FCKToolbarButton.prototype.Click=function(){var A=this._ToolbarButton||this;FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(A.CommandName).Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this._UIButton.ChangeState(-1);}; var FCKSpecialCombo=function(A,B,C,D,E){this.FieldWidth=B||100;this.PanelWidth=C||150;this.PanelMaxHeight=D||150;this.Label=' ';this.Caption=A;this.Tooltip=A;this.Style=2;this.Enabled=true;this.Items={};this._Panel=new FCKPanel(E||window);this._Panel.AppendStyleSheet(FCKConfig.SkinEditorCSS);this._PanelBox=this._Panel.MainNode.appendChild(this._Panel.Document.createElement('DIV'));this._PanelBox.className='SC_Panel';this._PanelBox.style.width=this.PanelWidth+'px';this._PanelBox.innerHTML='
    ';this._ItemsHolderEl=this._PanelBox.getElementsByTagName('TD')[0];if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKSpecialCombo_Cleanup);};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(A,B,C){this.className=this.originalClass;B._Panel.Hide();B.SetLabel(this.FCKItemLabel);if (typeof(B.OnSelect)=='function') B.OnSelect(C,this);};FCKSpecialCombo.prototype.ClearItems=function (){if (this.Items) this.Items={};var A=this._ItemsHolderEl;while (A.firstChild) A.removeChild(A.firstChild);};FCKSpecialCombo.prototype.AddItem=function(A,B,C,D){var E=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));E.className=E.originalClass='SC_Item';E.innerHTML=B;E.FCKItemLabel=C||A;E.Selected=false;if (FCKBrowserInfo.IsIE) E.style.width='100%';if (D) E.style.backgroundColor=D;FCKTools.AddEventListenerEx(E,'mouseover',FCKSpecialCombo_ItemOnMouseOver);FCKTools.AddEventListenerEx(E,'mouseout',FCKSpecialCombo_ItemOnMouseOut);FCKTools.AddEventListenerEx(E,'click',FCKSpecialCombo_ItemOnClick,[this,A]);this.Items[A.toString().toLowerCase()]=E;return E;};FCKSpecialCombo.prototype.SelectItem=function(A){if (typeof A=='string') A=this.Items[A.toString().toLowerCase()];if (A){A.className=A.originalClass='SC_ItemSelected';A.Selected=true;}};FCKSpecialCombo.prototype.SelectItemByLabel=function(A,B){for (var C in this.Items){var D=this.Items[C];if (D.FCKItemLabel==A){D.className=D.originalClass='SC_ItemSelected';D.Selected=true;if (B) this.SetLabel(A);}}};FCKSpecialCombo.prototype.DeselectAll=function(A){for (var i in this.Items){if (!this.Items[i]) continue;this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};if (A) this.SetLabel('');};FCKSpecialCombo.prototype.SetLabelById=function(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];this.SetLabel(B?B.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(A){A=(!A||A.length==0)?' ':A;if (A==this.Label) return;this.Label=A;var B=this._LabelEl;if (B){B.innerHTML=A;FCKTools.DisableSelection(B);}};FCKSpecialCombo.prototype.SetEnabled=function(A){this.Enabled=A;if (this._OuterTable) this._OuterTable.className=A?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this._OuterTable=A.appendChild(B.createElement('TABLE'));C.cellPadding=0;C.cellSpacing=0;C.insertRow(-1);var D;var E;switch (this.Style){case 0:D='TB_ButtonType_Icon';E=false;break;case 1:D='TB_ButtonType_Text';E=false;break;case 2:E=true;break;};if (this.Caption&&this.Caption.length>0&&E){var F=C.rows[0].insertCell(-1);F.innerHTML=this.Caption;F.className='SC_FieldCaption';};var G=FCKTools.AppendElement(C.rows[0].insertCell(-1),'div');if (E){G.className='SC_Field';G.style.width=this.FieldWidth+'px';G.innerHTML='
     
    ';this._LabelEl=G.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;}else{G.className='TB_Button_Off';G.innerHTML='
    '+this.Caption+'
    ';};FCKTools.AddEventListenerEx(G,'mouseover',FCKSpecialCombo_OnMouseOver,this);FCKTools.AddEventListenerEx(G,'mouseout',FCKSpecialCombo_OnMouseOut,this);FCKTools.AddEventListenerEx(G,'click',FCKSpecialCombo_OnClick,this);FCKTools.DisableSelection(this._Panel.Document.body);};function FCKSpecialCombo_Cleanup(){this._LabelEl=null;this._OuterTable=null;this._ItemsHolderEl=null;this._PanelBox=null;if (this.Items){for (var A in this.Items) this.Items[A]=null;}};function FCKSpecialCombo_OnMouseOver(A,B){if (B.Enabled){switch (B.Style){case 0:this.className='TB_Button_On_Over';break;case 1:this.className='TB_Button_On_Over';break;case 2:this.className='SC_Field SC_FieldOver';break;}}};function FCKSpecialCombo_OnMouseOut(A,B){switch (B.Style){case 0:this.className='TB_Button_Off';break;case 1:this.className='TB_Button_Off';break;case 2:this.className='SC_Field';break;}};function FCKSpecialCombo_OnClick(e,A){if (A.Enabled){var B=A._Panel;var C=A._PanelBox;var D=A._ItemsHolderEl;var E=A.PanelMaxHeight;if (A.OnBeforeClick) A.OnBeforeClick(A);if (FCKBrowserInfo.IsIE) B.Preload(0,this.offsetHeight,this);if (D.offsetHeight>E) C.style.height=E+'px';else C.style.height='';B.Show(0,this.offsetHeight,this);}}; var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;this.FieldWidth=null;this.PanelWidth=null;this.PanelMaxHeight=null;};FCKToolbarSpecialCombo.prototype.DefaultLabel='';function FCKToolbarSpecialCombo_OnSelect(A,B){FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).Execute(A,B);};FCKToolbarSpecialCombo.prototype.Create=function(A){this._Combo=new FCKSpecialCombo(this.GetLabel(),this.FieldWidth,this.PanelWidth,this.PanelMaxHeight,FCKBrowserInfo.IsIE?window:FCKTools.GetElementWindow(A).parent);this._Combo.Tooltip=this.Tooltip;this._Combo.Style=this.Style;this.CreateItems(this._Combo);this._Combo.Create(A);this._Combo.CommandName=this.CommandName;this._Combo.OnSelect=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(A,B){A.DeselectAll();A.SelectItem(B);A.SetLabelById(B);};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var A;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B!=-1){A=1;if (this.RefreshActiveItems) this.RefreshActiveItems(this._Combo,B);else{if (this._LastValue!==B){this._LastValue=B;if (!B||B.length==0){this._Combo.DeselectAll();this._Combo.SetLabel(this.DefaultLabel);}else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,B);}}}else A=-1;if (A==this.State) return;if (A==-1){this._Combo.DeselectAll();this._Combo.SetLabel('');};this.State=A;this._Combo.SetEnabled(A!=-1);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=-1;this._Combo.DeselectAll();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}; var FCKToolbarStyleCombo=function(A,B){if (A===false) return;this.CommandName='Style';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.DefaultLabel=FCKConfig.DefaultStyleLabel||'';};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.GetStyles=function(){var A={};var B=FCK.ToolbarSet.CurrentInstance.Styles.GetStyles();for (var C in B){var D=B[C];if (!D.IsCore) A[C]=D;};return A;};FCKToolbarStyleCombo.prototype.CreateItems=function(A){var B=A._Panel.Document;FCKTools.AppendStyleSheet(B,FCKConfig.ToolbarComboPreviewCSS);FCKTools.AppendStyleString(B,FCKConfig.EditorAreaStyles);B.body.className+=' ForceBaseFont';FCKConfig.ApplyBodyAttributes(B.body);var C=this.GetStyles();for (var D in C){var E=C[D];var F=E.GetType()==2?D:FCKToolbarStyleCombo_BuildPreview(E,E.Label||D);var G=A.AddItem(D,F);G.Style=E;};A.OnBeforeClick=this.StyleCombo_OnBeforeClick;};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(A){var B=FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement(true);if (B){var C=new FCKElementPath(B);var D=C.Elements;for (var e=0;e');var E=A.Element;if (E=='bdo') E='span';D=['<',E];var F=A._StyleDesc.Attributes;if (F){for (var G in F){D.push(' ',G,'="',A.GetFinalAttributeValue(G),'"');}};if (A._GetStyleText().length>0) D.push(' style="',A.GetFinalStyleValue(),'"');D.push('>',B,'');if (C==0) D.push('');return D.join('');}; var FCKToolbarFontFormatCombo=function(A,B){if (A===false) return;this.CommandName='FontFormat';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.NormalLabel='Normal';this.PanelWidth=190;this.DefaultLabel=FCKConfig.DefaultFontFormatLabel||'';};FCKToolbarFontFormatCombo.prototype=new FCKToolbarStyleCombo(false);FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.GetStyles=function(){var A={};var B=FCKLang['FontFormats'].split(';');var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],div:B[9]||(B[0]+' (DIV)')};var D=FCKConfig.FontFormats.split(';');for (var i=0;i';G.open();G.write(''+H+''+document.getElementById('xToolbarSpace').innerHTML+'');G.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.ToolbarSet_InitOutFrame(G);FCKTools.AddEventListener(G,'contextmenu',FCKTools.CancelEvent);FCKTools.AppendStyleSheet(G,FCKConfig.SkinEditorCSS);B=D.__FCKToolbarSet=new FCKToolbarSet(G);B._IFrame=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(D,FCKToolbarSet_Target_Cleanup);};B.CurrentInstance=FCK;if (!B.ToolbarItems) B.ToolbarItems=FCKToolbarItems;FCK.AttachToOnSelectionChange(B.RefreshItemsState);return B;};function FCK_OnBlur(A){var B=A.ToolbarSet;if (B.CurrentInstance==A) B.Disable();};function FCK_OnFocus(A){var B=A.ToolbarSet;var C=A||FCK;B.CurrentInstance.FocusManager.RemoveWindow(B._IFrame.contentWindow);B.CurrentInstance=C;C.FocusManager.AddWindow(B._IFrame.contentWindow,true);B.Enable();};function FCKToolbarSet_Cleanup(){this._TargetElement=null;this._IFrame=null;};function FCKToolbarSet_Target_Cleanup(){this.__FCKToolbarSet=null;};var FCKToolbarSet=function(A){this._Document=A;this._TargetElement=A.getElementById('xToolbar');var B=A.getElementById('xExpandHandle');var C=A.getElementById('xCollapseHandle');B.title=FCKLang.ToolbarExpand;FCKTools.AddEventListener(B,'click',FCKToolbarSet_Expand_OnClick);C.title=FCKLang.ToolbarCollapse;FCKTools.AddEventListener(C,'click',FCKToolbarSet_Collapse_OnClick);if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();C.style.display=FCKConfig.ToolbarCanCollapse?'':'none';if (FCKConfig.ToolbarCanCollapse) C.style.display='';else A.getElementById('xTBLeftBorder').style.display='';this.Toolbars=[];this.IsLoaded=false;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarSet_Cleanup);};function FCKToolbarSet_Expand_OnClick(){FCK.ToolbarSet.Expand();};function FCKToolbarSet_Collapse_OnClick(){FCK.ToolbarSet.Collapse();};FCKToolbarSet.prototype.Expand=function(){this._ChangeVisibility(false);};FCKToolbarSet.prototype.Collapse=function(){this._ChangeVisibility(true);};FCKToolbarSet.prototype._ChangeVisibility=function(A){this._Document.getElementById('xCollapsed').style.display=A?'':'none';this._Document.getElementById('xExpanded').style.display=A?'none':'';if (FCKBrowserInfo.IsGecko){FCKTools.RunFunction(window.onresize);}};FCKToolbarSet.prototype.Load=function(A){this.Name=A;this.Items=[];this.ItemsWysiwygOnly=[];this.ItemsContextSensitive=[];this._TargetElement.innerHTML='';var B=FCKConfig.ToolbarSets[A];if (!B){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,A));return;};this.Toolbars=[];for (var x=0;x0) break;}catch (e){break;};D=D.parent;};var E=D.document;var F=function(){if (!B) B=FCKConfig.FloatingPanelsZIndex+999;return++B;};var G=function(){if (!C) return;var H=FCKTools.IsStrictMode(E)?E.documentElement:E.body;FCKDomTools.SetElementStyles(C,{'width':Math.max(H.scrollWidth,H.clientWidth,E.scrollWidth||0)-1+'px','height':Math.max(H.scrollHeight,H.clientHeight,E.scrollHeight||0)-1+'px'});};return {OpenDialog:function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow,resizable){if (!A) this.DisplayMainCover();var I={Title:dialogTitle,Page:dialogPage,Editor:window,CustomValue:customValue,TopWindow:D};FCK.ToolbarSet.CurrentInstance.Selection.Save(true);var J=FCKTools.GetViewPaneSize(D);var K={ 'X':0,'Y':0 };var L=FCKBrowserInfo.IsIE&&(!FCKBrowserInfo.IsIE7||!FCKTools.IsStrictMode(D.document));if (L) K=FCKTools.GetScrollPosition(D);var M=Math.max(K.Y+(J.Height-height-20)/2,0);var N=Math.max(K.X+(J.Width-width-20)/2,0);var O=E.createElement('iframe');FCKTools.ResetStyles(O);O.src=FCKConfig.BasePath+'fckdialog.html';O.frameBorder=0;O.allowTransparency=true;FCKDomTools.SetElementStyles(O,{'position':(L)?'absolute':'fixed','top':M+'px','left':N+'px','width':width+'px','height':height+'px','zIndex':F()});O._DialogArguments=I;E.body.appendChild(O);O._ParentDialog=A;A=O;},OnDialogClose:function(dialogWindow){var O=dialogWindow.frameElement;FCKDomTools.RemoveNode(O);if (O._ParentDialog){A=O._ParentDialog;O._ParentDialog.contentWindow.SetEnabled(true);}else{if (!FCKBrowserInfo.IsIE) FCK.Focus();this.HideMainCover();setTimeout(function(){ A=null;},0);FCK.ToolbarSet.CurrentInstance.Selection.Release();}},DisplayMainCover:function(){C=E.createElement('div');FCKTools.ResetStyles(C);FCKDomTools.SetElementStyles(C,{'position':'absolute','zIndex':F(),'top':'0px','left':'0px','backgroundColor':FCKConfig.BackgroundBlockerColor});FCKDomTools.SetOpacity(C,FCKConfig.BackgroundBlockerOpacity);if (FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsIE7){var Q=E.createElement('iframe');FCKTools.ResetStyles(Q);Q.hideFocus=true;Q.frameBorder=0;Q.src=FCKTools.GetVoidUrl();FCKDomTools.SetElementStyles(Q,{'width':'100%','height':'100%','position':'absolute','left':'0px','top':'0px','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'});C.appendChild(Q);};FCKTools.AddEventListener(D,'resize',G);G();E.body.appendChild(C);FCKFocusManager.Lock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R._fck_originalTabIndex=R.tabIndex;R.tabIndex=-1;},HideMainCover:function(){FCKDomTools.RemoveNode(C);FCKFocusManager.Unlock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R.tabIndex=R._fck_originalTabIndex;FCKDomTools.ClearElementJSProperty(R,'_fck_originalTabIndex');},GetCover:function(){return C;}};})(); var FCKMenuItem=function(A,B,C,D,E,F){this.Name=B;this.Label=C||B;this.IsDisabled=E;this.Icon=new FCKIcon(D);this.SubMenu=new FCKMenuBlockPanel();this.SubMenu.Parent=A;this.SubMenu.OnClick=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnClick,this);this.CustomData=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuItem_Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D,E){this.HasSubMenu=true;return this.SubMenu.AddItem(A,B,C,D,E);};FCKMenuItem.prototype.AddSeparator=function(){this.SubMenu.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=this.HasSubMenu;var C=FCKTools.GetElementDocument(A);var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';if (!this.IsDisabled){FCKTools.AddEventListenerEx(r,'mouseover',FCKMenuItem_OnMouseOver,[this]);FCKTools.AddEventListenerEx(r,'click',FCKMenuItem_OnClick,[this]);if (!B) FCKTools.AddEventListenerEx(r,'mouseout',FCKMenuItem_OnMouseOut,[this]);};var D=r.insertCell(-1);D.className='MN_Icon';D.appendChild(this.Icon.CreateIconElement(C));D=r.insertCell(-1);D.className='MN_Label';D.noWrap=true;D.appendChild(C.createTextNode(this.Label));D=r.insertCell(-1);if (B){D.className='MN_Arrow';var E=D.appendChild(C.createElement('IMG'));E.src=FCK_IMAGES_PATH+'arrow_'+FCKLang.Dir+'.gif';E.width=4;E.height=7;this.SubMenu.Create();this.SubMenu.Panel.OnHide=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnHide,this);}};FCKMenuItem.prototype.Activate=function(){this.MainElement.className='MN_Item_Over';if (this.HasSubMenu){this.SubMenu.Show(this.MainElement.offsetWidth+2,-2,this.MainElement);};FCKTools.RunFunction(this.OnActivate,this);};FCKMenuItem.prototype.Deactivate=function(){this.MainElement.className='MN_Item';if (this.HasSubMenu) this.SubMenu.Hide();};function FCKMenuItem_SubMenu_OnClick(A,B){FCKTools.RunFunction(B.OnClick,B,[A]);};function FCKMenuItem_SubMenu_OnHide(A){A.Deactivate();};function FCKMenuItem_OnClick(A,B){if (B.HasSubMenu) B.Activate();else{B.Deactivate();FCKTools.RunFunction(B.OnClick,B,[B]);}};function FCKMenuItem_OnMouseOver(A,B){B.Activate();};function FCKMenuItem_OnMouseOut(A,B){B.Deactivate();};function FCKMenuItem_Cleanup(){this.MainElement=null;}; var FCKMenuBlock=function(){this._Items=[];};FCKMenuBlock.prototype.Count=function(){return this._Items.length;};FCKMenuBlock.prototype.AddItem=function(A,B,C,D,E){var F=new FCKMenuItem(this,A,B,C,D,E);F.OnClick=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnClick,this);F.OnActivate=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnActivate,this);this._Items.push(F);return F;};FCKMenuBlock.prototype.AddSeparator=function(){this._Items.push(new FCKMenuSeparator());};FCKMenuBlock.prototype.RemoveAllItems=function(){this._Items=[];var A=this._ItemsTable;if (A){while (A.rows.length>0) A.deleteRow(0);}};FCKMenuBlock.prototype.Create=function(A){if (!this._ItemsTable){if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuBlock_Cleanup);this._Window=FCKTools.GetElementWindow(A);var B=FCKTools.GetElementDocument(A);var C=A.appendChild(B.createElement('table'));C.cellPadding=0;C.cellSpacing=0;FCKTools.DisableSelection(C);var D=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=this._ItemsTable=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;};for (var i=0;i0&&F.href.length==0);if (G) return;menu.AddSeparator();menu.AddItem('VisitLink',FCKLang.VisitLink);menu.AddSeparator();if (E) menu.AddItem('Link',FCKLang.EditLink,34);menu.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&!tag.getAttribute('_fckfakelement')){menu.AddSeparator();menu.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(menu,tag,tagName){var F=FCKSelection.MoveToAncestorNode('A');var G=(F&&F.name.length>0);if (G||(tagName=='IMG'&&tag.getAttribute('_fckanchor'))){menu.AddSeparator();menu.AddItem('Anchor',FCKLang.AnchorProp,36);menu.AddItem('AnchorDelete',FCKLang.AnchorDelete);}}};case 'Flash':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckflash')){menu.AddSeparator();menu.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('FORM')){menu.AddSeparator();menu.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='checkbox'){menu.AddSeparator();menu.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='radio'){menu.AddSeparator();menu.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='text'||tag.type=='password')){menu.AddSeparator();menu.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckinputhidden')){menu.AddSeparator();menu.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='image'){menu.AddSeparator();menu.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='button'||tag.type=='submit'||tag.type=='reset')){menu.AddSeparator();menu.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(menu,tag,tagName){if (tagName=='SELECT'){menu.AddSeparator();menu.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(menu,tag,tagName){if (tagName=='TEXTAREA'){menu.AddSeparator();menu.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('UL')){menu.AddSeparator();menu.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('OL')){menu.AddSeparator();menu.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};case 'DivContainer':return {AddItems:function(menu,tag,tagName){var J=FCKDomTools.GetSelectedDivContainers();if (J.length>0){menu.AddSeparator();menu.AddItem('EditDiv',FCKLang.EditDiv,75);menu.AddItem('DeleteDiv',FCKLang.DeleteDiv,76);}}};};return null;};function FCK_ContextMenu_OnBeforeOpen(){FCK.Events.FireEvent('OnSelectionChange');var A,sTagName;if ((A=FCKSelection.GetSelectedElement())) sTagName=A.tagName;var B=FCK.ContextMenu._InnerContextMenu;B.RemoveAllItems();var C=FCK.ContextMenu.Listeners;for (var i=0;i0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}};var FCKHtmlIterator=function(A){this._sourceHtml=A;};FCKHtmlIterator.prototype={Next:function(){var A=this._sourceHtml;if (A==null) return null;var B=FCKRegexLib.HtmlTag.exec(A);var C=false;var D="";if (B){if (B.index>0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}}; var FCKPlugin=function(A,B,C){this.Name=A;this.BasePath=C?C:FCKConfig.PluginsPath;this.Path=this.BasePath+A+'/';if (!B||B.length==0) this.AvailableLangs=[];else this.AvailableLangs=B.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.IndexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];LoadScript(this.Path+'lang/'+A+'.js');};LoadScript(this.Path+'fckplugin.js');}; var FCKPlugins=FCK.Plugins={};FCKPlugins.ItemsCount=0;FCKPlugins.Items={};FCKPlugins.Load=function(){var A=FCKPlugins.Items;for (var i=0;i-1);};String.prototype.Equals=function(){var A=arguments;if (A.length==1&&A[0].pop) A=A[0];for (var i=0;iC) return false;if (B){var E=new RegExp(A+'$','i');return E.test(this);}else return (D==0||this.substr(C-D,D)==A);};String.prototype.Remove=function(A,B){var s='';if (A>0) s=this.substring(0,A);if (A+B0){var B=A.pop();if (B) B[1].call(B[0]);};this._FCKCleanupObj=null;if (CollectGarbage) CollectGarbage();}; var s=navigator.userAgent.toLowerCase();var FCKBrowserInfo={IsIE:/*@cc_on!@*/false,IsIE7:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=7),IsIE6:/*@cc_on!@*/false&&(parseInt(s.match(/msie (\d+)/)[1],10)>=6),IsSafari:s.Contains(' applewebkit/'),IsOpera:!!window.opera,IsAIR:s.Contains(' adobeair/'),IsMac:s.Contains('macintosh')};(function(A){A.IsGecko=(navigator.product=='Gecko')&&!A.IsSafari&&!A.IsOpera;A.IsGeckoLike=(A.IsGecko||A.IsSafari||A.IsOpera);if (A.IsGecko){var B=s.match(/rv:(\d+\.\d+)/);var C=B&&parseFloat(B[1]);if (C){A.IsGecko10=(C<1.8);A.IsGecko19=(C>1.8);}}})(FCKBrowserInfo); var FCKURLParams={};(function(){var A=document.location.search.substr(1).split('&');for (var i=0;i';if (!FCKRegexLib.HtmlOpener.test(A)) A=''+A+'';if (!FCKRegexLib.HeadOpener.test(A)) A=A.replace(FCKRegexLib.HtmlOpener,'$&');return A;}else{var B=FCKConfig.DocType+'0&&!FCKRegexLib.Html4DocType.test(FCKConfig.DocType)) B+=' style="overflow-y: scroll"';B+='>'+A+'';return B;}},ConvertToDataFormat:function(A,B,C,D){var E=FCKXHtml.GetXHTML(A,!B,D);if (C&&FCKRegexLib.EmptyOutParagraph.test(E)) return '';return E;},FixHtml:function(A){return A;}}; var FCK={Name:FCKURLParams['InstanceName'],Status:0,EditMode:0,Toolbar:null,HasFocus:false,DataProcessor:new FCKDataProcessor(),GetInstanceObject:(function(){var w=window;return function(name){return w[name];}})(),AttachToOnSelectionChange:function(A){this.Events.AttachEvent('OnSelectionChange',A);},GetLinkedFieldValue:function(){return this.LinkedField.value;},GetParentForm:function(){return this.LinkedField.form;},StartupValue:'',IsDirty:function(){if (this.EditMode==1) return (this.StartupValue!=this.EditingArea.Textarea.value);else{if (!this.EditorDocument) return false;return (this.StartupValue!=this.EditorDocument.body.innerHTML);}},ResetIsDirty:function(){if (this.EditMode==1) this.StartupValue=this.EditingArea.Textarea.value;else if (this.EditorDocument.body) this.StartupValue=this.EditorDocument.body.innerHTML;},StartEditor:function(){this.TempBaseTag=FCKConfig.BaseHref.length>0?'':'';var A=FCK.KeystrokeHandler=new FCKKeystrokeHandler();A.OnKeystroke=_FCK_KeystrokeHandler_OnKeystroke;A.SetKeystrokes(FCKConfig.Keystrokes);if (FCKBrowserInfo.IsIE7){if ((CTRL+86) in A.Keystrokes) A.SetKeystrokes([CTRL+86,true]);if ((SHIFT+45) in A.Keystrokes) A.SetKeystrokes([SHIFT+45,true]);};A.SetKeystrokes([CTRL+8,true]);this.EditingArea=new FCKEditingArea(document.getElementById('xEditingArea'));this.EditingArea.FFSpellChecker=FCKConfig.FirefoxSpellChecker;this.SetData(this.GetLinkedFieldValue(),true);FCKTools.AddEventListener(document,"keydown",this._TabKeyHandler);this.AttachToOnSelectionChange(_FCK_PaddingNodeListener);if (FCKBrowserInfo.IsGecko) this.AttachToOnSelectionChange(this._ExecCheckEmptyBlock);},Focus:function(){FCK.EditingArea.Focus();},SetStatus:function(A){this.Status=A;if (A==1){FCKFocusManager.AddWindow(window,true);if (FCKBrowserInfo.IsIE) FCKFocusManager.AddWindow(window.frameElement,true);if (FCKConfig.StartupFocus) FCK.Focus();};this.Events.FireEvent('OnStatusChange',A);},FixBody:function(){var A=FCKConfig.EnterMode;if (A!='p'&&A!='div') return;var B=this.EditorDocument;if (!B) return;var C=B.body;if (!C) return;FCKDomTools.TrimNode(C);var D=C.firstChild;var E;while (D){var F=false;switch (D.nodeType){case 1:var G=D.nodeName.toLowerCase();if (!FCKListsLib.BlockElements[G]&&G!='li'&&!D.getAttribute('_fckfakelement')&&D.getAttribute('_moz_dirty')==null) F=true;break;case 3:if (E||D.nodeValue.Trim().length>0) F=true;break;case 8:if (E) F=true;break;};if (F){var H=D.parentNode;if (!E) E=H.insertBefore(B.createElement(A),D);E.appendChild(H.removeChild(D));D=E.nextSibling;}else{if (E){FCKDomTools.TrimNode(E);E=null;};D=D.nextSibling;}};if (E) FCKDomTools.TrimNode(E);},GetData:function(A){if (FCK.EditMode==1) return FCK.EditingArea.Textarea.value;this.FixBody();var B=FCK.EditorDocument;if (!B) return null;var C=FCKConfig.FullPage;var D=FCK.DataProcessor.ConvertToDataFormat(C?B.documentElement:B.body,!C,FCKConfig.IgnoreEmptyParagraphValue,A);D=FCK.ProtectEventsRestore(D);if (FCKBrowserInfo.IsIE) D=D.replace(FCKRegexLib.ToReplace,'$1');if (C){if (FCK.DocTypeDeclaration&&FCK.DocTypeDeclaration.length>0) D=FCK.DocTypeDeclaration+'\n'+D;if (FCK.XmlDeclaration&&FCK.XmlDeclaration.length>0) D=FCK.XmlDeclaration+'\n'+D;};return FCKConfig.ProtectedSource.Revert(D);},UpdateLinkedField:function(){var A=FCK.GetXHTML(FCKConfig.FormatOutput);if (FCKConfig.HtmlEncodeOutput) A=FCKTools.HTMLEncode(A);FCK.LinkedField.value=A;FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');},RegisteredDoubleClickHandlers:{},OnDoubleClick:function(A){var B=FCK.RegisteredDoubleClickHandlers[A.tagName.toUpperCase()];if (B){for (var i=0;i0?'|ABBR|XML|EMBED|OBJECT':'ABBR|XML|EMBED|OBJECT';var C;if (B.length>0){C=new RegExp('<('+B+')(?!\w|:)','gi');A=A.replace(C,'','gi');A=A.replace(C,'<\/FCK:$1>');};B='META';if (FCKBrowserInfo.IsIE) B+='|HR';C=new RegExp('<(('+B+')(?=\\s|>|/)[\\s\\S]*?)/?>','gi');A=A.replace(C,'');return A;},SetData:function(A,B){this.EditingArea.Mode=FCK.EditMode;if (FCKBrowserInfo.IsIE&&FCK.EditorDocument){FCK.EditorDocument.detachEvent("onselectionchange",Doc_OnSelectionChange);};FCKTempBin.Reset();FCK.Selection.Release();if (FCK.EditMode==0){this._ForceResetIsDirty=(B===true);A=FCKConfig.ProtectedSource.Protect(A);A=FCK.DataProcessor.ConvertToHtml(A);A=A.replace(FCKRegexLib.InvalidSelfCloseTags,'$1>');A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);if (FCK.TempBaseTag.length>0&&!FCKRegexLib.HasBaseTag.test(A)) A=A.replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);var C='';if (!FCKConfig.FullPage) C+=_FCK_GetEditorAreaStyleTags();if (FCKBrowserInfo.IsIE) C+=FCK._GetBehaviorsStyle();else if (FCKConfig.ShowBorders) C+=FCKTools.GetStyleHtml(FCK_ShowTableBordersCSS,true);C+=FCKTools.GetStyleHtml(FCK_InternalCSS,true);A=A.replace(FCKRegexLib.HeadCloser,C+'$&');this.EditingArea.OnLoad=_FCK_EditingArea_OnLoad;this.EditingArea.Start(A);}else{FCK.EditorWindow=null;FCK.EditorDocument=null;FCKDomTools.PaddingNode=null;this.EditingArea.OnLoad=null;this.EditingArea.Start(A);this.EditingArea.Textarea._FCKShowContextMenu=true;FCK.EnterKeyHandler=null;if (B) this.ResetIsDirty();FCK.KeystrokeHandler.AttachToElement(this.EditingArea.Textarea);this.EditingArea.Textarea.focus();FCK.Events.FireEvent('OnAfterSetHTML');};if (FCKBrowserInfo.IsGecko) window.onresize();},RedirectNamedCommands:{},ExecuteNamedCommand:function(A,B,C,D){if (!D) FCKUndo.SaveUndoStep();if (!C&&FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,false,B);FCK.Events.FireEvent('OnSelectionChange');};if (!D) FCKUndo.SaveUndoStep();},GetNamedCommandState:function(A){try{if (FCKBrowserInfo.IsSafari&&FCK.EditorWindow&&A.IEquals('Paste')) return 0;if (!FCK.EditorDocument.queryCommandEnabled(A)) return -1;else{return FCK.EditorDocument.queryCommandState(A)?1:0;}}catch (e){return 0;}},GetNamedCommandValue:function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==-1) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';},Paste:function(A){if (FCK.Status!=2||!FCK.Events.FireEvent('OnPaste')) return false;return A||FCK._ExecPaste();},PasteFromWord:function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');},Preview:function(){var A;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) A=FCK.TempBaseTag+FCK.GetXHTML();else A=FCK.GetXHTML();}else{A=FCKConfig.DocType+''+FCK.TempBaseTag+''+FCKLang.Preview+''+_FCK_GetEditorAreaStyleTags()+''+FCK.GetXHTML()+'';};var B=FCKConfig.ScreenWidth*0.8;var C=FCKConfig.ScreenHeight*0.7;var D=(FCKConfig.ScreenWidth-B)/2;var E='';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A;E='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.opener._FCKHtmlToLoad );document.close() ;window.opener._FCKHtmlToLoad = null ;})() )';};var F=window.open(E,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+B+',height='+C+',left='+D);if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){F.document.write(A);F.document.close();}},SwitchEditMode:function(A){var B=(FCK.EditMode==0);var C=FCK.IsDirty();var D;if (B){FCKCommands.GetCommand('ShowBlocks').SaveState();if (!A&&FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();D=FCK.GetXHTML(FCKConfig.FormatSource);if (FCKBrowserInfo.IsIE) FCKTempBin.ToHtml();if (D==null) return false;}else D=this.EditingArea.Textarea.value;FCK.EditMode=B?1:0;FCK.SetData(D,!C);FCK.Focus();FCKTools.RunFunction(FCK.ToolbarSet.RefreshModeState,FCK.ToolbarSet);return true;},InsertElement:function(A){if (typeof A=='string') A=this.EditorDocument.createElement(A);var B=A.nodeName.toLowerCase();FCKSelection.Restore();var C=new FCKDomRange(this.EditorWindow);C.MoveToSelection();C.DeleteContents();if (FCKListsLib.BlockElements[B]!=null){if (C.StartBlock){if (C.CheckStartOfBlock()) C.MoveToPosition(C.StartBlock,3);else if (C.CheckEndOfBlock()) C.MoveToPosition(C.StartBlock,4);else C.SplitBlock();};C.InsertNode(A);var D=FCKDomTools.GetNextSourceElement(A,false,null,['hr','br','param','img','area','input'],true);if (!D&&FCKConfig.EnterMode!='br'){D=this.EditorDocument.body.appendChild(this.EditorDocument.createElement(FCKConfig.EnterMode));if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);};if (FCKListsLib.EmptyElements[B]==null) C.MoveToElementEditStart(A);else if (D) C.MoveToElementEditStart(D);else C.MoveToPosition(A,4);if (FCKBrowserInfo.IsGeckoLike){if (D) FCKDomTools.ScrollIntoView(D,false);FCKDomTools.ScrollIntoView(A,false);}}else{C.InsertNode(A);C.SetStart(A,4);C.SetEnd(A,4);};C.Select();C.Release();this.Focus();return A;},_InsertBlockElement:function(A){},_IsFunctionKey:function(A){if (A>=16&&A<=20) return true;if (A==27||(A>=33&&A<=40)) return true;if (A==45) return true;return false;},_KeyDownListener:function(A){if (!A) A=FCK.EditorWindow.event;if (FCK.EditorWindow){if (!FCK._IsFunctionKey(A.keyCode)&&!(A.ctrlKey||A.metaKey)&&!(A.keyCode==46)) FCK._KeyDownUndo();};return true;},_KeyDownUndo:function(){if (!FCKUndo.Typing){FCKUndo.SaveUndoStep();FCKUndo.Typing=true;FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.TypesCount++;FCKUndo.Changed=1;if (FCKUndo.TypesCount>FCKUndo.MaxTypes){FCKUndo.TypesCount=0;FCKUndo.SaveUndoStep();}},_TabKeyHandler:function(A){if (!A) A=window.event;var B=A.keyCode;if (B==9&&FCK.EditMode!=0){if (FCKBrowserInfo.IsIE){var C=document.selection.createRange();if (C.parentElement()!=FCK.EditingArea.Textarea) return true;C.text='\t';C.select();}else{var a=[];var D=FCK.EditingArea.Textarea;var E=D.selectionStart;var F=D.selectionEnd;a.push(D.value.substr(0,E));a.push('\t');a.push(D.value.substr(F));D.value=a.join('');D.setSelectionRange(E+1,E+1);};if (A.preventDefault) return A.preventDefault();return A.returnValue=false;};return true;}};FCK.Events=new FCKEvents(FCK);FCK.GetHTML=FCK.GetXHTML=FCK.GetData;FCK.SetHTML=FCK.SetData;FCK.InsertElementAndGetIt=FCK.CreateElement=FCK.InsertElement;function _FCK_ProtectEvents_ReplaceTags(A){return A.replace(FCKRegexLib.EventAttributes,_FCK_ProtectEvents_ReplaceEvents);};function _FCK_ProtectEvents_ReplaceEvents(A,B){return ' '+B+'_fckprotectedatt="'+encodeURIComponent(A)+'"';};function _FCK_ProtectEvents_RestoreEvents(A,B){return decodeURIComponent(B);};function _FCK_MouseEventsListener(A){if (!A) A=window.event;if (A.type=='mousedown') FCK.MouseDownFlag=true;else if (A.type=='mouseup') FCK.MouseDownFlag=false;else if (A.type=='mousemove') FCK.Events.FireEvent('OnMouseMove',A);};function _FCK_PaddingNodeListener(){if (FCKConfig.EnterMode.IEquals('br')) return;FCKDomTools.EnforcePaddingNode(FCK.EditorDocument,FCKConfig.EnterMode);if (!FCKBrowserInfo.IsIE&&FCKDomTools.PaddingNode){var A=FCKSelection.GetSelection();if (A&&A.rangeCount==1){var B=A.getRangeAt(0);if (B.collapsed&&B.startContainer==FCK.EditorDocument.body&&B.startOffset==0){B.selectNodeContents(FCKDomTools.PaddingNode);B.collapse(true);A.removeAllRanges();A.addRange(B);}}}else if (FCKDomTools.PaddingNode){var C=FCKSelection.GetParentElement();var D=FCKDomTools.PaddingNode;if (C&&C.nodeName.IEquals('body')){if (FCK.EditorDocument.body.childNodes.length==1&&FCK.EditorDocument.body.firstChild==D){if (FCKSelection._GetSelectionDocument(FCK.EditorDocument.selection)!=FCK.EditorDocument) return;var B=FCK.EditorDocument.body.createTextRange();var F=false;if (!D.childNodes.firstChild){D.appendChild(FCKTools.GetElementDocument(D).createTextNode('\ufeff'));F=true;};B.moveToElementText(D);B.select();if (F) B.pasteHTML('');}}}};function _FCK_EditingArea_OnLoad(){FCK.EditorWindow=FCK.EditingArea.Window;FCK.EditorDocument=FCK.EditingArea.Document;if (FCKBrowserInfo.IsIE) FCKTempBin.ToElements();FCK.InitializeBehaviors();FCK.MouseDownFlag=false;FCKTools.AddEventListener(FCK.EditorDocument,'mousemove',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',_FCK_MouseEventsListener);FCKTools.AddEventListener(FCK.EditorDocument,'mouseup',_FCK_MouseEventsListener);if (FCKBrowserInfo.IsSafari){var A=function(evt){if (!(evt.ctrlKey||evt.metaKey)) return;if (FCK.EditMode!=0) return;switch (evt.keyCode){case 89:FCKUndo.Redo();break;case 90:FCKUndo.Undo();break;}};FCKTools.AddEventListener(FCK.EditorDocument,'keyup',A);};FCK.EnterKeyHandler=new FCKEnterKey(FCK.EditorWindow,FCKConfig.EnterMode,FCKConfig.ShiftEnterMode,FCKConfig.TabSpaces);FCK.KeystrokeHandler.AttachToElement(FCK.EditorDocument);if (FCK._ForceResetIsDirty) FCK.ResetIsDirty();if (FCKBrowserInfo.IsIE&&FCK.HasFocus) FCK.EditorDocument.body.setActive();FCK.OnAfterSetHTML();FCKCommands.GetCommand('ShowBlocks').RestoreState();if (FCK.Status!=0) return;FCK.SetStatus(1);};function _FCK_GetEditorAreaStyleTags(){return FCKTools.GetStyleHtml(FCKConfig.EditorAreaCSS)+FCKTools.GetStyleHtml(FCKConfig.EditorAreaStyles);};function _FCK_KeystrokeHandler_OnKeystroke(A,B){if (FCK.Status!=2) return false;if (FCK.EditMode==0){switch (B){case 'Paste':return!FCK.Paste();case 'Cut':FCKUndo.SaveUndoStep();return false;}}else{if (B.Equals('Paste','Undo','Redo','SelectAll','Cut')) return false;};var C=FCK.Commands.GetCommand(B);if (C.GetState()==-1) return false;return (C.Execute.apply(C,FCKTools.ArgumentsToArray(arguments,2))!==false);};(function(){var A=window.parent.document;var B=A.getElementById(FCK.Name);var i=0;while (B||i==0){if (B&&B.tagName.toLowerCase().Equals('input','textarea')){FCK.LinkedField=B;break;};B=A.getElementsByName(FCK.Name)[i++];}})();var FCKTempBin={Elements:[],AddElement:function(A){var B=this.Elements.length;this.Elements[B]=A;return B;},RemoveElement:function(A){var e=this.Elements[A];this.Elements[A]=null;return e;},Reset:function(){var i=0;while (i '+this.Elements[i].outerHTML+'';this.Elements[i].isHtml=true;}},ToElements:function(){var A=FCK.EditorDocument.createElement('div');for (var i=0;i0) C+='TABLE { behavior: '+B+' ; }';C+='';FCK._BehaviorsStyle=C;};return FCK._BehaviorsStyle;};function Doc_OnMouseUp(){if (FCK.EditorWindow.event.srcElement.tagName=='HTML'){FCK.Focus();FCK.EditorWindow.event.cancelBubble=true;FCK.EditorWindow.event.returnValue=false;}};function Doc_OnPaste(){var A=FCK.EditorDocument.body;A.detachEvent('onpaste',Doc_OnPaste);var B=FCK.Paste(!FCKConfig.ForcePasteAsPlainText&&!FCKConfig.AutoDetectPasteFromWord);A.attachEvent('onpaste',Doc_OnPaste);return B;};function Doc_OnDblClick(){FCK.OnDoubleClick(FCK.EditorWindow.event.srcElement);FCK.EditorWindow.event.cancelBubble=true;};function Doc_OnSelectionChange(){if (!FCK.IsSelectionChangeLocked&&FCK.EditorDocument) FCK.Events.FireEvent("OnSelectionChange");};function Doc_OnDrop(){if (FCK.MouseDownFlag){FCK.MouseDownFlag=false;return;};if (FCKConfig.ForcePasteAsPlainText){var A=FCK.EditorWindow.event;if (FCK._CheckIsPastingEnabled()||FCKConfig.ShowDropDialog) FCK.PasteAsPlainText(A.dataTransfer.getData('Text'));A.returnValue=false;A.cancelBubble=true;}};FCK.InitializeBehaviors=function(A){this.EditorDocument.attachEvent('onmouseup',Doc_OnMouseUp);this.EditorDocument.body.attachEvent('onpaste',Doc_OnPaste);this.EditorDocument.body.attachEvent('ondrop',Doc_OnDrop);FCK.ContextMenu._InnerContextMenu.AttachToElement(FCK.EditorDocument.body);this.EditorDocument.attachEvent("onkeydown",FCK._KeyDownListener);this.EditorDocument.attachEvent("ondblclick",Doc_OnDblClick);this.EditorDocument.attachEvent("onbeforedeactivate",function(){ FCKSelection.Save();});this.EditorDocument.attachEvent("onselectionchange",Doc_OnSelectionChange);FCKTools.AddEventListener(FCK.EditorDocument,'mousedown',Doc_OnMouseDown);};FCK.InsertHtml=function(A){A=FCKConfig.ProtectedSource.Protect(A);A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);FCKSelection.Restore();FCK.EditorWindow.focus();FCKUndo.SaveUndoStep();var B=FCKSelection.GetSelection();if (B.type.toLowerCase()=='control') B.clear();A=''+A;B.createRange().pasteHTML(A);FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode(true);FCKDocumentProcessor.Process(FCK.EditorDocument);this.Events.FireEvent("OnSelectionChange");};FCK.SetInnerHtml=function(A){var B=FCK.EditorDocument;B.body.innerHTML='
     
    '+A;B.getElementById('__fakeFCKRemove__').removeNode(true);};function FCK_PreloadImages(){var A=new FCKImagePreloader();A.AddImages(FCKConfig.PreloadImages);A.AddImages(FCKConfig.SkinPath+'fck_strip.gif');A.OnComplete=LoadToolbarSetup;A.Start();};function Document_OnContextMenu(){return (event.srcElement._FCKShowContextMenu==true);};document.oncontextmenu=Document_OnContextMenu;function FCK_Cleanup(){this.LinkedField=null;this.EditorWindow=null;this.EditorDocument=null;};FCK._ExecPaste=function(){if (FCK._PasteIsRunning) return true;if (FCKConfig.ForcePasteAsPlainText){FCK.PasteAsPlainText();return false;};var A=FCK._CheckIsPastingEnabled(true);if (A===false) FCKTools.RunFunction(FCKDialog.OpenDialog,FCKDialog,['FCKDialog_Paste',FCKLang.Paste,'dialog/fck_paste.html',400,330,'Security']);else{if (FCKConfig.AutoDetectPasteFromWord&&A.length>0){var B=/<\w[^>]*(( class="?MsoNormal"?)|(="mso-))/gi;if (B.test(A)){if (confirm(FCKLang.PasteWordConfirm)){FCK.PasteFromWord();return false;}}};FCK._PasteIsRunning=true;FCK.ExecuteNamedCommand('Paste');delete FCK._PasteIsRunning;};return false;};FCK.PasteAsPlainText=function(A){if (!FCK._CheckIsPastingEnabled()){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteAsText,'dialog/fck_paste.html',400,330,'PlainText');return;};var B=null;if (!A) B=clipboardData.getData("Text");else B=A;if (B&&B.length>0){B=FCKTools.HTMLEncode(B);B=FCKTools.ProcessLineBreaks(window,FCKConfig,B);var C=B.search('

    ');var D=B.search('

    ');if ((C!=-1&&D!=-1&&C0){if (FCKSelection.GetType()=='Control'){var D=this.EditorDocument.createElement('A');D.href=A;var E=FCKSelection.GetSelectedElement();E.parentNode.insertBefore(D,E);E.parentNode.removeChild(E);D.appendChild(E);return [D];};var F='javascript:void(0);/*'+(new Date().getTime())+'*/';FCK.ExecuteNamedCommand('CreateLink',F,false,!!B);var G=this.EditorDocument.links;for (i=0;i0&&!isNaN(E)) this.PageConfig[D]=parseInt(E,10);else this.PageConfig[D]=E;}};function FCKConfig_LoadPageConfig(){var A=FCKConfig.PageConfig;for (var B in A) FCKConfig[B]=A[B];};function FCKConfig_PreProcess(){var A=FCKConfig;if (A.AllowQueryStringDebug){try{if ((/fckdebug=true/i).test(window.top.location.search)) A.Debug=true;}catch (e) { }};if (!A.PluginsPath.EndsWith('/')) A.PluginsPath+='/';var B=A.ToolbarComboPreviewCSS;if (!B||B.length==0) A.ToolbarComboPreviewCSS=A.EditorAreaCSS;A.RemoveAttributesArray=(A.RemoveAttributes||'').split(',');if (!FCKConfig.SkinEditorCSS||FCKConfig.SkinEditorCSS.length==0) FCKConfig.SkinEditorCSS=FCKConfig.SkinPath+'fck_editor.css';if (!FCKConfig.SkinDialogCSS||FCKConfig.SkinDialogCSS.length==0) FCKConfig.SkinDialogCSS=FCKConfig.SkinPath+'fck_dialog.css';};FCKConfig.ToolbarSets={};FCKConfig.Plugins={};FCKConfig.Plugins.Items=[];FCKConfig.Plugins.Add=function(A,B,C){FCKConfig.Plugins.Items.push([A,B,C]);};FCKConfig.ProtectedSource={};FCKConfig.ProtectedSource._CodeTag=(new Date()).valueOf();FCKConfig.ProtectedSource.RegexEntries=[//g,//gi,//gi];FCKConfig.ProtectedSource.Add=function(A){this.RegexEntries.push(A);};FCKConfig.ProtectedSource.Protect=function(A){var B=this._CodeTag;function _Replace(protectedSource){var C=FCKTempBin.AddElement(protectedSource);return '';};for (var i=0;i|>)","g");return A.replace(D,_Replace);};FCKConfig.GetBodyAttributes=function(){var A='';if (this.BodyId&&this.BodyId.length>0) A+=' id="'+this.BodyId+'"';if (this.BodyClass&&this.BodyClass.length>0) A+=' class="'+this.BodyClass+'"';return A;};FCKConfig.ApplyBodyAttributes=function(A){if (this.BodyId&&this.BodyId.length>0) A.id=FCKConfig.BodyId;if (this.BodyClass&&this.BodyClass.length>0) A.className+=' '+FCKConfig.BodyClass;}; var FCKDebug={Output:function(){},OutputObject:function(){}}; var FCKDomTools={MoveChildren:function(A,B,C){if (A==B) return;var D;if (C){while ((D=A.lastChild)) B.insertBefore(A.removeChild(D),B.firstChild);}else{while ((D=A.firstChild)) B.appendChild(A.removeChild(D));}},MoveNode:function(A,B,C){if (C) B.insertBefore(FCKDomTools.RemoveNode(A),B.firstChild);else B.appendChild(FCKDomTools.RemoveNode(A));},TrimNode:function(A){this.LTrimNode(A);this.RTrimNode(A);},LTrimNode:function(A){var B;while ((B=A.firstChild)){if (B.nodeType==3){var C=B.nodeValue.LTrim();var D=B.nodeValue.length;if (C.length==0){A.removeChild(B);continue;}else if (C.length0) break;if (A.lastChild) A=A.lastChild;else return this.GetPreviousSourceElement(A,B,C,D);};return null;},GetNextSourceElement:function(A,B,C,D,E){while((A=this.GetNextSourceNode(A,E))){if (A.nodeType==1){if (C&&A.nodeName.IEquals(C)) break;if (D&&A.nodeName.IEquals(D)) return this.GetNextSourceElement(A,B,C,D);return A;}else if (B&&A.nodeType==3&&A.nodeValue.RTrim().length>0) break;};return null;},GetNextSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.firstChild) E=A.firstChild;else{if (D&&A==D) return null;E=A.nextSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetNextSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetNextSourceNode(E,false,C,D);return E;},GetPreviousSourceNode:function(A,B,C,D){if (!A) return null;var E;if (!B&&A.lastChild) E=A.lastChild;else{if (D&&A==D) return null;E=A.previousSibling;if (!E&&(!D||D!=A.parentNode)) return this.GetPreviousSourceNode(A.parentNode,true,C,D);};if (C&&E&&E.nodeType!=C) return this.GetPreviousSourceNode(E,false,C,D);return E;},InsertAfterNode:function(A,B){return A.parentNode.insertBefore(B,A.nextSibling);},GetParents:function(A){var B=[];while (A){B.unshift(A);A=A.parentNode;};return B;},GetCommonParents:function(A,B){var C=this.GetParents(A);var D=this.GetParents(B);var E=[];for (var i=0;i0) D[C.pop().toLowerCase()]=1;var E=this.GetCommonParents(A,B);var F=null;while ((F=E.pop())){if (D[F.nodeName.toLowerCase()]) return F;};return null;},GetIndexOf:function(A){var B=A.parentNode?A.parentNode.firstChild:null;var C=-1;while (B){C++;if (B==A) return C;B=B.nextSibling;};return-1;},PaddingNode:null,EnforcePaddingNode:function(A,B){try{if (!A||!A.body) return;}catch (e){return;};this.CheckAndRemovePaddingNode(A,B,true);try{if (A.body.lastChild&&(A.body.lastChild.nodeType!=1||A.body.lastChild.tagName.toLowerCase()==B.toLowerCase())) return;}catch (e){return;};var C=A.createElement(B);if (FCKBrowserInfo.IsGecko&&FCKListsLib.NonEmptyBlockElements[B]) FCKTools.AppendBogusBr(C);this.PaddingNode=C;if (A.body.childNodes.length==1&&A.body.firstChild.nodeType==1&&A.body.firstChild.tagName.toLowerCase()=='br'&&(A.body.firstChild.getAttribute('_moz_dirty')!=null||A.body.firstChild.getAttribute('type')=='_moz')) A.body.replaceChild(C,A.body.firstChild);else A.body.appendChild(C);},CheckAndRemovePaddingNode:function(A,B,C){var D=this.PaddingNode;if (!D) return;try{if (D.parentNode!=A.body||D.tagName.toLowerCase()!=B||(D.childNodes.length>1)||(D.firstChild&&D.firstChild.nodeValue!='\xa0'&&String(D.firstChild.tagName).toLowerCase()!='br')){this.PaddingNode=null;return;}}catch (e){this.PaddingNode=null;return;};if (!C){if (D.parentNode.childNodes.length>1) D.parentNode.removeChild(D);this.PaddingNode=null;}},HasAttribute:function(A,B){if (A.hasAttribute) return A.hasAttribute(B);else{var C=A.attributes[B];return (C!=undefined&&C.specified);}},HasAttributes:function(A){var B=A.attributes;for (var i=0;i0) return true;}else if (B[i].specified) return true;};return false;},RemoveAttribute:function(A,B){if (FCKBrowserInfo.IsIE&&B.toLowerCase()=='class') B='className';return A.removeAttribute(B,0);},RemoveAttributes:function (A,B){for (var i=0;i0) return false;C=C.nextSibling;};return D?this.CheckIsEmptyElement(D,B):true;},SetElementStyles:function(A,B){var C=A.style;for (var D in B) C[D]=B[D];},SetOpacity:function(A,B){if (FCKBrowserInfo.IsIE){B=Math.round(B*100);A.style.filter=(B>100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+B+')');}else A.style.opacity=B;},GetCurrentElementStyle:function(A,B){if (FCKBrowserInfo.IsIE) return A.currentStyle[B];else return A.ownerDocument.defaultView.getComputedStyle(A,'').getPropertyValue(B);},GetPositionedAncestor:function(A){var B=A;while (B!=FCKTools.GetElementDocument(B).documentElement){if (this.GetCurrentElementStyle(B,'position')!='static') return B;if (B==FCKTools.GetElementDocument(B).documentElement&¤tWindow!=w) B=currentWindow.frameElement;else B=B.parentNode;};return null;},ScrollIntoView:function(A,B){var C=FCKTools.GetElementWindow(A);var D=FCKTools.GetViewPaneSize(C).Height;var E=D*-1;if (B===false){E+=A.offsetHeight||0;E+=parseInt(this.GetCurrentElementStyle(A,'marginBottom')||0,10)||0;};var F=FCKTools.GetDocumentPosition(C,A);E+=F.y;var G=FCKTools.GetScrollPosition(C).Y;if (E>0&&(E>G||E'+styleDef+'';};var C=function(cssFileUrl,markTemp){if (cssFileUrl.length==0) return '';var B=markTemp?' _fcktemp="true"':'';return '';};return function(cssFileOrArrayOrDef,markTemp){if (!cssFileOrArrayOrDef) return '';if (typeof(cssFileOrArrayOrDef)=='string'){if (/[\\\/\.][^{}]*$/.test(cssFileOrArrayOrDef)){return this.GetStyleHtml(cssFileOrArrayOrDef.split(','),markTemp);}else return A(this._GetUrlFixedCss(cssFileOrArrayOrDef),markTemp);}else{var E='';for (var i=0;i/g,'>');return A;};FCKTools.HTMLDecode=function(A){if (!A) return '';A=A.replace(/>/g,'>');A=A.replace(/</g,'<');A=A.replace(/&/g,'&');return A;};FCKTools._ProcessLineBreaksForPMode=function(A,B,C,D,E){var F=0;var G="

    ";var H="

    ";var I="
    ";if (C){G="
  • ";H="
  • ";F=1;}while (D&&D!=A.FCK.EditorDocument.body){if (D.tagName.toLowerCase()=='p'){F=1;break;};D=D.parentNode;};for (var i=0;i0) return A[A.length-1];return null;};FCKTools.GetDocumentPosition=function(w,A){var x=0;var y=0;var B=A;var C=null;var D=FCKTools.GetElementWindow(B);while (B&&!(D==w&&(B==w.document.body||B==w.document.documentElement))){x+=B.offsetLeft-B.scrollLeft;y+=B.offsetTop-B.scrollTop;if (!FCKBrowserInfo.IsOpera){var E=C;while (E&&E!=B){x-=E.scrollLeft;y-=E.scrollTop;E=E.parentNode;}};C=B;if (B.offsetParent) B=B.offsetParent;else{if (D!=w){B=D.frameElement;C=null;if (B) D=B.contentWindow.parent;}else B=null;}};if (FCKDomTools.GetCurrentElementStyle(w.document.body,'position')!='static'||(FCKBrowserInfo.IsIE&&FCKDomTools.GetPositionedAncestor(A)==null)){x+=w.document.body.offsetLeft;y+=w.document.body.offsetTop;};return { "x":x,"y":y };};FCKTools.GetWindowPosition=function(w,A){var B=this.GetDocumentPosition(w,A);var C=FCKTools.GetScrollPosition(w);B.x-=C.X;B.y-=C.Y;return B;};FCKTools.ProtectFormStyles=function(A){if (!A||A.nodeType!=1||A.tagName.toLowerCase()!='form') return [];var B=[];var C=['style','className'];for (var i=0;i0){for (var i=B.length-1;i>=0;i--){var C=B[i][0];var D=B[i][1];if (D) A.insertBefore(C,D);else A.appendChild(C);}}};FCKTools.GetNextNode=function(A,B){if (A.firstChild) return A.firstChild;else if (A.nextSibling) return A.nextSibling;else{var C=A.parentNode;while (C){if (C==B) return null;if (C.nextSibling) return C.nextSibling;else C=C.parentNode;}};return null;};FCKTools.GetNextTextNode=function(A,B,C){node=this.GetNextNode(A,B);if (C&&node&&C(node)) return null;while (node&&node.nodeType!=3){node=this.GetNextNode(node,B);if (C&&node&&C(node)) return null;};return node;};FCKTools.Merge=function(){var A=arguments;var o=A[0];for (var i=1;i');document.domain = '"+FCK_RUNTIME_DOMAIN+"';document.close();}() ) ;";if (FCKBrowserInfo.IsIE){if (FCKBrowserInfo.IsIE7||!FCKBrowserInfo.IsIE6) return "";else return "javascript: '';";};return "javascript: void(0);";};FCKTools.ResetStyles=function(A){A.style.cssText='margin:0;padding:0;border:0;background-color:transparent;background-image:none;';}; FCKTools.CancelEvent=function(e){return false;};FCKTools._AppendStyleSheet=function(A,B){return A.createStyleSheet(B).owningElement;};FCKTools.AppendStyleString=function(A,B){if (!B) return null;var s=A.createStyleSheet("");s.cssText=B;return s;};FCKTools.ClearElementAttributes=function(A){A.clearAttributes();};FCKTools.GetAllChildrenIds=function(A){var B=[];for (var i=0;i0) B[B.length]=C;};return B;};FCKTools.RemoveOuterTags=function(e){e.insertAdjacentHTML('beforeBegin',e.innerHTML);e.parentNode.removeChild(e);};FCKTools.CreateXmlObject=function(A){var B;switch (A){case 'XmlHttp':if (document.location.protocol!='file:') try { return new XMLHttpRequest();} catch (e) {};B=['MSXML2.XmlHttp','Microsoft.XmlHttp'];break;case 'DOMDocument':B=['MSXML2.DOMDocument','Microsoft.XmlDom'];break;};for (var i=0;i<2;i++){try { return new ActiveXObject(B[i]);}catch (e){}};if (FCKLang.NoActiveX){alert(FCKLang.NoActiveX);FCKLang.NoActiveX=null;};return null;};FCKTools.DisableSelection=function(A){A.unselectable='on';var e,i=0;while ((e=A.all[i++])){switch (e.tagName){case 'IFRAME':case 'TEXTAREA':case 'INPUT':case 'SELECT':break;default:e.unselectable='on';}}};FCKTools.GetScrollPosition=function(A){var B=A.document;var C={ X:B.documentElement.scrollLeft,Y:B.documentElement.scrollTop };if (C.X>0||C.Y>0) return C;return { X:B.body.scrollLeft,Y:B.body.scrollTop };};FCKTools.AddEventListener=function(A,B,C){A.attachEvent('on'+B,C);};FCKTools.RemoveEventListener=function(A,B,C){A.detachEvent('on'+B,C);};FCKTools.AddEventListenerEx=function(A,B,C,D){var o={};o.Source=A;o.Params=D||[];o.Listener=function(ev){return C.apply(o.Source,[ev].concat(o.Params));};if (FCK.IECleanup) FCK.IECleanup.AddItem(null,function() { o.Source=null;o.Params=null;});A.attachEvent('on'+B,o.Listener);A=null;D=null;};FCKTools.GetViewPaneSize=function(A){var B;var C=A.document.documentElement;if (C&&C.clientWidth) B=C;else B=A.document.body;if (B) return { Width:B.clientWidth,Height:B.clientHeight };else return { Width:0,Height:0 };};FCKTools.SaveStyles=function(A){var B=FCKTools.ProtectFormStyles(A);var C={};if (A.className.length>0){C.Class=A.className;A.className='';};var D=A.style.cssText;if (D.length>0){C.Inline=D;A.style.cssText='';};FCKTools.RestoreFormStyles(A,B);return C;};FCKTools.RestoreStyles=function(A,B){var C=FCKTools.ProtectFormStyles(A);A.className=B.Class||'';A.style.cssText=B.Inline||'';FCKTools.RestoreFormStyles(A,C);};FCKTools.RegisterDollarFunction=function(A){A.$=A.document.getElementById;};FCKTools.AppendElement=function(A,B){return A.appendChild(this.GetElementDocument(A).createElement(B));};FCKTools.ToLowerCase=function(A){return A.toLowerCase();}; var FCKeditorAPI;function InitializeAPI(){var A=window.parent;if (!(FCKeditorAPI=A.FCKeditorAPI)){var B='window.FCKeditorAPI = {Version : "2.6.4.1",VersionBuild : "23187",Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},GetInstance : function( name ){return this.Instances[ name ];},_FormSubmit : function(){for ( var name in FCKeditorAPI.Instances ){var oEditor = FCKeditorAPI.Instances[ name ] ;if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )oEditor.UpdateLinkedField() ;}this._FCKOriginalSubmit() ;},_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {Functions : new Array(),IsRunning : false,Add : function( f ){this.Functions.push( f );if ( !this.IsRunning )this.StartNext();},StartNext : function(){var aQueue = this.Functions ;if ( aQueue.length > 0 ){this.IsRunning = true;aQueue[0].call();}else this.IsRunning = false;},Remove : function( f ){var aQueue = this.Functions;var i = 0, fFunc;while( (fFunc = aQueue[ i ]) ){if ( fFunc == f )aQueue.splice( i,1 );i++ ;}this.StartNext();}}}';if (A.execScript) A.execScript(B,'JavaScript');else{if (FCKBrowserInfo.IsGecko10){eval.call(A,B);}else if(FCKBrowserInfo.IsAIR){FCKAdobeAIR.FCKeditorAPI_Evaluate(A,B);}else if (FCKBrowserInfo.IsSafari){var C=A.document;var D=C.createElement('script');D.appendChild(C.createTextNode(B));C.documentElement.appendChild(D);}else A.eval(B);};FCKeditorAPI=A.FCKeditorAPI;FCKeditorAPI.__Instances=FCKeditorAPI.Instances;};FCKeditorAPI.Instances[FCK.Name]=FCK;};function _AttachFormSubmitToAPI(){var A=FCK.GetParentForm();if (A){FCKTools.AddEventListener(A,'submit',FCK.UpdateLinkedField);if (!A._FCKOriginalSubmit&&(typeof(A.submit)=='function'||(!A.submit.tagName&&!A.submit.length))){A._FCKOriginalSubmit=A.submit;A.submit=FCKeditorAPI._FormSubmit;}}};function FCKeditorAPI_Cleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat&&!window.FCKUnloadFlag) return;delete FCKeditorAPI.Instances[FCK.Name];};function FCKeditorAPI_ConfirmCleanup(){if (window.FCKConfig&&FCKConfig.MsWebBrowserControlCompat) window.FCKUnloadFlag=true;};FCKTools.AddEventListener(window,'unload',FCKeditorAPI_Cleanup);FCKTools.AddEventListener(window,'beforeunload',FCKeditorAPI_ConfirmCleanup); var FCKImagePreloader=function(){this._Images=[];};FCKImagePreloader.prototype={AddImages:function(A){if (typeof(A)=='string') A=A.split(';');this._Images=this._Images.concat(A);},Start:function(){var A=this._Images;this._PreloadCount=A.length;for (var i=0;i]*\>)/i,AfterBody:/(\<\/body\>[\s\S]*$)/i,ToReplace:/___fcktoreplace:([\w]+)/ig,MetaHttpEquiv:/http-equiv\s*=\s*["']?([^"' ]+)/i,HasBaseTag:/]/i,HtmlOpener:/]*>/i,HeadOpener:/]*>/i,HeadCloser:/<\/head\s*>/i,FCK_Class:/\s*FCK__[^ ]*(?=\s+|$)/,ElementName:/(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/,ForceSimpleAmpersand:/___FCKAmp___/g,SpaceNoClose:/\/>/g,EmptyParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/,EmptyOutParagraph:/^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*| )(<\/\1>)?$/,TagBody:/>]+))/gi,ProtectUrlsA:/]+))/gi,ProtectUrlsArea:/]+))/gi,Html4DocType:/HTML 4\.0 Transitional/i,DocTypeTag:/]*>/i,HtmlDocType:/DTD HTML/,TagsWithEvent:/<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g,EventAttributes:/\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g,ProtectedEvents:/\s\w+_fckprotectedatt="([^"]+)"/g,StyleProperties:/\S+\s*:/g,InvalidSelfCloseTags:/(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi,StyleVariableAttName:/#\(\s*("|')(.+?)\1[^\)]*\s*\)/g,RegExp:/^\/(.*)\/([gim]*)$/,HtmlTag:/<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/}; var FCKListsLib={BlockElements:{ address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 },NonEmptyBlockElements:{ p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 },InlineChildReqElements:{ abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },InlineNonEmptyElements:{ a:1,abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },EmptyElements:{ base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 },PathBlockElements:{ address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 },PathBlockLimitElements:{ body:1,div:1,td:1,th:1,caption:1,form:1 },StyleBlockElements:{ address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 },StyleObjectElements:{ img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 },NonEditableElements:{ button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 },BlockBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 },ListBoundaries:{ p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 }}; var FCKLanguageManager=FCK.Language={AvailableLanguages:{af:'Afrikaans',ar:'Arabic',bg:'Bulgarian',bn:'Bengali/Bangla',bs:'Bosnian',ca:'Catalan',cs:'Czech',da:'Danish',de:'German',el:'Greek',en:'English','en-au':'English (Australia)','en-ca':'English (Canadian)','en-uk':'English (United Kingdom)',eo:'Esperanto',es:'Spanish',et:'Estonian',eu:'Basque',fa:'Persian',fi:'Finnish',fo:'Faroese',fr:'French','fr-ca':'French (Canada)',gl:'Galician',gu:'Gujarati',he:'Hebrew',hi:'Hindi',hr:'Croatian',hu:'Hungarian',is:'Icelandic',it:'Italian',ja:'Japanese',km:'Khmer',ko:'Korean',lt:'Lithuanian',lv:'Latvian',mn:'Mongolian',ms:'Malay',nb:'Norwegian Bokmal',nl:'Dutch',no:'Norwegian',pl:'Polish',pt:'Portuguese (Portugal)','pt-br':'Portuguese (Brazil)',ro:'Romanian',ru:'Russian',sk:'Slovak',sl:'Slovenian',sr:'Serbian (Cyrillic)','sr-latn':'Serbian (Latin)',sv:'Swedish',th:'Thai',tr:'Turkish',uk:'Ukrainian',vi:'Vietnamese',zh:'Chinese Traditional','zh-cn':'Chinese Simplified'},GetActiveLanguage:function(){if (FCKConfig.AutoDetectLanguage){var A;if (navigator.userLanguage) A=navigator.userLanguage.toLowerCase();else if (navigator.language) A=navigator.language.toLowerCase();else{return FCKConfig.DefaultLanguage;};if (A.length>=5){A=A.substr(0,5);if (this.AvailableLanguages[A]) return A;};if (A.length>=2){A=A.substr(0,2);if (this.AvailableLanguages[A]) return A;}};return this.DefaultLanguage;},TranslateElements:function(A,B,C,D){var e=A.getElementsByTagName(B);var E,s;for (var i=0;i':'gt','ˆ':'circ','Ëœ':'tilde',' ':'ensp',' ':'emsp',' ':'thinsp','‌':'zwnj','â€':'zwj','‎':'lrm','â€':'rlm','–':'ndash','—':'mdash','‘':'lsquo','’':'rsquo','‚':'sbquo','“':'ldquo','â€':'rdquo','„':'bdquo','†':'dagger','‡':'Dagger','‰':'permil','‹':'lsaquo','›':'rsaquo','€':'euro'};for (e in FCKXHtmlEntities.Entities) A+=e;if (FCKConfig.IncludeLatinEntities){B={'À':'Agrave','Ã':'Aacute','Â':'Acirc','Ã':'Atilde','Ä':'Auml','Ã…':'Aring','Æ':'AElig','Ç':'Ccedil','È':'Egrave','É':'Eacute','Ê':'Ecirc','Ë':'Euml','ÃŒ':'Igrave','Ã':'Iacute','ÃŽ':'Icirc','Ã':'Iuml','Ã':'ETH','Ñ':'Ntilde','Ã’':'Ograve','Ó':'Oacute','Ô':'Ocirc','Õ':'Otilde','Ö':'Ouml','Ø':'Oslash','Ù':'Ugrave','Ú':'Uacute','Û':'Ucirc','Ü':'Uuml','Ã':'Yacute','Þ':'THORN','ß':'szlig','à':'agrave','á':'aacute','â':'acirc','ã':'atilde','ä':'auml','Ã¥':'aring','æ':'aelig','ç':'ccedil','è':'egrave','é':'eacute','ê':'ecirc','ë':'euml','ì':'igrave','í':'iacute','î':'icirc','ï':'iuml','ð':'eth','ñ':'ntilde','ò':'ograve','ó':'oacute','ô':'ocirc','õ':'otilde','ö':'ouml','ø':'oslash','ù':'ugrave','ú':'uacute','û':'ucirc','ü':'uuml','ý':'yacute','þ':'thorn','ÿ':'yuml','Å’':'OElig','Å“':'oelig','Å ':'Scaron','Å¡':'scaron','Ÿ':'Yuml'};for (e in B){FCKXHtmlEntities.Entities[e]=B[e];A+=e;};B=null;};if (FCKConfig.IncludeGreekEntities){B={'Α':'Alpha','Î’':'Beta','Γ':'Gamma','Δ':'Delta','Ε':'Epsilon','Ζ':'Zeta','Η':'Eta','Θ':'Theta','Ι':'Iota','Κ':'Kappa','Λ':'Lambda','Μ':'Mu','Î':'Nu','Ξ':'Xi','Ο':'Omicron','Π':'Pi','Ρ':'Rho','Σ':'Sigma','Τ':'Tau','Î¥':'Upsilon','Φ':'Phi','Χ':'Chi','Ψ':'Psi','Ω':'Omega','α':'alpha','β':'beta','γ':'gamma','δ':'delta','ε':'epsilon','ζ':'zeta','η':'eta','θ':'theta','ι':'iota','κ':'kappa','λ':'lambda','μ':'mu','ν':'nu','ξ':'xi','ο':'omicron','Ï€':'pi','Ï':'rho','Ï‚':'sigmaf','σ':'sigma','Ï„':'tau','Ï…':'upsilon','φ':'phi','χ':'chi','ψ':'psi','ω':'omega','\u03d1':'thetasym','\u03d2':'upsih','\u03d6':'piv'};for (e in B){FCKXHtmlEntities.Entities[e]=B[e];A+=e;};B=null;}}else{FCKXHtmlEntities.Entities={'>':'gt'};A='>';A+=' ';};var C='['+A+']';if (FCKConfig.ProcessNumericEntities) C='[^ -~]|'+C;var D=FCKConfig.AdditionalNumericEntities;if (D&&D.length>0) C+='|'+FCKConfig.AdditionalNumericEntities;FCKXHtmlEntities.EntitiesRegex=new RegExp(C,'g');}; var FCKXHtml={};FCKXHtml.CurrentJobNum=0;FCKXHtml.GetXHTML=function(A,B,C){FCKDomTools.CheckAndRemovePaddingNode(FCKTools.GetElementDocument(A),FCKConfig.EnterMode);FCKXHtmlEntities.Initialize();this._NbspEntity=(FCKConfig.ProcessHTMLEntities?'nbsp':'#160');var D=FCK.IsDirty();FCKXHtml.SpecialBlocks=[];this.XML=FCKTools.CreateXmlObject('DOMDocument');this.MainNode=this.XML.appendChild(this.XML.createElement('xhtml'));FCKXHtml.CurrentJobNum++;if (B) this._AppendNode(this.MainNode,A);else this._AppendChildNodes(this.MainNode,A,false);var E=this._GetMainXmlString();this.XML=null;if (FCKBrowserInfo.IsSafari) E=E.replace(/^/,'');E=E.substr(7,E.length-15).Trim();if (FCKConfig.DocType.length>0&&FCKRegexLib.HtmlDocType.test(FCKConfig.DocType)) E=E.replace(FCKRegexLib.SpaceNoClose,'>');else E=E.replace(FCKRegexLib.SpaceNoClose,' />');if (FCKConfig.ForceSimpleAmpersand) E=E.replace(FCKRegexLib.ForceSimpleAmpersand,'&');if (C) E=FCKCodeFormatter.Format(E);for (var i=0;i0;if (C) A.appendChild(this.XML.createTextNode(B.replace(FCKXHtmlEntities.EntitiesRegex,FCKXHtml_GetEntity)));return C;};function FCKXHtml_GetEntity(A){var B=FCKXHtmlEntities.Entities[A]||('#'+A.charCodeAt(0));return '#?-:'+B+';';};FCKXHtml.TagProcessors={a:function(A,B){if (B.innerHTML.Trim().length==0&&!B.name) return false;var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);};A=FCKXHtml._AppendChildNodes(A,B,false);return A;},area:function(A,B){var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'href',C);if (FCKBrowserInfo.IsIE){if (!A.attributes.getNamedItem('coords')){var D=B.getAttribute('coords',2);if (D&&D!='0,0,0') FCKXHtml._AppendAttribute(A,'coords',D);};if (!A.attributes.getNamedItem('shape')){var E=B.getAttribute('shape',2);if (E&&E.length>0) FCKXHtml._AppendAttribute(A,'shape',E.toLowerCase());}};return A;},body:function(A,B){A=FCKXHtml._AppendChildNodes(A,B,false);A.removeAttribute('spellcheck');return A;},iframe:function(A,B){var C=B.innerHTML;if (FCKBrowserInfo.IsGecko) C=FCKTools.HTMLDecode(C);C=C.replace(/\s_fcksavedurl="[^"]*"/g,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},img:function(A,B){if (!A.attributes.getNamedItem('alt')) FCKXHtml._AppendAttribute(A,'alt','');var C=B.getAttribute('_fcksavedurl');if (C!=null) FCKXHtml._AppendAttribute(A,'src',C);if (B.style.width) A.removeAttribute('width');if (B.style.height) A.removeAttribute('height');return A;},li:function(A,B,C){if (C.nodeName.IEquals(['ul','ol'])) return FCKXHtml._AppendChildNodes(A,B,true);var D=FCKXHtml.XML.createElement('ul');B._fckxhtmljob=null;do{FCKXHtml._AppendNode(D,B);do{B=FCKDomTools.GetNextSibling(B);} while (B&&B.nodeType==3&&B.nodeValue.Trim().length==0)} while (B&&B.nodeName.toLowerCase()=='li') return D;},ol:function(A,B,C){if (B.innerHTML.Trim().length==0) return false;var D=C.lastChild;if (D&&D.nodeType==3) D=D.previousSibling;if (D&&D.nodeName.toUpperCase()=='LI'){B._fckxhtmljob=null;FCKXHtml._AppendNode(D,B);return false;};A=FCKXHtml._AppendChildNodes(A,B);return A;},pre:function (A,B){var C=B.firstChild;if (C&&C.nodeType==3) A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem('\r\n')));FCKXHtml._AppendChildNodes(A,B,true);return A;},script:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/javascript');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(B.text)));return A;},span:function(A,B){if (B.innerHTML.length==0) return false;A=FCKXHtml._AppendChildNodes(A,B,false);return A;},style:function(A,B){if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text/css');var C=B.innerHTML;if (FCKBrowserInfo.IsIE) C=C.replace(/^(\r\n|\n|\r)/,'');A.appendChild(FCKXHtml.XML.createTextNode(FCKXHtml._AppendSpecialItem(C)));return A;},title:function(A,B){A.appendChild(FCKXHtml.XML.createTextNode(FCK.EditorDocument.title));return A;}};FCKXHtml.TagProcessors.ul=FCKXHtml.TagProcessors.ol; FCKXHtml._GetMainXmlString=function(){return this.MainNode.xml;};FCKXHtml._AppendAttributes=function(A,B,C,D){var E=B.attributes,bHasStyle;for (var n=0;n0){var I=FCKTools.ProtectFormStyles(B);var J=B.style.cssText.replace(FCKRegexLib.StyleProperties,FCKTools.ToLowerCase);FCKTools.RestoreFormStyles(B,I);this._AppendAttribute(C,'style',J);}};FCKXHtml.TagProcessors['div']=function(A,B){if (B.align.length>0) FCKXHtml._AppendAttribute(A,'align',B.align);A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['font']=function(A,B){if (A.attributes.length==0) A=FCKXHtml.XML.createDocumentFragment();A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['form']=function(A,B){if (B.acceptCharset&&B.acceptCharset.length>0&&B.acceptCharset!='UNKNOWN') FCKXHtml._AppendAttribute(A,'accept-charset',B.acceptCharset);var C=B.attributes['name'];if (C&&C.value.length>0) FCKXHtml._AppendAttribute(A,'name',C.value);A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['input']=function(A,B){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);if (B.value&&!A.attributes.getNamedItem('value')) FCKXHtml._AppendAttribute(A,'value',B.value);if (!A.attributes.getNamedItem('type')) FCKXHtml._AppendAttribute(A,'type','text');return A;};FCKXHtml.TagProcessors['label']=function(A,B){if (B.htmlFor.length>0) FCKXHtml._AppendAttribute(A,'for',B.htmlFor);A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['map']=function(A,B){if (!A.attributes.getNamedItem('name')){var C=B.name;if (C) FCKXHtml._AppendAttribute(A,'name',C);};A=FCKXHtml._AppendChildNodes(A,B,true);return A;};FCKXHtml.TagProcessors['meta']=function(A,B){var C=A.attributes.getNamedItem('http-equiv');if (C==null||C.value.length==0){var D=B.outerHTML.match(FCKRegexLib.MetaHttpEquiv);if (D){D=D[1];FCKXHtml._AppendAttribute(A,'http-equiv',D);}};return A;};FCKXHtml.TagProcessors['option']=function(A,B){if (B.selected&&!A.attributes.getNamedItem('selected')) FCKXHtml._AppendAttribute(A,'selected','selected');A=FCKXHtml._AppendChildNodes(A,B);return A;};FCKXHtml.TagProcessors['textarea']=FCKXHtml.TagProcessors['select']=function(A,B){if (B.name) FCKXHtml._AppendAttribute(A,'name',B.name);A=FCKXHtml._AppendChildNodes(A,B);return A;}; var FCKCodeFormatter={};FCKCodeFormatter.Init=function(){var A=this.Regex={};A.BlocksOpener=/\<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.BlocksCloser=/\<\/(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DL|DT|DD|TITLE|META|LINK|BASE|SCRIPT|LINK|TD|TH|AREA|OPTION)[^\>]*\>/gi;A.NewLineTags=/\<(BR|HR)[^\>]*\>/gi;A.MainTags=/\<\/?(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR)[^\>]*\>/gi;A.LineSplitter=/\s*\n+\s*/g;A.IncreaseIndent=/^\<(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL|DL)[ \/\>]/i;A.DecreaseIndent=/^\<\/(HTML|HEAD|BODY|FORM|TABLE|TBODY|THEAD|TR|UL|OL|DL)[ \>]/i;A.FormatIndentatorRemove=new RegExp('^'+FCKConfig.FormatIndentator);A.ProtectedTags=/(]*>)([\s\S]*?)(<\/PRE>)/gi;};FCKCodeFormatter._ProtectData=function(A,B,C,D){return B+'___FCKpd___'+(FCKCodeFormatter.ProtectedData.push(C)-1)+D;};FCKCodeFormatter.Format=function(A){if (!this.Regex) this.Init();FCKCodeFormatter.ProtectedData=[];var B=A.replace(this.Regex.ProtectedTags,FCKCodeFormatter._ProtectData);B=B.replace(this.Regex.BlocksOpener,'\n$&');B=B.replace(this.Regex.BlocksCloser,'$&\n');B=B.replace(this.Regex.NewLineTags,'$&\n');B=B.replace(this.Regex.MainTags,'\n$&\n');var C='';var D=B.split(this.Regex.LineSplitter);B='';for (var i=0;iB[i]) return 1;};if (A.lengthB.length) return 1;return 0;};FCKUndo._CheckIsBookmarksEqual=function(A,B){if (!(A&&B)) return false;if (FCKBrowserInfo.IsIE){var C=A[1].search(A[0].StartId);var D=B[1].search(B[0].StartId);var E=A[1].search(A[0].EndId);var F=B[1].search(B[0].EndId);return C==D&&E==F;}else{return this._CompareCursors(A.Start,B.Start)==0&&this._CompareCursors(A.End,B.End)==0;}};FCKUndo.SaveUndoStep=function(){if (FCK.EditMode!=0||this.SaveLocked) return;if (this.SavedData.length) this.Changed=true;var A=FCK.EditorDocument.body.innerHTML;var B=this._GetBookmark();this.SavedData=this.SavedData.slice(0,this.CurrentIndex+1);if (this.CurrentIndex>0&&A==this.SavedData[this.CurrentIndex][0]&&this._CheckIsBookmarksEqual(B,this.SavedData[this.CurrentIndex][1])) return;else if (this.CurrentIndex==0&&this.SavedData.length&&A==this.SavedData[0][0]){this.SavedData[0][1]=B;return;};if (this.CurrentIndex+1>=FCKConfig.MaxUndoLevels) this.SavedData.shift();else this.CurrentIndex++;this.SavedData[this.CurrentIndex]=[A,B];FCK.Events.FireEvent("OnSelectionChange");};FCKUndo.CheckUndoState=function(){return (this.Changed||this.CurrentIndex>0);};FCKUndo.CheckRedoState=function(){return (this.CurrentIndex<(this.SavedData.length-1));};FCKUndo.Undo=function(){if (this.CheckUndoState()){if (this.CurrentIndex==(this.SavedData.length-1)){this.SaveUndoStep();};this._ApplyUndoLevel(--this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo.Redo=function(){if (this.CheckRedoState()){this._ApplyUndoLevel(++this.CurrentIndex);FCK.Events.FireEvent("OnSelectionChange");}};FCKUndo._ApplyUndoLevel=function(A){var B=this.SavedData[A];if (!B) return;if (FCKBrowserInfo.IsIE){if (B[1]&&B[1][1]) FCK.SetInnerHtml(B[1][1]);else FCK.SetInnerHtml(B[0]);}else FCK.EditorDocument.body.innerHTML=B[0];this._SelectBookmark(B[1]);this.TypesCount=0;this.Changed=false;this.Typing=false;}; var FCKEditingArea=function(A){this.TargetElement=A;this.Mode=0;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKEditingArea_Cleanup);};FCKEditingArea.prototype.Start=function(A,B){var C=this.TargetElement;var D=FCKTools.GetElementDocument(C);while(C.firstChild) C.removeChild(C.firstChild);if (this.Mode==0){if (FCK_IS_CUSTOM_DOMAIN) A=''+A;if (FCKBrowserInfo.IsIE) A=A.replace(/(]*?)\s*\/?>(?!\s*<\/base>)/gi,'$1>');else if (!B){var E=A.match(FCKRegexLib.BeforeBody);var F=A.match(FCKRegexLib.AfterBody);if (E&&F){var G=A.substr(E[1].length,A.length-E[1].length-F[1].length);A=E[1]+' '+F[1];if (FCKBrowserInfo.IsGecko&&(G.length==0||FCKRegexLib.EmptyParagraph.test(G))) G='
    ';this._BodyHTML=G;}else this._BodyHTML=A;};var H=this.IFrame=D.createElement('iframe');var I='';H.frameBorder=0;H.style.width=H.style.height='100%';if (FCK_IS_CUSTOM_DOMAIN&&FCKBrowserInfo.IsIE){window._FCKHtmlToLoad=A.replace(//i,''+I);H.src='javascript:void( (function(){document.open() ;document.domain="'+document.domain+'" ;document.write( window.parent._FCKHtmlToLoad );document.close() ;window.parent._FCKHtmlToLoad = null ;})() )';}else if (!FCKBrowserInfo.IsGecko){H.src='javascript:void(0)';};C.appendChild(H);this.Window=H.contentWindow;if (!FCK_IS_CUSTOM_DOMAIN||!FCKBrowserInfo.IsIE){var J=this.Window.document;J.open();J.write(A.replace(//i,''+I));J.close();};if (FCKBrowserInfo.IsAIR) FCKAdobeAIR.EditingArea_Start(J,A);if (FCKBrowserInfo.IsGecko10&&!B){this.Start(A,true);return;};if (H.readyState&&H.readyState!='completed'){var K=this;setTimeout(function(){try{K.Window.document.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;};K.Window._FCKEditingArea=K;FCKEditingArea_CompleteStart.call(K.Window);},0);}else{this.Window._FCKEditingArea=this;if (FCKBrowserInfo.IsGecko10) this.Window.setTimeout(FCKEditingArea_CompleteStart,500);else FCKEditingArea_CompleteStart.call(this.Window);}}else{var L=this.Textarea=D.createElement('textarea');L.className='SourceField';L.dir='ltr';FCKDomTools.SetElementStyles(L,{width:'100%',height:'100%',border:'none',resize:'none',outline:'none'});C.appendChild(L);L.value=A;FCKTools.RunFunction(this.OnLoad);}};function FCKEditingArea_CompleteStart(){if (!this.document.body){this.setTimeout(FCKEditingArea_CompleteStart,50);return;};var A=this._FCKEditingArea;A.Document=A.Window.document;A.MakeEditable();FCKTools.RunFunction(A.OnLoad);};FCKEditingArea.prototype.MakeEditable=function(){var A=this.Document;if (FCKBrowserInfo.IsIE){A.body.disabled=true;A.body.contentEditable=true;A.body.removeAttribute("disabled");}else{try{A.body.spellcheck=(this.FFSpellChecker!==false);if (this._BodyHTML){A.body.innerHTML=this._BodyHTML;A.body.offsetLeft;this._BodyHTML=null;};A.designMode='on';A.execCommand('enableObjectResizing',false,!FCKConfig.DisableObjectResizing);A.execCommand('enableInlineTableEditing',false,!FCKConfig.DisableFFTableHandles);}catch (e){FCKTools.AddEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);}}};function FCKEditingArea_Document_AttributeNodeModified(A){var B=A.currentTarget.contentWindow._FCKEditingArea;if (B._timer) window.clearTimeout(B._timer);B._timer=FCKTools.SetTimeout(FCKEditingArea_MakeEditableByMutation,1000,B);};function FCKEditingArea_MakeEditableByMutation(){delete this._timer;FCKTools.RemoveEventListener(this.Window.frameElement,'DOMAttrModified',FCKEditingArea_Document_AttributeNodeModified);this.MakeEditable();};FCKEditingArea.prototype.Focus=function(){try{if (this.Mode==0){if (FCKBrowserInfo.IsIE) this._FocusIE();else this.Window.focus();}else{var A=FCKTools.GetElementDocument(this.Textarea);if ((!A.hasFocus||A.hasFocus())&&A.activeElement==this.Textarea) return;this.Textarea.focus();}}catch(e) {}};FCKEditingArea.prototype._FocusIE=function(){this.Document.body.setActive();this.Window.focus();var A=this.Document.selection.createRange();var B=A.parentElement();var C=B.nodeName.toLowerCase();if (B.childNodes.length>0||!(FCKListsLib.BlockElements[C]||FCKListsLib.NonEmptyBlockElements[C])){return;};A=new FCKDomRange(this.Window);A.MoveToElementEditStart(B);A.Select();};function FCKEditingArea_Cleanup(){if (this.Document) this.Document.body.innerHTML="";this.TargetElement=null;this.IFrame=null;this.Document=null;this.Textarea=null;if (this.Window){this.Window._FCKEditingArea=null;this.Window=null;}}; var FCKKeystrokeHandler=function(A){this.Keystrokes={};this.CancelCtrlDefaults=(A!==false);};FCKKeystrokeHandler.prototype.AttachToElement=function(A){FCKTools.AddEventListenerEx(A,'keydown',_FCKKeystrokeHandler_OnKeyDown,this);if (FCKBrowserInfo.IsGecko10||FCKBrowserInfo.IsOpera||(FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac)) FCKTools.AddEventListenerEx(A,'keypress',_FCKKeystrokeHandler_OnKeyPress,this);};FCKKeystrokeHandler.prototype.SetKeystrokes=function(){for (var i=0;i40))){B._CancelIt=true;if (A.preventDefault) return A.preventDefault();A.returnValue=false;A.cancelBubble=true;return false;};return true;};function _FCKKeystrokeHandler_OnKeyPress(A,B){if (B._CancelIt){if (A.preventDefault) return A.preventDefault();return false;};return true;}; FCK.DTD=(function(){var X=FCKTools.Merge;var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I;A={isindex:1,fieldset:1};B={input:1,button:1,select:1,textarea:1,label:1};C=X({a:1},B);D=X({iframe:1},C);E={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1};F={ins:1,del:1,script:1};G=X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F);H=X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G);I=X({p:1},H);J=X({iframe:1},H,B);K={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1};L=X({a:1},J);M={tr:1};N={'#':1};O=X({param:1},K);P=X({form:1},A,D,E,I);Q={li:1};return {col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:P,td:P,br:{},th:P,center:P,kbd:L,button:X(I,E),basefont:{},h5:L,h4:L,samp:L,h6:L,ol:Q,h1:L,h3:L,option:N,h2:L,form:X(A,D,E,I),select:{optgroup:1,option:1},font:J,ins:P,menu:Q,abbr:L,label:L,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:L,script:N,tfoot:M,cite:L,li:P,input:{},iframe:P,strong:J,textarea:N,noframes:P,big:J,small:J,span:J,hr:{},dt:L,sub:J,optgroup:{option:1},param:{},bdo:L,'var':J,div:P,object:O,sup:J,dd:P,strike:J,area:{},dir:Q,map:X({area:1,form:1,p:1},A,F,E),applet:O,dl:{dt:1,dd:1},del:P,isindex:{},fieldset:X({legend:1},K),thead:M,ul:Q,acronym:L,b:J,a:J,blockquote:P,caption:L,i:J,u:J,tbody:M,s:L,address:X(D,I),tt:J,legend:L,q:L,pre:X(G,C),p:L,em:J,dfn:L};})(); var FCKStyle=function(A){this.Element=(A.Element||'span').toLowerCase();this._StyleDesc=A;};FCKStyle.prototype={GetType:function(){var A=this.GetType_$;if (A!=undefined) return A;var B=this.Element;if (B=='#'||FCKListsLib.StyleBlockElements[B]) A=0;else if (FCKListsLib.StyleObjectElements[B]) A=2;else A=1;return (this.GetType_$=A);},ApplyToSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.ApplyToRange(B,true);},ApplyToRange:function(A,B,C){switch (this.GetType()){case 0:this.ApplyToRange=this._ApplyBlockStyle;break;case 1:this.ApplyToRange=this._ApplyInlineStyle;break;default:return;};this.ApplyToRange(A,B,C);},ApplyToObject:function(A){if (!A) return;this.BuildElement(null,A);},RemoveFromSelection:function(A){var B=new FCKDomRange(A);B.MoveToSelection();this.RemoveFromRange(B,true);},RemoveFromRange:function(A,B,C){var D;var E=this._GetAttribsForComparison();var F=this._GetOverridesForComparison();if (A.CheckIsCollapsed()){var D=A.CreateBookmark(true);var H=A.GetBookmarkNode(D,true);var I=new FCKElementPath(H.parentNode);var J=[];var K=!FCKDomTools.GetNextSibling(H);var L=K||!FCKDomTools.GetPreviousSibling(H);var M;var N=-1;for (var i=0;i=0;i--){var E=D[i];for (var F in B){if (FCKDomTools.HasAttribute(E,F)){switch (F){case 'style':this._RemoveStylesFromElement(E);break;case 'class':if (FCKDomTools.GetAttributeValue(E,F)!=this.GetFinalAttributeValue(F)) continue;default:FCKDomTools.RemoveAttribute(E,F);}}};this._RemoveOverrides(E,C[this.Element]);this._RemoveNoAttribElement(E);};for (var G in C){if (G!=this.Element){D=A.getElementsByTagName(G);for (var i=D.length-1;i>=0;i--){var E=D[i];this._RemoveOverrides(E,C[G]);this._RemoveNoAttribElement(E);}}}},_RemoveStylesFromElement:function(A){var B=A.style.cssText;var C=this.GetFinalStyleValue();if (B.length>0&&C.length==0) return;C='(^|;)\\s*('+C.replace(/\s*([^ ]+):.*?(;|$)/g,'$1|').replace(/\|$/,'')+'):[^;]+';var D=new RegExp(C,'gi');B=B.replace(D,'').Trim();if (B.length==0||B==';') FCKDomTools.RemoveAttribute(A,'style');else A.style.cssText=B.replace(D,'');},_RemoveOverrides:function(A,B){var C=B&&B.Attributes;if (C){for (var i=0;i0) C.style.cssText=this.GetFinalStyleValue();return C;},_CompareAttributeValues:function(A,B,C){if (A=='style'&&B&&C){B=B.replace(/;$/,'').toLowerCase();C=C.replace(/;$/,'').toLowerCase();};return (B==C||((B===null||B==='')&&(C===null||C==='')))},GetFinalAttributeValue:function(A){var B=this._StyleDesc.Attributes;var B=B?B[A]:null;if (!B&&A=='style') return this.GetFinalStyleValue();if (B&&this._Variables) B=B.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);return B;},GetFinalStyleValue:function(){var A=this._GetStyleText();if (A.length>0&&this._Variables){A=A.Replace(FCKRegexLib.StyleVariableAttName,this._GetVariableReplace,this);A=FCKTools.NormalizeCssText(A);};return A;},_GetVariableReplace:function(){return this._Variables[arguments[2]]||arguments[0];},SetVariable:function(A,B){var C=this._Variables;if (!C) C=this._Variables={};this._Variables[A]=B;},_FromPre:function(A,B,C){var D=B.innerHTML;D=D.replace(/(\r\n|\r)/g,'\n');D=D.replace(/^[ \t]*\n/,'');D=D.replace(/\n$/,'');D=D.replace(/^[ \t]+|[ \t]+$/g,function(match,offset,s){if (match.length==1) return ' ';else if (offset==0) return new Array(match.length).join(' ')+' ';else return ' '+new Array(match.length).join(' ');});var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag){value=value.replace(/\n/g,'
    ');value=value.replace(/[ \t]{2,}/g,function (match){return new Array(match.length).join(' ')+' ';});};F.push(value);});C.innerHTML=F.join('');return C;},_ToPre:function(A,B,C){var D=B.innerHTML.Trim();D=D.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'
    ');var E=new FCKHtmlIterator(D);var F=[];E.Each(function(isTag,value){if (!isTag) value=value.replace(/([ \t\n\r]+| )/g,' ');else if (isTag&&value=='
    ') value='\n';F.push(value);});if (FCKBrowserInfo.IsIE){var G=A.createElement('div');G.appendChild(C);C.outerHTML='
    \n'+F.join('')+'
    ';C=G.removeChild(G.firstChild);}else C.innerHTML=F.join('');return C;},_CheckAndMergePre:function(A,B){if (A!=FCKDomTools.GetPreviousSourceElement(B,true)) return;var C=A.innerHTML.replace(/\n$/,'')+'\n\n'+B.innerHTML.replace(/^\n/,'');if (FCKBrowserInfo.IsIE) B.outerHTML='
    '+C+'
    ';else B.innerHTML=C;FCKDomTools.RemoveNode(A);},_CheckAndSplitPre:function(A){var B;var C=A.firstChild;C=C&&C.nextSibling;while (C){var D=C.nextSibling;if (D&&D.nextSibling&&C.nodeName.IEquals('br')&&D.nodeName.IEquals('br')){FCKDomTools.RemoveNode(C);C=D.nextSibling;FCKDomTools.RemoveNode(D);B=FCKDomTools.InsertAfterNode(B||A,FCKDomTools.CloneElement(A));continue;};if (B){C=C.previousSibling;FCKDomTools.MoveNode(C.nextSibling,B);};C=C.nextSibling;}},_ApplyBlockStyle:function(A,B,C){var D;if (B) D=A.CreateBookmark();var E=new FCKDomRangeIterator(A);E.EnforceRealBlocks=true;var F;var G=A.Window.document;var H;while((F=E.GetNextParagraph())){var I=this.BuildElement(G);var J=I.nodeName.IEquals('pre');var K=F.nodeName.IEquals('pre');var L=J&&!K;var M=!J&&K;if (L) I=this._ToPre(G,F,I);else if (M) I=this._FromPre(G,F,I);else FCKDomTools.MoveChildren(F,I);F.parentNode.insertBefore(I,F);FCKDomTools.RemoveNode(F);if (J){if (H) this._CheckAndMergePre(H,I);H=I;}else if (M) this._CheckAndSplitPre(I);};if (B) A.SelectBookmark(D);if (C) A.MoveToBookmark(D);},_ApplyInlineStyle:function(A,B,C){var D=A.Window.document;if (A.CheckIsCollapsed()){var E=this.BuildElement(D);A.InsertNode(E);A.MoveToPosition(E,2);A.Select();return;};var F=this.Element;var G=FCK.DTD[F]||FCK.DTD.span;var H=this._GetAttribsForComparison();var I;A.Expand('inline_elements');var J=A.CreateBookmark(true);var K=A.GetBookmarkNode(J,true);var L=A.GetBookmarkNode(J,false);A.Release(true);var M=FCKDomTools.GetNextSourceNode(K,true);while (M){var N=false;var O=M.nodeType;var P=O==1?M.nodeName.toLowerCase():null;if (!P||G[P]){if ((FCK.DTD[M.parentNode.nodeName.toLowerCase()]||FCK.DTD.span)[F]||!FCK.DTD[F]){if (!A.CheckHasRange()) A.SetStart(M,3);if (O!=1||M.childNodes.length==0){var Q=M;var R=Q.parentNode;while (Q==R.lastChild&&G[R.nodeName.toLowerCase()]){Q=R;};A.SetEnd(Q,4);if (Q==Q.parentNode.lastChild&&!G[Q.parentNode.nodeName.toLowerCase()]) N=true;}else{A.SetEnd(M,3);}}else N=true;}else N=true;M=FCKDomTools.GetNextSourceNode(M);if (M==L){M=null;N=true;};if (N&&A.CheckHasRange()&&!A.CheckIsCollapsed()){I=this.BuildElement(D);A.ExtractContents().AppendTo(I);if (I.innerHTML.RTrim().length>0){A.InsertNode(I);this.RemoveFromElement(I);this._MergeSiblings(I,this._GetAttribsForComparison());if (!FCKBrowserInfo.IsIE) I.normalize();};A.Release(true);}};this._FixBookmarkStart(K);if (B) A.SelectBookmark(J);if (C) A.MoveToBookmark(J);},_FixBookmarkStart:function(A){var B;while ((B=A.nextSibling)){if (B.nodeType==1&&FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){if (!B.firstChild) FCKDomTools.RemoveNode(B);else FCKDomTools.MoveNode(A,B,true);continue;};if (B.nodeType==3&&B.length==0){FCKDomTools.RemoveNode(B);continue;};break;}},_MergeSiblings:function(A,B){if (!A||A.nodeType!=1||!FCKListsLib.InlineNonEmptyElements[A.nodeName.toLowerCase()]) return;this._MergeNextSibling(A,B);this._MergePreviousSibling(A,B);},_MergeNextSibling:function(A,B){var C=A.nextSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.nextSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.lastChild;if (D) FCKDomTools.MoveNode(A.nextSibling,A);FCKDomTools.MoveChildren(C,A);FCKDomTools.RemoveNode(C);if (E) this._MergeNextSibling(E);}}},_MergePreviousSibling:function(A,B){var C=A.previousSibling;var D=(C&&C.nodeType==1&&C.getAttribute('_fck_bookmark'));if (D) C=C.previousSibling;if (C&&C.nodeType==1&&C.nodeName==A.nodeName){if (!B) B=this._CreateElementAttribsForComparison(A);if (this._CheckAttributesMatch(C,B)){var E=A.firstChild;if (D) FCKDomTools.MoveNode(A.previousSibling,A,true);FCKDomTools.MoveChildren(C,A,true);FCKDomTools.RemoveNode(C);if (E) this._MergePreviousSibling(E);}}},_GetStyleText:function(){var A=this._StyleDesc.Styles;var B=(this._StyleDesc.Attributes?this._StyleDesc.Attributes['style']||'':'');if (B.length>0) B+=';';for (var C in A) B+=C+':'+A[C]+';';if (B.length>0&&!(/#\(/.test(B))){B=FCKTools.NormalizeCssText(B);};return (this._GetStyleText=function() { return B;})();},_GetAttribsForComparison:function(){var A=this._GetAttribsForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Attributes;if (B){for (var C in B){A[C.toLowerCase()]=B[C].toLowerCase();}};if (this._GetStyleText().length>0){A['style']=this._GetStyleText().toLowerCase();};FCKTools.AppendLengthProperty(A,'_length');return (this._GetAttribsForComparison_$=A);},_GetOverridesForComparison:function(){var A=this._GetOverridesForComparison_$;if (A) return A;A={};var B=this._StyleDesc.Overrides;if (B){if (!FCKTools.IsArray(B)) B=[B];for (var i=0;i0) return true;};B=B.nextSibling;};return false;}}; var FCKElementPath=function(A){var B=null;var C=null;var D=[];var e=A;while (e){if (e.nodeType==1){if (!this.LastElement) this.LastElement=e;var E=e.nodeName.toLowerCase();if (FCKBrowserInfo.IsIE&&e.scopeName!='HTML') E=e.scopeName.toLowerCase()+':'+E;if (!C){if (!B&&FCKListsLib.PathBlockElements[E]!=null) B=e;if (FCKListsLib.PathBlockLimitElements[E]!=null){if (!B&&E=='div'&&!FCKElementPath._CheckHasBlock(e)) B=e;else C=e;}};D.push(e);if (E=='body') break;};e=e.parentNode;};this.Block=B;this.BlockLimit=C;this.Elements=D;};FCKElementPath._CheckHasBlock=function(A){var B=A.childNodes;for (var i=0,count=B.length;i0){if (D.nodeType==3){var G=D.nodeValue.substr(0,E).Trim();if (G.length!=0) return A.IsStartOfBlock=false;}else F=D.childNodes[E-1];};if (!F) F=FCKDomTools.GetPreviousSourceNode(D,true,null,C);while (F){switch (F.nodeType){case 1:if (!FCKListsLib.InlineChildReqElements[F.nodeName.toLowerCase()]) return A.IsStartOfBlock=false;break;case 3:if (F.nodeValue.Trim().length>0) return A.IsStartOfBlock=false;};F=FCKDomTools.GetPreviousSourceNode(F,false,null,C);};return A.IsStartOfBlock=true;},CheckEndOfBlock:function(A){var B=this._Cache.IsEndOfBlock;if (B!=undefined) return B;var C=this.EndBlock||this.EndBlockLimit;var D=this._Range.endContainer;var E=this._Range.endOffset;var F;if (D.nodeType==3){var G=D.nodeValue;if (E0) return this._Cache.IsEndOfBlock=false;};F=FCKDomTools.GetNextSourceNode(F,false,null,C);};if (A) this.Select();return this._Cache.IsEndOfBlock=true;},CreateBookmark:function(A){var B={StartId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'S',EndId:(new Date()).valueOf()+Math.floor(Math.random()*1000)+'E'};var C=this.Window.document;var D;var E;var F;if (!this.CheckIsCollapsed()){E=C.createElement('span');E.style.display='none';E.id=B.EndId;E.setAttribute('_fck_bookmark',true);E.innerHTML=' ';F=this.Clone();F.Collapse(false);F.InsertNode(E);};D=C.createElement('span');D.style.display='none';D.id=B.StartId;D.setAttribute('_fck_bookmark',true);D.innerHTML=' ';F=this.Clone();F.Collapse(true);F.InsertNode(D);if (A){B.StartNode=D;B.EndNode=E;};if (E){this.SetStart(D,4);this.SetEnd(E,3);}else this.MoveToPosition(D,4);return B;},GetBookmarkNode:function(A,B){var C=this.Window.document;if (B) return A.StartNode||C.getElementById(A.StartId);else return A.EndNode||C.getElementById(A.EndId);},MoveToBookmark:function(A,B){var C=this.GetBookmarkNode(A,true);var D=this.GetBookmarkNode(A,false);this.SetStart(C,3);if (!B) FCKDomTools.RemoveNode(C);if (D){this.SetEnd(D,3);if (!B) FCKDomTools.RemoveNode(D);}else this.Collapse(true);this._UpdateElementInfo();},CreateBookmark2:function(){if (!this._Range) return { "Start":0,"End":0 };var A={"Start":[this._Range.startOffset],"End":[this._Range.endOffset]};var B=this._Range.startContainer.previousSibling;var C=this._Range.endContainer.previousSibling;var D=this._Range.startContainer;var E=this._Range.endContainer;while (B&&B.nodeType==3&&D.nodeType==3){A.Start[0]+=B.length;D=B;B=B.previousSibling;}while (C&&C.nodeType==3&&E.nodeType==3){A.End[0]+=C.length;E=C;C=C.previousSibling;};if (D.nodeType==1&&D.childNodes[A.Start[0]]&&D.childNodes[A.Start[0]].nodeType==3){var F=D.childNodes[A.Start[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};D=F;A.Start[0]=G;};if (E.nodeType==1&&E.childNodes[A.End[0]]&&E.childNodes[A.End[0]].nodeType==3){var F=E.childNodes[A.End[0]];var G=0;while (F.previousSibling&&F.previousSibling.nodeType==3){F=F.previousSibling;G+=F.length;};E=F;A.End[0]=G;};A.Start=FCKDomTools.GetNodeAddress(D,true).concat(A.Start);A.End=FCKDomTools.GetNodeAddress(E,true).concat(A.End);return A;},MoveToBookmark2:function(A){var B=FCKDomTools.GetNodeFromAddress(this.Window.document,A.Start.slice(0,-1),true);var C=FCKDomTools.GetNodeFromAddress(this.Window.document,A.End.slice(0,-1),true);this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var D=A.Start[A.Start.length-1];var E=A.End[A.End.length-1];while (B.nodeType==3&&D>B.length){if (!B.nextSibling||B.nextSibling.nodeType!=3) break;D-=B.length;B=B.nextSibling;}while (C.nodeType==3&&E>C.length){if (!C.nextSibling||C.nextSibling.nodeType!=3) break;E-=C.length;C=C.nextSibling;};this._Range.setStart(B,D);this._Range.setEnd(C,E);this._UpdateElementInfo();},MoveToPosition:function(A,B){this.SetStart(A,B);this.Collapse(true);},SetStart:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setStart(A,0);break;case 2:D.setStart(A,A.childNodes.length);break;case 3:D.setStartBefore(A);break;case 4:D.setStartAfter(A);};if (!C) this._UpdateElementInfo();},SetEnd:function(A,B,C){var D=this._Range;if (!D) D=this._Range=this.CreateRange();switch(B){case 1:D.setEnd(A,0);break;case 2:D.setEnd(A,A.childNodes.length);break;case 3:D.setEndBefore(A);break;case 4:D.setEndAfter(A);};if (!C) this._UpdateElementInfo();},Expand:function(A){var B,oSibling;switch (A){case 'inline_elements':if (this._Range.startOffset==0){B=this._Range.startContainer;if (B.nodeType!=1) B=B.previousSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setStartBefore(B);if (B!=B.parentNode.firstChild) break;B=B.parentNode;}}};B=this._Range.endContainer;var C=this._Range.endOffset;if ((B.nodeType==3&&C>=B.nodeValue.length)||(B.nodeType==1&&C>=B.childNodes.length)||(B.nodeType!=1&&B.nodeType!=3)){if (B.nodeType!=1) B=B.nextSibling?null:B.parentNode;if (B){while (FCKListsLib.InlineNonEmptyElements[B.nodeName.toLowerCase()]){this._Range.setEndAfter(B);if (B!=B.parentNode.lastChild) break;B=B.parentNode;}}};break;case 'block_contents':case 'list_contents':var D=FCKListsLib.BlockBoundaries;if (A=='list_contents'||FCKConfig.EnterMode=='br') D=FCKListsLib.ListBoundaries;if (this.StartBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents') this.SetStart(this.StartBlock,1);else{B=this._Range.startContainer;if (B.nodeType==1){var E=B.childNodes[this._Range.startOffset];if (E) B=FCKDomTools.GetPreviousSourceNode(E,true);else B=B.lastChild||B;}while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setStartBefore(B);B=B.previousSibling||B.parentNode;}};if (this.EndBlock&&FCKConfig.EnterMode!='br'&&A=='block_contents'&&this.EndBlock.nodeName.toLowerCase()!='li') this.SetEnd(this.EndBlock,2);else{B=this._Range.endContainer;if (B.nodeType==1) B=B.childNodes[this._Range.endOffset]||B.lastChild;while (B&&(B.nodeType!=1||(B!=this.StartBlockLimit&&!D[B.nodeName.toLowerCase()]))){this._Range.setEndAfter(B);B=B.nextSibling||B.parentNode;};if (B&&B.nodeName.toLowerCase()=='br') this._Range.setEndAfter(B);};this._UpdateElementInfo();}},SplitBlock:function(A){var B=A||FCKConfig.EnterMode;if (!this._Range) this.MoveToSelection();if (this.StartBlockLimit==this.EndBlockLimit){var C=this.StartBlock;var D=this.EndBlock;var E=null;if (B!='br'){if (!C){C=this.FixBlock(true,B);D=this.EndBlock;};if (!D) D=this.FixBlock(false,B);};var F=(C!=null&&this.CheckStartOfBlock());var G=(D!=null&&this.CheckEndOfBlock());if (!this.CheckIsEmpty()) this.DeleteContents();if (C&&D&&C==D){if (G){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(D,4);D=null;}else if (F){E=new FCKElementPath(this.StartContainer);this.MoveToPosition(C,3);C=null;}else{this.SetEnd(C,2);var H=this.ExtractContents();D=C.cloneNode(false);D.removeAttribute('id',false);H.AppendTo(D);FCKDomTools.InsertAfterNode(C,D);this.MoveToPosition(C,4);if (FCKBrowserInfo.IsGecko&&!C.nodeName.IEquals(['ul','ol'])) FCKTools.AppendBogusBr(C);}};return {PreviousBlock:C,NextBlock:D,WasStartOfBlock:F,WasEndOfBlock:G,ElementPath:E};};return null;},FixBlock:function(A,B){var C=this.CreateBookmark();this.Collapse(A);this.Expand('block_contents');var D=this.Window.document.createElement(B);this.ExtractContents().AppendTo(D);FCKDomTools.TrimNode(D);if (FCKDomTools.CheckIsEmptyElement(D,function(element) { return element.getAttribute('_fck_bookmark')!='true';})&&FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(D);this.InsertNode(D);this.MoveToBookmark(C);return D;},Release:function(A){if (!A) this.Window=null;this.StartNode=null;this.StartContainer=null;this.StartBlock=null;this.StartBlockLimit=null;this.EndNode=null;this.EndContainer=null;this.EndBlock=null;this.EndBlockLimit=null;this._Range=null;this._Cache=null;},CheckHasRange:function(){return!!this._Range;},GetTouchedStartNode:function(){var A=this._Range;var B=A.startContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.startOffset]||B;},GetTouchedEndNode:function(){var A=this._Range;var B=A.endContainer;if (A.collapsed||B.nodeType!=1) return B;return B.childNodes[A.endOffset-1]||B;}}; FCKDomRange.prototype.MoveToSelection=function(){this.Release(true);this._Range=new FCKW3CRange(this.Window.document);var A=this.Window.document.selection;if (A.type!='Control'){var B=this._GetSelectionMarkerTag(true);var C=this._GetSelectionMarkerTag(false);if (!B&&!C){this._Range.setStart(this.Window.document.body,0);this._UpdateElementInfo();return;};this._Range.setStart(B.parentNode,FCKDomTools.GetIndexOf(B));B.parentNode.removeChild(B);this._Range.setEnd(C.parentNode,FCKDomTools.GetIndexOf(C));C.parentNode.removeChild(C);this._UpdateElementInfo();}else{var D=A.createRange().item(0);if (D){this._Range.setStartBefore(D);this._Range.setEndAfter(D);this._UpdateElementInfo();}}};FCKDomRange.prototype.Select=function(A){if (this._Range) this.SelectBookmark(this.CreateBookmark(true),A);};FCKDomRange.prototype.SelectBookmark=function(A,B){var C=this.CheckIsCollapsed();var D;var E;var F=this.GetBookmarkNode(A,true);if (!F) return;var G;if (!C) G=this.GetBookmarkNode(A,false);var H=this.Window.document.body.createTextRange();H.moveToElementText(F);H.moveStart('character',1);if (G){var I=this.Window.document.body.createTextRange();I.moveToElementText(G);H.setEndPoint('EndToEnd',I);H.moveEnd('character',-1);}else{D=(B||!F.previousSibling||F.previousSibling.nodeName.toLowerCase()=='br')&&!F.nextSibing;E=this.Window.document.createElement('span');E.innerHTML='';F.parentNode.insertBefore(E,F);if (D){F.parentNode.insertBefore(this.Window.document.createTextNode('\ufeff'),F);}};if (!this._Range) this._Range=this.CreateRange();this._Range.setStartBefore(F);F.parentNode.removeChild(F);if (C){if (D){H.moveStart('character',-1);H.select();this.Window.document.selection.clear();}else H.select();FCKDomTools.RemoveNode(E);}else{this._Range.setEndBefore(G);G.parentNode.removeChild(G);H.select();}};FCKDomRange.prototype._GetSelectionMarkerTag=function(A){var B=this.Window.document;var C=B.selection;var D;try{D=C.createRange();}catch (e){return null;};if (D.parentElement().document!=B) return null;D.collapse(A===true);var E='fck_dom_range_temp_'+(new Date()).valueOf()+'_'+Math.floor(Math.random()*1000);D.pasteHTML('');return B.getElementById(E);}; var FCKDomRangeIterator=function(A){this.Range=A;this.ForceBrBreak=false;this.EnforceRealBlocks=false;};FCKDomRangeIterator.CreateFromSelection=function(A){var B=new FCKDomRange(A);B.MoveToSelection();return new FCKDomRangeIterator(B);};FCKDomRangeIterator.prototype={GetNextParagraph:function(){var A;var B;var C;var D;var E;var F=this.ForceBrBreak?FCKListsLib.ListBoundaries:FCKListsLib.BlockBoundaries;if (!this._LastNode){var B=this.Range.Clone();B.Expand(this.ForceBrBreak?'list_contents':'block_contents');this._NextNode=B.GetTouchedStartNode();this._LastNode=B.GetTouchedEndNode();B=null;};var H=this._NextNode;var I=this._LastNode;this._NextNode=null;while (H){var J=false;var K=(H.nodeType!=1);var L=false;if (!K){var M=H.nodeName.toLowerCase();if (F[M]&&(!FCKBrowserInfo.IsIE||H.scopeName=='HTML')){if (M=='br') K=true;else if (!B&&H.childNodes.length==0&&M!='hr'){A=H;C=H==I;break;};if (B){B.SetEnd(H,3,true);if (M!='br') this._NextNode=FCKDomTools.GetNextSourceNode(H,true,null,I)||H;};J=true;}else{if (H.firstChild){if (!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};H=H.firstChild;continue;};K=true;}}else if (H.nodeType==3){if (/^[\r\n\t ]+$/.test(H.nodeValue)) K=false;};if (K&&!B){B=new FCKDomRange(this.Range.Window);B.SetStart(H,3,true);};C=((!J||K)&&H==I);if (B&&!J){while (!H.nextSibling&&!C){var N=H.parentNode;if (F[N.nodeName.toLowerCase()]){J=true;C=C||(N==I);break;};H=N;K=true;C=(H==I);L=true;}};if (K) B.SetEnd(H,4,true);if ((J||C)&&B){B._UpdateElementInfo();if (B.StartNode==B.EndNode&&B.StartNode.parentNode==B.StartBlockLimit&&B.StartNode.getAttribute&&B.StartNode.getAttribute('_fck_bookmark')) B=null;else break;};if (C) break;H=FCKDomTools.GetNextSourceNode(H,L,null,I);};if (!A){if (!B){this._NextNode=null;return null;};A=B.StartBlock;if (!A&&!this.EnforceRealBlocks&&B.StartBlockLimit.nodeName.IEquals('DIV','TH','TD')&&B.CheckStartOfBlock()&&B.CheckEndOfBlock()){A=B.StartBlockLimit;}else if (!A||(this.EnforceRealBlocks&&A.nodeName.toLowerCase()=='li')){A=this.Range.Window.document.createElement(FCKConfig.EnterMode=='p'?'p':'div');B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);B.InsertNode(A);D=true;E=true;}else if (A.nodeName.toLowerCase()!='li'){if (!B.CheckStartOfBlock()||!B.CheckEndOfBlock()){A=A.cloneNode(false);B.ExtractContents().AppendTo(A);FCKDomTools.TrimNode(A);var O=B.SplitBlock();D=!O.WasStartOfBlock;E=!O.WasEndOfBlock;B.InsertNode(A);}}else if (!C){this._NextNode=A==I?null:FCKDomTools.GetNextSourceNode(B.EndNode,true,null,I);return A;}};if (D){var P=A.previousSibling;if (P&&P.nodeType==1){if (P.nodeName.toLowerCase()=='br') P.parentNode.removeChild(P);else if (P.lastChild&&P.lastChild.nodeName.IEquals('br')) P.removeChild(P.lastChild);}};if (E){var Q=A.lastChild;if (Q&&Q.nodeType==1&&Q.nodeName.toLowerCase()=='br') A.removeChild(Q);};if (!this._NextNode) this._NextNode=(C||A==I)?null:FCKDomTools.GetNextSourceNode(A,true,null,I);return A;}}; var FCKDocumentFragment=function(A){this._Document=A;this.RootNode=A.createElement('div');};FCKDocumentFragment.prototype={AppendTo:function(A){FCKDomTools.MoveChildren(this.RootNode,A);},AppendHtml:function(A){var B=this._Document.createElement('div');B.innerHTML=A;FCKDomTools.MoveChildren(B,this.RootNode);},InsertAfterNode:function(A){var B=this.RootNode;var C;while((C=B.lastChild)) FCKDomTools.InsertAfterNode(A,B.removeChild(C));}}; var FCKW3CRange=function(A){this._Document=A;this.startContainer=null;this.startOffset=null;this.endContainer=null;this.endOffset=null;this.collapsed=true;};FCKW3CRange.CreateRange=function(A){return new FCKW3CRange(A);};FCKW3CRange.CreateFromRange=function(A,B){var C=FCKW3CRange.CreateRange(A);C.setStart(B.startContainer,B.startOffset);C.setEnd(B.endContainer,B.endOffset);return C;};FCKW3CRange.prototype={_UpdateCollapsed:function(){this.collapsed=(this.startContainer==this.endContainer&&this.startOffset==this.endOffset);},setStart:function(A,B){this.startContainer=A;this.startOffset=B;if (!this.endContainer){this.endContainer=A;this.endOffset=B;};this._UpdateCollapsed();},setEnd:function(A,B){this.endContainer=A;this.endOffset=B;if (!this.startContainer){this.startContainer=A;this.startOffset=B;};this._UpdateCollapsed();},setStartAfter:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setStartBefore:function(A){this.setStart(A.parentNode,FCKDomTools.GetIndexOf(A));},setEndAfter:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A)+1);},setEndBefore:function(A){this.setEnd(A.parentNode,FCKDomTools.GetIndexOf(A));},collapse:function(A){if (A){this.endContainer=this.startContainer;this.endOffset=this.startOffset;}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset;};this.collapsed=true;},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.nodeType==3?A.data.length:A.childNodes.length);},insertNode:function(A){var B=this.startContainer;var C=this.startOffset;if (B.nodeType==3){B.splitText(C);if (B==this.endContainer) this.setEnd(B.nextSibling,this.endOffset-this.startOffset);FCKDomTools.InsertAfterNode(B,A);return;}else{B.insertBefore(A,B.childNodes[C]||null);if (B==this.endContainer){this.endOffset++;this.collapsed=false;}}},deleteContents:function(){if (this.collapsed) return;this._ExecContentsAction(0);},extractContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(1,A);return A;},cloneContents:function(){var A=new FCKDocumentFragment(this._Document);if (!this.collapsed) this._ExecContentsAction(2,A);return A;},_ExecContentsAction:function(A,B){var C=this.startContainer;var D=this.endContainer;var E=this.startOffset;var F=this.endOffset;var G=false;var H=false;if (D.nodeType==3) D=D.splitText(F);else{if (D.childNodes.length>0){if (F>D.childNodes.length-1){D=FCKDomTools.InsertAfterNode(D.lastChild,this._Document.createTextNode(''));H=true;}else D=D.childNodes[F];}};if (C.nodeType==3){C.splitText(E);if (C==D) D=C.nextSibling;}else{if (E==0){C=C.insertBefore(this._Document.createTextNode(''),C.firstChild);G=true;}else if (E>C.childNodes.length-1){C=C.appendChild(this._Document.createTextNode(''));G=true;}else C=C.childNodes[E].previousSibling;};var I=FCKDomTools.GetParents(C);var J=FCKDomTools.GetParents(D);var i,topStart,topEnd;for (i=0;i0&&levelStartNode!=D) levelClone=K.appendChild(levelStartNode.cloneNode(levelStartNode==D));if (!I[k]||levelStartNode.parentNode!=I[k].parentNode){currentNode=levelStartNode.previousSibling;while(currentNode){if (currentNode==I[k]||currentNode==C) break;currentSibling=currentNode.previousSibling;if (A==2) K.insertBefore(currentNode.cloneNode(true),K.firstChild);else{currentNode.parentNode.removeChild(currentNode);if (A==1) K.insertBefore(currentNode,K.firstChild);};currentNode=currentSibling;}};if (K) K=levelClone;};if (A==2){var L=this.startContainer;if (L.nodeType==3){L.data+=L.nextSibling.data;L.parentNode.removeChild(L.nextSibling);};var M=this.endContainer;if (M.nodeType==3&&M.nextSibling){M.data+=M.nextSibling.data;M.parentNode.removeChild(M.nextSibling);}}else{if (topStart&&topEnd&&(C.parentNode!=topStart.parentNode||D.parentNode!=topEnd.parentNode)){var N=FCKDomTools.GetIndexOf(topEnd);if (G&&topEnd.parentNode==C.parentNode) N--;this.setStart(topEnd.parentNode,N);};this.collapse(true);};if(G) C.parentNode.removeChild(C);if(H&&D.parentNode) D.parentNode.removeChild(D);},cloneRange:function(){return FCKW3CRange.CreateFromRange(this._Document,this);}}; var FCKEnterKey=function(A,B,C,D){this.Window=A;this.EnterMode=B||'p';this.ShiftEnterMode=C||'br';var E=new FCKKeystrokeHandler(false);E._EnterKey=this;E.OnKeystroke=FCKEnterKey_OnKeystroke;E.SetKeystrokes([[13,'Enter'],[SHIFT+13,'ShiftEnter'],[8,'Backspace'],[CTRL+8,'CtrlBackspace'],[46,'Delete']]);this.TabText='';if (D>0||FCKBrowserInfo.IsSafari){while (D--) this.TabText+='\xa0';E.SetKeystrokes([9,'Tab']);};E.AttachToElement(A.document);};function FCKEnterKey_OnKeystroke(A,B){var C=this._EnterKey;try{switch (B){case 'Enter':return C.DoEnter();break;case 'ShiftEnter':return C.DoShiftEnter();break;case 'Backspace':return C.DoBackspace();break;case 'Delete':return C.DoDelete();break;case 'Tab':return C.DoTab();break;case 'CtrlBackspace':return C.DoCtrlBackspace();break;}}catch (e){};return false;};FCKEnterKey.prototype.DoEnter=function(A,B){FCKUndo.SaveUndoStep();this._HasShift=(B===true);var C=FCKSelection.GetParentElement();var D=new FCKElementPath(C);var E=A||this.EnterMode;if (E=='br'||D.Block&&D.Block.tagName.toLowerCase()=='pre') return this._ExecuteEnterBr();else return this._ExecuteEnterBlock(E);};FCKEnterKey.prototype.DoShiftEnter=function(){return this.DoEnter(this.ShiftEnterMode,true);};FCKEnterKey.prototype.DoBackspace=function(){var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};var C=B.CheckIsCollapsed();if (!C){if (FCKBrowserInfo.IsIE&&this.Window.document.selection.type.toLowerCase()=="control"){var D=this.Window.document.selection.createRange();for (var i=D.length-1;i>=0;i--){var E=D.item(i);E.parentNode.removeChild(E);};return true;};return false;};if (FCKBrowserInfo.IsIE){var F=FCKDomTools.GetPreviousSourceElement(B.StartNode,true);if (F&&F.nodeName.toLowerCase()=='br'){var G=B.Clone();G.SetStart(F,4);if (G.CheckIsEmpty()){F.parentNode.removeChild(F);return true;}}};var H=B.StartBlock;var I=B.EndBlock;if (B.StartBlockLimit==B.EndBlockLimit&&H&&I){if (!C){var J=B.CheckEndOfBlock();B.DeleteContents();if (H!=I){B.SetStart(I,1);B.SetEnd(I,1);};B.Select();A=(H==I);};if (B.CheckStartOfBlock()){var K=B.StartBlock;var L=FCKDomTools.GetPreviousSourceElement(K,true,['BODY',B.StartBlockLimit.nodeName],['UL','OL']);A=this._ExecuteBackspace(B,L,K);}else if (FCKBrowserInfo.IsGeckoLike){B.Select();}};B.Release();return A;};FCKEnterKey.prototype.DoCtrlBackspace=function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(this.Window);A.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(A,this.Window.document.body)){this._FixIESelectAllBug(A);return true;};return false;};FCKEnterKey.prototype._ExecuteBackspace=function(A,B,C){var D=false;if (!B&&C&&C.nodeName.IEquals('LI')&&C.parentNode.parentNode.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};if (B&&B.nodeName.IEquals('LI')){var E=FCKDomTools.GetLastChild(B,['UL','OL']);while (E){B=FCKDomTools.GetLastChild(E,'LI');E=FCKDomTools.GetLastChild(B,['UL','OL']);}};if (B&&C){if (C.nodeName.IEquals('LI')&&!B.nodeName.IEquals('LI')){this._OutdentWithSelection(C,A);return true;};var F=C.parentNode;var G=B.nodeName.toLowerCase();if (FCKListsLib.EmptyElements[G]!=null||G=='table'){FCKDomTools.RemoveNode(B);D=true;}else{FCKDomTools.RemoveNode(C);while (F.innerHTML.Trim().length==0){var H=F.parentNode;H.removeChild(F);F=H;};FCKDomTools.LTrimNode(C);FCKDomTools.RTrimNode(B);A.SetStart(B,2,true);A.Collapse(true);var I=A.CreateBookmark(true);if (!C.tagName.IEquals(['TABLE'])) FCKDomTools.MoveChildren(C,B);A.SelectBookmark(I);D=true;}};return D;};FCKEnterKey.prototype.DoDelete=function(){FCKUndo.SaveUndoStep();var A=false;var B=new FCKDomRange(this.Window);B.MoveToSelection();if (FCKBrowserInfo.IsIE&&this._CheckIsAllContentsIncluded(B,this.Window.document.body)){this._FixIESelectAllBug(B);return true;};if (B.CheckIsCollapsed()&&B.CheckEndOfBlock(FCKBrowserInfo.IsGeckoLike)){var C=B.StartBlock;var D=FCKTools.GetElementAscensor(C,'td');var E=FCKDomTools.GetNextSourceElement(C,true,[B.StartBlockLimit.nodeName],['UL','OL','TR'],true);if (D){var F=FCKTools.GetElementAscensor(E,'td');if (F!=D) return true;};A=this._ExecuteBackspace(B,C,E);};B.Release();return A;};FCKEnterKey.prototype.DoTab=function(){var A=new FCKDomRange(this.Window);A.MoveToSelection();var B=A._Range.startContainer;while (B){if (B.nodeType==1){var C=B.tagName.toLowerCase();if (C=="tr"||C=="td"||C=="th"||C=="tbody"||C=="table") return false;else break;};B=B.parentNode;};if (this.TabText){A.DeleteContents();A.InsertNode(this.Window.document.createTextNode(this.TabText));A.Collapse(false);A.Select();};return true;};FCKEnterKey.prototype._ExecuteEnterBlock=function(A,B){var C=B||new FCKDomRange(this.Window);var D=C.SplitBlock(A);if (D){var E=D.PreviousBlock;var F=D.NextBlock;var G=D.WasStartOfBlock;var H=D.WasEndOfBlock;if (F){if (F.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(F,F.parentNode);FCKDomTools.MoveNode(F,F.nextSibling,true);}}else if (E&&E.parentNode.nodeName.IEquals('li')){FCKDomTools.BreakParent(E,E.parentNode);C.MoveToElementEditStart(E.nextSibling);FCKDomTools.MoveNode(E,E.previousSibling);};if (!G&&!H){if (F.nodeName.IEquals('li')&&F.firstChild&&F.firstChild.nodeName.IEquals(['ul','ol'])) F.insertBefore(FCKTools.GetElementDocument(F).createTextNode('\xa0'),F.firstChild);if (F) C.MoveToElementEditStart(F);}else{if (G&&H&&E.tagName.toUpperCase()=='LI'){C.MoveToElementStart(E);this._OutdentWithSelection(E,C);C.Release();return true;};var I;if (E){var J=E.tagName.toUpperCase();if (!this._HasShift&&!(/^H[1-6]$/).test(J)){I=FCKDomTools.CloneElement(E);}}else if (F) I=FCKDomTools.CloneElement(F);if (!I) I=this.Window.document.createElement(A);var K=D.ElementPath;if (K){for (var i=0,len=K.Elements.length;i=0&&(C=B[i--])){if (C.name.length>0){if (C.innerHTML!==''){if (FCKBrowserInfo.IsIE) C.className+=' FCK__AnchorC';}else{var D=FCKDocumentProcessor_CreateFakeImage('FCK__Anchor',C.cloneNode(true));D.setAttribute('_fckanchor','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}}}};var FCKPageBreaksProcessor=FCKDocumentProcessor.AppendNew();FCKPageBreaksProcessor.ProcessDocument=function(A){var B=A.getElementsByTagName('DIV');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.style.pageBreakAfter=='always'&&C.childNodes.length==1&&C.childNodes[0].style&&C.childNodes[0].style.display=='none'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',C.cloneNode(true));C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};var FCKEmbedAndObjectProcessor=(function(){var A=[];var B=function(el){var C=el.cloneNode(true);var D;var E=D=FCKDocumentProcessor_CreateFakeImage('FCK__UnknownObject',C);FCKEmbedAndObjectProcessor.RefreshView(E,el);for (var i=0;i=0;i--) B(G[i]);};var H=function(doc){F('object',doc);F('embed',doc);};return FCKTools.Merge(FCKDocumentProcessor.AppendNew(),{ProcessDocument:function(doc){if (FCKBrowserInfo.IsGecko) FCKTools.RunFunction(H,this,[doc]);else H(doc);},RefreshView:function(placeHolder,original){if (original.getAttribute('width')>0) placeHolder.style.width=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('width'));if (original.getAttribute('height')>0) placeHolder.style.height=FCKTools.ConvertHtmlSizeToStyle(original.getAttribute('height'));},AddCustomHandler:function(func){A.push(func);}});})();FCK.GetRealElement=function(A){var e=FCKTempBin.Elements[A.getAttribute('_fckrealelement')];if (A.getAttribute('_fckflash')){if (A.style.width.length>0) e.width=FCKTools.ConvertStyleSizeToHtml(A.style.width);if (A.style.height.length>0) e.height=FCKTools.ConvertStyleSizeToHtml(A.style.height);};return e;};if (FCKBrowserInfo.IsIE){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('HR');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){var D=A.createElement('hr');D.mergeAttributes(C,true);FCKDomTools.InsertAfterNode(C,D);C.parentNode.removeChild(C);}}};FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByTagName('INPUT');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (C.type=='hidden'){var D=FCKDocumentProcessor_CreateFakeImage('FCK__InputHidden',C.cloneNode(true));D.setAttribute('_fckinputhidden','true',0);C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKEmbedAndObjectProcessor.AddCustomHandler(function(A,B){if (!(A.nodeName.IEquals('embed')&&(A.type=='application/x-shockwave-flash'||/\.swf($|#|\?)/i.test(A.src)))) return;B.className='FCK__Flash';B.setAttribute('_fckflash','true',0);});if (FCKBrowserInfo.IsSafari){FCKDocumentProcessor.AppendNew().ProcessDocument=function(A){var B=A.getElementsByClassName?A.getElementsByClassName('Apple-style-span'):Array.prototype.filter.call(A.getElementsByTagName('span'),function(item){ return item.className=='Apple-style-span';});for (var i=B.length-1;i>=0;i--) FCKDomTools.RemoveNode(B[i],true);}}; var FCKSelection=FCK.Selection={GetParentBlock:function(){var A=this.GetParentElement();while (A){if (FCKListsLib.BlockBoundaries[A.nodeName.toLowerCase()]) break;A=A.parentNode;};return A;},ApplyStyle:function(A){FCKStyles.ApplyStyle(new FCKStyle(A));}}; FCKSelection.GetType=function(){try{var A=FCKSelection.GetSelection().type;if (A=='Control'||A=='Text') return A;if (this.GetSelection().createRange().parentElement) return 'Text';}catch(e){};return 'None';};FCKSelection.GetSelectedElement=function(){if (this.GetType()=='Control'){var A=this.GetSelection().createRange();if (A&&A.item) return this.GetSelection().createRange().item(0);};return null;};FCKSelection.GetParentElement=function(){switch (this.GetType()){case 'Control':var A=FCKSelection.GetSelectedElement();return A?A.parentElement:null;case 'None':return null;default:return this.GetSelection().createRange().parentElement();}};FCKSelection.GetBoundaryParentElement=function(A){switch (this.GetType()){case 'Control':var B=FCKSelection.GetSelectedElement();return B?B.parentElement:null;case 'None':return null;default:var C=FCK.EditorDocument;var D=C.selection.createRange();D.collapse(A!==false);var B=D.parentElement();return FCKTools.GetElementDocument(B)==C?B:null;}};FCKSelection.SelectNode=function(A){FCK.Focus();this.GetSelection().empty();var B;try{B=FCK.EditorDocument.body.createControlRange();B.addElement(A);}catch(e){B=FCK.EditorDocument.body.createTextRange();B.moveToElementText(A);};B.select();};FCKSelection.Collapse=function(A){FCK.Focus();if (this.GetType()=='Text'){var B=this.GetSelection().createRange();B.collapse(A==null||A===true);B.select();}};FCKSelection.HasAncestorNode=function(A){var B;if (this.GetSelection().type=="Control"){B=this.GetSelectedElement();}else{var C=this.GetSelection().createRange();B=C.parentElement();}while (B){if (B.nodeName.IEquals(A)) return true;B=B.parentNode;};return false;};FCKSelection.MoveToAncestorNode=function(A){var B,oRange;if (!FCK.EditorDocument) return null;if (this.GetSelection().type=="Control"){oRange=this.GetSelection().createRange();for (i=0;i=0;i--){if (C[i]) FCKTableHandler.DeleteRows(C[i]);};return;};var E=FCKTools.GetElementAscensor(A,'TABLE');if (E.rows.length==1){FCKTableHandler.DeleteTable(E);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteTable=function(A){if (!A){A=FCKSelection.GetSelectedElement();if (!A||A.tagName!='TABLE') A=FCKSelection.MoveToAncestorNode('TABLE');};if (!A) return;FCKSelection.SelectNode(A);FCKSelection.Collapse();if (A.parentNode.childNodes.length==1) A.parentNode.parentNode.removeChild(A.parentNode);else A.parentNode.removeChild(A);};FCKTableHandler.InsertColumn=function(A){var B=null;var C=this.GetSelectedCells();if (C&&C.length) B=C[A?0:(C.length-1)];if (!B) return;var D=FCKTools.GetElementAscensor(B,'TABLE');var E=B.cellIndex;for (var i=0;i=0;i--){if (B[i]) FCKTableHandler.DeleteColumns(B[i]);};return;};if (!A) return;var C=FCKTools.GetElementAscensor(A,'TABLE');var D=A.cellIndex;for (var i=C.rows.length-1;i>=0;i--){var E=C.rows[i];if (D==0&&E.cells.length==1){FCKTableHandler.DeleteRows(E);continue;};if (E.cells[D]) E.removeChild(E.cells[D]);}};FCKTableHandler.InsertCell=function(A,B){var C=null;var D=this.GetSelectedCells();if (D&&D.length) C=D[B?0:(D.length-1)];if (!C) return null;var E=FCK.EditorDocument.createElement('TD');if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(E);if (!B&&C.cellIndex==C.parentNode.cells.length-1) C.parentNode.appendChild(E);else C.parentNode.insertBefore(E,B?C:C.nextSibling);return E;};FCKTableHandler.DeleteCell=function(A){if (A.parentNode.cells.length==1){FCKTableHandler.DeleteRows(A.parentNode);return;};A.parentNode.removeChild(A);};FCKTableHandler.DeleteCells=function(){var A=FCKTableHandler.GetSelectedCells();for (var i=A.length-1;i>=0;i--){FCKTableHandler.DeleteCell(A[i]);}};FCKTableHandler._MarkCells=function(A,B){for (var i=0;i=E.height){for (D=F;D0){var L=K.removeChild(K.firstChild);if (L.nodeType!=1||(L.getAttribute('type',2)!='_moz'&&L.getAttribute('_moz_dirty')!=null)){I.appendChild(L);J++;}}};if (J>0) I.appendChild(FCK.EditorDocument.createElement('br'));};this._ReplaceCellsByMarker(C,'_SelectedCells',B);this._UnmarkCells(A,'_SelectedCells');this._InstallTableMap(C,B.parentNode.parentNode.parentNode);B.appendChild(I);if (FCKBrowserInfo.IsGeckoLike&&(!B.firstChild)) FCKTools.AppendBogusBr(B);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeRight=function(){var A=this.GetMergeRightTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCK.EditorDocument.createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));D.parentNode.removeChild(D);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.MergeDown=function(){var A=this.GetMergeDownTarget();if (A==null) return;var B=A.refCell;var C=A.tableMap;var D=A.nextCell;var E=FCKTools.GetElementDocument(B).createDocumentFragment();while (D&&D.childNodes&&D.childNodes.length>0) E.appendChild(D.removeChild(D.firstChild));if (E.firstChild) E.insertBefore(FCK.EditorDocument.createElement('br'),E.firstChild);B.appendChild(E);this._MarkCells([D],'_Replace');this._ReplaceCellsByMarker(C,'_Replace',B);this._InstallTableMap(C,B.parentNode.parentNode.parentNode);this._MoveCaretToCell(B,false);};FCKTableHandler.HorizontalSplitCell=function(){var A=FCKTableHandler.GetSelectedCells();if (A.length!=1) return;var B=A[0];var C=this._CreateTableMap(B);var D=B.parentNode.rowIndex;var E=FCKTableHandler._GetCellIndexSpan(C,D,B);var F=isNaN(B.colSpan)?1:B.colSpan;if (F>1){var G=Math.ceil(F/2);var H=FCK.EditorDocument.createElement(B.nodeName);if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(H);var I=E+G;var J=E+F;var K=isNaN(B.rowSpan)?1:B.rowSpan;for (var r=D;r1){B.rowSpan=Math.ceil(G/2);var H=D+Math.ceil(G/2);var I=C[H];var J=null;for (var i=E+1;i1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);B.parentNode.parentNode.parentNode.rows[H].insertBefore(K,J);}else{var L=B.parentNode.sectionRowIndex+1;var M=FCK.EditorDocument.createElement('tr');var N=B.parentNode.parentNode;if (N.rows.length>L) N.insertBefore(M,N.rows[L]);else N.appendChild(M);for (var i=0;i1) K.colSpan=F;if (FCKBrowserInfo.IsGeckoLike) FCKTools.AppendBogusBr(K);M.appendChild(K);}};FCKTableHandler._GetCellIndexSpan=function(A,B,C){if (A.lengthE) E=j;if (D._colScanned===true) continue;if (A[i][j-1]==D) D.colSpan++;if (A[i][j+1]!=D) D._colScanned=true;}};for (var i=0;i<=E;i++){for (var j=0;j=0&&C.compareEndPoints('StartToEnd',E)<=0)||(C.compareEndPoints('EndToStart',E)>=0&&C.compareEndPoints('EndToEnd',E)<=0)){B[B.length]=D.cells[i];}}}};return B;}; var FCKXml=function(){this.Error=false;};FCKXml.GetAttribute=function(A,B,C){var D=A.attributes.getNamedItem(B);return D?D.value:C;};FCKXml.TransformToObject=function(A){if (!A) return null;var B={};var C=A.attributes;for (var i=0;i ';var A=FCKDocumentProcessor_CreateFakeImage('FCK__PageBreak',e);var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.SplitBlock();B.InsertNode(A);FCK.Events.FireEvent('OnSelectionChange');};FCKPageBreakCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKUnlinkCommand=function(){this.Name='Unlink';};FCKUnlinkCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (FCKBrowserInfo.IsGeckoLike){var A=FCK.Selection.MoveToAncestorNode('A');if (A) FCKTools.RemoveOuterTags(A);return;};FCK.ExecuteNamedCommand(this.Name);};FCKUnlinkCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState(this.Name);if (A==0&&FCK.EditMode==0){var B=FCKSelection.MoveToAncestorNode('A');var C=(B&&B.name.length>0&&B.href.length==0);if (C) A=-1;};return A;};var FCKVisitLinkCommand=function(){this.Name='VisitLink';};FCKVisitLinkCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCK.GetNamedCommandState('Unlink');if (A==0){var B=FCKSelection.MoveToAncestorNode('A');if (!B.href) A=-1;};return A;},Execute:function(){var A=FCKSelection.MoveToAncestorNode('A');var B=A.getAttribute('_fcksavedurl')||A.getAttribute('href',2);if (!/:\/\//.test(B)){var C=FCKConfig.BaseHref;var D=FCK.GetInstanceObject('parent');if (!C){C=D.document.location.href;C=C.substring(0,C.lastIndexOf('/')+1);};if (/^\//.test(B)){try{C=C.match(/^.*:\/\/+[^\/]+/)[0];}catch (e){C=D.document.location.protocol+'://'+D.parent.document.location.host;}};B=C+B;};if (!window.open(B,'_blank')) alert(FCKLang.VisitLinkBlocked);}};var FCKSelectAllCommand=function(){this.Name='SelectAll';};FCKSelectAllCommand.prototype.Execute=function(){if (FCK.EditMode==0){FCK.ExecuteNamedCommand('SelectAll');}else{var A=FCK.EditingArea.Textarea;if (FCKBrowserInfo.IsIE){A.createTextRange().execCommand('SelectAll');}else{A.selectionStart=0;A.selectionEnd=A.value.length;};A.focus();}};FCKSelectAllCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return 0;};var FCKPasteCommand=function(){this.Name='Paste';};FCKPasteCommand.prototype={Execute:function(){if (FCKBrowserInfo.IsIE) FCK.Paste();else FCK.ExecuteNamedCommand('Paste');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}};var FCKRuleCommand=function(){this.Name='Rule';};FCKRuleCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();FCK.InsertElement('hr');},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('InsertHorizontalRule');}};var FCKCutCopyCommand=function(A){this.Name=A?'Cut':'Copy';};FCKCutCopyCommand.prototype={Execute:function(){var A=false;if (FCKBrowserInfo.IsIE){var B=function(){A=true;};var C='on'+this.Name.toLowerCase();FCK.EditorDocument.body.attachEvent(C,B);FCK.ExecuteNamedCommand(this.Name);FCK.EditorDocument.body.detachEvent(C,B);}else{try{FCK.ExecuteNamedCommand(this.Name);A=true;}catch(e){}};if (!A) alert(FCKLang['PasteError'+this.Name]);},GetState:function(){return FCK.EditMode!=0?-1:FCK.GetNamedCommandState('Cut');}};var FCKAnchorDeleteCommand=function(){this.Name='AnchorDelete';};FCKAnchorDeleteCommand.prototype={Execute:function(){if (FCK.Selection.GetType()=='Control'){FCK.Selection.Delete();}else{var A=FCK.Selection.GetSelectedElement();if (A){if (A.tagName=='IMG'&&A.getAttribute('_fckanchor')) oAnchor=FCK.GetRealElement(A);else A=null;};if (!A){oAnchor=FCK.Selection.MoveToAncestorNode('A');if (oAnchor) FCK.Selection.SelectNode(oAnchor);};if (oAnchor.href.length!=0){oAnchor.removeAttribute('name');if (FCKBrowserInfo.IsIE) oAnchor.className=oAnchor.className.replace(FCKRegexLib.FCK_Class,'');return;};if (A){A.parentNode.removeChild(A);return;};if (oAnchor.innerHTML.length==0){oAnchor.parentNode.removeChild(oAnchor);return;};FCKTools.RemoveOuterTags(oAnchor);};if (FCKBrowserInfo.IsGecko) FCK.Selection.Collapse(true);},GetState:function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Unlink');}};var FCKDeleteDivCommand=function(){};FCKDeleteDivCommand.prototype={GetState:function(){if (FCK.EditMode!=0) return -1;var A=FCKSelection.GetParentElement();var B=new FCKElementPath(A);return B.BlockLimit&&B.BlockLimit.nodeName.IEquals('div')?0:-1;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCKDomTools.GetSelectedDivContainers();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();for (var i=0;i\n \n
    \n '+FCKLang.ColorAutomatic+'\n \n ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_AutoOnClick,this);if (!FCKBrowserInfo.IsIE) C.style.width='96%';var G=FCKConfig.FontColors.toString().split(',');var H=0;while (H
    ';if (H>=G.length) C.style.visibility='hidden';else FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_OnClick,[this,L]);}};if (FCKConfig.EnableMoreFontColors){E=D.insertRow(-1).insertCell(-1);E.colSpan=8;C=E.appendChild(CreateSelectionDiv());C.innerHTML='
    '+FCKLang.ColorMoreColors+'
    ';FCKTools.AddEventListenerEx(C,'click',FCKTextColorCommand_MoreOnClick,this);};if (!FCKBrowserInfo.IsIE) C.style.width='96%';}; var FCKPastePlainTextCommand=function(){this.Name='PasteText';};FCKPastePlainTextCommand.prototype.Execute=function(){FCK.PasteAsPlainText();};FCKPastePlainTextCommand.prototype.GetState=function(){if (FCK.EditMode!=0) return -1;return FCK.GetNamedCommandState('Paste');}; var FCKPasteWordCommand=function(){this.Name='PasteWord';};FCKPasteWordCommand.prototype.Execute=function(){FCK.PasteFromWord();};FCKPasteWordCommand.prototype.GetState=function(){if (FCK.EditMode!=0||FCKConfig.ForcePasteAsPlainText) return -1;else return FCK.GetNamedCommandState('Paste');}; var FCKTableCommand=function(A){this.Name=A;};FCKTableCommand.prototype.Execute=function(){FCKUndo.SaveUndoStep();if (!FCKBrowserInfo.IsGecko){switch (this.Name){case 'TableMergeRight':return FCKTableHandler.MergeRight();case 'TableMergeDown':return FCKTableHandler.MergeDown();}};switch (this.Name){case 'TableInsertRowAfter':return FCKTableHandler.InsertRow(false);case 'TableInsertRowBefore':return FCKTableHandler.InsertRow(true);case 'TableDeleteRows':return FCKTableHandler.DeleteRows();case 'TableInsertColumnAfter':return FCKTableHandler.InsertColumn(false);case 'TableInsertColumnBefore':return FCKTableHandler.InsertColumn(true);case 'TableDeleteColumns':return FCKTableHandler.DeleteColumns();case 'TableInsertCellAfter':return FCKTableHandler.InsertCell(null,false);case 'TableInsertCellBefore':return FCKTableHandler.InsertCell(null,true);case 'TableDeleteCells':return FCKTableHandler.DeleteCells();case 'TableMergeCells':return FCKTableHandler.MergeCells();case 'TableHorizontalSplitCell':return FCKTableHandler.HorizontalSplitCell();case 'TableVerticalSplitCell':return FCKTableHandler.VerticalSplitCell();case 'TableDelete':return FCKTableHandler.DeleteTable();default:return alert(FCKLang.UnknownCommand.replace(/%1/g,this.Name));}};FCKTableCommand.prototype.GetState=function(){if (FCK.EditorDocument!=null&&FCKSelection.HasAncestorNode('TABLE')){switch (this.Name){case 'TableHorizontalSplitCell':case 'TableVerticalSplitCell':if (FCKTableHandler.GetSelectedCells().length==1) return 0;else return -1;case 'TableMergeCells':if (FCKTableHandler.CheckIsSelectionRectangular()&&FCKTableHandler.GetSelectedCells().length>1) return 0;else return -1;case 'TableMergeRight':return FCKTableHandler.GetMergeRightTarget()?0:-1;case 'TableMergeDown':return FCKTableHandler.GetMergeDownTarget()?0:-1;default:return 0;}}else return -1;}; var FCKFitWindow=function(){this.Name='FitWindow';};FCKFitWindow.prototype.Execute=function(){var A=window.frameElement;var B=A.style;var C=parent;var D=C.document.documentElement;var E=C.document.body;var F=E.style;var G;var H,oEditorScrollPos;if (FCK.EditMode==0){H=new FCKDomRange(FCK.EditorWindow);H.MoveToSelection();oEditorScrollPos=FCKTools.GetScrollPosition(FCK.EditorWindow);}else{var I=FCK.EditingArea.Textarea;H=!FCKBrowserInfo.IsIE&&[I.selectionStart,I.selectionEnd];oEditorScrollPos=[I.scrollLeft,I.scrollTop];};if (!this.IsMaximized){if(FCKBrowserInfo.IsIE) C.attachEvent('onresize',FCKFitWindow_Resize);else C.addEventListener('resize',FCKFitWindow_Resize,true);this._ScrollPos=FCKTools.GetScrollPosition(C);G=A;while((G=G.parentNode)){if (G.nodeType==1){G._fckSavedStyles=FCKTools.SaveStyles(G);G.style.zIndex=FCKConfig.FloatingPanelsZIndex-1;}};if (FCKBrowserInfo.IsIE){this.documentElementOverflow=D.style.overflow;D.style.overflow='hidden';F.overflow='hidden';}else{F.overflow='hidden';F.width='0px';F.height='0px';};this._EditorFrameStyles=FCKTools.SaveStyles(A);var J=FCKTools.GetViewPaneSize(C);B.position="absolute";A.offsetLeft;B.zIndex=FCKConfig.FloatingPanelsZIndex-1;B.left="0px";B.top="0px";B.width=J.Width+"px";B.height=J.Height+"px";if (!FCKBrowserInfo.IsIE){B.borderRight=B.borderBottom="9999px solid white";B.backgroundColor="white";};C.scrollTo(0,0);var K=FCKTools.GetWindowPosition(C,A);if (K.x!=0) B.left=(-1*K.x)+"px";if (K.y!=0) B.top=(-1*K.y)+"px";this.IsMaximized=true;}else{if(FCKBrowserInfo.IsIE) C.detachEvent("onresize",FCKFitWindow_Resize);else C.removeEventListener("resize",FCKFitWindow_Resize,true);G=A;while((G=G.parentNode)){if (G._fckSavedStyles){FCKTools.RestoreStyles(G,G._fckSavedStyles);G._fckSavedStyles=null;}};if (FCKBrowserInfo.IsIE) D.style.overflow=this.documentElementOverflow;FCKTools.RestoreStyles(A,this._EditorFrameStyles);C.scrollTo(this._ScrollPos.X,this._ScrollPos.Y);this.IsMaximized=false;};FCKToolbarItems.GetItem('FitWindow').RefreshState();if (FCK.EditMode==0) FCK.EditingArea.MakeEditable();FCK.Focus();if (FCK.EditMode==0){H.Select();FCK.EditorWindow.scrollTo(oEditorScrollPos.X,oEditorScrollPos.Y);}else{if (!FCKBrowserInfo.IsIE){I.selectionStart=H[0];I.selectionEnd=H[1];};I.scrollLeft=oEditorScrollPos[0];I.scrollTop=oEditorScrollPos[1];}};FCKFitWindow.prototype.GetState=function(){if (FCKConfig.ToolbarLocation!='In') return -1;else return (this.IsMaximized?1:0);};function FCKFitWindow_Resize(){var A=FCKTools.GetViewPaneSize(parent);var B=window.frameElement.style;B.width=A.Width+'px';B.height=A.Height+'px';}; var FCKListCommand=function(A,B){this.Name=A;this.TagName=B;};FCKListCommand.prototype={GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=FCKSelection.GetBoundaryParentElement(true);var B=A;while (B){if (B.nodeName.IEquals(['ul','ol'])) break;B=B.parentNode;};if (B&&B.nodeName.IEquals(this.TagName)) return 1;else return 0;},Execute:function(){FCKUndo.SaveUndoStep();var A=FCK.EditorDocument;var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=this.GetState();if (C==0){FCKDomTools.TrimNode(A.body);if (!A.body.firstChild){var D=A.createElement('p');A.body.appendChild(D);B.MoveToNodeContents(D);}};var E=B.CreateBookmark();var F=[];var G={};var H=new FCKDomRangeIterator(B);var I;H.ForceBrBreak=(C==0);var J=true;var K=null;while (J){while ((I=H.GetNextParagraph())){var L=new FCKElementPath(I);var M=null;var N=false;var O=L.BlockLimit;for (var i=L.Elements.length-1;i>=0;i--){var P=L.Elements[i];if (P.nodeName.IEquals(['ol','ul'])){if (O._FCK_ListGroupObject) O._FCK_ListGroupObject=null;var Q=P._FCK_ListGroupObject;if (Q) Q.contents.push(I);else{Q={ 'root':P,'contents':[I] };F.push(Q);FCKDomTools.SetElementMarker(G,P,'_FCK_ListGroupObject',Q);};N=true;break;}};if (N) continue;var R=O;if (R._FCK_ListGroupObject) R._FCK_ListGroupObject.contents.push(I);else{var Q={ 'root':R,'contents':[I] };FCKDomTools.SetElementMarker(G,R,'_FCK_ListGroupObject',Q);F.push(Q);}};if (FCKBrowserInfo.IsIE) J=false;else{if (K==null){K=[];var T=FCKSelection.GetSelection();if (T&&F.length==0) K.push(T.getRangeAt(0));for (var i=1;T&&i0){var Q=F.shift();if (C==0){if (Q.root.nodeName.IEquals(['ul','ol'])) this._ChangeListType(Q,G,W);else this._CreateList(Q,W);}else if (C==1&&Q.root.nodeName.IEquals(['ul','ol'])) this._RemoveList(Q,G);};for (var i=0;iC[i-1].indent+1){var H=C[i-1].indent+1-C[i].indent;var I=C[i].indent;while (C[i]&&C[i].indent>=I){C[i].indent+=H;i++;};i--;}};var J=FCKDomTools.ArrayToList(C,B);if (A.root.nextSibling==null||A.root.nextSibling.nodeName.IEquals('br')){if (J.listNode.lastChild.nodeName.IEquals('br')) J.listNode.removeChild(J.listNode.lastChild);};A.root.parentNode.replaceChild(J.listNode,A.root);}}; var FCKJustifyCommand=function(A){this.AlignValue=A;var B=FCKConfig.ContentLangDirection.toLowerCase();this.IsDefaultAlign=(A=='left'&&B=='ltr')||(A=='right'&&B=='rtl');var C=this._CssClassName=(function(){var D=FCKConfig.JustifyClasses;if (D){switch (A){case 'left':return D[0]||null;case 'center':return D[1]||null;case 'right':return D[2]||null;case 'justify':return D[3]||null;}};return null;})();if (C&&C.length>0) this._CssClassRegex=new RegExp('(?:^|\\s+)'+C+'(?=$|\\s)');};FCKJustifyCommand._GetClassNameRegex=function(){var A=FCKJustifyCommand._ClassRegex;if (A!=undefined) return A;var B=[];var C=FCKConfig.JustifyClasses;if (C){for (var i=0;i<4;i++){var D=C[i];if (D&&D.length>0) B.push(D);}};if (B.length>0) A=new RegExp('(?:^|\\s+)(?:'+B.join('|')+')(?=$|\\s)');else A=null;return FCKJustifyCommand._ClassRegex=A;};FCKJustifyCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=new FCKDomRange(FCK.EditorWindow);A.MoveToSelection();var B=this.GetState();if (B==-1) return;var C=A.CreateBookmark();var D=this._CssClassName;var E=new FCKDomRangeIterator(A);var F;while ((F=E.GetNextParagraph())){F.removeAttribute('align');if (D){var G=F.className.replace(FCKJustifyCommand._GetClassNameRegex(),'');if (B==0){if (G.length>0) G+=' ';F.className=G+D;}else if (G.length==0) FCKDomTools.RemoveAttribute(F,'class');}else{var H=F.style;if (B==0) H.textAlign=this.AlignValue;else{H.textAlign='';if (H.cssText.length==0) F.removeAttribute('style');}}};A.MoveToBookmark(C);A.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;var C;if (FCKBrowserInfo.IsIE) C=B.currentStyle.textAlign;else C=FCK.EditorWindow.getComputedStyle(B,'').getPropertyValue('text-align');C=C.replace(/(-moz-|-webkit-|start|auto)/i,'');if ((!C&&this.IsDefaultAlign)||C==this.AlignValue) return 1;return 0;}}; var FCKIndentCommand=function(A,B){this.Name=A;this.Offset=B;this.IndentCSSProperty=FCKConfig.ContentLangDirection.IEquals('ltr')?'marginLeft':'marginRight';};FCKIndentCommand._InitIndentModeParameters=function(){if (FCKConfig.IndentClasses&&FCKConfig.IndentClasses.length>0){this._UseIndentClasses=true;this._IndentClassMap={};for (var i=0;i0?H+' ':'')+FCKConfig.IndentClasses[G-1];}else{var I=parseInt(E.style[this.IndentCSSProperty],10);if (isNaN(I)) I=0;I+=this.Offset;I=Math.max(I,0);I=Math.ceil(I/this.Offset)*this.Offset;E.style[this.IndentCSSProperty]=I?I+FCKConfig.IndentUnit:'';if (E.getAttribute('style')=='') E.removeAttribute('style');}}},_IndentList:function(A,B){var C=A.StartContainer;var D=A.EndContainer;while (C&&C.parentNode!=B) C=C.parentNode;while (D&&D.parentNode!=B) D=D.parentNode;if (!C||!D) return;var E=C;var F=[];var G=false;while (G==false){if (E==D) G=true;F.push(E);E=E.nextSibling;};if (F.length<1) return;var H=FCKDomTools.GetParents(B);for (var i=0;iN;i++) M[i].indent+=I;var O=FCKDomTools.ArrayToList(M);if (O) B.parentNode.replaceChild(O.listNode,B);FCKDomTools.ClearAllMarkers(L);}}; var FCKBlockQuoteCommand=function(){};FCKBlockQuoteCommand.prototype={Execute:function(){FCKUndo.SaveUndoStep();var A=this.GetState();var B=new FCKDomRange(FCK.EditorWindow);B.MoveToSelection();var C=B.CreateBookmark();if (FCKBrowserInfo.IsIE){var D=B.GetBookmarkNode(C,true);var E=B.GetBookmarkNode(C,false);var F;if (D&&D.parentNode.nodeName.IEquals('blockquote')&&!D.previousSibling){F=D;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]) FCKDomTools.MoveNode(D,F,true);}};if (E&&E.parentNode.nodeName.IEquals('blockquote')&&!E.previousSibling){F=E;while ((F=F.nextSibling)){if (FCKListsLib.BlockElements[F.nodeName.toLowerCase()]){if (F.firstChild==D) FCKDomTools.InsertAfterNode(D,E);else FCKDomTools.MoveNode(E,F,true);}}}};var G=new FCKDomRangeIterator(B);var H;if (A==0){var I=[];while ((H=G.GetNextParagraph())) I.push(H);if (I.length<1){para=B.Window.document.createElement(FCKConfig.EnterMode.IEquals('p')?'p':'div');B.InsertNode(para);para.appendChild(B.Window.document.createTextNode('\ufeff'));B.MoveToBookmark(C);B.MoveToNodeContents(para);B.Collapse(true);C=B.CreateBookmark();I.push(para);};var J=I[0].parentNode;var K=[];for (var i=0;i0){H=I.shift();while (H.parentNode!=J) H=H.parentNode;if (H!=L) K.push(H);L=H;}while (K.length>0){H=K.shift();if (H.nodeName.IEquals('blockquote')){var M=FCKTools.GetElementDocument(H).createDocumentFragment();while (H.firstChild){M.appendChild(H.removeChild(H.firstChild));I.push(M.lastChild);};H.parentNode.replaceChild(M,H);}else I.push(H);};var N=B.Window.document.createElement('blockquote');J.insertBefore(N,I[0]);while (I.length>0){H=I.shift();N.appendChild(H);}}else if (A==1){var O=[];var P={};while ((H=G.GetNextParagraph())){var Q=null;var R=null;while (H.parentNode){if (H.parentNode.nodeName.IEquals('blockquote')){Q=H.parentNode;R=H;break;};H=H.parentNode;};if (Q&&R&&!R._fckblockquotemoveout){O.push(R);FCKDomTools.SetElementMarker(P,R,'_fckblockquotemoveout',true);}};FCKDomTools.ClearAllMarkers(P);var S=[];var T=[],P={};var U=function(N){for (var i=0;i0){var W=O.shift();var N=W.parentNode;if (W==W.parentNode.firstChild) N.parentNode.insertBefore(N.removeChild(W),N);else if (W==W.parentNode.lastChild) N.parentNode.insertBefore(N.removeChild(W),N.nextSibling);else FCKDomTools.BreakParent(W,W.parentNode,B);if (!N._fckbqprocessed){T.push(N);FCKDomTools.SetElementMarker(P,N,'_fckbqprocessed',true);};S.push(W);};for (var i=T.length-1;i>=0;i--){var N=T[i];if (U(N)) FCKDomTools.RemoveNode(N);};FCKDomTools.ClearAllMarkers(P);if (FCKConfig.EnterMode.IEquals('br')){while (S.length){var W=S.shift();var a=true;if (W.nodeName.IEquals('div')){var M=FCKTools.GetElementDocument(W).createDocumentFragment();var c=a&&W.previousSibling&&!FCKListsLib.BlockBoundaries[W.previousSibling.nodeName.toLowerCase()];if (a&&c) M.appendChild(FCKTools.GetElementDocument(W).createElement('br'));var d=W.nextSibling&&!FCKListsLib.BlockBoundaries[W.nextSibling.nodeName.toLowerCase()];while (W.firstChild) M.appendChild(W.removeChild(W.firstChild));if (d) M.appendChild(FCKTools.GetElementDocument(W).createElement('br'));W.parentNode.replaceChild(M,W);a=false;}}}};B.MoveToBookmark(C);B.Select();FCK.Focus();FCK.Events.FireEvent('OnSelectionChange');},GetState:function(){if (FCK.EditMode!=0||!FCK.EditorWindow) return -1;var A=new FCKElementPath(FCKSelection.GetBoundaryParentElement(true));var B=A.Block||A.BlockLimit;if (!B||B.nodeName.toLowerCase()=='body') return 0;for (var i=0;i';B.open();B.write(''+F+'<\/head><\/body><\/html>');B.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.Panel_Contructor(B,window.document.location);FCKTools.AddEventListenerEx(E,'focus',FCKPanel_Window_OnFocus,this);FCKTools.AddEventListenerEx(E,'blur',FCKPanel_Window_OnBlur,this);};B.dir=FCKLang.Dir;FCKTools.AddEventListener(B,'contextmenu',FCKTools.CancelEvent);this.MainNode=B.body.appendChild(B.createElement('DIV'));this.MainNode.style.cssFloat=this.IsRTL?'right':'left';};FCKPanel.prototype.AppendStyleSheet=function(A){FCKTools.AppendStyleSheet(this.Document,A);};FCKPanel.prototype.Preload=function(x,y,A){if (this._Popup) this._Popup.show(x,y,0,0,A);};FCKPanel.prototype.ResizeForSubpanel=function(A,B,C){if (!FCKBrowserInfo.IsIE7) return false;if (!this._Popup.isOpen){this.Subpanel=null;return false;};if (B==0&&C==0){if (this.Subpanel!==A) return false;this.Subpanel=null;this.IncreasedX=0;}else{this.Subpanel=A;if ((this.IncreasedX>=B)&&(this.IncreasedY>=C)) return false;this.IncreasedX=Math.max(this.IncreasedX,B);this.IncreasedY=Math.max(this.IncreasedY,C);};var x=this.ShowRect.x;var w=this.IncreasedX;if (this.IsRTL) x=x-w;var D=this.ShowRect.w+w;var E=Math.max(this.ShowRect.h,this.IncreasedY);if (this.ParentPanel) this.ParentPanel.ResizeForSubpanel(this,D,E);this._Popup.show(x,this.ShowRect.y,D,E,this.RelativeElement);return this.IsRTL;};FCKPanel.prototype.Show=function(x,y,A,B,C){var D;var E=this.MainNode;if (this._Popup){this._Popup.show(x,y,0,0,A);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (FCKBrowserInfo.IsIE7){if (this.ParentPanel&&this.ParentPanel.ResizeForSubpanel(this,D,E.offsetHeight)){FCKTools.RunFunction(this.Show,this,[x,y,A]);return;}};if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=(x*-1)+A.offsetWidth-D;};if (FCKBrowserInfo.IsIE7){this.ShowRect={x:x,y:y,w:D,h:E.offsetHeight};this.IncreasedX=0;this.IncreasedY=0;this.RelativeElement=A;};this._Popup.show(x,y,D,E.offsetHeight,A);if (this.OnHide){if (this._Timer) CheckPopupOnHide.call(this,true);this._Timer=FCKTools.SetInterval(CheckPopupOnHide,100,this);}}else{if (typeof(FCK.ToolbarSet.CurrentInstance.FocusManager)!='undefined') FCK.ToolbarSet.CurrentInstance.FocusManager.Lock();if (this.ParentPanel){this.ParentPanel.Lock();FCKPanel_Window_OnBlur(null,this.ParentPanel);};if (FCKBrowserInfo.IsGecko&&FCKBrowserInfo.IsMac){this._IFrame.scrolling='';FCKTools.RunFunction(function(){ this._IFrame.scrolling='no';},this);};if (FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel&&FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel!=this) FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel.Hide(false,true);FCKDomTools.SetElementStyles(E,{B:B?B+'px':'',C:C?C+'px':''});D=E.offsetWidth;if (!B) this._IFrame.width=1;if (!C) this._IFrame.height=1;D=E.offsetWidth||E.firstChild.offsetWidth;var F=FCKTools.GetDocumentPosition(this._Window,A.nodeType==9?(FCKTools.IsStrictMode(A)?A.documentElement:A.body):A);var G=FCKDomTools.GetPositionedAncestor(this._IFrame.parentNode);if (G){var H=FCKTools.GetDocumentPosition(FCKTools.GetElementWindow(G),G);F.x-=H.x;F.y-=H.y;};if (this.IsRTL&&!this.IsContextMenu) x=(x*-1);x+=F.x;y+=F.y;if (this.IsRTL){if (this.IsContextMenu) x=x-D+1;else if (A) x=x+A.offsetWidth-D;}else{var I=FCKTools.GetViewPaneSize(this._Window);var J=FCKTools.GetScrollPosition(this._Window);var K=I.Height+J.Y;var L=I.Width+J.X;if ((x+D)>L) x-=x+D-L;if ((y+E.offsetHeight)>K) y-=y+E.offsetHeight-K;};FCKDomTools.SetElementStyles(this._IFrame,{left:x+'px',top:y+'px'});this._IFrame.contentWindow.focus();this._IsOpened=true;var M=this;this._resizeTimer=setTimeout(function(){var N=E.offsetWidth||E.firstChild.offsetWidth;var O=E.offsetHeight;M._IFrame.style.width=N+'px';M._IFrame.style.height=O+'px';},0);FCK.ToolbarSet.CurrentInstance.GetInstanceObject('FCKPanel')._OpenedPanel=this;};FCKTools.RunFunction(this.OnShow,this);};FCKPanel.prototype.Hide=function(A,B){if (this._Popup) this._Popup.hide();else{if (!this._IsOpened||this._LockCounter>0) return;if (typeof(FCKFocusManager)!='undefined'&&!B) FCKFocusManager.Unlock();this._IFrame.style.width=this._IFrame.style.height='0px';this._IsOpened=false;if (this._resizeTimer){clearTimeout(this._resizeTimer);this._resizeTimer=null;};if (this.ParentPanel) this.ParentPanel.Unlock();if (!A) FCKTools.RunFunction(this.OnHide,this);}};FCKPanel.prototype.CheckIsOpened=function(){if (this._Popup) return this._Popup.isOpen;else return this._IsOpened;};FCKPanel.prototype.CreateChildPanel=function(){var A=this._Popup?FCKTools.GetDocumentWindow(this.Document):this._Window;var B=new FCKPanel(A);B.ParentPanel=this;return B;};FCKPanel.prototype.Lock=function(){this._LockCounter++;};FCKPanel.prototype.Unlock=function(){if (--this._LockCounter==0&&!this.HasFocus) this.Hide();};function FCKPanel_Window_OnFocus(e,A){A.HasFocus=true;};function FCKPanel_Window_OnBlur(e,A){A.HasFocus=false;if (A._LockCounter==0) FCKTools.RunFunction(A.Hide,A);};function CheckPopupOnHide(A){if (A||!this._Popup.isOpen){window.clearInterval(this._Timer);this._Timer=null;if (this._Popup&&this.ParentPanel&&!A) this.ParentPanel.ResizeForSubpanel(this,0,0);FCKTools.RunFunction(this.OnHide,this);}};function FCKPanel_Cleanup(){this._Popup=null;this._Window=null;this.Document=null;this.MainNode=null;this.RelativeElement=null;}; var FCKIcon=function(A){var B=A?typeof(A):'undefined';switch (B){case 'number':this.Path=FCKConfig.SkinPath+'fck_strip.gif';this.Size=16;this.Position=A;break;case 'undefined':this.Path=FCK_SPACER_PATH;break;case 'string':this.Path=A;break;default:this.Path=A[0];this.Size=A[1];this.Position=A[2];}};FCKIcon.prototype.CreateIconElement=function(A){var B,eIconImage;if (this.Position){var C='-'+((this.Position-1)*this.Size)+'px';if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path;eIconImage.style.top=C;}else{B=A.createElement('IMG');B.src=FCK_SPACER_PATH;B.style.backgroundPosition='0px '+C;B.style.backgroundImage='url("'+this.Path+'")';}}else{if (FCKBrowserInfo.IsIE){B=A.createElement('DIV');eIconImage=B.appendChild(A.createElement('IMG'));eIconImage.src=this.Path?this.Path:FCK_SPACER_PATH;}else{B=A.createElement('IMG');B.src=this.Path?this.Path:FCK_SPACER_PATH;}};B.className='TB_Button_Image';return B;}; var FCKToolbarButtonUI=function(A,B,C,D,E,F){this.Name=A;this.Label=B||A;this.Tooltip=C||this.Label;this.Style=E||0;this.State=F||0;this.Icon=new FCKIcon(D);if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarButtonUI_Cleanup);};FCKToolbarButtonUI.prototype._CreatePaddingElement=function(A){var B=A.createElement('IMG');B.className='TB_Button_Padding';B.src=FCK_SPACER_PATH;return B;};FCKToolbarButtonUI.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this.MainElement=B.createElement('DIV');C.title=this.Tooltip;if (FCKBrowserInfo.IsGecko) C.onmousedown=FCKTools.CancelEvent;FCKTools.AddEventListenerEx(C,'mouseover',FCKToolbarButtonUI_OnMouseOver,this);FCKTools.AddEventListenerEx(C,'mouseout',FCKToolbarButtonUI_OnMouseOut,this);FCKTools.AddEventListenerEx(C,'click',FCKToolbarButtonUI_OnClick,this);this.ChangeState(this.State,true);if (this.Style==0&&!this.ShowArrow){C.appendChild(this.Icon.CreateIconElement(B));}else{var D=C.appendChild(B.createElement('TABLE'));D.cellPadding=0;D.cellSpacing=0;var E=D.insertRow(-1);var F=E.insertCell(-1);if (this.Style==0||this.Style==2) F.appendChild(this.Icon.CreateIconElement(B));else F.appendChild(this._CreatePaddingElement(B));if (this.Style==1||this.Style==2){F=E.insertCell(-1);F.className='TB_Button_Text';F.noWrap=true;F.appendChild(B.createTextNode(this.Label));};if (this.ShowArrow){if (this.Style!=0){E.insertCell(-1).appendChild(this._CreatePaddingElement(B));};F=E.insertCell(-1);var G=F.appendChild(B.createElement('IMG'));G.src=FCKConfig.SkinPath+'images/toolbar.buttonarrow.gif';G.width=5;G.height=3;};F=E.insertCell(-1);F.appendChild(this._CreatePaddingElement(B));};A.appendChild(C);};FCKToolbarButtonUI.prototype.ChangeState=function(A,B){if (!B&&this.State==A) return;var e=this.MainElement;if (!e) return;switch (parseInt(A,10)){case 0:e.className='TB_Button_Off';break;case 1:e.className='TB_Button_On';break;case -1:e.className='TB_Button_Disabled';break;};this.State=A;};function FCKToolbarButtonUI_OnMouseOver(A,B){if (B.State==0) this.className='TB_Button_Off_Over';else if (B.State==1) this.className='TB_Button_On_Over';};function FCKToolbarButtonUI_OnMouseOut(A,B){if (B.State==0) this.className='TB_Button_Off';else if (B.State==1) this.className='TB_Button_On';};function FCKToolbarButtonUI_OnClick(A,B){if (B.OnClick&&B.State!=-1) B.OnClick(B);};function FCKToolbarButtonUI_Cleanup(){this.MainElement=null;}; var FCKToolbarButton=function(A,B,C,D,E,F,G){this.CommandName=A;this.Label=B;this.Tooltip=C;this.Style=D;this.SourceView=E?true:false;this.ContextSensitive=F?true:false;if (G==null) this.IconPath=FCKConfig.SkinPath+'toolbar/'+A.toLowerCase()+'.gif';else if (typeof(G)=='number') this.IconPath=[FCKConfig.SkinPath+'fck_strip.gif',16,G];else this.IconPath=G;};FCKToolbarButton.prototype.Create=function(A){this._UIButton=new FCKToolbarButtonUI(this.CommandName,this.Label,this.Tooltip,this.IconPath,this.Style);this._UIButton.OnClick=this.Click;this._UIButton._ToolbarButton=this;this._UIButton.Create(A);};FCKToolbarButton.prototype.RefreshState=function(){var A=this._UIButton;if (!A) return;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B==A.State) return;A.ChangeState(B);};FCKToolbarButton.prototype.Click=function(){var A=this._ToolbarButton||this;FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(A.CommandName).Execute();};FCKToolbarButton.prototype.Enable=function(){this.RefreshState();};FCKToolbarButton.prototype.Disable=function(){this._UIButton.ChangeState(-1);}; var FCKSpecialCombo=function(A,B,C,D,E){this.FieldWidth=B||100;this.PanelWidth=C||150;this.PanelMaxHeight=D||150;this.Label=' ';this.Caption=A;this.Tooltip=A;this.Style=2;this.Enabled=true;this.Items={};this._Panel=new FCKPanel(E||window);this._Panel.AppendStyleSheet(FCKConfig.SkinEditorCSS);this._PanelBox=this._Panel.MainNode.appendChild(this._Panel.Document.createElement('DIV'));this._PanelBox.className='SC_Panel';this._PanelBox.style.width=this.PanelWidth+'px';this._PanelBox.innerHTML='
    ';this._ItemsHolderEl=this._PanelBox.getElementsByTagName('TD')[0];if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKSpecialCombo_Cleanup);};function FCKSpecialCombo_ItemOnMouseOver(){this.className+=' SC_ItemOver';};function FCKSpecialCombo_ItemOnMouseOut(){this.className=this.originalClass;};function FCKSpecialCombo_ItemOnClick(A,B,C){this.className=this.originalClass;B._Panel.Hide();B.SetLabel(this.FCKItemLabel);if (typeof(B.OnSelect)=='function') B.OnSelect(C,this);};FCKSpecialCombo.prototype.ClearItems=function (){if (this.Items) this.Items={};var A=this._ItemsHolderEl;while (A.firstChild) A.removeChild(A.firstChild);};FCKSpecialCombo.prototype.AddItem=function(A,B,C,D){var E=this._ItemsHolderEl.appendChild(this._Panel.Document.createElement('DIV'));E.className=E.originalClass='SC_Item';E.innerHTML=B;E.FCKItemLabel=C||A;E.Selected=false;if (FCKBrowserInfo.IsIE) E.style.width='100%';if (D) E.style.backgroundColor=D;FCKTools.AddEventListenerEx(E,'mouseover',FCKSpecialCombo_ItemOnMouseOver);FCKTools.AddEventListenerEx(E,'mouseout',FCKSpecialCombo_ItemOnMouseOut);FCKTools.AddEventListenerEx(E,'click',FCKSpecialCombo_ItemOnClick,[this,A]);this.Items[A.toString().toLowerCase()]=E;return E;};FCKSpecialCombo.prototype.SelectItem=function(A){if (typeof A=='string') A=this.Items[A.toString().toLowerCase()];if (A){A.className=A.originalClass='SC_ItemSelected';A.Selected=true;}};FCKSpecialCombo.prototype.SelectItemByLabel=function(A,B){for (var C in this.Items){var D=this.Items[C];if (D.FCKItemLabel==A){D.className=D.originalClass='SC_ItemSelected';D.Selected=true;if (B) this.SetLabel(A);}}};FCKSpecialCombo.prototype.DeselectAll=function(A){for (var i in this.Items){if (!this.Items[i]) continue;this.Items[i].className=this.Items[i].originalClass='SC_Item';this.Items[i].Selected=false;};if (A) this.SetLabel('');};FCKSpecialCombo.prototype.SetLabelById=function(A){A=A?A.toString().toLowerCase():'';var B=this.Items[A];this.SetLabel(B?B.FCKItemLabel:'');};FCKSpecialCombo.prototype.SetLabel=function(A){A=(!A||A.length==0)?' ':A;if (A==this.Label) return;this.Label=A;var B=this._LabelEl;if (B){B.innerHTML=A;FCKTools.DisableSelection(B);}};FCKSpecialCombo.prototype.SetEnabled=function(A){this.Enabled=A;if (this._OuterTable) this._OuterTable.className=A?'':'SC_FieldDisabled';};FCKSpecialCombo.prototype.Create=function(A){var B=FCKTools.GetElementDocument(A);var C=this._OuterTable=A.appendChild(B.createElement('TABLE'));C.cellPadding=0;C.cellSpacing=0;C.insertRow(-1);var D;var E;switch (this.Style){case 0:D='TB_ButtonType_Icon';E=false;break;case 1:D='TB_ButtonType_Text';E=false;break;case 2:E=true;break;};if (this.Caption&&this.Caption.length>0&&E){var F=C.rows[0].insertCell(-1);F.innerHTML=this.Caption;F.className='SC_FieldCaption';};var G=FCKTools.AppendElement(C.rows[0].insertCell(-1),'div');if (E){G.className='SC_Field';G.style.width=this.FieldWidth+'px';G.innerHTML='
     
    ';this._LabelEl=G.getElementsByTagName('label')[0];this._LabelEl.innerHTML=this.Label;}else{G.className='TB_Button_Off';G.innerHTML='
    '+this.Caption+'
    ';};FCKTools.AddEventListenerEx(G,'mouseover',FCKSpecialCombo_OnMouseOver,this);FCKTools.AddEventListenerEx(G,'mouseout',FCKSpecialCombo_OnMouseOut,this);FCKTools.AddEventListenerEx(G,'click',FCKSpecialCombo_OnClick,this);FCKTools.DisableSelection(this._Panel.Document.body);};function FCKSpecialCombo_Cleanup(){this._LabelEl=null;this._OuterTable=null;this._ItemsHolderEl=null;this._PanelBox=null;if (this.Items){for (var A in this.Items) this.Items[A]=null;}};function FCKSpecialCombo_OnMouseOver(A,B){if (B.Enabled){switch (B.Style){case 0:this.className='TB_Button_On_Over';break;case 1:this.className='TB_Button_On_Over';break;case 2:this.className='SC_Field SC_FieldOver';break;}}};function FCKSpecialCombo_OnMouseOut(A,B){switch (B.Style){case 0:this.className='TB_Button_Off';break;case 1:this.className='TB_Button_Off';break;case 2:this.className='SC_Field';break;}};function FCKSpecialCombo_OnClick(e,A){if (A.Enabled){var B=A._Panel;var C=A._PanelBox;var D=A._ItemsHolderEl;var E=A.PanelMaxHeight;if (A.OnBeforeClick) A.OnBeforeClick(A);if (FCKBrowserInfo.IsIE) B.Preload(0,this.offsetHeight,this);if (D.offsetHeight>E) C.style.height=E+'px';else C.style.height='';B.Show(0,this.offsetHeight,this);}}; var FCKToolbarSpecialCombo=function(){this.SourceView=false;this.ContextSensitive=true;this.FieldWidth=null;this.PanelWidth=null;this.PanelMaxHeight=null;};FCKToolbarSpecialCombo.prototype.DefaultLabel='';function FCKToolbarSpecialCombo_OnSelect(A,B){FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).Execute(A,B);};FCKToolbarSpecialCombo.prototype.Create=function(A){this._Combo=new FCKSpecialCombo(this.GetLabel(),this.FieldWidth,this.PanelWidth,this.PanelMaxHeight,FCKBrowserInfo.IsIE?window:FCKTools.GetElementWindow(A).parent);this._Combo.Tooltip=this.Tooltip;this._Combo.Style=this.Style;this.CreateItems(this._Combo);this._Combo.Create(A);this._Combo.CommandName=this.CommandName;this._Combo.OnSelect=FCKToolbarSpecialCombo_OnSelect;};function FCKToolbarSpecialCombo_RefreshActiveItems(A,B){A.DeselectAll();A.SelectItem(B);A.SetLabelById(B);};FCKToolbarSpecialCombo.prototype.RefreshState=function(){var A;var B=FCK.ToolbarSet.CurrentInstance.Commands.GetCommand(this.CommandName).GetState();if (B!=-1){A=1;if (this.RefreshActiveItems) this.RefreshActiveItems(this._Combo,B);else{if (this._LastValue!==B){this._LastValue=B;if (!B||B.length==0){this._Combo.DeselectAll();this._Combo.SetLabel(this.DefaultLabel);}else FCKToolbarSpecialCombo_RefreshActiveItems(this._Combo,B);}}}else A=-1;if (A==this.State) return;if (A==-1){this._Combo.DeselectAll();this._Combo.SetLabel('');};this.State=A;this._Combo.SetEnabled(A!=-1);};FCKToolbarSpecialCombo.prototype.Enable=function(){this.RefreshState();};FCKToolbarSpecialCombo.prototype.Disable=function(){this.State=-1;this._Combo.DeselectAll();this._Combo.SetLabel('');this._Combo.SetEnabled(false);}; var FCKToolbarStyleCombo=function(A,B){if (A===false) return;this.CommandName='Style';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.DefaultLabel=FCKConfig.DefaultStyleLabel||'';};FCKToolbarStyleCombo.prototype=new FCKToolbarSpecialCombo;FCKToolbarStyleCombo.prototype.GetLabel=function(){return FCKLang.Style;};FCKToolbarStyleCombo.prototype.GetStyles=function(){var A={};var B=FCK.ToolbarSet.CurrentInstance.Styles.GetStyles();for (var C in B){var D=B[C];if (!D.IsCore) A[C]=D;};return A;};FCKToolbarStyleCombo.prototype.CreateItems=function(A){var B=A._Panel.Document;FCKTools.AppendStyleSheet(B,FCKConfig.ToolbarComboPreviewCSS);FCKTools.AppendStyleString(B,FCKConfig.EditorAreaStyles);B.body.className+=' ForceBaseFont';FCKConfig.ApplyBodyAttributes(B.body);var C=this.GetStyles();for (var D in C){var E=C[D];var F=E.GetType()==2?D:FCKToolbarStyleCombo_BuildPreview(E,E.Label||D);var G=A.AddItem(D,F);G.Style=E;};A.OnBeforeClick=this.StyleCombo_OnBeforeClick;};FCKToolbarStyleCombo.prototype.RefreshActiveItems=function(A){var B=FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement(true);if (B){var C=new FCKElementPath(B);var D=C.Elements;for (var e=0;e');var E=A.Element;if (E=='bdo') E='span';D=['<',E];var F=A._StyleDesc.Attributes;if (F){for (var G in F){D.push(' ',G,'="',A.GetFinalAttributeValue(G),'"');}};if (A._GetStyleText().length>0) D.push(' style="',A.GetFinalStyleValue(),'"');D.push('>',B,'');if (C==0) D.push('');return D.join('');}; var FCKToolbarFontFormatCombo=function(A,B){if (A===false) return;this.CommandName='FontFormat';this.Label=this.GetLabel();this.Tooltip=A?A:this.Label;this.Style=B?B:2;this.NormalLabel='Normal';this.PanelWidth=190;this.DefaultLabel=FCKConfig.DefaultFontFormatLabel||'';};FCKToolbarFontFormatCombo.prototype=new FCKToolbarStyleCombo(false);FCKToolbarFontFormatCombo.prototype.GetLabel=function(){return FCKLang.FontFormat;};FCKToolbarFontFormatCombo.prototype.GetStyles=function(){var A={};var B=FCKLang['FontFormats'].split(';');var C={p:B[0],pre:B[1],address:B[2],h1:B[3],h2:B[4],h3:B[5],h4:B[6],h5:B[7],h6:B[8],div:B[9]||(B[0]+' (DIV)')};var D=FCKConfig.FontFormats.split(';');for (var i=0;i';G.open();G.write(''+H+''+document.getElementById('xToolbarSpace').innerHTML+'');G.close();if(FCKBrowserInfo.IsAIR) FCKAdobeAIR.ToolbarSet_InitOutFrame(G);FCKTools.AddEventListener(G,'contextmenu',FCKTools.CancelEvent);FCKTools.AppendStyleSheet(G,FCKConfig.SkinEditorCSS);B=D.__FCKToolbarSet=new FCKToolbarSet(G);B._IFrame=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(D,FCKToolbarSet_Target_Cleanup);};B.CurrentInstance=FCK;if (!B.ToolbarItems) B.ToolbarItems=FCKToolbarItems;FCK.AttachToOnSelectionChange(B.RefreshItemsState);return B;};function FCK_OnBlur(A){var B=A.ToolbarSet;if (B.CurrentInstance==A) B.Disable();};function FCK_OnFocus(A){var B=A.ToolbarSet;var C=A||FCK;B.CurrentInstance.FocusManager.RemoveWindow(B._IFrame.contentWindow);B.CurrentInstance=C;C.FocusManager.AddWindow(B._IFrame.contentWindow,true);B.Enable();};function FCKToolbarSet_Cleanup(){this._TargetElement=null;this._IFrame=null;};function FCKToolbarSet_Target_Cleanup(){this.__FCKToolbarSet=null;};var FCKToolbarSet=function(A){this._Document=A;this._TargetElement=A.getElementById('xToolbar');var B=A.getElementById('xExpandHandle');var C=A.getElementById('xCollapseHandle');B.title=FCKLang.ToolbarExpand;FCKTools.AddEventListener(B,'click',FCKToolbarSet_Expand_OnClick);C.title=FCKLang.ToolbarCollapse;FCKTools.AddEventListener(C,'click',FCKToolbarSet_Collapse_OnClick);if (!FCKConfig.ToolbarCanCollapse||FCKConfig.ToolbarStartExpanded) this.Expand();else this.Collapse();C.style.display=FCKConfig.ToolbarCanCollapse?'':'none';if (FCKConfig.ToolbarCanCollapse) C.style.display='';else A.getElementById('xTBLeftBorder').style.display='';this.Toolbars=[];this.IsLoaded=false;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKToolbarSet_Cleanup);};function FCKToolbarSet_Expand_OnClick(){FCK.ToolbarSet.Expand();};function FCKToolbarSet_Collapse_OnClick(){FCK.ToolbarSet.Collapse();};FCKToolbarSet.prototype.Expand=function(){this._ChangeVisibility(false);};FCKToolbarSet.prototype.Collapse=function(){this._ChangeVisibility(true);};FCKToolbarSet.prototype._ChangeVisibility=function(A){this._Document.getElementById('xCollapsed').style.display=A?'':'none';this._Document.getElementById('xExpanded').style.display=A?'none':'';if (FCKBrowserInfo.IsGecko){FCKTools.RunFunction(window.onresize);}};FCKToolbarSet.prototype.Load=function(A){this.Name=A;this.Items=[];this.ItemsWysiwygOnly=[];this.ItemsContextSensitive=[];this._TargetElement.innerHTML='';var B=FCKConfig.ToolbarSets[A];if (!B){alert(FCKLang.UnknownToolbarSet.replace(/%1/g,A));return;};this.Toolbars=[];for (var x=0;x0) break;}catch (e){break;};D=D.parent;};var E=D.document;var F=function(){if (!B) B=FCKConfig.FloatingPanelsZIndex+999;return++B;};var G=function(){if (!C) return;var H=FCKTools.IsStrictMode(E)?E.documentElement:E.body;FCKDomTools.SetElementStyles(C,{'width':Math.max(H.scrollWidth,H.clientWidth,E.scrollWidth||0)-1+'px','height':Math.max(H.scrollHeight,H.clientHeight,E.scrollHeight||0)-1+'px'});};return {OpenDialog:function(dialogName,dialogTitle,dialogPage,width,height,customValue,parentWindow,resizable){if (!A) this.DisplayMainCover();var I={Title:dialogTitle,Page:dialogPage,Editor:window,CustomValue:customValue,TopWindow:D};FCK.ToolbarSet.CurrentInstance.Selection.Save(true);var J=FCKTools.GetViewPaneSize(D);var K={ 'X':0,'Y':0 };var L=FCKBrowserInfo.IsIE&&(!FCKBrowserInfo.IsIE7||!FCKTools.IsStrictMode(D.document));if (L) K=FCKTools.GetScrollPosition(D);var M=Math.max(K.Y+(J.Height-height-20)/2,0);var N=Math.max(K.X+(J.Width-width-20)/2,0);var O=E.createElement('iframe');FCKTools.ResetStyles(O);O.src=FCKConfig.BasePath+'fckdialog.html';O.frameBorder=0;O.allowTransparency=true;FCKDomTools.SetElementStyles(O,{'position':(L)?'absolute':'fixed','top':M+'px','left':N+'px','width':width+'px','height':height+'px','zIndex':F()});O._DialogArguments=I;E.body.appendChild(O);O._ParentDialog=A;A=O;},OnDialogClose:function(dialogWindow){var O=dialogWindow.frameElement;FCKDomTools.RemoveNode(O);if (O._ParentDialog){A=O._ParentDialog;O._ParentDialog.contentWindow.SetEnabled(true);}else{if (!FCKBrowserInfo.IsIE) FCK.Focus();this.HideMainCover();setTimeout(function(){ A=null;},0);FCK.ToolbarSet.CurrentInstance.Selection.Release();}},DisplayMainCover:function(){C=E.createElement('div');FCKTools.ResetStyles(C);FCKDomTools.SetElementStyles(C,{'position':'absolute','zIndex':F(),'top':'0px','left':'0px','backgroundColor':FCKConfig.BackgroundBlockerColor});FCKDomTools.SetOpacity(C,FCKConfig.BackgroundBlockerOpacity);if (FCKBrowserInfo.IsIE&&!FCKBrowserInfo.IsIE7){var Q=E.createElement('iframe');FCKTools.ResetStyles(Q);Q.hideFocus=true;Q.frameBorder=0;Q.src=FCKTools.GetVoidUrl();FCKDomTools.SetElementStyles(Q,{'width':'100%','height':'100%','position':'absolute','left':'0px','top':'0px','filter':'progid:DXImageTransform.Microsoft.Alpha(opacity=0)'});C.appendChild(Q);};FCKTools.AddEventListener(D,'resize',G);G();E.body.appendChild(C);FCKFocusManager.Lock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R._fck_originalTabIndex=R.tabIndex;R.tabIndex=-1;},HideMainCover:function(){FCKDomTools.RemoveNode(C);FCKFocusManager.Unlock();var R=FCK.ToolbarSet.CurrentInstance.GetInstanceObject('frameElement');R.tabIndex=R._fck_originalTabIndex;FCKDomTools.ClearElementJSProperty(R,'_fck_originalTabIndex');},GetCover:function(){return C;}};})(); var FCKMenuItem=function(A,B,C,D,E,F){this.Name=B;this.Label=C||B;this.IsDisabled=E;this.Icon=new FCKIcon(D);this.SubMenu=new FCKMenuBlockPanel();this.SubMenu.Parent=A;this.SubMenu.OnClick=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnClick,this);this.CustomData=F;if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuItem_Cleanup);};FCKMenuItem.prototype.AddItem=function(A,B,C,D,E){this.HasSubMenu=true;return this.SubMenu.AddItem(A,B,C,D,E);};FCKMenuItem.prototype.AddSeparator=function(){this.SubMenu.AddSeparator();};FCKMenuItem.prototype.Create=function(A){var B=this.HasSubMenu;var C=FCKTools.GetElementDocument(A);var r=this.MainElement=A.insertRow(-1);r.className=this.IsDisabled?'MN_Item_Disabled':'MN_Item';if (!this.IsDisabled){FCKTools.AddEventListenerEx(r,'mouseover',FCKMenuItem_OnMouseOver,[this]);FCKTools.AddEventListenerEx(r,'click',FCKMenuItem_OnClick,[this]);if (!B) FCKTools.AddEventListenerEx(r,'mouseout',FCKMenuItem_OnMouseOut,[this]);};var D=r.insertCell(-1);D.className='MN_Icon';D.appendChild(this.Icon.CreateIconElement(C));D=r.insertCell(-1);D.className='MN_Label';D.noWrap=true;D.appendChild(C.createTextNode(this.Label));D=r.insertCell(-1);if (B){D.className='MN_Arrow';var E=D.appendChild(C.createElement('IMG'));E.src=FCK_IMAGES_PATH+'arrow_'+FCKLang.Dir+'.gif';E.width=4;E.height=7;this.SubMenu.Create();this.SubMenu.Panel.OnHide=FCKTools.CreateEventListener(FCKMenuItem_SubMenu_OnHide,this);}};FCKMenuItem.prototype.Activate=function(){this.MainElement.className='MN_Item_Over';if (this.HasSubMenu){this.SubMenu.Show(this.MainElement.offsetWidth+2,-2,this.MainElement);};FCKTools.RunFunction(this.OnActivate,this);};FCKMenuItem.prototype.Deactivate=function(){this.MainElement.className='MN_Item';if (this.HasSubMenu) this.SubMenu.Hide();};function FCKMenuItem_SubMenu_OnClick(A,B){FCKTools.RunFunction(B.OnClick,B,[A]);};function FCKMenuItem_SubMenu_OnHide(A){A.Deactivate();};function FCKMenuItem_OnClick(A,B){if (B.HasSubMenu) B.Activate();else{B.Deactivate();FCKTools.RunFunction(B.OnClick,B,[B]);}};function FCKMenuItem_OnMouseOver(A,B){B.Activate();};function FCKMenuItem_OnMouseOut(A,B){B.Deactivate();};function FCKMenuItem_Cleanup(){this.MainElement=null;}; var FCKMenuBlock=function(){this._Items=[];};FCKMenuBlock.prototype.Count=function(){return this._Items.length;};FCKMenuBlock.prototype.AddItem=function(A,B,C,D,E){var F=new FCKMenuItem(this,A,B,C,D,E);F.OnClick=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnClick,this);F.OnActivate=FCKTools.CreateEventListener(FCKMenuBlock_Item_OnActivate,this);this._Items.push(F);return F;};FCKMenuBlock.prototype.AddSeparator=function(){this._Items.push(new FCKMenuSeparator());};FCKMenuBlock.prototype.RemoveAllItems=function(){this._Items=[];var A=this._ItemsTable;if (A){while (A.rows.length>0) A.deleteRow(0);}};FCKMenuBlock.prototype.Create=function(A){if (!this._ItemsTable){if (FCK.IECleanup) FCK.IECleanup.AddItem(this,FCKMenuBlock_Cleanup);this._Window=FCKTools.GetElementWindow(A);var B=FCKTools.GetElementDocument(A);var C=A.appendChild(B.createElement('table'));C.cellPadding=0;C.cellSpacing=0;FCKTools.DisableSelection(C);var D=C.insertRow(-1).insertCell(-1);D.className='MN_Menu';var E=this._ItemsTable=D.appendChild(B.createElement('table'));E.cellPadding=0;E.cellSpacing=0;};for (var i=0;i0&&F.href.length==0);if (G) return;menu.AddSeparator();menu.AddItem('VisitLink',FCKLang.VisitLink);menu.AddSeparator();if (E) menu.AddItem('Link',FCKLang.EditLink,34);menu.AddItem('Unlink',FCKLang.RemoveLink,35);}}};case 'Image':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&!tag.getAttribute('_fckfakelement')){menu.AddSeparator();menu.AddItem('Image',FCKLang.ImageProperties,37);}}};case 'Anchor':return {AddItems:function(menu,tag,tagName){var F=FCKSelection.MoveToAncestorNode('A');var G=(F&&F.name.length>0);if (G||(tagName=='IMG'&&tag.getAttribute('_fckanchor'))){menu.AddSeparator();menu.AddItem('Anchor',FCKLang.AnchorProp,36);menu.AddItem('AnchorDelete',FCKLang.AnchorDelete);}}};case 'Flash':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckflash')){menu.AddSeparator();menu.AddItem('Flash',FCKLang.FlashProperties,38);}}};case 'Form':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('FORM')){menu.AddSeparator();menu.AddItem('Form',FCKLang.FormProp,48);}}};case 'Checkbox':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='checkbox'){menu.AddSeparator();menu.AddItem('Checkbox',FCKLang.CheckboxProp,49);}}};case 'Radio':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='radio'){menu.AddSeparator();menu.AddItem('Radio',FCKLang.RadioButtonProp,50);}}};case 'TextField':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='text'||tag.type=='password')){menu.AddSeparator();menu.AddItem('TextField',FCKLang.TextFieldProp,51);}}};case 'HiddenField':return {AddItems:function(menu,tag,tagName){if (tagName=='IMG'&&tag.getAttribute('_fckinputhidden')){menu.AddSeparator();menu.AddItem('HiddenField',FCKLang.HiddenFieldProp,56);}}};case 'ImageButton':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&tag.type=='image'){menu.AddSeparator();menu.AddItem('ImageButton',FCKLang.ImageButtonProp,55);}}};case 'Button':return {AddItems:function(menu,tag,tagName){if (tagName=='INPUT'&&(tag.type=='button'||tag.type=='submit'||tag.type=='reset')){menu.AddSeparator();menu.AddItem('Button',FCKLang.ButtonProp,54);}}};case 'Select':return {AddItems:function(menu,tag,tagName){if (tagName=='SELECT'){menu.AddSeparator();menu.AddItem('Select',FCKLang.SelectionFieldProp,53);}}};case 'Textarea':return {AddItems:function(menu,tag,tagName){if (tagName=='TEXTAREA'){menu.AddSeparator();menu.AddItem('Textarea',FCKLang.TextareaProp,52);}}};case 'BulletedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('UL')){menu.AddSeparator();menu.AddItem('BulletedList',FCKLang.BulletedListProp,27);}}};case 'NumberedList':return {AddItems:function(menu,tag,tagName){if (FCKSelection.HasAncestorNode('OL')){menu.AddSeparator();menu.AddItem('NumberedList',FCKLang.NumberedListProp,26);}}};case 'DivContainer':return {AddItems:function(menu,tag,tagName){var J=FCKDomTools.GetSelectedDivContainers();if (J.length>0){menu.AddSeparator();menu.AddItem('EditDiv',FCKLang.EditDiv,75);menu.AddItem('DeleteDiv',FCKLang.DeleteDiv,76);}}};};return null;};function FCK_ContextMenu_OnBeforeOpen(){FCK.Events.FireEvent('OnSelectionChange');var A,sTagName;if ((A=FCKSelection.GetSelectedElement())) sTagName=A.tagName;var B=FCK.ContextMenu._InnerContextMenu;B.RemoveAllItems();var C=FCK.ContextMenu.Listeners;for (var i=0;i0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}};var FCKHtmlIterator=function(A){this._sourceHtml=A;};FCKHtmlIterator.prototype={Next:function(){var A=this._sourceHtml;if (A==null) return null;var B=FCKRegexLib.HtmlTag.exec(A);var C=false;var D="";if (B){if (B.index>0){D=A.substr(0,B.index);this._sourceHtml=A.substr(B.index);}else{C=true;D=B[0];this._sourceHtml=A.substr(B[0].length);}}else{D=A;this._sourceHtml=null;};return { 'isTag':C,'value':D };},Each:function(A){var B;while ((B=this.Next())) A(B.isTag,B.value);}}; var FCKPlugin=function(A,B,C){this.Name=A;this.BasePath=C?C:FCKConfig.PluginsPath;this.Path=this.BasePath+A+'/';if (!B||B.length==0) this.AvailableLangs=[];else this.AvailableLangs=B.split(',');};FCKPlugin.prototype.Load=function(){if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.IndexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];LoadScript(this.Path+'lang/'+A+'.js');};LoadScript(this.Path+'fckplugin.js');}; var FCKPlugins=FCK.Plugins={};FCKPlugins.ItemsCount=0;FCKPlugins.Items={};FCKPlugins.Load=function(){var A=FCKPlugins.Items;for (var i=0;i. var headInnerHtml = html.match( /([\s\S]*)<\/head>/i )[1] ; if ( headInnerHtml && headInnerHtml.length > 0 ) { // Inject the HTML inside a
    . // Do that before getDocumentHead because WebKit moves // elements to the at this point. var div = doc.createElement( 'div' ) ; div.innerHTML = headInnerHtml ; // Move the
    nodes to . FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ; } doc.body.innerHTML = html.match( /([\s\S]*)<\/body>/i )[1] ; //prevent clicking on hyperlinks and navigating away doc.addEventListener('click', function( ev ) { ev.preventDefault() ; ev.stopPropagation() ; }, true ) ; }, Panel_Contructor : function( doc, baseLocation ) { var head = getDocumentHead( doc ) ; // Set the href. head.appendChild( doc.createElement('base') ).href = baseLocation ; doc.body.style.margin = '0px' ; doc.body.style.padding = '0px' ; }, ToolbarSet_GetOutElement : function( win, outMatch ) { var toolbarTarget = win.parent ; var targetWindowParts = outMatch[1].split( '.' ) ; while ( targetWindowParts.length > 0 ) { var part = targetWindowParts.shift() ; if ( part.length > 0 ) toolbarTarget = toolbarTarget[ part ] ; } toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ; }, ToolbarSet_InitOutFrame : function( doc ) { var head = getDocumentHead( doc ) ; head.appendChild( doc.createElement('base') ).href = window.document.location ; var targetWindow = doc.defaultView; targetWindow.adjust = function() { targetWindow.frameElement.height = doc.body.scrollHeight; } ; targetWindow.onresize = targetWindow.adjust ; targetWindow.setTimeout( targetWindow.adjust, 0 ) ; doc.body.style.overflow = 'hidden'; doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ; } } ; })(); /* * ### Overrides */ ( function() { // Save references for override reuse. var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ; var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ; var _Original_FCK_StartEditor = FCK.StartEditor ; FCKPanel_Window_OnFocus = function( e, panel ) { // Call the original implementation. _Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ; if ( panel._focusTimer ) clearTimeout( panel._focusTimer ) ; } FCKPanel_Window_OnBlur = function( e, panel ) { // Delay the execution of the original function. panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ; } FCK.StartEditor = function() { // Force pointing to the CSS files instead of using the inline CSS cached styles. window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; _Original_FCK_StartEditor.apply( this, arguments ) ; } })(); } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/fckeditor.html0000755000175000017500000003022411471562006027133 0ustar achapmanachapman FCKeditor
    zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/0000755000175000017500000000000011473031633025056 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/fck_showtableborders_gecko.css0000755000175000017500000000324011471562005033136 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This CSS Style Sheet defines the rules to show table borders on Gecko. */ /* ######### * WARNING * ######### * When changing this file, the minified version of it must be updated in the * fckeditor.html file (see FCK_ShowTableBordersCSS). */ /* For tables with the "border" attribute set to "0" */ 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 ; } /* For tables with no "border" attribute set */ 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 { border: #d3d3d3 1px dotted ; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/fck_editorarea.css0000755000175000017500000000513011471562005030534 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is the default CSS file used by the editor area. It defines the * initial font of the editor and background color. * * A user can configure the editor to use another CSS file. Just change * the value of the FCKConfig.EditorAreaCSS key in the configuration * file. */ /** * The "body" styles should match your editor web site, mainly regarding * background color and font family and size. */ body { background-color: #ffffff; padding: 5px 5px 5px 5px; margin: 0px; } body, td { font-family: Arial, Verdana, sans-serif; font-size: 12px; } a[href] { color: -moz-hyperlinktext !important; /* For Firefox... mark as important, otherwise it becomes black */ text-decoration: -moz-anchor-decoration; /* For Firefox 3, otherwise no underline will be used */ } /** * Just uncomment the following block if you want to avoid spaces between * paragraphs. Remember to apply the same style in your output front end page. */ /* p, ul, li { margin-top: 0px; margin-bottom: 0px; } */ /** * Uncomment the following block, or only selected lines if appropriate, * if you have some style items that would break the styles combo box. * You can also write other CSS overrides inside the style block below * as needed and they will be applied to inside the style combo only. */ /* .SC_Item *, .SC_ItemSelected * { margin: 0px !important; padding: 0px !important; text-indent: 0px !important; clip: auto !important; position: static !important; } */ /** * The following are some sample styles used in the "Styles" toolbar command. * You should instead remove them, and include the styles used by the site * you are using the editor in. */ .Bold { font-weight: bold; } .Title { font-weight: bold; font-size: 18px; color: #cc3300; } .Code { border: #8b4513 1px solid; padding-right: 5px; padding-left: 5px; color: #000066; font-family: 'Courier New' , Monospace; background-color: #ff9933; } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/0000755000175000017500000000000011473031633026323 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_pre.png0000755000175000017500000000033711471562005030777 0ustar achapmanachapman‰PNG  IHDRóºœbKGDÿÿÿ ½§“ pHYs  šœtIME×*n)btEXtCommentCreated with The GIMPïd%nCIDATxÚc`tŒè ÿ‘،Ĉ!‹“ Ð,ùOŒ9€iH5ÅÁŒ+ñù j&CƒÝ×0tEXtCommentCreated with The GIMPïd%n@IDATxÚc`þãb#óéb1.ÇP˜ˆt #µ=ÈBÈ×ÇÔv)¢f3‘ 4OÙ£`P(1*ý"VÁIEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_p.png0000755000175000017500000000031511471562005030444 0ustar achapmanachapman‰PNG  IHDRóºœbKGDÿÿÿ ½§“ pHYs  šœtIME×* ©X*tEXtCommentCreated with The GIMPïd%n1IDATxÚc`tŒè ÿÑøŒtq ‹ÿÓ¦Ѡ¦UК fÍØ£`ØË†Ïs0{IEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/fck_plugin.gif0000755000175000017500000000325511471562005031143 0ustar achapmanachapmanGIF89a00ç½ "$.467:=>DLNOPSWXY\]^_bdefghijklmopqrstvyz|}~€‚ƒ„…†ˆ‰‹ŒŽ‘’“”•–—˜™›œžŸ ¡¢£¤¥¦§¨ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúüýþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!þCreated with GIMP!ù ÿ,00þÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£ÇŒˆy ä $H @Á‚ ˆ¤À‹*R 8qÂĆ€QÇ"L LéP€&—0\²X¡"e +(È СF”6‰J+ šX¸`™ÅI“&,&0P@3„EÊêÔ«/g'¨‚EÊ“%I°€.A ò ztÉS©V^K …Ê%F„!!8†UâDj•—4¡Dar$H8-h BŸBŒÂŽRÕ¶à'P” ñ¡ÃÆ P@@qøZ4IÓX.Æ7þ7y’$‡Ž1fäè1ÄF‹AȰ¡Ãgwï©ÀÓÿÀ€2РƒD,^˜1_}÷}gÜ$ðC0‘ÓÁ?Á„Y€q†uô±]wc©q€@ðñÐU=ü0DNP¡Eh¼a‡…€ÅÉ(«¨AŒÀ -@„á@QDLDqEd¨^9RI'¤°2Ë%7á /¼˜°›D$¡DQT¡…ˆóíH"\ò‰)­Ô² ›„E '…Z|Ñ%w˜¸ˆ$|¡òÊ-„Ä¡QP…Xlá(nСG ‡ˆy¤*±à²Ë'þ¬ZBi ÀXSÿ Â\xF¤Ê‡ÛE‚ÉŸ­Ð¢‹ÓÑÁË.8¶QD±ÛLˆ1Fg¨á†°} ’È#«Ë-{€!»œq€´ pÇ h ‘ÆmÀA}òÕ$™üif.d–ÀS6@y¨aƒoT GtÜ¡‡ƒ|%É%Œ’ʹ¼$<†ðÆ; }èÇvØq‡ Là@üÈ%œˆ‚Š+´äR²fˆ!ƒò‡}ôQBöbÀ \Š)¬È‚ ›&  #ŠbH!„LÑ0A†ÂJ,˜rM´”–L‰#,²ˆö€x#±Ø¢ ¡]oƉ&—TBÉ$“8âAœ „À0ôý7àoO8 (žp²‰&™h¢Éoþ3%²Ü29å4¥rJ)£ˆ ( |¢F舲u¦nÓ´À…(£,ÀÒ& ÀKĶ`½÷®wòÊäüóÐG/ýôÔWoýõØ;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_div.png0000755000175000017500000000034511471562005030772 0ustar achapmanachapman‰PNG  IHDRóºœbKGDÿÿÿ ½§“ pHYs  šœtIME×%ØetEXtCommentCreated with The GIMPïd%nIIDATxÚc`þÃ0º82.N*`Âa9#ÿ§•™øžf–3‘ŒÈÁÞÐÐÀH‹éÔdûˆê©šÒÔ< FÍ Ö1¹þLIEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/fck_anchor.gif0000755000175000017500000000027011471562005031111 0ustar achapmanachapmanGIF89a³ –––€€ÿÿ™ÿÿÿÌÿ™™ÿÿÌ33ÌÌÿÿÿ!ù ,e0IiÐA3#Ãë(‡ Å‘l”1‰r‚…¸d ÌF}á°ÃÎêÙ€:žïöJÞÆ‹€@îFÄ’„8/̬íPÚUàÒÁKžˆ•ÃzU-O6µ•¡skö]rB‚„;zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_h4.png0000755000175000017500000000034511471562005030523 0ustar achapmanachapman‰PNG  IHDRóºœbKGDÿÿÿ ½§“ pHYs  šœtIME×- ;‹kØtEXtCommentCreated with The GIMPïd%nIIDATxÚc`þccÃøèbä&RÔÐÐÀH-2 TȲ nZø§Ñ-BŽ_jÅ3щ‹š–2æãQ0ì%—&„õƒ&"IEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_blockquote.png0000755000175000017500000000044511471562005032361 0ustar achapmanachapman‰PNG  IHDR7@òW†bKGDÿÿÿ ½§“ pHYs  šœtIME× =á;tEXtCommentCreated with The GIMPïd%n‰IDATxÚíTÑÀ0¤Ù‡ûs{j&‚té,¶¸'®´×¢F9 &ˆˆ…“›v'y+WÛÑ9+±’“¾Öä‰fÍE~”k­ÝÉôYq#«%t5Í—LÆác·´…¡uïÕ­>Þ©âS{-œƒo´%æ·\ávKo$¢Xk¿#U¡ºéüý% '^òª|›ñ–IEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/images/block_h6.png0000755000175000017500000000033011471562005030517 0ustar achapmanachapman‰PNG  IHDRóºœbKGDÿÿÿ ½§“ pHYs  šœtIME×-9ó\:XtEXtCommentCreated with The GIMPïd%nõ`<ÿ_þrPû>îhHÿŒpÿf@ÿ3ÿÿÿÿÿÿ!ù6,#(ÿ@›pH,‡P…Æ<:ŸÃ‰@@H4¨¶i,jàZ »ÝR a𸬥¦Ãk¶³CxÃÉòb¨N3 xyC4o„E/3o 4ŽG†i•–E‘i3F4ic%¤D( o3L±«2vw«4¶jƒ„Ÿ»¼¤)_ÀqŽoÌÌX™±Ô½l}`«DÒi#ÞB' a 0å6Ú5&¤*Kð5ܸ ºÊhˆÀuÈŽ< Þ0½)p€D9…pŒzXP ,„ìhÀ@솰h±ÂC£(S–©Æ F<ÂÂ Ö !Mpº<@ÄåÌt!˜â’€ `æ´ñ’†P¾,r@2 œÀPˆTMÌ+õ'NL A0ÃãM&c4½9Ä'Na‘0D.SIDATxÚc`þcccãS˜Èq½-f¤¦Å,ôðÑ>nhh`¤¶Éê³üôˆ†Q0 (õ. <)ÍñIEND®B`‚zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/behaviors/0000755000175000017500000000000011473031633027040 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/behaviors/showtableborders.htc0000755000175000017500000000146611471562005033123 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/behaviors/disablehandles.htc0000755000175000017500000000035411471562005032507 0ustar achapmanachapman zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/css/fck_internal.css0000755000175000017500000001006111471562005030230 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This CSS Style Sheet defines rules used by the editor for its internal use. */ /* ######### * WARNING * ######### * When changing this file, the minified version of it must be updated in the * fckeditor.html file (see FCK_InternalCSS). */ /* Fix to allow putting the caret at the end of the content in Firefox if clicking below the content. */ html { min-height: 100%; } table.FCK__ShowTableBorders, table.FCK__ShowTableBorders td, table.FCK__ShowTableBorders th { border: #d3d3d3 1px solid; } form { border: 1px dotted #FF0000; 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__UnknownObject { border: #a9a9a9 1px solid; background-position: center center; background-image: url(images/fck_plugin.gif); background-repeat: no-repeat; width: 80px; height: 80px; } /* Empty anchors images */ .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; } /* Anchors with content */ .FCK__AnchorC { border: 1px dotted #00F; background-position: 1px center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; padding-left: 18px; } /* Any anchor for non-IE, if we combine it with the previous rule IE ignores all. */ 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: #999999 1px dotted; border-bottom: #999999 1px dotted; border-right: 0px; border-left: 0px; height: 5px; } /* Hidden fields */ .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); } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/0000755000175000017500000000000011473031633025725 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/internals/0000755000175000017500000000000011473031633027724 5ustar achapmanachapman././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootzope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/internals/fckxhtml_gecko.jszope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/internals/fckxhtml_gecko.js0000755000175000017500000000627411471562004033265 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKXHtml object, responsible for the XHTML operations. * Gecko specific. */ FCKXHtml._GetMainXmlString = function() { return ( new XMLSerializer() ).serializeToString( this.MainNode ) ; } FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node ) { var aAttributes = htmlNode.attributes ; for ( var n = 0 ; n < aAttributes.length ; n++ ) { var oAttribute = aAttributes[n] ; if ( oAttribute.specified ) { var sAttName = oAttribute.nodeName.toLowerCase() ; var sAttValue ; // Ignore any attribute starting with "_fck". if ( sAttName.StartsWith( '_fck' ) ) continue ; // There is a bug in Mozilla that returns '_moz_xxx' attributes as specified. else if ( sAttName.indexOf( '_moz' ) == 0 ) continue ; // There are one cases (on Gecko) when the oAttribute.nodeValue must be used: // - for the "class" attribute else if ( sAttName == 'class' ) { sAttValue = oAttribute.nodeValue.replace( FCKRegexLib.FCK_Class, '' ) ; if ( sAttValue.length == 0 ) continue ; } // XHTML doens't support attribute minimization like "CHECKED". It must be transformed to checked="checked". else if ( oAttribute.nodeValue === true ) sAttValue = sAttName ; else sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined. this._AppendAttribute( node, sAttName, sAttValue ) ; } } } if ( FCKBrowserInfo.IsOpera ) { // Opera moves the element outside head (#1166). // Save a reference to the XML node, so we can use it for // orphan s. FCKXHtml.TagProcessors['head'] = function( node, htmlNode ) { FCKXHtml.XML._HeadElement = node ; node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; return node ; } // Check whether a element is outside , and move it to the // proper place. FCKXHtml.TagProcessors['meta'] = function( node, htmlNode, xmlNode ) { if ( htmlNode.parentNode.nodeName.toLowerCase() != 'head' ) { var headElement = FCKXHtml.XML._HeadElement ; if ( headElement && xmlNode != headElement ) { delete htmlNode._fckxhtmljob ; FCKXHtml._AppendNode( headElement, htmlNode ) ; return null ; } } return node ; } } if ( FCKBrowserInfo.IsGecko ) { // #2162, some Firefox extensions might add references to internal links FCKXHtml.TagProcessors['link'] = function( node, htmlNode ) { if ( htmlNode.href.substr(0, 9).toLowerCase() == 'chrome://' ) return false ; return node ; } } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/internals/fck_ie.js0000755000175000017500000003137411471562004031514 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Creation and initialization of the "FCK" object. This is the main * object that represents an editor instance. * (IE specific implementations) */ FCK.Description = "FCKeditor for Internet Explorer 5.5+" ; FCK._GetBehaviorsStyle = function() { if ( !FCK._BehaviorsStyle ) { var sBasePath = FCKConfig.BasePath ; var sTableBehavior = '' ; var sStyle ; // The behaviors should be pointed using the BasePath to avoid security // errors when using a different BaseHref. sStyle = '' ; FCK._BehaviorsStyle = sStyle ; } return FCK._BehaviorsStyle ; } function Doc_OnMouseUp() { if ( FCK.EditorWindow.event.srcElement.tagName == 'HTML' ) { FCK.Focus() ; FCK.EditorWindow.event.cancelBubble = true ; FCK.EditorWindow.event.returnValue = false ; } } function Doc_OnPaste() { var body = FCK.EditorDocument.body ; body.detachEvent( 'onpaste', Doc_OnPaste ) ; var ret = FCK.Paste( !FCKConfig.ForcePasteAsPlainText && !FCKConfig.AutoDetectPasteFromWord ) ; body.attachEvent( 'onpaste', Doc_OnPaste ) ; return ret ; } function Doc_OnDblClick() { FCK.OnDoubleClick( FCK.EditorWindow.event.srcElement ) ; FCK.EditorWindow.event.cancelBubble = true ; } function Doc_OnSelectionChange() { // Don't fire the event if no document is loaded. if ( !FCK.IsSelectionChangeLocked && FCK.EditorDocument ) FCK.Events.FireEvent( "OnSelectionChange" ) ; } function Doc_OnDrop() { if ( FCK.MouseDownFlag ) { FCK.MouseDownFlag = false ; return ; } if ( FCKConfig.ForcePasteAsPlainText ) { var evt = FCK.EditorWindow.event ; if ( FCK._CheckIsPastingEnabled() || FCKConfig.ShowDropDialog ) FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ; evt.returnValue = false ; evt.cancelBubble = true ; } } FCK.InitializeBehaviors = function( dontReturn ) { // Set the focus to the editable area when clicking in the document area. // TODO: The cursor must be positioned at the end. this.EditorDocument.attachEvent( 'onmouseup', Doc_OnMouseUp ) ; // Intercept pasting operations this.EditorDocument.body.attachEvent( 'onpaste', Doc_OnPaste ) ; // Intercept drop operations this.EditorDocument.body.attachEvent( 'ondrop', Doc_OnDrop ) ; // Reset the context menu. FCK.ContextMenu._InnerContextMenu.AttachToElement( FCK.EditorDocument.body ) ; this.EditorDocument.attachEvent("onkeydown", FCK._KeyDownListener ) ; this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ; this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save() ; } ) ; // Catch cursor selection changes. this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ; FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', Doc_OnMouseDown ) ; } FCK.InsertHtml = function( html ) { html = FCKConfig.ProtectedSource.Protect( html ) ; html = FCK.ProtectEvents( html ) ; html = FCK.ProtectUrls( html ) ; html = FCK.ProtectTags( html ) ; // FCK.Focus() ; FCKSelection.Restore() ; FCK.EditorWindow.focus() ; FCKUndo.SaveUndoStep() ; // Gets the actual selection. var oSel = FCKSelection.GetSelection() ; // Deletes the actual selection contents. if ( oSel.type.toLowerCase() == 'control' ) oSel.clear() ; // Using the following trick, any comment in the beginning of the HTML will // be preserved. html = '' + html ; // Insert the HTML. oSel.createRange().pasteHTML( html ) ; // Remove the fake node FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ; FCKDocumentProcessor.Process( FCK.EditorDocument ) ; // For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call. this.Events.FireEvent( "OnSelectionChange" ) ; } FCK.SetInnerHtml = function( html ) // IE Only { var oDoc = FCK.EditorDocument ; // Using the following trick, any comment in the beginning of the HTML will // be preserved. oDoc.body.innerHTML = '
     
    ' + html ; oDoc.getElementById('__fakeFCKRemove__').removeNode( true ) ; } function FCK_PreloadImages() { var oPreloader = new FCKImagePreloader() ; // Add the configured images. oPreloader.AddImages( FCKConfig.PreloadImages ) ; // Add the skin icons strip. oPreloader.AddImages( FCKConfig.SkinPath + 'fck_strip.gif' ) ; oPreloader.OnComplete = LoadToolbarSetup ; oPreloader.Start() ; } // Disable the context menu in the editor (outside the editing area). function Document_OnContextMenu() { return ( event.srcElement._FCKShowContextMenu == true ) ; } document.oncontextmenu = Document_OnContextMenu ; function FCK_Cleanup() { this.LinkedField = null ; this.EditorWindow = null ; this.EditorDocument = null ; } FCK._ExecPaste = function() { // As we call ExecuteNamedCommand('Paste'), it would enter in a loop. So, let's use a semaphore. if ( FCK._PasteIsRunning ) return true ; if ( FCKConfig.ForcePasteAsPlainText ) { FCK.PasteAsPlainText() ; return false ; } var sHTML = FCK._CheckIsPastingEnabled( true ) ; if ( sHTML === false ) FCKTools.RunFunction( FCKDialog.OpenDialog, FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ; else { if ( FCKConfig.AutoDetectPasteFromWord && sHTML.length > 0 ) { var re = /<\w[^>]*(( class="?MsoNormal"?)|(="mso-))/gi ; if ( re.test( sHTML ) ) { if ( confirm( FCKLang.PasteWordConfirm ) ) { FCK.PasteFromWord() ; return false ; } } } // Instead of inserting the retrieved HTML, let's leave the OS work for us, // by calling FCK.ExecuteNamedCommand( 'Paste' ). It could give better results. // Enable the semaphore to avoid a loop. FCK._PasteIsRunning = true ; FCK.ExecuteNamedCommand( 'Paste' ) ; // Removes the semaphore. delete FCK._PasteIsRunning ; } // Let's always make a custom implementation (return false), otherwise // the new Keyboard Handler may conflict with this code, and the CTRL+V code // could result in a simple "V" being pasted. return false ; } FCK.PasteAsPlainText = function( forceText ) { if ( !FCK._CheckIsPastingEnabled() ) { FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ; return ; } // Get the data available in the clipboard in text format. var sText = null ; if ( ! forceText ) sText = clipboardData.getData("Text") ; else sText = forceText ; if ( sText && sText.length > 0 ) { // Replace the carriage returns with
    sText = FCKTools.HTMLEncode( sText ) ; sText = FCKTools.ProcessLineBreaks( window, FCKConfig, sText ) ; var closeTagIndex = sText.search( '

    ' ) ; var startTagIndex = sText.search( '

    ' ) ; if ( ( closeTagIndex != -1 && startTagIndex != -1 && closeTagIndex < startTagIndex ) || ( closeTagIndex != -1 && startTagIndex == -1 ) ) { var prefix = sText.substr( 0, closeTagIndex ) ; sText = sText.substr( closeTagIndex + 4 ) ; this.InsertHtml( prefix ) ; } // Insert the resulting data in the editor. FCKUndo.SaveLocked = true ; this.InsertHtml( sText ) ; FCKUndo.SaveLocked = false ; } } FCK._CheckIsPastingEnabled = function( returnContents ) { // The following seams to be the only reliable way to check is script // pasting operations are enabled in the security settings of IE6 and IE7. // It adds a little bit of overhead to the check, but so far that's the // only way, mainly because of IE7. FCK._PasteIsEnabled = false ; document.body.attachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; // The execCommand in GetClipboardHTML will fire the "onpaste", only if the // security settings are enabled. var oReturn = FCK.GetClipboardHTML() ; document.body.detachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; if ( FCK._PasteIsEnabled ) { if ( !returnContents ) oReturn = true ; } else oReturn = false ; delete FCK._PasteIsEnabled ; return oReturn ; } function FCK_CheckPasting_Listener() { FCK._PasteIsEnabled = true ; } FCK.GetClipboardHTML = function() { var oDiv = document.getElementById( '___FCKHiddenDiv' ) ; if ( !oDiv ) { oDiv = document.createElement( 'DIV' ) ; oDiv.id = '___FCKHiddenDiv' ; var oDivStyle = oDiv.style ; oDivStyle.position = 'absolute' ; oDivStyle.visibility = oDivStyle.overflow = 'hidden' ; oDivStyle.width = oDivStyle.height = 1 ; document.body.appendChild( oDiv ) ; } oDiv.innerHTML = '' ; var oTextRange = document.body.createTextRange() ; oTextRange.moveToElementText( oDiv ) ; oTextRange.execCommand( 'Paste' ) ; var sData = oDiv.innerHTML ; oDiv.innerHTML = '' ; return sData ; } FCK.CreateLink = function( url, noUndo ) { // Creates the array that will be returned. It contains one or more created links (see #220). var aCreatedLinks = new Array() ; // Remove any existing link in the selection. FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; if ( url.length > 0 ) { // If there are several images, and you try to link each one, all the images get inside the link: // -> -> due to the call to 'CreateLink' (bug in IE) if (FCKSelection.GetType() == 'Control') { // Create a link var oLink = this.EditorDocument.createElement( 'A' ) ; oLink.href = url ; // Get the selected object var oControl = FCKSelection.GetSelectedElement() ; // Put the link just before the object oControl.parentNode.insertBefore(oLink, oControl) ; // Move the object inside the link oControl.parentNode.removeChild( oControl ) ; oLink.appendChild( oControl ) ; return [ oLink ] ; } // Generate a temporary name for the link. var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ; // Use the internal "CreateLink" command to create the link. FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl, false, !!noUndo ) ; // Look for the just create link. var oLinks = this.EditorDocument.links ; for ( i = 0 ; i < oLinks.length ; i++ ) { var oLink = oLinks[i] ; // Check it this a newly created link. // getAttribute must be used. oLink.url may cause problems with IE7 (#555). if ( oLink.getAttribute( 'href', 2 ) == sTempUrl ) { var sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). oLink.href = url ; oLink.innerHTML = sInnerHtml ; // Restore the innerHTML. // If the last child is a
    move it outside the link or it // will be too easy to select this link again #388. var oLastChild = oLink.lastChild ; if ( oLastChild && oLastChild.nodeName == 'BR' ) { // Move the BR after the link. FCKDomTools.InsertAfterNode( oLink, oLink.removeChild( oLastChild ) ) ; } aCreatedLinks.push( oLink ) ; } } } return aCreatedLinks ; } function _FCK_RemoveDisabledAtt() { this.removeAttribute( 'disabled' ) ; } function Doc_OnMouseDown( evt ) { var e = evt.srcElement ; // Radio buttons and checkboxes should not be allowed to be triggered in IE // in editable mode. Otherwise the whole browser window may be locked by // the buttons. (#1782) if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled ) { e.disabled = true ; FCKTools.SetTimeout( _FCK_RemoveDisabledAtt, 1, e ) ; } } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/editor/_source/internals/fckdialog.js0000755000175000017500000001611711471562004032215 0ustar achapmanachapman/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Dialog windows operations. */ var FCKDialog = ( function() { var topDialog ; var baseZIndex ; var cover ; // The document that holds the dialog. var topWindow = window.parent ; while ( topWindow.parent && topWindow.parent != topWindow ) { try { if ( topWindow.parent.document.domain != document.domain ) break ; if ( topWindow.parent.document.getElementsByTagName( 'frameset' ).length > 0 ) break ; } catch ( e ) { break ; } topWindow = topWindow.parent ; } var topDocument = topWindow.document ; var getZIndex = function() { if ( !baseZIndex ) baseZIndex = FCKConfig.FloatingPanelsZIndex + 999 ; return ++baseZIndex ; } // TODO : This logic is not actually working when reducing the window, only // when enlarging it. var resizeHandler = function() { if ( !cover ) return ; var relElement = FCKTools.IsStrictMode( topDocument ) ? topDocument.documentElement : topDocument.body ; FCKDomTools.SetElementStyles( cover, { 'width' : Math.max( relElement.scrollWidth, relElement.clientWidth, topDocument.scrollWidth || 0 ) - 1 + 'px', 'height' : Math.max( relElement.scrollHeight, relElement.clientHeight, topDocument.scrollHeight || 0 ) - 1 + 'px' } ) ; } return { /** * Opens a dialog window using the standard dialog template. */ OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable ) { if ( !topDialog ) this.DisplayMainCover() ; // Setup the dialog info to be passed to the dialog. var dialogInfo = { Title : dialogTitle, Page : dialogPage, Editor : window, CustomValue : customValue, // Optional TopWindow : topWindow } FCK.ToolbarSet.CurrentInstance.Selection.Save( true ) ; // Calculate the dialog position, centering it on the screen. var viewSize = FCKTools.GetViewPaneSize( topWindow ) ; var scrollPosition = { 'X' : 0, 'Y' : 0 } ; var useAbsolutePosition = FCKBrowserInfo.IsIE && ( !FCKBrowserInfo.IsIE7 || !FCKTools.IsStrictMode( topWindow.document ) ) ; if ( useAbsolutePosition ) scrollPosition = FCKTools.GetScrollPosition( topWindow ) ; var iTop = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ; var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 ) / 2, 0 ) ; // Setup the IFRAME that will hold the dialog. var dialog = topDocument.createElement( 'iframe' ) ; FCKTools.ResetStyles( dialog ) ; dialog.src = FCKConfig.BasePath + 'fckdialog.html' ; // Dummy URL for testing whether the code in fckdialog.js alone leaks memory. // dialog.src = 'about:blank'; dialog.frameBorder = 0 ; dialog.allowTransparency = true ; FCKDomTools.SetElementStyles( dialog, { 'position' : ( useAbsolutePosition ) ? 'absolute' : 'fixed', 'top' : iTop + 'px', 'left' : iLeft + 'px', 'width' : width + 'px', 'height' : height + 'px', 'zIndex' : getZIndex() } ) ; // Save the dialog info to be used by the dialog page once loaded. dialog._DialogArguments = dialogInfo ; // Append the IFRAME to the target document. topDocument.body.appendChild( dialog ) ; // Keep record of the dialog's parent/child relationships. dialog._ParentDialog = topDialog ; topDialog = dialog ; }, /** * (For internal use) * Called when the top dialog is closed. */ OnDialogClose : function( dialogWindow ) { var dialog = dialogWindow.frameElement ; FCKDomTools.RemoveNode( dialog ) ; if ( dialog._ParentDialog ) // Nested Dialog. { topDialog = dialog._ParentDialog ; dialog._ParentDialog.contentWindow.SetEnabled( true ) ; } else // First Dialog. { // Set the Focus in the browser, so the "OnBlur" event is not // fired. In IE, there is no need to do that because the dialog // already moved the selection to the editing area before // closing (EnsureSelection). Also, the Focus() call here // causes memory leak on IE7 (weird). if ( !FCKBrowserInfo.IsIE ) FCK.Focus() ; this.HideMainCover() ; // Bug #1918: Assigning topDialog = null directly causes IE6 to crash. setTimeout( function(){ topDialog = null ; }, 0 ) ; // Release the previously saved selection. FCK.ToolbarSet.CurrentInstance.Selection.Release() ; } }, DisplayMainCover : function() { // Setup the DIV that will be used to cover. cover = topDocument.createElement( 'div' ) ; FCKTools.ResetStyles( cover ) ; FCKDomTools.SetElementStyles( cover, { 'position' : 'absolute', 'zIndex' : getZIndex(), 'top' : '0px', 'left' : '0px', 'backgroundColor' : FCKConfig.BackgroundBlockerColor } ) ; FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; // For IE6-, we need to fill the cover with a transparent IFRAME, // to properly block tag. FCKXHtml.TagProcessors['input'] = function( node, htmlNode ) { if ( htmlNode.name ) FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ; if ( htmlNode.value && !node.attributes.getNamedItem( 'value' ) ) FCKXHtml._AppendAttribute( node, 'value', htmlNode.value ) ; if ( !node.attributes.getNamedItem( 'type' ) ) FCKXHtml._AppendAttribute( node, 'type', 'text' ) ; return node ; } FCKXHtml.TagProcessors['label'] = function( node, htmlNode ) { if ( htmlNode.htmlFor.length > 0 ) FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ; node = FCKXHtml._AppendChildNodes( node, htmlNode ) ; return node ; } // Fix behavior for IE, it doesn't read back the .name on newly created maps FCKXHtml.TagProcessors['map'] = function( node, htmlNode ) { if ( ! node.attributes.getNamedItem( 'name' ) ) { var name = htmlNode.name ; if ( name ) FCKXHtml._AppendAttribute( node, 'name', name ) ; } node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; return node ; } FCKXHtml.TagProcessors['meta'] = function( node, htmlNode ) { var oHttpEquiv = node.attributes.getNamedItem( 'http-equiv' ) ; if ( oHttpEquiv == null || oHttpEquiv.value.length == 0 ) { // Get the http-equiv value from the outerHTML. var sHttpEquiv = htmlNode.outerHTML.match( FCKRegexLib.MetaHttpEquiv ) ; if ( sHttpEquiv ) { sHttpEquiv = sHttpEquiv[1] ; FCKXHtml._AppendAttribute( node, 'http-equiv', sHttpEquiv ) ; } } return node ; } // IE ignores the "SELECTED" attribute so we must add it manually. FCKXHtml.TagProcessors['option'] = function( node, htmlNode ) { if ( htmlNode.selected && !node.attributes.getNamedItem( 'selected' ) ) FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ; node = FCKXHtml._AppendChildNodes( node, htmlNode ) ; return node ; } // IE doens't hold the name attribute as an attribute for the " % ( self.InstanceName, WidthCSS, HeightCSS, HtmlValue ) return Html def IsCompatible(self): if (os.environ.has_key("HTTP_USER_AGENT")): sAgent = os.environ.get("HTTP_USER_AGENT", "") else: sAgent = "" if (sAgent.find("MSIE") >= 0) and (sAgent.find("mac") < 0) and (sAgent.find("Opera") < 0): i = sAgent.find("MSIE") iVersion = float(sAgent[i+5:i+5+3]) if (iVersion >= 5.5): return True return False elif (sAgent.find("Gecko/") >= 0): i = sAgent.find("Gecko/") iVersion = int(sAgent[i+6:i+6+8]) if (iVersion >= 20030210): return True return False elif (sAgent.find("Opera/") >= 0): i = sAgent.find("Opera/") iVersion = float(sAgent[i+6:i+6+4]) if (iVersion >= 9.5): return True return False elif (sAgent.find("AppleWebKit/") >= 0): p = re.compile('AppleWebKit\/(\d+)', re.IGNORECASE) m = p.search(sAgent) if (m.group(1) >= 522): return True return False else: return False def GetConfigFieldString(self): sParams = "" bFirst = True for sKey in self.Config.keys(): sValue = self.Config[sKey] if (not bFirst): sParams += "&" else: bFirst = False if (sValue): k = escape(sKey) v = escape(sValue) if (sValue == "true"): sParams += "%s=true" % k elif (sValue == "false"): sParams += "%s=false" % k else: sParams += "%s=%s" % (k, v) return sParams zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor_php5.php0000755000175000017500000001401411471562006026423 0ustar achapmanachapman= 5.5) ; } else if ( strpos($sAgent, 'Gecko/') !== false ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; return ($iVersion >= 20030210) ; } else if ( strpos($sAgent, 'Opera/') !== false ) { $fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ; return ($fVersion >= 9.5) ; } else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) ) { $iVersion = $matches[1] ; return ( $matches[1] >= 522 ) ; } else return false ; } class FCKeditor { /** * Name of the FCKeditor instance. * * @access protected * @var string */ public $InstanceName ; /** * Path to FCKeditor relative to the document root. * * @var string */ public $BasePath ; /** * Width of the FCKeditor. * Examples: 100%, 600 * * @var mixed */ public $Width ; /** * Height of the FCKeditor. * Examples: 400, 50% * * @var mixed */ public $Height ; /** * Name of the toolbar to load. * * @var string */ public $ToolbarSet ; /** * Initial value. * * @var string */ public $Value ; /** * This is where additional configuration can be passed. * Example: * $oFCKeditor->Config['EnterMode'] = 'br'; * * @var array */ public $Config ; /** * Main Constructor. * Refer to the _samples/php directory for examples. * * @param string $instanceName */ public function __construct( $instanceName ) { $this->InstanceName = $instanceName ; $this->BasePath = '/fckeditor/' ; $this->Width = '100%' ; $this->Height = '200' ; $this->ToolbarSet = 'Default' ; $this->Value = '' ; $this->Config = array() ; } /** * Display FCKeditor. * */ public function Create() { echo $this->CreateHtml() ; } /** * Return the HTML code required to run FCKeditor. * * @return string */ public function CreateHtml() { $HtmlValue = htmlspecialchars( $this->Value ) ; $Html = '' ; if ( $this->IsCompatible() ) { if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" ) $File = 'fckeditor.original.html' ; else $File = 'fckeditor.html' ; $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ; if ( $this->ToolbarSet != '' ) $Link .= "&Toolbar={$this->ToolbarSet}" ; // Render the linked hidden field. $Html .= "InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ; // Render the configurations hidden field. $Html .= "InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ; // Render the editor IFRAME. $Html .= "" ; } else { if ( strpos( $this->Width, '%' ) === false ) $WidthCSS = $this->Width . 'px' ; else $WidthCSS = $this->Width ; if ( strpos( $this->Height, '%' ) === false ) $HeightCSS = $this->Height . 'px' ; else $HeightCSS = $this->Height ; $Html .= "" ; } return $Html ; } /** * Returns true if browser is compatible with FCKeditor. * * @return boolean */ public function IsCompatible() { return FCKeditor_IsCompatibleBrowser() ; } /** * Get settings from Config array as a single string. * * @access protected * @return string */ public function GetConfigFieldString() { $sParams = '' ; $bFirst = true ; foreach ( $this->Config as $sKey => $sValue ) { if ( $bFirst == false ) $sParams .= '&' ; else $bFirst = false ; if ( $sValue === true ) $sParams .= $this->EncodeConfig( $sKey ) . '=true' ; else if ( $sValue === false ) $sParams .= $this->EncodeConfig( $sKey ) . '=false' ; else $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ; } return $sParams ; } /** * Encode characters that may break the configuration string * generated by GetConfigFieldString(). * * @access protected * @param string $valueToEncode * @return string */ public function EncodeConfig( $valueToEncode ) { $chars = array( '&' => '%26', '=' => '%3D', '"' => '%22' ) ; return strtr( $valueToEncode, $chars ) ; } } zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/_upgrade.html0000755000175000017500000000251711471562006025465 0ustar achapmanachapman FCKeditor - Upgrade

    FCKeditor Upgrade

    Please check the following URL for notes regarding upgrade:
    http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Installation/Upgrading

    zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.cfm0000755000175000017500000001556011471562006025454 0ustar achapmanachapman if( attributes.checkBrowser ) { isCompatibleBrowser = FCKeditor_IsCompatibleBrowser(); } 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,ToolbarComboPreviewCSS,DocType"; lConfigKeys = lConfigKeys & ",BaseHref,FullPage,Debug,AllowQueryStringDebug,SkinPath"; lConfigKeys = lConfigKeys & ",PreloadImages,PluginsPath,AutoDetectLanguage,DefaultLanguage,ContentLangDirection"; lConfigKeys = lConfigKeys & ",ProcessHTMLEntities,IncludeLatinEntities,IncludeGreekEntities,ProcessNumericEntities,AdditionalNumericEntities"; lConfigKeys = lConfigKeys & ",FillEmptyBlocks,FormatSource,FormatOutput,FormatIndentator"; lConfigKeys = lConfigKeys & ",StartupFocus,ForcePasteAsPlainText,AutoDetectPasteFromWord,ForceSimpleAmpersand"; lConfigKeys = lConfigKeys & ",TabSpaces,ShowBorders,SourcePopup,ToolbarStartExpanded,ToolbarCanCollapse"; lConfigKeys = lConfigKeys & ",IgnoreEmptyParagraphValue,FloatingPanelsZIndex,TemplateReplaceAll,TemplateReplaceCheckbox"; lConfigKeys = lConfigKeys & ",ToolbarLocation,ToolbarSets,EnterMode,ShiftEnterMode,Keystrokes"; lConfigKeys = lConfigKeys & ",ContextMenu,BrowserContextMenuOnCtrl,FontColors,FontNames,FontSizes"; lConfigKeys = lConfigKeys & ",FontFormats,StylesXmlPath,TemplatesXmlPath,SpellChecker,IeSpellDownloadUrl"; lConfigKeys = lConfigKeys & ",SpellerPagesServerScript,FirefoxSpellChecker,MaxUndoLevels,DisableObjectResizing,DisableFFTableHandles"; lConfigKeys = lConfigKeys & ",LinkDlgHideTarget ,LinkDlgHideAdvanced,ImageDlgHideLink ,ImageDlgHideAdvanced,FlashDlgHideAdvanced"; lConfigKeys = lConfigKeys & ",ProtectedTags,BodyId,BodyClass,DefaultLinkTarget,CleanWordKeepsStructure"; lConfigKeys = lConfigKeys & ",LinkBrowser,LinkBrowserURL,LinkBrowserWindowWidth,LinkBrowserWindowHeight,ImageBrowser"; lConfigKeys = lConfigKeys & ",ImageBrowserURL,ImageBrowserWindowWidth,ImageBrowserWindowHeight,FlashBrowser,FlashBrowserURL"; lConfigKeys = lConfigKeys & ",FlashBrowserWindowWidth ,FlashBrowserWindowHeight,LinkUpload,LinkUploadURL,LinkUploadWindowWidth"; lConfigKeys = lConfigKeys & ",LinkUploadWindowHeight,LinkUploadAllowedExtensions,LinkUploadDeniedExtensions,ImageUpload,ImageUploadURL"; lConfigKeys = lConfigKeys & ",ImageUploadAllowedExtensions,ImageUploadDeniedExtensions,FlashUpload,FlashUploadURL,FlashUploadAllowedExtensions"; lConfigKeys = lConfigKeys & ",FlashUploadDeniedExtensions,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 ); sConfig = sConfig & urlEncodedFormat( fieldName ) & '=' & urlEncodedFormat( 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"; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/license.txt0000755000175000017500000020164311471562006025175 0ustar achapmanachapmanFCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html (See Appendix A) - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html (See Appendix B) - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html (See Appendix C) You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses. Appendix A: The GPL License =========================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix B: The LGPL License ============================ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix C: The MPL License =========================== MOZILLA PUBLIC LICENSE Version 1.1 --------------- 1. Definitions. 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. EXHIBIT A -Mozilla Public License. ``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is ______________________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.asp0000755000175000017500000001455411471562006025474 0ustar achapmanachapman <% Class FCKeditor private sBasePath private sInstanceName private sWidth private sHeight private sToolbarSet private sValue private oConfig Private Sub Class_Initialize() sBasePath = "/fckeditor/" sWidth = "100%" sHeight = "200" sToolbarSet = "Default" sValue = "" Set oConfig = CreateObject("Scripting.Dictionary") End Sub Public Property Let BasePath( basePathValue ) sBasePath = basePathValue End Property Public Property Let InstanceName( instanceNameValue ) sInstanceName = instanceNameValue End Property Public Property Let Width( widthValue ) sWidth = widthValue End Property Public Property Let Height( heightValue ) sHeight = heightValue End Property Public Property Let ToolbarSet( toolbarSetValue ) sToolbarSet = toolbarSetValue End Property Public Property Let Value( newValue ) If ( IsNull( newValue ) OR IsEmpty( newValue ) ) Then sValue = "" Else sValue = newValue End If End Property Public Property Let Config( configKey, configValue ) oConfig.Add configKey, configValue End Property ' Generates the instace of the editor in the HTML output of the page. Public Sub Create( instanceName ) response.write CreateHtml( instanceName ) end Sub ' Returns the html code that must be used to generate an instance of FCKeditor. Public Function CreateHtml( instanceName ) dim html If IsCompatible() Then Dim sFile, sLink If Request.QueryString( "fcksource" ) = "true" Then sFile = "fckeditor.original.html" Else sFile = "fckeditor.html" End If sLink = sBasePath & "editor/" & sFile & "?InstanceName=" + instanceName If (sToolbarSet & "") <> "" Then sLink = sLink + "&Toolbar=" & sToolbarSet End If html = "" ' Render the linked hidden field. html = html & "" ' Render the configurations hidden field. html = html & "" ' Render the editor IFRAME. html = html & "" Else Dim sWidthCSS, sHeightCSS If InStr( sWidth, "%" ) > 0 Then sWidthCSS = sWidth Else sWidthCSS = sWidth & "px" End If If InStr( sHeight, "%" ) > 0 Then sHeightCSS = sHeight Else sHeightCSS = sHeight & "px" End If html = "" End If CreateHtml = html End Function Private Function IsCompatible() IsCompatible = FCKeditor_IsCompatibleBrowser() End Function Private Function GetConfigFieldString() Dim sParams Dim bFirst bFirst = True Dim sKey For Each sKey in oConfig If bFirst = False Then sParams = sParams & "&" Else bFirst = False End If sParams = sParams & EncodeConfig( sKey ) & "=" & EncodeConfig( oConfig(sKey) ) Next GetConfigFieldString = sParams End Function Private Function EncodeConfig( valueToEncode ) ' The locale of the asp server makes the conversion of a boolean to string different to "true" or "false" ' so we must do it manually If vartype(valueToEncode) = vbBoolean then If valueToEncode=True Then EncodeConfig="True" Else EncodeConfig="False" End If Else EncodeConfig = Replace( valueToEncode, "&", "%26" ) EncodeConfig = Replace( EncodeConfig , "=", "%3D" ) EncodeConfig = Replace( EncodeConfig , """", "%22" ) End if End Function End Class ' A function that can be used to check if the current browser is compatible with FCKeditor ' without the need to create an instance of the class. Function FCKeditor_IsCompatibleBrowser() Dim sAgent sAgent = Request.ServerVariables("HTTP_USER_AGENT") Dim iVersion Dim re, Matches If InStr(sAgent, "MSIE") > 0 AND InStr(sAgent, "mac") <= 0 AND InStr(sAgent, "Opera") <= 0 Then iVersion = CInt( FCKeditor_ToNumericFormat( Mid(sAgent, InStr(sAgent, "MSIE") + 5, 3) ) ) FCKeditor_IsCompatibleBrowser = ( iVersion >= 5.5 ) ElseIf InStr(sAgent, "Gecko/") > 0 Then iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) ) FCKeditor_IsCompatibleBrowser = ( iVersion >= 20030210 ) ElseIf InStr(sAgent, "Opera/") > 0 Then iVersion = CSng( FCKeditor_ToNumericFormat( Mid( sAgent, InStr( sAgent, "Opera/" ) + 6, 4 ) ) ) FCKeditor_IsCompatibleBrowser = ( iVersion >= 9.5 ) ElseIf InStr(sAgent, "AppleWebKit/") > 0 Then Set re = new RegExp re.IgnoreCase = true re.global = false re.Pattern = "AppleWebKit/(\d+)" Set Matches = re.Execute(sAgent) FCKeditor_IsCompatibleBrowser = ( re.Replace(Matches.Item(0).Value, "$1") >= 522 ) Else FCKeditor_IsCompatibleBrowser = False End If End Function ' By Agrotic ' On ASP, when converting string to numbers, the number decimal separator is localized ' so 5.5 will not work on systems were the separator is "," and vice versa. Private Function FCKeditor_ToNumericFormat( numberStr ) If IsNumeric( "5.5" ) Then FCKeditor_ToNumericFormat = Replace( numberStr, ",", ".") Else FCKeditor_ToNumericFormat = Replace( numberStr, ".", ",") End If End Function %> zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckeditor.pl0000755000175000017500000000644311471562006025322 0ustar achapmanachapman##### # FCKeditor - The text editor for Internet - http://www.fckeditor.net # Copyright (C) 2003-2009 Frederico Caldeira Knabben # # == BEGIN LICENSE == # # Licensed under the terms of any of the following licenses at your # choice: # # - GNU General Public License Version 2 or later (the "GPL") # http://www.gnu.org/licenses/gpl.html # # - GNU Lesser General Public License Version 2.1 or later (the "LGPL") # http://www.gnu.org/licenses/lgpl.html # # - Mozilla Public License Version 1.1 or later (the "MPL") # http://www.mozilla.org/MPL/MPL-1.1.html # # == END LICENSE == # # This is the integration file for Perl. ##### #my $InstanceName; #my $BasePath; #my $Width; #my $Height; #my $ToolbarSet; #my $Value; #my %Config; sub FCKeditor { local($instanceName) = @_; $InstanceName = $instanceName; $BasePath = '/fckeditor/'; $Width = '100%'; $Height = '200'; $ToolbarSet = 'Default'; $Value = ''; } sub Create { print &CreateHtml(); } sub specialchar_cnv { local($ch) = @_; $ch =~ s/&/&/g; # & $ch =~ s/\"/"/g; #" $ch =~ s/\'/'/g; # ' $ch =~ s//>/g; # > return($ch); } sub CreateHtml { $HtmlValue = &specialchar_cnv($Value); $Html = '' ; if(&IsCompatible()) { $Link = $BasePath . "editor/fckeditor.html?InstanceName=$InstanceName"; if($ToolbarSet ne '') { $Link .= "&Toolbar=$ToolbarSet"; } #// Render the linked hidden field. $Html .= "" ; #// Render the configurations hidden field. $cfgstr = &GetConfigFieldString(); $wk = $InstanceName."___Config"; $Html .= "" ; #// Render the editor IFRAME. $wk = $InstanceName."___Frame"; $Html .= ""; } else { if($Width =~ /\%/g){ $WidthCSS = $Width; } else { $WidthCSS = $Width . 'px'; } if($Height =~ /\%/g){ $HeightCSS = $Height; } else { $HeightCSS = $Height . 'px'; } $Html .= ""; } return($Html); } sub IsCompatible { $sAgent = $ENV{'HTTP_USER_AGENT'}; if(($sAgent =~ /MSIE/i) && !($sAgent =~ /mac/i) && !($sAgent =~ /Opera/i)) { $iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3); return($iVersion >= 5.5) ; } elsif($sAgent =~ /Gecko\//i) { $iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8); return($iVersion >= 20030210) ; } elsif($sAgent =~ /Opera\//i) { $iVersion = substr($sAgent,index($sAgent,'Opera/') + 6,4); return($iVersion >= 9.5) ; } elsif($sAgent =~ /AppleWebKit\/(\d+)/i) { return($1 >= 522) ; } else { return(0); # 2.0 PR fix } } sub GetConfigFieldString { $sParams = ''; $bFirst = 0; foreach $sKey (keys %Config) { $sValue = $Config{$sKey}; if($bFirst == 1) { $sParams .= '&'; } else { $bFirst = 1; } $k = &specialchar_cnv($sKey); $v = &specialchar_cnv($sValue); if($sValue eq "true") { $sParams .= "$k=true"; } elsif($sValue eq "false") { $sParams .= "$k=false"; } else { $sParams .= "$k=$v"; } } return($sParams); } 1; zope.html-2.2.0/src/zope/html/fckeditor/2.6.4.1/fckeditor/fckutils.cfm0000755000175000017500000000454011471562006025322 0ustar achapmanachapman function FCKeditor_IsCompatibleBrowser() { 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( find( "opera/", sAgent ) ) { // try to extract Opera version stResult = reFind( "opera/([0-9]+\.[0-9]+)", sAgent, 1, true ); if( arrayLen( stResult.pos ) eq 2 ) { if ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 9.5) isCompatibleBrowser = true; } } else if( find( "applewebkit", sAgent ) ) { // try to extract Gecko version date stResult = reFind( "applewebkit/([0-9]+)", sAgent, 1, true ); if( arrayLen( stResult.pos ) eq 2 ) { if( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 522 ) isCompatibleBrowser = true; } } return isCompatibleBrowser; } zope.html-2.2.0/src/zope/html/tests.py0000644000175000017500000000454411471562006017772 0ustar achapmanachapman############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Test harness for zope.html. """ __docformat__ = "reStructuredText" import os import unittest from zope.testing import doctest import pytz import zope.annotation.attribute import zope.formlib.tests.test_textareawidget import zope.app.testing.placelesssetup import zope.component import zope.file.testing import zope.interface.common.idatetime import zope.mimetype.types import zope.publisher.interfaces from zope.app.testing import functional import zope.html.widget class FckeditorWidgetTestCase( zope.formlib.tests.test_textareawidget.TextAreaWidgetTest): _WidgetFactory = zope.html.widget.FckeditorWidget def setUp(test): zope.app.testing.placelesssetup.setUp() zope.component.provideAdapter( zope.annotation.attribute.AttributeAnnotations) # we have to initialize the mimetype handling zope.mimetype.types.setup() def tearDown(test): zope.app.testing.placelesssetup.tearDown() @zope.component.adapter(zope.publisher.interfaces.IRequest) @zope.interface.implementer(zope.interface.common.idatetime.ITZInfo) def requestToTZInfo(request): return pytz.timezone('US/Eastern') EditableHtmlLayer = zope.file.testing.ZCMLLayer( os.path.join(os.path.dirname(__file__), 'ftesting.zcml'), __name__, "EditableHtmlLayer") def test_suite(): ftests = zope.file.testing.FunctionalBlobDocFileSuite("browser.txt") ftests.layer = EditableHtmlLayer return unittest.TestSuite([ doctest.DocFileSuite( "docinfo.txt", setUp=setUp, tearDown=tearDown), doctest.DocFileSuite( "widget.txt", optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)), unittest.makeSuite(FckeditorWidgetTestCase), ftests, ]) zope.html-2.2.0/src/zope/html/TODO.txt0000644000175000017500000000122011471562006017550 0ustar achapmanachapmanThings that need to be done --------------------------- - When encoding text, make sure everything is encoded (nothing is left over), and deal with errors. - Make it possible for a user to override the use of the GUI editor with a preference setting, possibly allowing a different editor to be plugged in. - Fetch FCKeditor separately instead of including it in the zope.html checkout. - Add support for FCKeditor plugins; it would be cool to have the full-screen editor from here: http://www.saulmade.nl/FCKeditor/FCKPlugins.php - Better widgets, with less haphazard configurability. There should really be display widgets as well. zope.html-2.2.0/src/zope/html/widget.txt0000644000175000017500000000275011471562006020277 0ustar achapmanachapman============================== (X)HTML fragment editor widget ============================== The widget included in this package is a simple application of the FCKeditor control. It is only expected to work for fragments, not for arbitrary documents. Let's create a field and a widget:: >>> from zope.html import field >>> from zope.html import widget >>> from zope.publisher import browser >>> class Context(object): ... sample = u"" >>> myfield = field.XhtmlFragment( ... __name__="sample", ... title=u"Sample Field", ... ).bind(Context()) >>> request = browser.TestRequest() >>> mywidget = widget.FckeditorWidget(myfield, request) >>> mywidget.setPrefix("form") >>> mywidget.configurationPath = "/myconfig.js" >>> mywidget.editorWidth = 360 >>> mywidget.editorHeight = 200 >>> mywidget.toolbarConfiguration = "mytoolbars" >>> print mywidget() We should also test the CkeditorWidget. >>> ckwidget = widget.CkeditorWidget(myfield, request) >>> ckwidget.configurationPath = "/myconfig.js" >>> ckwidget.editorHeight = 200 The "fckVersion" attribute holds the version of CKEditor library. >>> ckwidget.fckVersion '3.2.1' >>> print ckwidget() zope.html-2.2.0/src/zope/html/__init__.py0000644000175000017500000000004611471562006020360 0ustar achapmanachapman# This directory is a Python package. zope.html-2.2.0/src/zope/html/widget.py0000644000175000017500000000636311471562006020114 0ustar achapmanachapman############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Widget implementations for rich-text fields. """ __docformat__ = "reStructuredText" import zope.app.form.browser import zc.resourcelibrary class FckeditorWidget(zope.app.form.browser.TextAreaWidget): editorWidth = 600 editorHeight = 400 fckVersion = '2.6.4.1' configurationPath = "/@@/zope_fckconfig.js" toolbarConfiguration = "zope" def __call__(self): zc.resourcelibrary.need("fckeditor") # # XXX The 'shortname' here needs some salt to ensure that # multiple widgets with the same trailing name are # distinguishable; some encoding of the full name seems # appropriate, or a per-request counter would also do nicely. # d = { "config": self.configurationPath, "name": self.name, "shortname": self.name.split('.', 1)[-1], "toolbars": self.toolbarConfiguration, "width": self.editorWidth, "height": self.editorHeight, "fckversion": self.fckVersion, } textarea = super(FckeditorWidget, self).__call__() return textarea + (self.javascriptTemplate % d) javascriptTemplate = ''' ''' class CkeditorWidget(zope.app.form.browser.TextAreaWidget): editorHeight = 400 fckVersion = '3.2.1' configurationPath = "/@@/zope_ckconfig.js" def __call__(self): zc.resourcelibrary.need("ckeditor") # # XXX The 'shortname' here needs some salt to ensure that # multiple widgets with the same trailing name are # distinguishable; some encoding of the full name seems # appropriate, or a per-request counter would also do nicely. # d = { "config": self.configurationPath, "name": self.name, "shortname": self.name.split('.', 1)[-1], "height": self.editorHeight, "fckversion": self.fckVersion, } textarea = super(CkeditorWidget, self).__call__() return textarea + (self.javascriptTemplate % d) javascriptTemplate = ''' ''' zope.html-2.2.0/src/zope/html/browser.py0000644000175000017500000002156511471562006020315 0ustar achapmanachapman############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Browser views that implement editing and preview. """ __docformat__ = "reStructuredText" import datetime import zope.lifecycleevent import zope.event import zope.file.contenttype import zope.file.interfaces import zope.formlib.form import zope.html.field import zope.html.interfaces import zope.mimetype.interfaces from zope import mimetype from zope.interface.common import idatetime from i18n import _ UNIVERSAL_CHARSETS = ("utf-8", "utf-16", "utf-16be", "utf-16le") def get_rendered_text(form): f = form.context.open("r") data = f.read() f.close() ci = mimetype.interfaces.IContentInfo(form.context) return ci.decode(data) class BaseEditingView(zope.formlib.form.Form): # initial value helpers: def get_rendered_isFragment(self): info = zope.html.interfaces.IEditableHtmlInformation(self.context) return info.isFragment def get_rendered_encoding(self): charset = self.context.parameters.get("charset") if charset: return zope.component.queryUtility( mimetype.interfaces.ICharsetCodec, charset) else: return None # field definitions: view_fields = zope.formlib.form.Fields( zope.html.interfaces.IEditableHtmlInformation, ) view_fields["isFragment"].get_rendered = get_rendered_isFragment encoding_field = zope.formlib.form.Field( zope.schema.Choice( __name__=_("encoding"), title=_("Encoding"), description=_("Character data encoding"), source=mimetype.source.codecSource, required=False, )) encoding_field.get_rendered = get_rendered_encoding reencode_field = zope.formlib.form.Field( zope.schema.Bool( __name__="reencode", title=_("Re-encode"), description=_("Enable encoding the text using UTF-8" " instead of the original encoding."), default=False, ) ) msgCannotDecodeText = _("Can't decode text for editing; please specify" " the document encoding.") def setUpWidgets(self, ignore_request=False): ci = mimetype.interfaces.IContentInfo(self.context) self.have_text = "charset" in ci.effectiveParameters fields = [self.view_fields] if self.have_text: if self.get_rendered_isFragment(): text_field = self.fragment_field else: text_field = self.document_field fields.append(text_field) if ci.effectiveParameters.get("charset") not in UNIVERSAL_CHARSETS: fields.append(self.reencode_field) else: if not self.status: self.status = self.msgCannotDecodeText fields.append(self.encoding_field) self.form_fields = zope.formlib.form.Fields(*fields) super(BaseEditingView, self).setUpWidgets( ignore_request=ignore_request) def save_validator(self, action, data): errs = self.validate(None, data) if not self.have_text: ifaces = zope.interface.providedBy( zope.security.proxy.removeSecurityProxy(self.context)) for iface in ifaces: if mimetype.interfaces.IContentTypeInterface.providedBy(iface): break else: # Should never happen! assert False, "this view has been mis-registered!" errs += zope.file.contenttype.validateCodecUse( self.context, iface, data.get("encoding"), self.encoding_field) return errs @zope.formlib.form.action(_("Save"), validator=save_validator) def save(self, action, data): changed = False context = self.context if self.have_text: changed = self.handle_text_update(data) else: # maybe we have a new encoding? codec = data["encoding"] if codec is None: self.status = self.msgCannotDecodeText else: if "charset" in context.parameters: old_codec = zope.component.queryUtility( mimetype.interfaces.ICharsetCodec, context.parameters["charset"]) else: old_codec = None if getattr(old_codec, "name", None) != codec.name: # use the preferred charset for the new codec new_charset = zope.component.getUtility( mimetype.interfaces.ICodecPreferredCharset, codec.name) parameters = dict(context.parameters) parameters["charset"] = new_charset.name context.parameters = parameters changed = True # Deal with the isFragment flag: info = zope.html.interfaces.IEditableHtmlInformation(context) isFragment = data["isFragment"] if isFragment != info.isFragment: info.isFragment = data["isFragment"] changed = True # Set the status message: if changed: # Should this get done if only the isFragment changed? zope.event.notify( zope.lifecycleevent.ObjectModifiedEvent(context)) formatter = self.request.locale.dates.getFormatter( 'dateTime', 'medium') now = datetime.datetime.now(idatetime.ITZInfo(self.request)) self.status = _("Updated on ${date_time}", mapping={'date_time': formatter.format(now)}) elif not self.status: self.status = _('No changes') def handle_text_update(self, data): text = data["text"] if text != get_rendered_text(self): ci = mimetype.interfaces.IContentInfo(self.context) codec = ci.getCodec() try: textdata, consumed = codec.encode(text) if consumed != len(text): # XXX borked! pass except: # The old encoding will no longer support the data, so # switch to UTF-8: if data.get("reencode"): textdata = text.encode("utf-8") parameters = dict(self.context.parameters) parameters["charset"] = "utf-8" self.context.parameters = parameters else: encoding = ci.effectiveParameters["charset"] self.status = _( "Can't encode text in current encoding (${encoding})" "; check 'Re-encode' to enable conversion to UTF-8.", mapping={"encoding": encoding}) self.form_reset = False return False # need to discard re-encode checkbox f = self.context.open("w") f.write(textdata) f.close() return True class HtmlEditingView(BaseEditingView): """Editing view for HTML content.""" document_field = zope.formlib.form.Field( zope.html.field.HtmlDocument( __name__="text", title=_("Text"), description=_("Text of the document being edited."), ) ) document_field.get_rendered = get_rendered_text fragment_field = zope.formlib.form.Field( zope.html.field.HtmlFragment( __name__="text", title=_("Text"), description=_("Text of the fragment being edited."), ) ) fragment_field.get_rendered = get_rendered_text class XhtmlEditingView(BaseEditingView): """Editing view for XHTML content.""" document_field = zope.formlib.form.Field( zope.html.field.XhtmlDocument( __name__="text", title=_("Text"), description=_("Text of the document being edited."), ) ) document_field.get_rendered = get_rendered_text fragment_field = zope.formlib.form.Field( zope.html.field.XhtmlFragment( __name__="text", title=_("Text"), description=_("Text of the fragment being edited."), ) ) fragment_field.get_rendered = get_rendered_text zope.html-2.2.0/src/zope/html/zope_ckconfig.js0000644000175000017500000000041311471562006021423 0ustar achapmanachapman/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // config.language = 'fr'; // config.uiColor = '#AADC6E'; }; zope.html-2.2.0/src/zope/html/zope_fckconfig.js0000644000175000017500000000345311471562006021600 0ustar achapmanachapman/* Configuration substantially based on the configuration from Tiks: * http://svn.tiks.org/svn/repos/Tiks/trunk/src/tiks/widgets/fckeditor/browser/tiks_fckconfig.js * by Roger Ineichen (dev@projekt01.ch) */ FCKConfig.BasePath = '/@@/fckeditor/editor/'; FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; FCKConfig.CustomConfigurationsPath = "/@@/zope_fckconfig.js"; FCKConfig.ToolbarSets["zope"] = [ ['Source','DocProps'], ['Cut','Copy','Paste','PasteText','PasteWord','-'], ['SelectAll','RemoveFormat'], ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], ['OrderedList','UnorderedList','-','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Image','Link','Unlink','Anchor','Table','Rule'], '/', ['Style','FontFormat','FontName','FontSize'], ['TextColor','BGColor'], ['About'] ]; // set faked table borders on table wth border="0" FCKConfig.ShowBorders = true ; // The contextURL is set in the javescipt template and used in the explorer implementation FCKConfig.contextURL = window.top.top.contextURL; FCKConfig.LinkBrowser = false ; FCKConfig.LinkBrowserURL = window.top.top.explorerURL; FCKConfig.LinkBrowserWindowWidth = 650 ; // 40% FCKConfig.LinkBrowserWindowHeight = 440 ; // 40% FCKConfig.ImageBrowser = false ; FCKConfig.ImageBrowserURL = window.top.top.explorerURL; FCKConfig.ImageBrowserWindowWidth = 650 ; // 40% ; FCKConfig.ImageBrowserWindowHeight = 440 ; // 40% ; // change this views if you need to load a different file explorer tree // This way you can load different explorers for different widget since // you can load different configuration scripts for each widget. // See tiks.skintools.explorer for more info FCKConfig.treeview = '@@explorer_tree'; FCKConfig.insertview = '@@explorer_insert'; zope.html-2.2.0/src/zope/html/ckeditor/0000755000175000017500000000000011473031633020052 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/ckeditor/.htaccess0000644000175000017500000000143011471562004021645 0ustar achapmanachapman# # Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. # For licensing, see LICENSE.html or http://ckeditor.com/license # # # On some specific Linux installations you could face problems with Firefox. # It could give you errors when loading the editor saying that some illegal # characters were found (three strange chars in the beginning of the file). # This could happen if you map the .js or .css files to PHP, for example. # # Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. # All FCKeditor files are Unicode encoded. # AddType application/x-javascript .js AddType text/css .css # # If PHP is mapped to handle XML files, you could have some issues. The # following will disable it. # AddType text/xml .xml zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/0000755000175000017500000000000011473031633020513 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/0000755000175000017500000000000011473031633022317 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/themes/0000755000175000017500000000000011473031633023604 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/themes/default/0000755000175000017500000000000011473031633025230 5ustar achapmanachapmanzope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/themes/default/theme.js0000644000175000017500000001255711471562003026700 0ustar achapmanachapman/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.themes.add('default',(function(){function a(b,c){var d,e;e=b.config.sharedSpaces;e=e&&e[c];e=e&&CKEDITOR.document.getById(e);if(e){var f=''+''+''+''+'
    '+'
    ',g=e.append(CKEDITOR.dom.element.createFromHtml(f,e.getDocument()));if(e.getCustomData('cke_hasshared'))g.hide();else e.setCustomData('cke_hasshared',1);d=g.getChild([0,0,0,0]);b.on('focus',function(){for(var h=0,i,j=e.getChildren();i=j.getItem(h);h++){if(i.type==CKEDITOR.NODE_ELEMENT&&!i.equals(g)&&i.hasClass('cke_shared'))i.hide();}g.show();});b.on('destroy',function(){g.remove();});}return d;};return{build:function(b,c){var d=b.name,e=b.element,f=b.elementMode;if(!e||f==CKEDITOR.ELEMENT_MODE_NONE)return;if(f==CKEDITOR.ELEMENT_MODE_REPLACE)e.hide();var g=b.fire('themeSpace',{space:'top',html:''}).html,h=b.fire('themeSpace',{space:'contents',html:''}).html,i=b.fireOnce('themeSpace',{space:'bottom',html:''}).html,j=h&&b.config.height,k=b.config.tabIndex||b.element.getAttribute('tabindex')||0;if(!h)j='auto';else if(!isNaN(j))j+='px';var l='',m=b.config.width;if(m){if(!isNaN(m))m+='px';l+='width: '+m+';';}var n=g&&a(b,'top'),o=a(b,'bottom');n&&(n.setHtml(g),g='');o&&(o.setHtml(i),i='');var p=CKEDITOR.dom.element.createFromHtml([''+''+b.lang.editor+''+''].join(''));p.getChild([1,0,0,0,0]).unselectable(); p.getChild([1,0,0,0,2]).unselectable();if(f==CKEDITOR.ELEMENT_MODE_REPLACE)p.insertAfter(e);else e.append(p);b.container=p;p.disableContextMenu();b.fireOnce('themeLoaded');b.fireOnce('uiReady');},buildDialog:function(b){var c=CKEDITOR.tools.getNextNumber(),d=CKEDITOR.dom.element.createFromHtml([''].join('').replace(/#/g,'_'+c).replace(/%/g,'cke_dialog_')),e=d.getChild([0,0,0,0,0]),f=e.getChild(0),g=e.getChild(1);f.unselectable();g.unselectable();return{element:d,parts:{dialog:d.getChild(0),title:f,close:g,tabs:e.getChild(2),contents:e.getChild([3,0,0,0]),footer:e.getChild(4)}};},destroy:function(b){var c=b.container;c.clearCustomData();b.element.clearCustomData();if(CKEDITOR.env.ie){c.setStyle('display','none');var d=document.body.createTextRange();d.moveToElementText(c.$);try{d.select();}catch(e){}}if(c)c.remove();if(b.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE)b.element.show();delete b.element;}};})());CKEDITOR.editor.prototype.getThemeSpace=function(a){var b='cke_'+a,c=this._[b]||(this._[b]=CKEDITOR.document.getById(b+'_'+this.name));return c;};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var e=/^\d+$/;if(e.test(a))a+='px';var f=this.container,g=CKEDITOR.document.getById('cke_contents_'+this.name),h=d?f.getChild(1):f;CKEDITOR.env.webkit&&h.setStyle('display','none'); h.setStyle('width',a);if(CKEDITOR.env.webkit){h.$.offsetWidth;h.setStyle('display','');}var i=c?0:(h.$.offsetHeight||0)-(g.$.clientHeight||0);g.setStyle('height',Math.max(b-i,0)+'px');this.fire('resize');};CKEDITOR.editor.prototype.getResizable=function(){return this.container.getChild(1);}; zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/config.js0000644000175000017500000000051311471562004024120 0ustar achapmanachapman/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; }; zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/LICENSE.html0000644000175000017500000021274011471562004024274 0ustar achapmanachapman License - CKEditor

    Software License Agreement

    CKEditor™ - The text editor for Internet™ - http://ckeditor.com
    Copyright © 2003-2010, CKSource - Frederico Knabben. All rights reserved.

    Licensed under the terms of any of the following licenses at your choice:

    You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "LEGAL" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses.

    Sources of Intellectual Property Included in CKEditor

    Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.

    YUI Test: At _source/tests/yuitest.js can be found part of the source code of YUI, which is licensed under the terms of the BSD License. YUI is Copyright © 2008, Yahoo! Inc.

    Trademarks

    CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

    zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/.htaccess0000644000175000017500000000143011471562004024112 0ustar achapmanachapman# # Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. # For licensing, see LICENSE.html or http://ckeditor.com/license # # # On some specific Linux installations you could face problems with Firefox. # It could give you errors when loading the editor saying that some illegal # characters were found (three strange chars in the beginning of the file). # This could happen if you map the .js or .css files to PHP, for example. # # Those characters are the Byte Order Mask (BOM) of the Unicode encoded files. # All FCKeditor files are Unicode encoded. # AddType application/x-javascript .js AddType text/css .css # # If PHP is mapped to handle XML files, you could have some issues. The # following will disable it. # AddType text/xml .xml zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/ckeditor_basic_source.js0000644000175000017500000000277411471562004027213 0ustar achapmanachapman/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ // Compressed version of core/ckeditor_base.js. See original for instructions. /*jsl:ignore*/ if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})(); /*jsl:end*/ // Uncomment the following line to have a new timestamp generated for each // request, having clear cache load of the editor code. // CKEDITOR.timestamp = ( new Date() ).valueOf(); // Set the script name to be loaded by the loader. CKEDITOR._autoLoad = 'core/ckeditor_basic'; // Include the loader script. document.write( '' ); zope.html-2.2.0/src/zope/html/ckeditor/3.2.1/ckeditor/ckeditor_basic.js0000644000175000017500000001503611471562004025626 0ustar achapmanachapman/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A39E',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0; }};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie; if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0; }};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e};f.elementMode=d||0;a.event.call(f);f._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!='textarea'){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!='object'){e=document.getElementById(b);if(!e)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,e,2,d);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:b.indexOf('mobile')>-1,isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*100+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=!d.mobile&&(d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false);d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie; if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g,h){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var i=g(e,f,h);a.add(i);return i;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f,g){return d(e,f,a.editor.appendTo,g);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f'+g+'');else h.push('');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='
    '?function(k){return g(k).replace(/
    /gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g(' ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'"').replace(//,'>');},escapeCssSelector:function(f){return f.replace(/[\s#:.,$*^\[\]()~=+>]/g,'\\$&');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h]*>/g,''):i;},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<\?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div'); i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var n=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(n,j);if(k!==0&&n.$.tabIndex===0)k=null;return k;break;case 'checked':var l=n.$.attributes.getNamedItem(j),m=l.specified?l.nodeValue:n.$.checked;return m?'checked':null;case 'hspace':return n.$.hspace;case 'style':return n.$.style.cssText;}return i.call(n,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;})();},getValue:function(){return this.$.value;},getFirst:function(i){var j=this.$.firstChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getNext(i);return k;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||lwindow.setTimeout(function(){window.close();},50);")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(i){if(!i.data.getTarget().hasClass('cke_enable_context_menu'))i.data.preventDefault();});}});a.command=function(i,j){this.uiItems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorFocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorFocus:true,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getChild(1).addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o,p){var q=typeof l=='string';if(q)l=[l];if(!n)n=a;var r=l.length,s=[],t=[],u=function(z){if(m)if(q)m.call(n,z);else m.call(n,s,t);};if(r===0){u(true);return;}var v=function(z,A){(A?s:t).push(z);if(--r<=0){p&&a.document.getDocumentElement().removeStyle('cursor');u(A);}},w=function(z,A){j[z]=1;var B=k[z];delete k[z];for(var C=0;C1)return;var B=new h('script');B.setAttributes({type:'text/javascript',src:z});if(m)if(c)B.$.onreadystatechange=function(){if(B.$.readyState=='loaded'||B.$.readyState=='complete'){B.$.onreadystatechange=null;w(z,true);}};else{B.$.onload=function(){setTimeout(function(){w(z,true);},0);};B.$.onerror=function(){w(z,false);};}B.appendTo(a.document.getHead());};p&&a.document.getDocumentElement().setStyle('cursor','wait');for(var y=0;y0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s); if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listItem;a.htmlParser.fragment.fromHtml=function(p,q){var r=new a.htmlParser(),s=[],t=new a.htmlParser.fragment(),u=[],v=[],w=t,x=false,y;function z(E){var F;if(u.length>0)for(var G=0;G=0;F--){if(E==u[F].name){u.splice(F,1);return;}}var G=[],H=[],I=w;while(I.type&&I.name!=E){if(!I._.isBlockLike)H.unshift(I);G.push(I);I=I.parent;}if(I.type){for(F=0;F0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){var r;this.filterChildren=function(){var s=new a.htmlParser.basicWriter();this.writeChildrenHtml.call(this,s,q,true);var t=s.getHtml();this.children=new a.htmlParser.fragment.fromHtml(t).children;r=1;};!this.name&&q&&q.onFragment(this);this.writeChildrenHtml(p,r?null:q);},writeChildrenHtml:function(p,q){for(var r=0;rn?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterChildren=function(){if(!u){var z=new a.htmlParser.basicWriter();a.htmlParser.fragment.prototype.writeChildrenHtml.call(p,z,n);p.children=new a.htmlParser.fragment.fromHtml(z.getHtml()).children;u=1;}};if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writeHtml(m,n);return;}q=p.name;if(!q){this.writeChildrenHtml.call(p,m,u?null:n);return;}}o=p.attributes;}m.openTag(q,o);var v=[];for(var w=0;w<2;w++)for(r in o){s=r;t=o[r];if(w==1)v.push([r,t]);else if(n){for(;;){if(!(s=n.onAttributeName(r))){delete o[r];break;}else if(s!=r){delete o[r];r=s;continue;}else break;}if(s)if((t=n.onAttribute(p,s,t))===false)delete o[s];else o[s]=t;}}if(m.sortAttributes)v.sort(l);var x=v.length;for(w=0;w=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0&&D.getChild(w.startOffset-1);this._.guardRTL=function(G,H){return(!H||!D.equals(G))&&(!E||!G.equals(E))&&(G.type!=1||!H||G.getName()!='body');};}var F=t?this._.guardRTL:this._.guardLTR;if(y)x=function(G,H){if(F(G,H)===false)return false;return y(G,H);};else x=F;if(this.current)v=this.current[A](false,z,x);else if(t){v=w.endContainer;if(w.endOffset>0){v=v.getChild(w.endOffset-1);if(x(v)===false)v=null;}else v=x(v,true)===false?null:v.getPreviousSourceNode(true,z,x); }else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B; if(x.type==3)x=x.split(z);else if(x.getChildCount()>0)if(z>=x.getChildCount()){x=x.append(t.document.createText(''));B=true;}else x=x.getChild(z);if(w.type==3){w.split(y);if(w.equals(x))x=w.getNext();}else if(!y){w=w.getFirst().insertBeforeMe(t.document.createText(''));A=true;}else if(y>=w.getChildCount()){w=w.append(t.document.createText(''));A=true;}else w=w.getChild(y).getPrevious();var C=w.getParents(),D=x.getParents(),E,F,G;for(E=0;E0&&!I.equals(x))J=H.append(I.clone());if(!C[N]||I.$.parentNode!=C[N].$.parentNode){K=I.getPrevious();while(K){if(K.equals(C[N])||K.equals(w))break;L=K.getPrevious();if(u==2)H.$.insertBefore(K.$.cloneNode(true),H.$.firstChild);else{K.remove();if(u==1)H.$.insertBefore(K.$,H.$.firstChild);}K=L;}}if(H)H=J;}if(u==2){var O=t.startContainer;if(O.type==3){O.$.data+=O.$.nextSibling.data;O.$.parentNode.removeChild(O.$.nextSibling);}var P=t.endContainer;if(P.type==3&&P.$.nextSibling){P.$.data+=P.$.nextSibling.data;P.$.parentNode.removeChild(P.$.nextSibling);}}else{if(F&&G&&(w.$.parentNode!=F.$.parentNode||x.$.parentNode!=G.$.parentNode)){var Q=G.getIndex();if(A&&G.$.parentNode==w.$.parentNode)Q--;t.setStart(G.getParent(),Q);}t.collapse(true);}if(A)w.remove();if(B&&x.$.parentNode)x.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(t){var u=false,v=d.walker.bookmark(true);return function(w){if(v(w))return true;if(w.type==3){if(e.trim(w.getText()).length)return false;}else if(w.type==1)if(!n[w.getName()])if(!t&&!c&&w.getName()=='br'&&!u)u=true;else return false;return true;};};function p(t){return t.type!=3&&t.getName() in f.$removeEmpty||!e.trim(t.getText())||t.getParent().hasAttribute('_fck_bookmark');};var q=new d.walker.whitespaces(),r=new d.walker.bookmark();function s(t){return!q(t)&&!r(t);};d.range.prototype={clone:function(){var u=this;var t=new d.range(u.document);t.startContainer=u.startContainer;t.startOffset=u.startOffset;t.endContainer=u.endContainer;t.endOffset=u.endOffset;t.collapsed=u.collapsed;return t;},collapse:function(t){var u=this;if(t){u.endContainer=u.startContainer; u.endOffset=u.startOffset;}else{u.startContainer=u.endContainer;u.startOffset=u.endOffset;}u.collapsed=true;},cloneContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,t);return t;},deleteContents:function(){if(this.collapsed)return;m(this,0);},extractContents:function(){var t=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,t);return t;},createBookmark:function(t){var y=this;var u,v,w,x;u=y.document.createElement('span');u.setAttribute('_fck_bookmark',1);u.setStyle('display','none');u.setHtml(' ');if(t){w='cke_bm_'+e.getNextNumber();u.setAttribute('id',w+'S');}if(!y.collapsed){v=u.clone();v.setHtml(' ');if(t)v.setAttribute('id',w+'E');x=y.clone();x.collapse();x.insertNode(v);}x=y.clone();x.collapse(true);x.insertNode(u);if(v){y.setStartAfter(u);y.setEndBefore(v);}else y.moveToPosition(u,4);return{startNode:t?w+'S':u,endNode:t?w+'E':v,serializable:t};},createBookmark2:function(t){var A=this;var u=A.startContainer,v=A.endContainer,w=A.startOffset,x=A.endOffset,y,z;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){y=u.getChild(w);if(y&&y.type==3&&w>0&&y.getPrevious().type==3){u=y;w=0;}}while(u.type==3&&(z=u.getPrevious())&&z.type==3){u=z;w+=z.getLength();}if(!A.isCollapsed){if(v.type==1){y=v.getChild(x);if(y&&y.type==3&&x>0&&y.getPrevious().type==3){v=y;x=0;}}while(v.type==3&&(z=v.getPrevious())&&z.type==3){v=z;x+=z.getLength();}}}return{start:u.getAddress(t),end:A.isCollapsed?null:v.getAddress(t),startOffset:w,endOffset:x,normalized:t,is2:true};},moveToBookmark:function(t){var B=this;if(t.is2){var u=B.document.getByAddress(t.start,t.normalized),v=t.startOffset,w=t.end&&B.document.getByAddress(t.end,t.normalized),x=t.endOffset;B.setStart(u,v);if(w)B.setEnd(w,x);else B.collapse(true);}else{var y=t.serializable,z=y?B.document.getById(t.startNode):t.startNode,A=y?B.document.getById(t.endNode):t.endNode;B.setStartBefore(z);z.remove();if(A){B.setEndBefore(A);A.remove();}else B.collapse(true);}},getBoundaryNodes:function(){var y=this;var t=y.startContainer,u=y.endContainer,v=y.startOffset,w=y.endOffset,x;if(t.type==1){x=t.getChildCount();if(x>v)t=t.getChild(v);else if(x<1)t=t.getPreviousSourceNode();else{t=t.$;while(t.lastChild)t=t.lastChild;t=new d.node(t);t=t.getNextSourceNode()||t;}}if(u.type==1){x=u.getChildCount();if(x>w)u=u.getChild(w).getPreviousSourceNode(true);else if(x<1)u=u.getPreviousSourceNode();else{u=u.$;while(u.lastChild)u=u.lastChild;u=new d.node(u);}}if(t.getPosition(u)&2)t=u;return{startNode:t,endNode:u}; },getCommonAncestor:function(t,u){var y=this;var v=y.startContainer,w=y.endContainer,x;if(v.equals(w)){if(t&&v.type==1&&y.startOffset==y.endOffset-1)x=v.getChild(y.startOffset);else x=v;}else x=v.getCommonAncestor(w);return u&&!x.is?x.getParent():x;},optimize:function(){var v=this;var t=v.startContainer,u=v.startOffset;if(t.type!=1)if(!u)v.setStartBefore(t);else if(u>=t.getLength())v.setStartAfter(t);t=v.endContainer;u=v.endOffset;if(t.type!=1)if(!u)v.setEndBefore(t);else if(u>=t.getLength())v.setEndAfter(t);},optimizeBookmark:function(){var v=this;var t=v.startContainer,u=v.endContainer;if(t.is&&t.is('span')&&t.hasAttribute('_fck_bookmark'))v.setStartAt(t,3);if(u&&u.is&&u.is('span')&&u.hasAttribute('_fck_bookmark'))v.setEndAt(u,4);},trim:function(t,u){var B=this;var v=B.startContainer,w=B.startOffset,x=B.collapsed;if((!t||x)&&v&&v.type==3){if(!w){w=v.getIndex();v=v.getParent();}else if(w>=v.getLength()){w=v.getIndex()+1;v=v.getParent();}else{var y=v.split(w);w=v.getIndex()+1;v=v.getParent();if(B.startContainer.equals(B.endContainer))B.setEnd(y,B.endOffset-B.startOffset);else if(v.equals(B.endContainer))B.endOffset+=1;}B.setStart(v,w);if(x){B.collapse(true);return;}}var z=B.endContainer,A=B.endOffset;if(!(u||x)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{z.split(A);A=z.getIndex()+1;z=z.getParent();}B.setEnd(z,A);}},enlarge:function(t){switch(t){case 1:if(this.collapsed)return;var u=this.getCommonAncestor(),v=this.document.getBody(),w,x,y,z,A,B=false,C,D,E=this.startContainer,F=this.startOffset;if(E.type==3){if(F){E=!e.trim(E.substring(0,F)).length&&E;B=!!E;}if(E)if(!(z=E.getPrevious()))y=E.getParent();}else{if(F)z=E.getChild(F-1)||E.getLast();if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)w=y;else this.setStartBefore(y);}z=y.getPrevious();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/[\s\ufeff]$/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{var G=z.$.all||z.$.getElementsByTagName('*');for(var H=0,I;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B){if(A)w=y;else if(y)this.setStartBefore(y);}else B=true;if(z){var J=z.getPrevious();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent(); }E=this.endContainer;F=this.endOffset;y=z=null;A=B=false;if(E.type==3){E=!e.trim(E.substring(F)).length&&E;B=!(E&&E.getLength());if(E)if(!(z=E.getNext()))y=E.getParent();}else{z=E.getChild(F);if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)x=y;else if(y)this.setEndAfter(y);}z=y.getNext();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/^[\s\ufeff]/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{G=z.$.all||z.$.getElementsByTagName('*');for(H=0;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B)if(A)x=y;else this.setEndAfter(y);if(z){J=z.getNext();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}if(w&&x){u=w.contains(x)?x:w;this.setStartBefore(u);this.setEndAfter(u);}break;case 2:case 3:var K=new d.range(this.document);v=this.document.getBody();K.setStartAt(v,1);K.setEnd(this.startContainer,this.startOffset);var L=new d.walker(K),M,N,O=d.walker.blockBoundary(t==3?{br:1}:null),P=function(R){var S=O(R);if(!S)M=R;return S;},Q=function(R){var S=P(R);if(!S&&R.is&&R.is('br'))N=R;return S;};L.guard=P;y=L.lastBackward();M=M||v;this.setStartAt(M,!M.is('br')&&(!y&&this.checkStartOfBlock()||y&&M.contains(y))?1:4);K=this.clone();K.collapse();K.setEndAt(v,2);L=new d.walker(K);L.guard=t==3?Q:P;M=null;y=L.lastForward();M=M||v;this.setEndAt(M,!y&&this.checkEndOfBlock()||y&&M.contains(y)?2:3);if(N)this.setEndAfter(N);}},shrink:function(t){if(!this.collapsed){t=t||a.SHRINK_TEXT;var u=this.clone(),v=this.startContainer,w=this.endContainer,x=this.startOffset,y=this.endOffset,z=this.collapsed,A=1,B=1;if(v&&v.type==3)if(!x)u.setStartBefore(v);else if(x>=v.getLength())u.setStartAfter(v);else{u.setStartBefore(v);A=0;}if(w&&w.type==3)if(!y)u.setEndBefore(w);else if(y>=w.getLength())u.setEndAfter(w);else{u.setEndAfter(w);B=0;}var C=new d.walker(u);C.evaluator=function(G){return G.type==(t==a.SHRINK_ELEMENT?1:3);};var D;C.guard=function(G,H){if(t==a.SHRINK_ELEMENT&&G.type==3)return false;if(H&&G.equals(D))return false;if(!H&&G.type==1)D=G;return true;};if(A){var E=C[t==a.SHRINK_ELEMENT?'lastForward':'next']();E&&this.setStartBefore(E);}if(B){C.reset();var F=C[t==a.SHRINK_ELEMENT?'lastBackward':'previous']();F&&this.setEndAfter(F);}return!!(A||B);}},insertNode:function(t){var x=this; x.optimizeBookmark();x.trim(false,true);var u=x.startContainer,v=x.startOffset,w=u.getChild(v);if(w)t.insertBefore(w);else u.append(t);if(t.getParent().equals(x.endContainer))x.endOffset++;x.setStartBefore(t);},moveToPosition:function(t,u){this.setStartAt(t,u);this.collapse(true);},selectNodeContents:function(t){this.setStart(t,0);this.setEnd(t,t.type==3?t.getLength():t.getChildCount());},setStart:function(t,u){var v=this;v.startContainer=t;v.startOffset=u;if(!v.endContainer){v.endContainer=t;v.endOffset=u;}l(v);},setEnd:function(t,u){var v=this;v.endContainer=t;v.endOffset=u;if(!v.startContainer){v.startContainer=t;v.startOffset=u;}l(v);},setStartAfter:function(t){this.setStart(t.getParent(),t.getIndex()+1);},setStartBefore:function(t){this.setStart(t.getParent(),t.getIndex());},setEndAfter:function(t){this.setEnd(t.getParent(),t.getIndex()+1);},setEndBefore:function(t){this.setEnd(t.getParent(),t.getIndex());},setStartAt:function(t,u){var v=this;switch(u){case 1:v.setStart(t,0);break;case 2:if(t.type==3)v.setStart(t,t.getLength());else v.setStart(t,t.getChildCount());break;case 3:v.setStartBefore(t);break;case 4:v.setStartAfter(t);}l(v);},setEndAt:function(t,u){var v=this;switch(u){case 1:v.setEnd(t,0);break;case 2:if(t.type==3)v.setEnd(t,t.getLength());else v.setEnd(t,t.getChildCount());break;case 3:v.setEndBefore(t);break;case 4:v.setEndAfter(t);}l(v);},fixBlock:function(t,u){var x=this;var v=x.createBookmark(),w=x.document.createElement(u);x.collapse(t);x.enlarge(2);x.extractContents().appendTo(w);w.trim();if(!c)w.appendBogus();x.insertNode(w);x.moveToBookmark(v);return w;},splitBlock:function(t){var D=this;var u=new d.elementPath(D.startContainer),v=new d.elementPath(D.endContainer),w=u.blockLimit,x=v.blockLimit,y=u.block,z=v.block,A=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=D.fixBlock(true,t);z=new d.elementPath(D.endContainer).block;}if(!z)z=D.fixBlock(false,t);}var B=y&&D.checkStartOfBlock(),C=z&&D.checkEndOfBlock();D.deleteContents();if(y&&y.equals(z))if(C){A=new d.elementPath(D.startContainer);D.moveToPosition(z,4);z=null;}else if(B){A=new d.elementPath(D.startContainer);D.moveToPosition(y,3);y=null;}else{z=D.splitElement(y);if(!c&&!y.is('ul','ol'))y.appendBogus();}return{previousBlock:y,nextBlock:z,wasStartOfBlock:B,wasEndOfBlock:C,elementPath:A};},splitElement:function(t){var w=this;if(!w.collapsed)return null;w.setEndAt(t,2);var u=w.extractContents(),v=t.clone(false);u.appendTo(v);v.insertAfter(t);w.moveToPosition(t,4);return v;},checkBoundaryOfElement:function(t,u){var v=this.clone(); v[u==1?'setStartAt':'setEndAt'](t,u==1?1:2);var w=new d.walker(v),x=false;w.evaluator=p;return w[u==1?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var z=this;var t=z.startContainer,u=z.startOffset;if(u&&t.type==3){var v=e.ltrim(t.substring(0,u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.startContainer),x=z.clone();x.collapse(true);x.setStartAt(w.block||w.blockLimit,1);var y=new d.walker(x);y.evaluator=o(true);return y.checkBackward();},checkEndOfBlock:function(){var z=this;var t=z.endContainer,u=z.endOffset;if(t.type==3){var v=e.rtrim(t.substring(u));if(v.length)return false;}z.trim();var w=new d.elementPath(z.endContainer),x=z.clone();x.collapse(false);x.setEndAt(w.block||w.blockLimit,2);var y=new d.walker(x);y.evaluator=o(false);return y.checkForward();},moveToElementEditablePosition:function(t,u){var v;if(f.$empty[t.getName()])return false;while(t&&t.type==1){v=t.isEditable();if(v)this.moveToPosition(t,u?2:1);else if(f.$inline[t.getName()]){this.moveToPosition(t,u?4:3);return true;}if(f.$empty[t.getName()])t=t[u?'getPrevious':'getNext'](s);else t=t[u?'getLast':'getFirst'](s);if(t&&t.type==3){this.moveToPosition(t,u?4:3);return true;}}return v;},moveToElementEditStart:function(t){return this.moveToElementEditablePosition(t);},moveToElementEditEnd:function(t){return this.moveToElementEditablePosition(t,true);},getEnclosedNode:function(){var t=this.clone(),u=new d.walker(t),v=d.walker.bookmark(true),w=d.walker.whitespaces(true),x=function(z){return w(z)&&v(z);};t.evaluator=x;var y=u.next();u.reset();return y&&y.equals(u.previous())?y:null;},getTouchedStartNode:function(){var t=this.startContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.startOffset)||t;},getTouchedEndNode:function(){var t=this.endContainer;if(this.collapsed||t.type!=1)return t;return t.getChild(this.endOffset-1)||t;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;a.SHRINK_ELEMENT=1;a.SHRINK_TEXT=2;(function(){if(b.webkit){b.hc=false;return;}var l=c&&b.version<7,m=c&&b.version==7,n=l?a.basePath+'images/spacer.gif':m?'about:blank':'data:image/png;base64,',o=h.createFromHtml('
    ',a.document);o.appendTo(a.document.getHead());try{b.hc=o.getComputedStyle('background-image')=='none'; }catch(p){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';o.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m0){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift(); I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber(),p='',q=this.command,r,s;this._.editor=l;var t={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}};t.clickFn=r=e.addFunction(t.execute,t);t.index=s=k.button._.instances.push(t)-1;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off';if(this.className)p+=' '+this.className;m.push('','=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',s,', event);" onfocus="return CKEDITOR.ui.button._.focus(',s,', event);" onclick="CKEDITOR.tools.callFunction(',r,', this); return false;">',this.label,'');if(this.hasArrow)m.push(''+(b.hc?'▼':'')+'');m.push('','');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);(b.version>7?t.$:t.$.selection.createRange()).execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u); y.setAttribute('id','cke_pastebin');b.webkit&&y.append(u.createText('\xa0'));u.getBody().append(y);y.setStyles({position:'absolute',left:'-1000px',top:w.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});var z=w.createBookmarks();if(s=='text'){if(c){var A=u.getBody().$.createTextRange();A.moveToElementText(y.$);A.execCommand('Paste');r.data.preventDefault();}else{u.$.designMode='off';y.$.focus();}}else{x.setStartAt(y,1);x.setEndAt(y,2);x.select(true);}window.setTimeout(function(){s=='text'&&!c&&(u.$.designMode='on');y.remove();var B;y=b.webkit&&(B=y.getFirst())&&B.is&&B.hasClass('Apple-style-span')?B:y;w.selectBookmarks(z);t(y['get'+(s=='text'?'Value':'Html')]());},0);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(r){r.on('paste',function(w){var x=w.data;if(x.html)r.insertHtml(x.html);else if(x.text)r.insertText(x.text);},null,null,1000);r.on('pasteDialog',function(w){setTimeout(function(){r.openDialog('paste');},0);});function s(w,x,y,z){var A=r.lang[x];r.addCommand(x,y);r.ui.addButton(w,{label:A,command:x});if(r.addMenuItems)r.addMenuItem(x,{label:A,command:x,group:'clipboard',order:z});};s('Cut','cut',new n('cut'),1);s('Copy','copy',new n('copy'),4);s('Paste','paste',o,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));r.on('key',p,r);var t=r.config.forcePasteAsPlainText?'text':'html';r.on('contentDom',function(){var w=r.document.getBody();w.on(t=='text'&&c||b.webkit?'paste':'beforepaste',function(x){if(u)return;q.call(r,x,t,function(y){if(!y)return;var z={};z[t]=y;r.fire('paste',z);});});});if(r.contextMenu){var u;function v(w){c&&w=='Paste'&&(u=1);var x=r.document.$.queryCommandEnabled(w)?2:0;u=0;return x;};r.contextMenu.addListener(function(){return{cut:v('Cut'),copy:v('Cut'),paste:b.webkit?2:v('Paste')};});}}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(l){var m=l.config,n=l.lang.colorButton,o;if(!b.hc){p('TextColor','fore',n.textColorTitle);p('BGColor','back',n.bgColorTitle);}function p(r,s,t){l.ui.add(r,4,{label:t,title:t,className:'cke_button_'+r.toLowerCase(),modes:{wysiwyg:1},panel:{css:l.skin.editor.css,attributes:{role:'listbox','aria-label':n.panelTitle}},onBlock:function(u,v){v.autoSize=true;v.element.addClass('cke_colorblock');v.element.setHtml(q(u,s));var w=v.keys;w[39]='next';w[40]='next';w[9]='next';w[37]='prev';w[38]='prev';w[2000+9]='prev';w[32]='click';}});};function q(r,s){var t=[],u=m.colorButton_colors.split(','),v=u.length+(m.colorButton_enableMore?2:1),w=e.addFunction(function(C,D){if(C=='?'){var E=arguments.callee; function F(H){this.removeListener('ok',F);this.removeListener('cancel',F);H.name=='ok'&&E(this.getContentElement('picker','selectedColor').getValue(),D);};l.openDialog('colordialog',function(){this.on('ok',F);this.on('cancel',F);});return;}l.focus();r.hide();l.fire('saveSnapshot');new a.style(m['colorButton_'+D+'Style'],{color:'inherit'}).remove(l.document);if(C){var G=m['colorButton_'+D+'Style'];G.childRule=D=='back'?function(){return false;}:function(H){return H.getName()!='a';};new a.style(G,{color:C}).apply(l.document);}l.fire('saveSnapshot');});t.push('
    ',n.auto,'
    ');for(var x=0;x');var y=u[x].split('/'),z=y[0],A=y[1]||z;if(!y[1])z='#'+z;var B=l.lang.colors[A]||A;t.push('');}if(m.colorButton_enableMore)t.push('');t.push('
    ',n.more,'
    ');return t.join('');};}});i.colorButton_enableMore=true;i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(l){l.addCommand('colordialog',new a.dialogCommand('colordialog')); a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],beforeInit:function(l){l.contextMenu=new j.contextMenu(l);l.addCommand('contextMenu',{exec:function(){l.contextMenu.show(l.document.getBody());}});}});j.contextMenu=e.createClass({$:function(l){this.id='cke_'+e.getNextNumber();this.editor=l;this._.listeners=[];this._.functionId=e.addFunction(function(m){this._.panel.hide();l.focus();l.execCommand(m);},this);this.definition={panel:{className:l.skinClass+' cke_contextmenu',attributes:{'aria-label':l.lang.contextmenu.options}}};},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor;if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q,this.definition);p.onClick=e.bind(function(z){p.hide();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);},this);p.onEscape=function(z){var A=this.parent;if(A){A._.panel.hideChild();var B=A._.panel._.panel._.currentBlock,C=B._.focusIndex;B._.markItem(C);}else if(z==27){this.hide();q.focus();}return false;};}var r=this._.listeners,s=[],t=this.editor.getSelection(),u=t&&t.getStartElement();p.onHide=e.bind(function(){p.onHide=null;if(c){var z=q.getSelection();z&&z.unlock();}this.onHide&&this.onHide();},this);for(var v=0;v ';j.add('elementspath',{requires:['selection'],init:function(n){var o='cke_path_'+n.name,p,q=function(){if(!p)p=a.document.getById(o);return p;},r='cke_elementspath_'+e.getNextNumber()+'_';n._.elementsPath={idBase:r,filters:[]};n.on('themeSpace',function(s){if(s.data.space=='bottom')s.data.html+=''+n.lang.elementsPath.eleLabel+''+'
    '+m+'
    ';});n.on('selectionChange',function(s){var t=b,u=s.data.selection,v=u.getStartElement(),w=[],x=s.editor,y=x._.elementsPath.list=[],z=x._.elementsPath.filters;while(v){var A=0;for(var B=0;B',D,''+F+'','');}if(D=='body')break;v=v.getParent();}q().setHtml(w.join('')+m);});n.on('contentDomUnload',function(){q().setHtml(m);});n.addCommand('elementsPathFocus',l.toolbarFocus);}});})();a._.elementsPath={click:function(l,m){var n=a.instances[l];n.focus();var o=n._.elementsPath.list[m];n.getSelection().selectElement(o);return false;},keydown:function(l,m,n){var o=k.button._.instances[m],p=a.instances[l],q=p._.elementsPath.idBase,r;n=new d.event(n);switch(n.getKeystroke()){case 37:case 9:r=a.document.getById(q+(m+1));if(!r)r=a.document.getById(q+'0');r.focus();return false;case 39:case 2000+9:r=a.document.getById(q+(m-1));if(!r)r=a.document.getById(q+(p._.elementsPath.list.length-1));r.focus();return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m);return false;}return true;}};(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(s){var t=s.specialKeys;t[13]=q;t[2000+13]=p;}});j.enterkey={enterBlock:function(s,t,u,v){u=u||r(s);var w=u.document;if(u.checkStartOfBlock()&&u.checkEndOfBlock()){var x=new d.elementPath(u.startContainer),y=x.block;if(y.is('li')||y.getParent().is('li')){s.execCommand('outdent');return;}}var z=t==3?'div':'p',A=u.splitBlock(z);if(!A)return;var B=A.previousBlock,C=A.nextBlock,D=A.wasStartOfBlock,E=A.wasEndOfBlock,F;if(C){F=C.getParent();if(F.is('li')){C.breakParent(F);C.move(C.getNext(),true);}}else if(B&&(F=B.getParent())&&F.is('li')){B.breakParent(F);u.moveToElementEditStart(B.getNext());B.move(B.getPrevious());}if(!D&&!E){if(C.is('li')&&(F=C.getFirst(d.walker.invisible(true)))&&F.is&&F.is('ul','ol'))(c?w.createText('\xa0'):w.createElement('br')).insertBefore(F);if(C)u.moveToElementEditStart(C);}else{var G;if(B){if(B.is('li')||!(v||o.test(B.getName())))G=B.clone();}else if(C)G=C.clone();if(!G)G=w.createElement(z);var H=A.elementPath;if(H)for(var I=0,J=H.elements.length;I0;u--)t[u].deleteContents();return t[0];};})();(function(){var l='nbsp,gt,lt,quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',m='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',n='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv'; function o(p){var q={},r=[],s={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};p=p.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(x,y){q[s[y]]='&'+y+';';r.push(s[y]);return '';});p=p.split(',');var t=document.createElement('div'),u;t.innerHTML='&'+p.join(';&')+';';u=t.innerHTML;t=null;for(var v=0;v'+t+'',t);}},onClick:function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);setTimeout(function(){l.fire('saveSnapshot');},0);},onRender:function(){l.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path;for(var v in p){if(p[v].checkActive(u)){if(v!=t)this.setValue(v,l.lang.format['tag_'+v]);return;}}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}}); if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form',true))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName();if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2};if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},afterInit:function(l){if(c){var m=l.dataProcessor,n=m&&m.htmlFilter;n&&n.addRules({elements:{input:function(o){var p=o.attributes,q=p.type;if(q=='checkbox'||q=='radio')p.value=='on'&&delete p.value;}}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={canUndo:false,exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(O){var P=O.children.length,Q=O.children[P-1];while(Q&&Q.type==3&&!e.trim(Q.value))Q=O.children[--P];return Q;};function o(O,P){var Q=O.children,R=n(O);if(R){if((P||!c)&&R.type==1&&R.name=='br')Q.pop();if(R.type==3&&l.test(R.value))Q.pop();}};function p(O){var P=n(O);return!P||P.type==1&&P.name=='br'||O.name=='form'&&P.name=='input';};function q(O){o(O,true);if(p(O))if(c)O.add(new a.htmlParser.text('\xa0'));else O.add(new a.htmlParser.element('br',{}));};function r(O){o(O);if(p(O))O.add(new a.htmlParser.text('\xa0'));};var s=f,t=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var u in t){if(!('br' in s[u]))delete t[u];}delete t.pre;var v={attributeNames:[[/^on/,'_cke_pa_on']]},w={elements:{}};for(u in t)w.elements[u]=q;var x={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^_cke_(saved|pa)_/,''],[/^_cke.*/,''],['hidefocus','']],elements:{$:function(O){var P=O.attributes;if(P){if(P.cke_temp)return false;var Q=['name','href','src'],R;for(var S=0;S]+)))/gi,A=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,B=/([^<]*)<\/cke:encoded>/gi,C=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,E=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function F(O){return O.replace(z,'$& _cke_saved_$1');};function G(O){return O.replace(A,function(P){return ''+encodeURIComponent(P)+'';});};function H(O){return O.replace(B,function(P,Q){return decodeURIComponent(Q);});};function I(O){return O.replace(C,'$1cke:$2');};function J(O){return O.replace(D,'$1$2');};function K(O){return O.replace(E,'');};function L(O){return O.replace(//g,function(P){return '';});};function M(O){return O.replace(//g,function(P,Q){return decodeURIComponent(Q);});};function N(O,P){var Q=[],R=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,S=[//gi,//gi].concat(P);O=O.replace(//g,function(U){return '';});for(var T=0;T';});O=O.replace(R,function(U,V,W){return ''; });return O;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(O){var P=O.dataProcessor=new a.htmlDataProcessor(O);P.writer.forceSimpleAmpersand=O.config.forceSimpleAmpersand;P.dataFilter.addRules(v);P.dataFilter.addRules(w);P.htmlFilter.addRules(x);P.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(O){var P=this;P.editor=O;P.writer=new a.htmlWriter();P.dataFilter=new a.htmlParser.filter();P.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(O,P){O=N(O,this.editor.config.protectedSource);O=F(O);O=G(O);O=I(O);O=K(O);var Q=new h('div');Q.setHtml('a'+O);O=Q.getHtml().substr(1);O=J(O);O=H(O);O=M(O);var R=a.htmlParser.fragment.fromHtml(O,P),S=new a.htmlParser.basicWriter();R.writeHtml(S,this.dataFilter);O=S.getHtml(true);O=L(O);return O;},toDataFormat:function(O,P){var Q=this.writer,R=a.htmlParser.fragment.fromHtml(O,P);Q.reset();R.writeHtml(Q,this.htmlFilter);return Q.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement'))return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1};function m(r,s){r.getCommand(this.name).setState(s);};function n(r){var C=this;var s=r.data.path.elements,t,u,v=r.editor;for(var w=0;wG;A++)F[A].indent+=B;var I=j.list.arrayToList(F,E,null,r.config.enterMode,0);if(this.name=='outdent'){var J;if((J=t.getParent())&&J.is('li')){var K=I.listNode.getChildren(),L=[],M=K.count(),N;for(A=M-1;A>=0;A--){if((N=K.getItem(A))&&N.is&&N.is('li'))L.push(N);}}}if(I)I.listNode.replace(t);if(L&&L.length)for(A=0;A0;if(u.useIndentClasses){u.classNameRegex=new RegExp('(?:^|\\s+)('+r.config.indentClasses.join('|')+')(?=$|\\s)');u.indentClassMap={};for(var t=0;t=0;x--){v=t[x].createIterator();v.enlargeBr=r!=2;while(w=v.getNextParagraph()){w.removeAttribute('align');if(u){var y=w.$.className=e.ltrim(w.$.className.replace(z.cssClassRegex,''));if(z.state==2&&!z.isDefaultAlign)w.addClass(u);else if(!y)w.removeAttribute('class');}else if(z.state==2&&!z.isDefaultAlign)w.setStyle('text-align',z.value);else w.removeStyle('text-align');}}p.focus();p.forceNextSelectionCheck();q.selectBookmarks(s);}};j.add('justify',{init:function(p){var q=new o(p,'justifyleft','left'),r=new o(p,'justifycenter','center'),s=new o(p,'justifyright','right'),t=new o(p,'justifyblock','justify');p.addCommand('justifyleft',q);p.addCommand('justifycenter',r);p.addCommand('justifyright',s);p.addCommand('justifyblock',t);p.ui.addButton('JustifyLeft',{label:p.lang.justify.left,command:'justifyleft'});p.ui.addButton('JustifyCenter',{label:p.lang.justify.center,command:'justifycenter'});p.ui.addButton('JustifyRight',{label:p.lang.justify.right,command:'justifyright'});p.ui.addButton('JustifyBlock',{label:p.lang.justify.block,command:'justifyblock'}); p.on('selectionChange',e.bind(n,q));p.on('selectionChange',e.bind(n,s));p.on('selectionChange',e.bind(n,r));p.on('selectionChange',e.bind(n,t));},requires:['domiterator']});})();e.extend(i,{justifyClasses:null});j.add('keystrokes',{beforeInit:function(l){l.keystrokeHandler=new a.keystrokeHandler(l);l.specialKeys={};},init:function(l){var m=l.config.keystrokes,n=l.config.blockedKeystrokes,o=l.keystrokeHandler.keystrokes,p=l.keystrokeHandler.blockedKeystrokes;for(var q=0;qD[F-1].indent+1){var J=D[F-1].indent+1-D[F].indent,K=D[F].indent;while(D[F]&&D[F].indent>=K){D[F].indent+=J;F++;}F--;}}var L=j.list.arrayToList(D,C,null,A.config.enterMode),M=L.listNode,N,O;function P(Q){if((N=M[Q?'getFirst':'getLast']())&&!(N.is&&N.isBlockBoundary())&&(O=B.root[Q?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(O.is&&O.isBlockBoundary({br:1})))A.document.createElement('br')[Q?'insertBefore':'insertAfter'](N);};P(true);P();M.replace(B.root);};function s(A,B){this.name=A;this.type=B;};s.prototype={exec:function(A){A.focus();var B=A.document,C=A.getSelection(),D=C&&C.getRanges();if(!D||D.length<1)return;if(this.state==2){var E=B.getBody();E.trim();if(!E.getFirst()){var F=B.createElement(A.config.enterMode==1?'p':A.config.enterMode==3?'div':'br');F.appendTo(E);D=[new d.range(B)];if(F.is('br')){D[0].setStartBefore(F);D[0].setEndAfter(F);}else D[0].selectNodeContents(F);C.selectRanges(D);}else{var G=D.length==1&&D[0],H=G&&G.getEnclosedNode();if(H&&H.is&&this.type==H.getName())n.call(this,A,1);}}var I=C.createBookmarks(true),J=[],K={};while(D.length>0){G=D.shift();var L=G.getBoundaryNodes(),M=L.startNode,N=L.endNode;if(M.type==1&&M.getName()=='td')G.setStartAt(L.startNode,1);if(N.type==1&&N.getName()=='td')G.setEndAt(L.endNode,2);var O=G.createIterator(),P;O.forceBrBreak=this.state==2;while(P=O.getNextParagraph()){var Q=new d.elementPath(P),R=Q.elements,S=R.length,T=null,U=false,V=Q.blockLimit,W;for(var X=S-1;X>=0&&(W=R[X]);X--){if(l[W.getName()]&&V.contains(W)){V.removeCustomData('list_group_object');var Y=W.getCustomData('list_group_object');if(Y)Y.contents.push(P);else{Y={root:W,contents:[P]};J.push(Y);h.setMarker(K,W,'list_group_object',Y);}U=true;break;}}if(U)continue;var Z=V;if(Z.getCustomData('list_group_object'))Z.getCustomData('list_group_object').contents.push(P);else{Y={root:Z,contents:[P]};h.setMarker(K,Z,'list_group_object',Y);J.push(Y);}}}var aa=[];while(J.length>0){Y=J.shift();if(this.state==2){if(l[Y.root.getName()])p.call(this,A,Y,K,aa); else q.call(this,A,Y,aa);}else if(this.state==1&&l[Y.root.getName()])r.call(this,A,Y,K);}for(X=0;X0)for(var t=s.length-1;t>=0;t--){var u=s[t][0],v=s[t][1];if(v)u.insertBefore(v);else u.appendTo(r);}};function n(r,s){var t=l(r),u={},v=r.$;if(!s){u['class']=v.className||'';v.className='';}u.inline=v.style.cssText||'';if(!s)v.style.cssText='position: static; overflow: visible';m(t);return u;};function o(r,s){var t=l(r),u=r.$;if('class' in s)u.className=s['class'];if('inline' in s)u.style.cssText=s.inline;m(t);};function p(r,s){return function(){var t=r.getViewPaneSize();s.resize(t.width,t.height,null,true);};};function q(r){if(r.focusManager.hasFocus){var s=r.container.append(h.createFromHtml('')); s.on('focus',function(){r.focus();});s.focus();s.remove();}};j.add('maximize',{init:function(r){var s=r.lang,t=a.document,u=t.getWindow(),v,w,x,y=p(u,r),z=2;r.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var A=r.container.getChild(1),B=r.getThemeSpace('contents');if(r.mode=='wysiwyg'){var C=r.getSelection();v=C&&C.getRanges();w=u.getScrollPosition();}else{var D=r.textarea.$;v=!c&&[D.selectionStart,D.selectionEnd];w=[D.scrollLeft,D.scrollTop];}if(this.state==2){u.on('resize',y);x=u.getScrollPosition();var E=r.container;while(E=E.getParent()){E.setCustomData('maximize_saved_styles',n(E));E.setStyle('z-index',r.config.baseFloatZIndex-1);}B.setCustomData('maximize_saved_styles',n(B,true));A.setCustomData('maximize_saved_styles',n(A,true));if(c)t.$.documentElement.style.overflow=t.getBody().$.style.overflow='hidden';else t.getBody().setStyles({overflow:'hidden',width:'0px',height:'0px'});c?setTimeout(function(){u.$.scrollTo(0,0);},0):u.$.scrollTo(0,0);var F=u.getViewPaneSize();A.setStyle('position','absolute');A.$.offsetLeft;A.setStyles({'z-index':r.config.baseFloatZIndex-1,left:'0px',top:'0px'});r.resize(F.width,F.height,null,true);var G=A.getDocumentPosition();A.setStyles({left:-1*G.x+'px',top:-1*G.y+'px'});b.gecko&&q(r);A.addClass('cke_maximized');}else if(this.state==1){u.removeListener('resize',y);var H=[B,A];for(var I=0;I 
    ');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0; return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true); }return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=n.config,q=p.baseHref?'':'',r=b.isCustomDomain();if(p.fullPage)o=n.getData().replace(//,'$&'+q).replace(/[^>]*(?=<\/title>)/,n.lang.preview);else{var s=''+''+q+''+n.lang.preview+''+e.buildStyleHtml(n.config.contentsCss)+''+s+n.getData()+'';}var u=640,v=420,w=80;try{var x=window.screen;u=Math.round(x.width*0.8);v=Math.round(x.height*0.7);w=Math.round(x.width*0.1);}catch(A){}var y='';if(r){window._cke_htmlToLoad=o;y='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var z=window.open(y,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+u+',height='+v+',left='+w);if(!r){z.document.open();z.document.write(o);z.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=l.getSelection().getRanges();for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createBookmark(),s=r.startNode,t=r.endNode,u=function(x){var y=new d.elementPath(x),z=y.elements;for(var A=1,B;B=z[A];A++){if(B.equals(y.block)||B.equals(y.blockLimit))break;if(m.test(B.getName()))x.breakParent(B);}};u(s);u(t);var v=s.getNextSourceNode(true,1); while(v){if(v.equals(t))break;var w=v.getNextSourceNode(false,1);if(!(v.getName()=='img'&&v.getAttribute('_cke_realelement')))if(m.test(v.getName()))v.remove(true);else v.removeAttributes(n);v=w;}q.moveToBookmark(r);}l.getSelection().selectRanges(o);}}}};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(l){var m=l.config;if(m.resize_enabled){var n=null,o,p;function q(t){var u=t.data.$.screenX-o.x,v=t.data.$.screenY-o.y,w=p.width+u*(l.lang.dir=='rtl'?-1:1),x=p.height+v;l.resize(Math.max(m.resize_minWidth,Math.min(w,m.resize_maxWidth)),Math.max(m.resize_minHeight,Math.min(x,m.resize_maxHeight)));};function r(t){a.document.removeListener('mousemove',q);a.document.removeListener('mouseup',r);if(l.document){l.document.removeListener('mousemove',q);l.document.removeListener('mouseup',r);}};var s=e.addFunction(function(t){if(!n)n=l.getResizable();p={width:n.$.offsetWidth||0,height:n.$.offsetHeight||0};o={x:t.screenX,y:t.screenY};a.document.on('mousemove',q);a.document.on('mouseup',r);if(l.document){l.document.on('mousemove',q);l.document.on('mouseup',r);}});l.on('destroy',function(){e.removeFunction(s);});l.on('themeSpace',function(t){if(t.data.space=='bottom')t.data.html+='
    ';},l,null,100);}}});i.resize_minWidth=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form;if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l);o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='',n=null,o=null;function p(u,v){var w=false,x;for(x in v){if(v[x]===u||v[x]==u){w=true;break;}}return w;};var q=function(){var u=this,v=function(){var y={};y.srcNodeRef=u.document.getWindow().$.frameElement;y.assocApp='CKEDITOR.'+a.version+'@'+a.revision;y.customerid=u.config.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';y.customDictionaryIds=u.config.scayt_customDictionaryIds||'';y.userDictionaryName=u.config.scayt_userDictionaryName||'';y.sLang=u.config.scayt_sLang||'en_US';y.onBeforeChange=function(){if(!u.checkDirty())setTimeout(function(){u.resetDirty(); });};var z=window.scayt_custom_params;if(typeof z=='object')for(var A in z)y[A]=z[A];if(o)y.id=o;var B=new window.scayt(y),C=r.instances[u.name];if(C){B.sLang=C.sLang;B.option(C.option());B.paused=C.paused;}r.instances[u.name]=B;var D='scaytButton',E=window.scayt.uiTags,F=[];for(var G=0,H=4;G=0){this.setState(0);u.on('showScaytState',function(){this.removeListener();this.setState(r.isScaytEnabled(u)?1:2);},this);r.loadEngine(u);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(u){u.config.menu_groups='scayt_suggest,scayt_moresuggest,scayt_control,'+u.config.menu_groups;},init:function(u){var v={},w={},x=u.addCommand(l,t);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var y=u.config.scayt_uiTabs||'1,1,1',z=[];y=y.split(',');for(var A=0,B=3;A tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,'')); }}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w0)return;if(S.type==1&&m.test(S.getName())&&!S.getCustomData('selected_cell')){h.setMarker(J,S,'selected_cell',true); I.push(S);}};for(var L=0;L0&&P.$.rows[K]||P.$.parentNode);for(M=I.length;M>=0;M--){if(I[M])r(I[M]);}return J;}else if(F instanceof h){P=F.getAscendant('table');if(P.$.rows.length==1)P.remove();else F.remove();}return 0;};function s(F,G){var H=F.getStartElement(),I=H.getAscendant('td',true)||H.getAscendant('th',true);if(!I)return;var J=I.getAscendant('table'),K=I.$.cellIndex;for(var L=0;L=0;H--){if(G[H])t(G[H]);}}else if(F instanceof h){var I=F.getAscendant('table'),J=F.$.cellIndex;for(H=I.$.rows.length-1;H>=0;H--){var K=new h(I.$.rows[H]);if(!J&&K.$.cells.length==1){r(K);continue;}if(K.$.cells[J])K.$.removeChild(K.$.cells[J]);}}};function u(F,G){var H=F.getStartElement(),I=H.getAscendant('td',true)||H.getAscendant('th',true);if(!I)return;var J=I.clone();if(!c)J.appendBogus();if(G)J.insertBefore(I);else J.insertAfter(I);};function v(F){if(F instanceof d.selection){var G=n(F),H=G[0]&&G[0].getAscendant('table'),I=o(G);for(var J=G.length-1; J>=0;J--)v(G[J]);if(I)x(I,true);else if(H)H.remove();}else if(F instanceof h){var K=F.getParent();if(K.getChildCount()==1)K.remove();else F.remove();}};function w(F){var G=F.getBogus();G&&G.remove();F.trim();};function x(F,G){var H=new d.range(F.getDocument());if(!H['moveToElementEdit'+(G?'End':'Start')](F)){H.selectNodeContents(F);H.collapse(G?false:true);}H.select(true);};function y(F){var G=F.$.rows,H=-1,I=[];for(var J=0;J=P)L.removeAttribute('rowSpan');else L.$.rowSpan=V;if(V>=O)L.removeAttribute('colSpan');else L.$.colSpan=W;var ah=new d.nodeList(M.$.rows),ai=ah.count();for(Z=ai-1;Z>=0;Z--){var aj=ah.getItem(Z);if(!aj.$.cells.length){aj.remove();ai++;continue;}}return L;}else return V*W==Y;};function C(F,G){var H=n(F);if(H.length>1)return false;else if(G)return true;var I=H[0],J=I.getParent(),K=J.getAscendant('table'),L=y(K),M=J.$.rowIndex,N=z(L,M,I),O=I.$.rowSpan,P,Q,R,S; if(O>1){Q=Math.ceil(O/2);R=Math.floor(O/2);S=M+Q;var T=new h(K.$.rows[S]),U=z(L,S),V;P=I.clone();for(var W=0;WN){P.insertBefore(new h(V));break;}else V=null;}if(!V)T.append(P,true);}else{R=Q=1;T=J.clone();T.insertAfter(J);T.append(P=I.clone());var X=z(L,M);for(var Y=0;Y1)return false;else if(G)return true;var I=H[0],J=I.getParent(),K=J.getAscendant('table'),L=y(K),M=J.$.rowIndex,N=z(L,M,I),O=I.$.colSpan,P,Q,R;if(O>1){Q=Math.ceil(O/2);R=Math.floor(O/2);}else{R=Q=1;var S=A(L,N);for(var T=0;T0?2:0};}},tablecell_insertBefore:{label:G.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:G.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:G.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:G.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:G.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:G.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:G.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:G.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:G.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:G.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:G.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:G.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:G.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:G.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:G.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:G.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:G.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(F.contextMenu)F.contextMenu.addListener(function(H,I){if(!H)return null;while(H){if(H.getName() in E)return{tablecell:2,tablerow:2,tablecolumn:2}; H=H.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||us){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(ts)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptLoader.load(p,o); else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];){if(q.focus){q.focus();return;}}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){var r,s,t,u=n.lang.dir=='rtl';switch(q){case u?37:39:case 9:do{r=p.next;if(!r){s=p.toolbar.next;t=s&&s.items.length;while(t===0){s=s.next;t=s&&s.items.length;}if(s)r=s.items[0];}p=r;}while(p&&!p.focus)if(p)p.focus();else n.toolbox.focus();return false;case u?39:37:case 2000+9:do{r=p.previous;if(!r){s=p.toolbar.previous;t=s&&s.items.length;while(t===0){s=s.previous;t=s&&s.items.length;}if(s)r=s.items[t-1];}p=r;}while(p&&!p.focus)if(p)p.focus();else{var v=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;v[v.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q='cke_'+e.getNextNumber(),r=['');if(n.config.toolbarCanCollapse){var F=e.addFunction(function(){n.execCommand('toolbarCollapse');});n.on('destroy',function(){e.removeFunction(F);});var G='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(H){var I=a.document.getById(G),J=I.getPrevious(),K=H.getThemeSpace('contents'),L=J.getParent(),M=parseInt(K.$.style.height,10),N=L.$.offsetHeight,O=!J.isVisible();if(!O){J.hide();I.addClass('cke_toolbox_collapser_min');I.setAttribute('title',H.lang.toolbarExpand);}else{J.show();I.removeClass('cke_toolbox_collapser_min');I.setAttribute('title',H.lang.toolbarCollapse);}I.getFirst().setText(O?'â–²':'â—€');var P=L.$.offsetHeight-N;K.setStyle('height',M-P+'px');H.fire('resize');},modes:{wysiwyg:1,source:1}});r.push('','','');}p.data.html+=r.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];i.toolbar='Full';i.toolbarCanCollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(r){var s=new n(r),t=r.addCommand('undo',{exec:function(){if(s.undo()){r.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),u=r.addCommand('redo',{exec:function(){if(s.redo()){r.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false}); s.onChange=function(){t.setState(s.undoable()?2:0);u.setState(s.redoable()?2:0);};function v(w){if(s.enabled&&w.data.command.canUndo!==false)s.save();};r.on('beforeCommandExec',v);r.on('afterCommandExec',v);r.on('saveSnapshot',function(){s.save();});r.on('contentDom',function(){r.document.on('keydown',function(w){if(!w.data.$.ctrlKey&&!w.data.$.metaKey)s.type(w);});});r.on('beforeModeUnload',function(){r.mode=='wysiwyg'&&s.save(true);});r.on('mode',function(){s.enabled=r.mode=='wysiwyg';s.onChange();});r.ui.addButton('Undo',{label:r.lang.undo,command:'undo'});r.ui.addButton('Redo',{label:r.lang.redo,command:'redo'});r.resetUndo=function(){s.reset();r.fire('saveSnapshot');};}});function l(r){var s=r.getSnapshot(),t=s&&r.getSelection();c&&s&&(s=s.replace(/\s+_cke_expando=".*?"/g,''));this.contents=s;this.bookmarks=t&&t.createBookmarks2(true);};var m=/\b(?:href|src|name)="[^"]*?"/gi;l.prototype={equals:function(r,s){var t=this.contents,u=r.contents;if(c&&(b.ie7Compat||b.ie6Compat)){t=t.replace(m,'');u=u.replace(m,'');}if(t!=u)return false;if(s)return true;var v=this.bookmarks,w=r.bookmarks;if(v||w){if(!v||!w||v.length!=w.length)return false;for(var x=0;x25){this.save(false,null,false);this.modifiersCount=1;}}else if(!x){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var r=this;r.lastKeystroke=0;r.snapshots=[];r.index=-1;r.limit=r.editor.config.undoStackSize;r.currentImage=null;r.hasUndo=false;r.hasRedo=false;r.resetType();},resetType:function(){var r=this;r.typing=false; delete r.lastKeystroke;r.typesCount=0;r.modifiersCount=0;},fireChange:function(){var r=this;r.hasUndo=!!r.getNextImage(true);r.hasRedo=!!r.getNextImage(false);r.resetType();r.onChange();},save:function(r,s,t){var v=this;var u=v.snapshots;if(!s)s=new l(v.editor);if(s.contents===false)return false;if(v.currentImage&&s.equals(v.currentImage,r))return false;u.splice(v.index+1,u.length-v.index-1);if(u.length==v.limit)u.shift();v.index=u.push(s)-1;v.currentImage=s;if(t!==false)v.fireChange();return true;},restoreImage:function(r){var t=this;t.editor.loadSnapshot(r.contents);if(r.bookmarks)t.editor.getSelection().selectBookmarks(r.bookmarks);else if(c){var s=t.editor.document.getBody().$.createTextRange();s.collapse(true);s.select();}t.index=r.index;t.snapshots.splice(t.index,1,t.currentImage=new l(t.editor));t.fireChange();},getNextImage:function(r){var w=this;var s=w.snapshots,t=w.currentImage,u,v;if(t)if(r)for(v=w.index-1;v>=0;v--){u=s[v];if(!t.equals(u,true)){u.index=v;return u;}}else for(v=w.index+1;v]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\1>)?\s*(?=$|<\/body>)/gi;function n(w){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var x=this.getSelection(),y=w.data;if(this.dataProcessor)y=this.dataProcessor.toHtml(y);if(c){var z=x.isLocked;if(z)x.unlock();var A=x.getNative();if(A.type=='Control')A.clear();A.createRange().pasteHTML(y);if(z)this.getSelection().lock();}else this.document.$.execCommand('inserthtml',false,y);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function o(w){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var x=w.data,y=x.getName(),z=f.$block[y],A=this.getSelection(),B=A.getRanges(),C=A.isLocked;if(C)A.unlock();var D,E,F,G;for(var H=B.length-1;H>=0;H--){D=B[H];D.deleteContents();E=!H&&x||x.clone(true);var I,J;if(z)while((I=D.getCommonAncestor(false,true))&&(J=f[I.getName()])&&!(J&&J[y])){if(I.getName() in f.span)D.splitElement(I); else if(D.checkStartOfBlock()&&D.checkEndOfBlock()){D.setStartBefore(I);D.collapse(true);I.remove();}else D.splitBlock();}D.insertNode(E);if(!F)F=E;}D.moveToPosition(F,4);var K=F.getNextSourceNode(true);if(K&&K.type==1)D.moveToElementEditStart(K);A.selectRanges([D]);if(C)this.getSelection().lock();e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function p(w){if(!w.checkDirty())setTimeout(function(){w.resetDirty();});};var q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true);function s(w){return q(w)&&r(w);};function t(w){return w.type==3&&e.trim(w.getText()).match(/^(?: |\xa0)$/);};function u(w){if(w.isLocked){w.unlock();setTimeout(function(){w.lock();},0);}};function v(w){var x=w.editor,y=w.data.path,z=y.blockLimit,A=w.data.selection,B=A.getRanges()[0],C=x.document.getBody(),D=x.config.enterMode;if(D!=2&&B.collapsed&&z.getName()=='body'&&!y.block){p(x);c&&u(A);var E=B.fixBlock(true,x.config.enterMode==3?'div':'p');if(c){var F=E.getFirst(s);F&&t(F)&&F.remove();}if(E.getOuterHtml().match(m)){var G=E.getPrevious(q),H=E.getNext(q);if(G&&G.getName&&!(G.getName() in l)&&B.moveToElementEditStart(G)||H&&H.getName&&!(H.getName() in l)&&B.moveToElementEditStart(H))E.remove();}B.select();if(!c)x.selectionChange();}var I=new d.range(x.document),J=new d.walker(I);I.selectNodeContents(C);J.evaluator=function(L){return L.type==1&&L.getName() in l;};J.guard=function(L,M){return!(L.type==3&&q(L)||M);};if(J.previous()){p(x);c&&u(A);var K;if(D!=2)K=C.append(new h(D==1?'p':'div'));else K=C;if(!c)K.appendBogus();}};j.add('wysiwygarea',{requires:['editingblock'],init:function(w){var x=w.config.enterMode!=2?w.config.enterMode==3?'div':'p':false,y=w.lang.editorTitle.replace('%1',w.name);w.on('editingBlockReady',function(){var B,C,D,E,F,G,H=b.isCustomDomain(),I=function(L){if(C)C.remove();F=0;var M=!b.gecko&&e.addFunction(function(O){e.removeFunction(M);O.write(L);}),N='document.open();'+(H?'document.domain="'+document.domain+'";':'')+('parent.CKEDITOR.tools.callFunction('+M+',document);')+'document.close();';C=h.createFromHtml('');b.gecko&&C.on('load',function(O){O.removeListener();var P=C.getFrameDocument().$;P.open();P.write(L);P.close();});B.append(C);},J='',K=function(L){if(F)return; F=1;w.fire('ariaWidget',C);var M=L.document,N=M.body,O=M.getElementById('cke_actscrpt');O.parentNode.removeChild(O);delete a._['contentDomReady'+w.name];N.spellcheck=!w.config.disableNativeSpellChecker;if(c){N.hideFocus=true;N.disabled=true;N.contentEditable=true;N.removeAttribute('disabled');}else M.designMode='on';try{M.execCommand('enableObjectResizing',false,!w.config.disableObjectResizing);}catch(T){}try{M.execCommand('enableInlineTableEditing',false,!w.config.disableNativeTableHandles);}catch(U){}L=w.window=new d.window(L);M=w.document=new g(M);if(!(c||b.opera))M.on('mousedown',function(V){var W=V.data.getTarget();if(W.is('img','hr','input','textarea','select'))w.getSelection().selectElement(W);});if(b.webkit){M.on('click',function(V){if(V.data.getTarget().is('input','select'))V.data.preventDefault();});M.on('mouseup',function(V){if(V.data.getTarget().is('input','textarea'))V.data.preventDefault();});}if(c&&M.$.compatMode=='CSS1Compat'){var P=M.getDocumentElement();P.on('mousedown',function(V){if(V.data.getTarget().equals(P))A.focus();});}var Q=c||b.webkit?L:M;Q.on('blur',function(){w.focusManager.blur();});Q.on('focus',function(){if(b.gecko){var V=N;while(V.firstChild)V=V.firstChild;if(!V.nextSibling&&'BR'==V.tagName&&V.hasAttribute('_moz_editor_bogus_node')){p(w);var W=M.$.createEvent('KeyEvents');W.initKeyEvent('keypress',true,true,L.$,false,false,false,false,0,32);M.$.dispatchEvent(W);var X=M.getBody().getFirst();if(w.config.enterMode==2)M.createElement('br',{attributes:{_moz_dirty:''}}).replace(X);else X.remove();}}w.focusManager.focus();});var R=w.keystrokeHandler;if(R)R.attach(M);if(c){M.on('keydown',function(V){var W=V.data.getKeystroke();if(W in {8:1,46:1}){var X=w.getSelection(),Y=X.getSelectedElement();if(Y){w.fire('saveSnapshot');var Z=X.getRanges()[0].createBookmark();Y.remove();X.selectBookmarks([Z]);w.fire('saveSnapshot');V.data.preventDefault();}}});if(M.$.compatMode=='CSS1Compat'){var S={33:1,34:1};M.on('keydown',function(V){if(V.data.getKeystroke() in S)setTimeout(function(){w.getSelection().scrollIntoView();},0);});}}if(w.contextMenu)w.contextMenu.addTarget(M,w.config.browserContextMenuOnCtrl!==false);setTimeout(function(){w.fire('contentDom');if(G){w.mode='wysiwyg';w.fire('mode');G=false;}D=false;if(E){w.focus();E=false;}setTimeout(function(){w.fire('dataReady');},0);if(c)setTimeout(function(){if(w.document){var V=w.document.$.body;V.runtimeStyle.marginBottom='0px';V.runtimeStyle.marginBottom='';}},1000);},0);};w.addMode('wysiwyg',{load:function(L,M,N){B=L; if(c&&b.quirks)L.setStyle('position','relative');w.mayBeDirty=true;G=true;if(N)this.loadSnapshotData(M);else this.loadData(M);},loadData:function(L){D=true;var M=w.config,N=M.fullPage,O=M.docType,P='';!N&&(P=e.buildStyleHtml(w.config.contentsCss)+P);var Q=M.baseHref?'':'';if(N)L=L.replace(/]*>/i,function(R){w.docType=O=R;return '';});if(w.dataProcessor)L=w.dataProcessor.toHtml(L,x);if(N){if(!/]/.test(L))L=''+L;if(!/]/.test(L))L=''+L+'';if(!/]/.test(L))L=L.replace(/]*>/,'$&');Q&&(L=L.replace(//,'$&'+Q));L=L.replace(/<\/head\s*>/,P+'$&');L=O+L;}else L=M.docType+''+''+y+''+''+Q+P+''+''+L+'';L+=J;a._['contentDomReady'+w.name]=K;this.onDispose();I(L);},getData:function(){var L=w.config,M=L.fullPage,N=M&&w.docType,O=C.getFrameDocument(),P=M?O.getDocumentElement().getOuterHtml():O.getBody().getHtml();if(w.dataProcessor)P=w.dataProcessor.toDataFormat(P,x);if(L.ignoreEmptyParagraph)P=P.replace(m,'');if(N)P=N+'\n'+P;return P;},getSnapshotData:function(){return C.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(L){C.getFrameDocument().getBody().setHtml(L);},onDispose:function(){if(!w.document)return;w.document.getDocumentElement().clearCustomData();w.document.getBody().clearCustomData();w.window.clearCustomData();w.document.clearCustomData();C.clearCustomData();},unload:function(L){this.onDispose();w.window=w.document=C=B=E=null;w.fire('contentDomUnload');},focus:function(){if(D)E=true;else if(w.window){w.window.focus();w.selectionChange();}}});w.on('insertHtml',n,null,null,20);w.on('insertElement',o,null,null,20);w.on('selectionChange',v,null,null,1);});var z;w.on('contentDom',function(){var B=w.document.getElementsByTag('title').getItem(0);B.setAttribute('_cke_title',w.document.$.title);w.document.$.title=y;});if(c){var A;w.on('uiReady',function(){A=w.container.append(h.createFromHtml(''));A.on('focus',function(){w.focus();});});w.on('destroy',function(){A.clearCustomData();});}}});if(b.gecko)(function(){var w=document.body;if(!w)window.addEventListener('load',arguments.callee,false);else w.setAttribute('onpageshow',w.getAttribute('onpageshow')+';event.persisted && CKEDITOR.tools.callFunction('+e.addFunction(function(){var x=a.instances,y,z; for(var A in x){y=x[A];z=y.document;if(z){z.$.designMode='off';z.$.designMode='on';}}})+')');})();})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{requires:['dialog'],init:function(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){function l(K){return!!this._.tabs[K][0].$.offsetHeight;};function m(){var O=this;var K=O._.currentTabId,L=O._.tabIdList.length,M=e.indexOf(O._.tabIdList,K)+L;for(var N=M-1;N>M-L;N--){if(l.call(O,O._.tabIdList[N%L]))return O._.tabIdList[N%L];}return null;};function n(){var O=this;var K=O._.currentTabId,L=O._.tabIdList.length,M=e.indexOf(O._.tabIdList,K);for(var N=M+1;N1){P._.tabBarMode=true;P._.tabs[P._.currentTabId][0].focus();T=1;}else if((ab==37||ab==39)&&P._.tabBarMode){ad=ab==37?m.call(P):n.call(P);P.selectPage(ad);P._.tabs[ad][0].focus();T=1;}else if((ab==13||ab==32)&&P._.tabBarMode){ae.selectPage(ae._.currentTabId);ae._.tabBarMode=false;ae._.currentFocusIndex=-1;S(true);T=1;}if(T){aa.stop();aa.data.preventDefault();}};function V(aa){T&&aa.data.preventDefault();};var W=this._.element;this.on('show',function(){W.on('keydown',U,this,null,0);if(b.opera||b.gecko&&b.mac)W.on('keypress',V,this);if(b.ie6Compat){var aa=y.getChild(0).getFrameDocument();aa.on('keydown',U,this,null,0);}});this.on('hide',function(){W.removeListener('keydown',U);if(b.opera||b.gecko&&b.mac)W.removeListener('keypress',V);});this.on('iframeAdded',function(aa){var ab=new g(aa.data.iframe.$.contentWindow.document);ab.on('keydown',U,this,null,0);});this.on('show',function(){var ae=this;R();if(K.config.dialog_startupFocusTab&&P._.tabIdList.length>1){P._.tabBarMode=true;P._.tabs[P._.currentTabId][0].focus();}else if(!ae._.hasFocus){ae._.currentFocusIndex=-1;if(M.onFocus){var aa=M.onFocus.call(ae);aa&&aa.focus();}else S(true);if(ae._.editor.mode=='wysiwyg'&&c){var ab=K.document.$.selection,ac=ab.createRange(); if(ac)if(ac.parentElement&&ac.parentElement().ownerDocument==K.document.$||ac.item&&ac.item(0).ownerDocument==K.document.$){var ad=document.body.createTextRange();ad.moveToElementText(ae.getElement().getFirst().$);ad.collapse(true);ad.select();}}}},this,null,4294967295);if(b.ie6Compat)this.on('load',function(aa){var ab=this.getElement(),ac=ab.getFirst();ac.remove();ac.appendTo(ab);},this);v(this);w(this);new d.text(M.title,a.document).appendTo(this.parts.title);for(var X=0;X0?L:0)+'px',top:(M>0?M:0)+'px'});};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){var K=this._.editor;if(K.mode=='wysiwyg'&&c){var L=K.getSelection();L&&L.lock(); }var M=this._.element,N=this.definition;if(!(M.getParent()&&M.getParent().equals(a.document.getBody())))M.appendTo(a.document.getBody());else return;if(b.gecko&&b.version<10900){var O=this.parts.dialog;O.setStyle('position','absolute');setTimeout(function(){O.setStyle('position','fixed');},0);}this.resize(N.minWidth,N.minHeight);this.selectPage(this.definition.contents[0].id);this.reset();if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;z(this._.editor);M.on('keydown',C);M.on(b.opera?'keypress':'keyup',D);for(var P in {keyup:1,keydown:1,keypress:1})M.on(P,J);}else{this._.parentDialog=a.dialog._.currentTop;var Q=this._.parentDialog.getElement().getFirst();Q.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}E(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;e.setTimeout(function(){var R=a.document.getWindow().getViewPaneSize(),S=this.getSize();this.move((R.width-N.minWidth)/2,(R.height-S.height)/2);this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(T){T.setInitValue&&T.setInitValue();});},100,this);},foreach:function(K){var N=this;for(var L in N._.contents)for(var M in N._.contents[L])K(N._.contents[L][M]);return N;},reset:(function(){var K=function(L){if(L.reset)L.reset();};return function(){this.foreach(K);return this;};})(),setupContent:function(){var K=arguments;this.foreach(function(L){if(L.setup)L.setup.apply(L,K);});},commitContent:function(){var K=arguments;this.foreach(function(L){if(L.commit)L.commit.apply(L,K);});},hide:function(){this.fire('hide',{});this._.editor.fire('dialogHide',this);var K=this._.element;if(!K.getParent())return;K.remove();this.parts.dialog.setStyle('visibility','hidden');F(this);if(!this._.parentDialog)A();else{var L=this._.parentDialog.getElement().getFirst();L.setStyle('z-index',parseInt(L.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;K.removeListener('keydown',C);K.removeListener(b.opera?'keypress':'keyup',D);for(var M in {keyup:1,keydown:1,keypress:1})K.removeListener(M,J);var N=this._.editor; N.focus();if(N.mode=='wysiwyg'&&c){var O=N.getSelection();O&&O.unlock(true);}}else a.dialog._.currentZIndex-=10;this.foreach(function(P){P.resetInitValue&&P.resetInitValue();});},addPage:function(K){var W=this;var L=[],M=K.label?' title="'+e.htmlEncode(K.label)+'"':'',N=K.elements,O=a.dialog._.uiElementBuilders.vbox.build(W,{type:'vbox',className:'cke_dialog_page_contents',children:K.elements,expand:!!K.expand,padding:K.padding,style:K.style||'width: 100%; height: 100%;'},L),P=h.createFromHtml(L.join(''));P.setAttribute('role','tabpanel');var Q=b,R=K.id+'_'+e.getNextNumber(),S=h.createFromHtml(['0?' cke_last':'cke_first',M,!!K.hidden?' style="display:none"':'',' id="',R,'"',Q.gecko&&Q.version>=10900&&!Q.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',K.label,''].join(''));P.setAttribute('aria-labelledby',R);W._.tabs[K.id]=[S,P];W._.tabIdList.push(K.id);!K.hidden&&W._.pageCount++;W._.lastTab=S;W.updateStyle();var T=W._.contents[K.id]={},U,V=O.getChild();while(U=V.shift()){T[U.id]=U;if(typeof U.getChild=='function')V.push.apply(V,U.getChild());}P.setAttribute('name',K.id);P.appendTo(W.parts.contents);S.unselectable();W.parts.tabs.append(S);if(K.accessKey){E(W,W,'CTRL+'+K.accessKey,H,G);W._.accessKeyMap['CTRL+'+K.accessKey]=K.id;}},selectPage:function(K){var P=this;for(var L in P._.tabs){var M=P._.tabs[L][0],N=P._.tabs[L][1];if(L!=K){M.removeClass('cke_dialog_tab_selected');N.hide();}N.setAttribute('aria-hidden',L!=K);}var O=P._.tabs[K];O[0].addClass('cke_dialog_tab_selected');O[1].show();P._.currentTabId=K;P._.currentTabIndex=e.indexOf(P._.tabIdList,K);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(K){var M=this;var L=M._.tabs[K]&&M._.tabs[K][0];if(!L||M._.pageCount==1)return;else if(K==M._.currentTabId)M.selectPage(m.call(M));L.hide();M._.pageCount--;M.updateStyle();},showPage:function(K){var M=this;var L=M._.tabs[K]&&M._.tabs[K][0];if(!L)return;L.show();M._.pageCount++;M.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(K,L){var M=this._.contents[K];return M&&M[L];},getValueOf:function(K,L){return this.getContentElement(K,L).getValue();},setValueOf:function(K,L,M){return this.getContentElement(K,L).setValue(M);},getButton:function(K){return this._.buttons[K];},click:function(K){return this._.buttons[K].click();},disableButton:function(K){return this._.buttons[K].disable(); },enableButton:function(K){return this._.buttons[K].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(K,L){var N=this;if(typeof L=='undefined'){L=N._.focusList.length;N._.focusList.push(new o(N,K,L));}else{N._.focusList.splice(L,0,new o(N,K,L));for(var M=L+1;MV.width-U.width-P)aa=V.width-U.width+Q[1];else aa=M.x;if(M.y+Q[0]V.height-U.height-P)ab=V.height-U.height+Q[2];else ab=M.y;K.move(aa,ab);T.data.preventDefault();};function S(T){a.document.removeListener('mousemove',R);a.document.removeListener('mouseup',S);if(b.ie6Compat){var U=y.getChild(0).getFrameDocument();U.removeListener('mousemove',R);U.removeListener('mouseup',S);}};K.parts.title.on('mousedown',function(T){K._.updateSize=true;L={x:T.data.$.screenX,y:T.data.$.screenY};a.document.on('mousemove',R);a.document.on('mouseup',S);M=K.getPosition();if(b.ie6Compat){var U=y.getChild(0).getFrameDocument();U.on('mousemove',R);U.on('mouseup',S);}T.data.preventDefault();},K);};function w(K){var L=K.definition,M=L.minWidth||0,N=L.minHeight||0,O=L.resizable,P=K.getParentEditor().skin.margins||[0,0,0,0];function Q(ab,ac){ab.y+=ac;};function R(ab,ac){ab.x2+=ac;};function S(ab,ac){ab.y2+=ac;};function T(ab,ac){ab.x+=ac;};var U=null,V=null,W=K._.editor.config.magnetDistance,X=['tl','t','tr','l','r','bl','b','br'];function Y(ab){var ac=ab.listenerData.part,ad=K.getSize();V=K.getPosition();e.extend(V,{x2:V.x+ad.width,y2:V.y+ad.height});U={x:ab.data.$.screenX,y:ab.data.$.screenY};a.document.on('mousemove',Z,K,{part:ac});a.document.on('mouseup',aa,K,{part:ac});if(b.ie6Compat){var ae=y.getChild(0).getFrameDocument();ae.on('mousemove',Z,K,{part:ac});ae.on('mouseup',aa,K,{part:ac});}ab.data.preventDefault();};function Z(ab){var ac=ab.data.$.screenX,ad=ab.data.$.screenY,ae=ac-U.x,af=ad-U.y,ag=a.document.getWindow().getViewPaneSize(),ah=ab.listenerData.part;if(ah.search('t')!=-1)Q(V,af);if(ah.search('l')!=-1)T(V,ae);if(ah.search('b')!=-1)S(V,af);if(ah.search('r')!=-1)R(V,ae); U={x:ac,y:ad};var ai,aj,ak,al;if(V.x+P[3]ag.width-W)ak=ag.width+P[1];else if(ah.search('r')!=-1&&V.x2-V.xag.height-W)al=ag.height+P[2];else if(ah.search('b')!=-1&&V.y2-V.y'];if(b.ie6Compat){var O=b.isCustomDomain(),P="";N.push('');}N.push('
    ');y=h.createFromHtml(N.join(''));}var Q=y,R=function(){var V=L.getViewPaneSize();Q.setStyles({width:V.width+'px',height:V.height+'px'});},S=function(){var V=L.getScrollPosition(),W=a.dialog._.currentTop;Q.setStyles({left:V.x+'px',top:V.y+'px'});do{var X=W.getPosition();W.move(X.x,X.y);}while(W=W._.parentDialog)};x=R;L.on('resize',R);R();if(b.ie6Compat){var T=function(){S();arguments.callee.prevScrollHandler.apply(this,arguments);};L.$.setTimeout(function(){T.prevScrollHandler=window.onscroll||(function(){});window.onscroll=T;},0);S();}var U=K.config.dialog_backgroundCoverOpacity;Q.setOpacity(typeof U!='undefined'?U:0.5);Q.appendTo(a.document.getBody());},A=function(){if(!y)return;var K=a.document.getWindow();y.remove();K.removeListener('resize',x);if(b.ie6Compat)K.$.setTimeout(function(){var L=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=L||null;},0);x=null;},B={},C=function(K){var L=K.data.$.ctrlKey||K.data.$.metaKey,M=K.data.$.altKey,N=K.data.$.shiftKey,O=String.fromCharCode(K.data.$.keyCode),P=B[(L?'CTRL+':'')+(M?'ALT+':'')+(N?'SHIFT+':'')+O]; if(!P||!P.length)return;P=P[P.length-1];P.keydown&&P.keydown.call(P.uiElement,P.dialog,P.key);K.data.preventDefault();},D=function(K){var L=K.data.$.ctrlKey||K.data.$.metaKey,M=K.data.$.altKey,N=K.data.$.shiftKey,O=String.fromCharCode(K.data.$.keyCode),P=B[(L?'CTRL+':'')+(M?'ALT+':'')+(N?'SHIFT+':'')+O];if(!P||!P.length)return;P=P[P.length-1];if(P.keyup){P.keyup.call(P.uiElement,P.dialog,P.key);K.data.preventDefault();}},E=function(K,L,M,N,O){var P=B[M]||(B[M]=[]);P.push({uiElement:K,dialog:L,key:M,keyup:O||K.accessKeyUp,keydown:N||K.accessKeyDown});},F=function(K){for(var L in B){var M=B[L];for(var N=M.length-1;N>=0;N--){if(M[N].dialog==K||M[N].uiElement==K)M.splice(N,1);}if(M.length===0)delete B[L];}},G=function(K,L){if(K._.accessKeyMap[L])K.selectPage(K._.accessKeyMap[L]);},H=function(K,L){},I={27:1,13:1},J=function(K){if(K.data.getKeystroke() in I)K.data.stopPropagation();};(function(){k.dialog={uiElement:function(K,L,M,N,O,P,Q){if(arguments.length<4)return;var R=(N.call?N(L):N)||'div',S=['<',R,' '],T=(O&&O.call?O(L):O)||{},U=(P&&P.call?P(L):P)||{},V=(Q&&Q.call?Q.call(this,K,L):Q)||'',W=this.domId=U.id||e.getNextNumber()+'_uiElement',X=this.id=L.id,Y;U.id=W;var Z={};if(L.type)Z['cke_dialog_ui_'+L.type]=1;if(L.className)Z[L.className]=1;var aa=U['class']&&U['class'].split?U['class'].split(' '):[];for(Y=0;Y=0;Y--){if(ac[Y]==='')ac.splice(Y,1);}if(ac.length>0)U.style=(U.style?U.style+'; ':'')+ac.join('; ');for(Y in U)S.push(Y+'="'+e.htmlEncode(U[Y])+'" ');S.push('>',V,'');M.push(S.join(''));(this._||(this._={})).dialog=K;if(typeof L.isChanged=='boolean')this.isChanged=function(){return L.isChanged;};if(typeof L.isChanged=='function')this.isChanged=L.isChanged;a.event.implementOn(this);this.registerEvents(L);if(this.accessKeyUp&&this.accessKeyDown&&L.accessKey)E(this,K,'CTRL+'+L.accessKey);var ad=this;K.on('load',function(){if(ad.getInputElement())ad.getInputElement().on('focus',function(){K._.tabBarMode=false;K._.hasFocus=true;ad.fire('focus');},ad);});if(this.keyboardFocusable){this.tabIndex=L.tabIndex||0;this.focusIndex=K._.focusList.push(this)-1;this.on('focus',function(){K._.currentFocusIndex=ad.focusIndex;});}e.extend(this,L);},hbox:function(K,L,M,N,O){if(arguments.length<4)return;this._||(this._={});var P=this._.children=L,Q=O&&O.widths||null,R=O&&O.height||null,S={},T,U=function(){var W=['']; for(T=0;T0)W.push('style="'+Y.join('; ')+'" ');W.push('>',M[T],'');}W.push('');return W.join('');},V={role:'presentation'};O&&O.align&&(V.align=O.align);k.dialog.uiElement.call(this,K,O||{type:'hbox'},N,'table',S,V,U);},vbox:function(K,L,M,N,O){if(arguments.length<3)return;this._||(this._={});var P=this._.children=L,Q=O&&O.width||null,R=O&&O.heights||null,S=function(){var T=['');for(var U=0;U');}T.push('
    0)T.push('style="',V.join('; '),'" ');T.push(' class="cke_dialog_ui_vbox_child">',M[U],'
    ');return T.join('');};k.dialog.uiElement.call(this,K,O||{type:'vbox'},N,'div',null,{role:'presentation'},S);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(K){this.getInputElement().setValue(K);this.fire('change',{value:K});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var N=this;var K=N.getInputElement(),L=K,M;while((L=L.getParent())&&L.$.className.search('cke_dialog_page_contents')==-1){}if(!L)return N;M=L.getAttribute('name');if(N._.dialog._.currentTabId!=M)N._.dialog.selectPage(M);return N;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(K){var L=/^on([A-Z]\w+)/,M,N=function(P,Q,R,S){Q.on('load',function(){P.getInputElement().on(R,S,P);});}; for(var O in K){if(!(M=O.match(L)))continue;if(this.eventProcessors[O])this.eventProcessors[O].call(this,this._.dialog,K[O]);else N(this,this._.dialog,M[1].toLowerCase(),K[O]);}return this;},eventProcessors:{onLoad:function(K,L){K.on('load',L,this);},onShow:function(K,L){K.on('show',L,this);},onHide:function(K,L){K.on('hide',L,this);}},accessKeyDown:function(K,L){this.focus();},accessKeyUp:function(K,L){},disable:function(){var K=this.getInputElement();K.setAttribute('disabled','true');K.addClass('cke_disabled');},enable:function(){var K=this.getInputElement();K.removeAttribute('disabled');K.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(K){var L=this;if(arguments.length<1)return L._.children.concat();if(!K.splice)K=[K];if(K.length<2)return L._.children[K[0]];else return L._.children[K[0]]&&L._.children[K[0]].getChild?L._.children[K[0]].getChild(K.slice(1,K.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var K={build:function(L,M,N){var O=M.children,P,Q=[],R=[];for(var S=0;S',P.name,'');return Q.join('');}};a.style.getStyleText=function(P){var Q=P._ST;if(Q)return Q;Q=P.styles;var R=P.attributes&&P.attributes.style||'',S='';if(R.length)R=R.replace(n,';');for(var T in Q){var U=Q[T],V=(T+':'+U).replace(n,';');if(U=='inherit')S+=V;else R+=V;}if(R.length)R=L(R);R+=S;return P._ST=R;};function o(P){var ao=this;var Q=P.document;if(P.collapsed){var R=E(ao,Q);P.insertNode(R);P.moveToPosition(R,2);return;}var S=ao.element,T=ao._.definition,U,V=f[S]||(U=true,f.span),W=P.createBookmark();P.enlarge(1);P.trim();var X=P.getBoundaryNodes(),Y=X.startNode,Z=X.endNode.getNextSourceNode(true);if(!Z){var aa;Z=aa=Q.createText('');Z.insertAfter(P.endContainer);}var ab=Z.getParent();if(ab&&ab.getAttribute('_fck_bookmark'))Z=ab;if(Z.equals(Y)){Z=Z.getNextSourceNode(true);if(!Z){Z=aa=Q.createText('');Z.insertAfter(Y);}}var ac=Y,ad;while(ac){var ae=false;if(ac.equals(Z)){ac=null;ae=true;}else{var af=ac.type,ag=af==1?ac.getName():null;if(ag&&ac.getAttribute('_fck_bookmark')){ac=ac.getNextSourceNode(true);continue;}if(!ag||V[ag]&&(ac.getPosition(Z)|4|0|8)==4+0+8&&(!T.childRule||T.childRule(ac))){var ah=ac.getParent();if(ah&&((ah.getDtd()||f.span)[S]||U)&&(!T.parentRule||T.parentRule(ah))){if(!ad&&(!ag||!f.$removeEmpty[ag]||(ac.getPosition(Z)|4|0|8)==4+0+8)){ad=new d.range(Q);ad.setStartBefore(ac);}if(af==3||af==1&&!ac.getChildCount()){var ai=ac,aj;while(!ai.$.nextSibling&&(aj=ai.getParent(),V[aj.getName()])&&(aj.getPosition(Y)|2|0|8)==2+0+8&&(!T.childRule||T.childRule(aj)))ai=aj; ad.setEndAfter(ai);if(!ai.$.nextSibling)ae=true;}}else ae=true;}else ae=true;ac=ac.getNextSourceNode();}if(ae&&ad&&!ad.collapsed){var ak=E(ao,Q),al=ad.getCommonAncestor();while(ak&&al){if(al.getName()==S){for(var am in T.attributes){if(ak.getAttribute(am)==al.getAttribute(am))ak.removeAttribute(am);}for(var an in T.styles){if(ak.getStyle(an)==al.getStyle(an))ak.removeStyle(an);}if(!ak.hasAttributes()){ak=null;break;}}al=al.getParent();}if(ak){ad.extractContents().appendTo(ak);z(ao,ak);ad.insertNode(ak);C(ak);if(!c)ak.$.normalize();}ad=null;}}aa&&aa.remove();P.moveToBookmark(W);P.shrink(a.SHRINK_TEXT);};function p(P){P.enlarge(1);var Q=P.createBookmark(),R=Q.startNode;if(P.collapsed){var S=new d.elementPath(R.getParent()),T;for(var U=0,V;U';else P.setHtml(R);Q.remove();};function u(P){var Q=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,R=P.getName(),S=v(P.getOuterHtml(),Q,function(U,V,W){return V+''+W+'
    ';}),T=[];S.replace(/([\s\S]*?)<\/pre>/gi,function(U,V){T.push(V);});return T;};function v(P,Q,R){var S='',T='';P=P.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(U,V,W){V&&(S=V);W&&(T=W);return '';});return S+P.replace(Q,R)+T;};function w(P,Q){var R=new d.documentFragment(Q.getDocument());for(var S=0;S');T=T.replace(/[ \t]{2,}/g,function(V){return e.repeat(' ',V.length-1)+' ';});var U=Q.clone();U.setHtml(T);R.append(U);}return R;};function x(P,Q){var R=P.getHtml();R=v(R,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');R=R.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');R=R.replace(/([ \t\n\r]+| )/g,' ');R=R.replace(/]*>/gi,'\n');if(c){var S=P.getDocument().createElement('div');S.append(Q);Q.$.outerHTML='
    '+R+'
    ';Q=S.getFirst().remove();}else Q.setHtml(R);return Q;};function y(P,Q){var R=P._.definition,S=e.extend({},R.attributes,J(P)[Q.getName()]),T=R.styles,U=e.isEmpty(S)&&e.isEmpty(T);for(var V in S){if((V=='class'||P._.definition.fullMatch)&&Q.getAttribute(V)!=K(V,S[V]))continue;U=Q.hasAttribute(V);Q.removeAttribute(V);}for(var W in T){if(P._.definition.fullMatch&&Q.getStyle(W)!=K(W,T[W],true))continue;U=U||!!Q.getStyle(W);Q.removeStyle(W);}U&&B(Q);};function z(P,Q){var R=P._.definition,S=R.attributes,T=R.styles,U=J(P),V=Q.getElementsByTag(P.element);for(var W=V.count();--W>=0;)y(P,V.getItem(W));for(var X in U){if(X!=P.element){V=Q.getElementsByTag(X);for(W=V.count()-1;W>=0;W--){var Y=V.getItem(W);A(Y,U[X]);}}}};function A(P,Q){var R=Q&&Q.attributes;if(R)for(var S=0;S0)G+=(E.$.offsetWidth||0)-(E.$.clientWidth||0);G+=4;E.setStyle('width',G+'px');u.element.addClass('cke_frameLoaded');var H=u.element.$.scrollHeight;if(c&&b.quirks&&H>0)H+=(E.$.offsetHeight||0)-(E.$.clientHeight||0);E.setStyle('height',H+'px');t._.currentBlock.element.setStyle('display','none').removeStyle('display');}else E.removeStyle('height');var I=t.element,J=I.getWindow(),K=J.getScrollPosition(),L=J.getViewPaneSize(),M={height:I.$.offsetHeight,width:I.$.offsetWidth};if(z?A<0:A+M.width>L.width+K.x)A+=M.width*(z?1:-1);if(B+M.height>L.height+K.y)B-=M.height;v.setStyles({top:B+'px',left:A+'px',opacity:'1'});},this);t.isLoaded?D():t.onLoad=D;e.setTimeout(function(){w.$.contentWindow.focus(); this.allowBlur(true);},0,this);},0,this);this.visible=1;if(this.onShow)this.onShow.call(this);m=false;},hide:function(){var o=this;if(o.visible&&(!o.onHide||o.onHide.call(o)!==true)){o.hideChild();o.element.setStyle('display','none');o.visible=0;}},allowBlur:function(o){var p=this._.panel;if(o!=undefined)p.allowBlur=o;return p.allowBlur;},showAsChild:function(o,p,q,r,s,t){if(this._.activeChild==o&&o._.panel._.offsetParentId==q.getId())return;this.hideChild();o.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=o;this._.focused=false;o.showBlock(p,q,r,s,t);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){o.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var o=this._.activeChild;if(o){delete o.onHide;delete this._.activeChild;o.hide();}}}});a.on('instanceDestroyed',function(){var o=e.isEmpty(a.instances);for(var p in l){var q=l[p];if(o)q.destroy();else q.element.hide();}o&&(l={});});})();j.add('menu',{beforeInit:function(l){var m=l.config.menu_groups.split(','),n=l._.menuGroups={},o=l._.menuItems={};for(var p=0;p'],y=q.length,z=y&&q[0].group;for(var A=0;A');z=B.group;}B.render(this,A,x);}x.push('');t.setHtml(x.join(''));if(this.parent)this.parent._.panel.showAsChild(s,this.id,m,n,o,p);else s.showBlock(this.id,m,n,o,p);r.fire('menuShow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuItem=e.createClass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,className:'cke_button_'+m});o.group=l._.menuGroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var u=this;var o=l.id+String(m),p=typeof u.state=='undefined'?2:u.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=u.label;if(u.className)q+=' '+u.className;var s=u.getItems;n.push(''+''); if(s)n.push('','&#',u.editor.lang.dir=='rtl'?'9668':'9658',';','');n.push(r,'');}}});i.menu_subMenuDelay=400;i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var l=function(n,o){return n._.modes&&n._.modes[o||n.mode];},m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
    ';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;l(n).loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removeListener('mode',arguments.callee);});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(l(n).getData());m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=l(n).getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)l(n).loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=l(this);o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=l(this,n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupMode='wysiwyg';i.startupFocus=false;i.editingBlock=true;(function(){function l(){var v=this;try{var s=v.getSelection();if(!s)return;var t=s.getStartElement(),u=new d.elementPath(t);if(!u.compare(v._.selectionPreviousPath)){v._.selectionPreviousPath=u;v.fire('selectionChange',{selection:s,path:u,element:t});}}catch(w){}};var m,n;function o(){n=true;if(m)return;p.call(this);m=e.setTimeout(p,200,this);};function p(){m=null;if(n){e.setTimeout(l,0,this);n=false;}};var q={modes:{wysiwyg:1,source:1},exec:function(s){switch(s.mode){case 'wysiwyg':s.document.$.execCommand('SelectAll',false,null); break;case 'source':var t=s.textarea.$;if(c)t.createTextRange().execCommand('SelectAll');else{t.selectionStart=0;t.selectionEnd=t.value.length;}t.focus();}},canUndo:false};j.add('selection',{init:function(s){s.on('contentDom',function(){var t=s.document,u=t.getBody();if(c){var v,w;u.on('focusin',function(z){if(z.data.$.srcElement.nodeName!='BODY')return;if(v){try{v.select();}catch(A){}v=null;}});u.on('focus',function(){w=true;y();});u.on('beforedeactivate',function(z){if(z.data.$.toElement)return;w=false;});if(c&&b.version<8)t.getWindow().on('blur',function(z){s.document.$.selection.empty();});u.on('mousedown',x);u.on('mouseup',function(){w=true;setTimeout(function(){y(true);},0);});u.on('keydown',x);u.on('keyup',function(){w=true;y();});t.on('selectionchange',y);function x(){w=false;};function y(z){if(w){var A=s.document,B=A&&A.$.selection;if(z&&B&&B.type=='None')if(!A.$.queryCommandEnabled('InsertImage')){e.setTimeout(y,50,this,true);return;}v=B&&B.createRange();o.call(s);}};}else{t.on('mouseup',o,s);t.on('keyup',o,s);}});s.addCommand('selectAll',q);s.ui.addButton('SelectAll',{label:s.lang.selectAll,command:'selectAll'});s.selectionChange=o;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var s=new d.selection(this);return!s||s.isInvalid?null:s;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(s){var v=this;var t=s.getCustomData('cke_locked_selection');if(t)return t;v.document=s;v.isLocked=false;v._={cache:{}};if(c){var u=v.getNative().createRange();if(!u||u.item&&u.item(0).ownerDocument!=v.document.$||u.parentElement&&u.parentElement().ownerDocument!=v.document.$)v.isInvalid=true;}return v;};var r={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,th:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var s=this._.cache;if(s.type)return s.type;var t=1;try{var u=this.getNative(),v=u.type;if(v=='Text')t=2;if(v=='Control')t=3;if(u.createRange().parentElement)t=2;}catch(w){}return s.type=t;}:function(){var s=this._.cache;if(s.type)return s.type;var t=2,u=this.getNative(); if(!u)t=1;else if(u.rangeCount==1){var v=u.getRangeAt(0),w=v.startContainer;if(w==v.endContainer&&w.nodeType==1&&v.endOffset-v.startOffset==1&&r[w.childNodes[v.startOffset].nodeName.toLowerCase()])t=3;}return s.type=t;},getRanges:c?(function(){var s=function(t,u){t=t.duplicate();t.collapse(u);var v=t.parentElement(),w=v.childNodes,x;for(var y=0;y0)break;else if(!A||B==1&&A==-1)return{container:v,offset:y};else if(!B)return{container:v,offset:y+1};x=null;}}if(!x){x=t.duplicate();x.moveToElementText(v);x.collapse(false);}x.setEndPoint('StartToStart',t);var C=x.text.replace(/(\r\n|\r)/g,'\n').length;try{while(C>0)C-=w[--y].nodeValue.length;}catch(D){C=0;}if(C===0)return{container:v,offset:y};else return{container:w[y],offset:-C};};return function(){var E=this;var t=E._.cache;if(t.ranges)return t.ranges;var u=E.getNative(),v=u&&u.createRange(),w=E.getType(),x;if(!u)return[];if(w==2){x=new d.range(E.document);var y=s(v,true);x.setStart(new d.node(y.container),y.offset);y=s(v);x.setEnd(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=E._.cache.ranges=[];for(var A=0;A=0){q.collapse(true);o.setEnd(q.endContainer.$,q.endOffset);}else throw r;}var p=q.document.getSelection().getNative();p.removeAllRanges();p.addRange(o);};})();(function(){var l={elements:{$:function(m){var n=m.attributes,o=n&&n._cke_realelement,p=o&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(o)),q=p&&p.children[0];if(q&&m.attributes._cke_resizable){var r=m.attributes.style;if(r){var s=/(?:^|\s)width\s*:\s*(\d+)/i.exec(r),t=s&&s[1];s=/(?:^|\s)height\s*:\s*(\d+)/i.exec(r);var u=s&&s[1];if(t)q.attributes.width=t;if(u)q.attributes.height=u;}}return q;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter; if(o)o.addRules(l);}});})();a.editor.prototype.createFakeElement=function(l,m,n,o){var p=this.lang.fakeobjects,q={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(l.getOuterHtml()),_cke_real_node_type:l.type,alt:p[n]||p.unknown};if(n)q._cke_real_element_type=n;if(o)q._cke_resizable=o;return this.document.createElement('img',{attributes:q});};a.editor.prototype.createFakeParserElement=function(l,m,n,o){var p=this.lang.fakeobjects,q,r=new a.htmlParser.basicWriter();l.writeHtml(r);q=r.getHtml();var s={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(q),_cke_real_node_type:l.type,alt:p[n]||p.unknown};if(n)s._cke_real_element_type=n;if(o)s._cke_resizable=o;return new a.htmlParser.element('img',s);};a.editor.prototype.restoreRealElement=function(l){if(l.getAttribute('_cke_real_node_type')!=1)return null;return h.createFromHtml(decodeURIComponent(l.getAttribute('_cke_realelement')),this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(l){l.ui.addHandler(3,k.richCombo.handler);}});a.UI_RICHCOMBO=3;k.richCombo=e.createClass({$:function(l){var n=this;e.extend(n,l,{title:l.label,modes:{wysiwyg:1}});var m=n.panel||{};delete n.panel;n.id=e.getNextNumber();n.document=m&&m.parent&&m.parent.getDocument()||a.document;m.className=(m.className||'')+' cke_rcombopanel';m.block={multiSelect:m.multiSelect,attributes:m.attributes};n._={panelDefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richCombo(l);}}},proto:{renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n=b,o='cke_'+this.id,p=e.addFunction(function(s){var v=this;var t=v._;if(t.state==0)return;v.createPanel(l);if(t.on){t.panel.hide();return;}if(!t.committed){t.list.commit();t.committed=1;}var u=v.getValue();if(u)t.list.mark(u);else t.list.unmarkAll();t.panel.showBlock(v.id,new h(s),4);},this),q={id:o,combo:this,focus:function(){var s=a.document.getById(o).getChild(1);s.focus();},clickFn:p};l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);var r=e.addFunction(function(s,t){s=new d.event(s);var u=s.getKeystroke();switch(u){case 13:case 32:case 40:e.callFunction(p,t);break;default:q.onkey(q,u);}s.preventDefault();});q.keyDownFn=r;m.push('','','',this.label,'','=10900&&!n.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',o,'_label" aria-describedby="',o,'_text" aria-haspopup="true"'); if(b.opera||b.gecko&&b.mac)m.push(' onkeypress="return false;"');if(b.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="CKEDITOR.tools.callFunction( ',r,', event, this );" onclick="CKEDITOR.tools.callFunction(',p,', this); return false;">'+this.label+''+''+''+(b.hc?'':'')+''+''+''+'');if(this.onRender)this.onRender();return q;},createPanel:function(l){if(this._.panel)return;var m=this._.panelDefinition,n=this._.panelDefinition.block,o=m.parent||a.document.getBody(),p=new k.floatPanel(l,o,m),q=p.addListBlock(this.id,n),r=this;p.onShow=function(){if(r.className)this.element.getFirst().addClass(r.className+'_panel');r.setState(1);q.focus(!r.multiSelect&&r.getValue());r._.on=1;if(r.onOpen)r.onOpen();};p.onHide=function(){if(r.className)this.element.getFirst().removeClass(r.className+'_panel');r.setState(2);r._.on=0;if(r.onClose)r.onClose();};p.onEscape=function(){p.hide();r.document.getById('cke_'+r.id).getFirst().getNext().focus();};q.onClick=function(s,t){r.document.getWindow().focus();if(r.onClick)r.onClick.call(r,s,t);if(t)r.setValue(s,r._.items[s]);else r.setValue('');p.hide();};this._.panel=p;this._.list=q;p.getBlock(this.id).onHide=function(){r._.on=0;r.setState(2);};if(this.init)this.init();},setValue:function(l,m){var o=this;o._.value=l;var n=o.document.getById('cke_'+o.id+'_text');if(!(l||m)){m=o.label;n.addClass('cke_inline_label');}else n.removeClass('cke_inline_label');n.setHtml(typeof m!='undefined'?m:l);},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(l){this._.list.mark(l);},hideItem:function(l){this._.list.hideItem(l);},hideGroup:function(l){this._.list.hideGroup(l);},showAll:function(){this._.list.showAll();},add:function(l,m,n){this._.items[l]=n||l;this._.list.add(l,m,n);},startGroup:function(l){this._.list.startGroup(l);},commit:function(){this._.list.commit();},setState:function(l){var m=this;if(m._.state==l)return;m.document.getById('cke_'+m.id).setState(l);m._.state=l;}}});k.prototype.addRichCombo=function(l,m){this.add(l,3,m);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var n=this;n.base();n.indentationChars='\t';n.selfClosingEnd=' />';n.lineBreakChars='\n';n.forceSimpleAmpersand=false;n.sortAttributes=true;n._.indent=false;n._.indentation='';n._.rules={}; var l=f;for(var m in e.extend({},l.$nonBodyContent,l.$block,l.$listItem,l.$tableContent))n.setRules(m,{indent:true,breakBeforeOpen:true,breakAfterOpen:true,breakBeforeClose:!l[m]['#'],breakAfterClose:true});n.setRules('br',{breakAfterOpen:true});n.setRules('title',{indent:false,breakAfterOpen:false});n.setRules('style',{indent:false,breakBeforeClose:true});n.setRules('pre',{indent:false});},proto:{openTag:function(l,m){var o=this;var n=o._.rules[l];if(o._.indent)o.indentation();else if(n&&n.breakBeforeOpen){o.lineBreak();o.indentation();}o._.output.push('<',l);},openTagClose:function(l,m){var o=this;var n=o._.rules[l];if(m)o._.output.push(o.selfClosingEnd);else{o._.output.push('>');if(n&&n.indent)o._.indentation+=o.indentationChars;}if(n&&n.breakAfterOpen)o.lineBreak();},attribute:function(l,m){if(typeof m=='string'){this.forceSimpleAmpersand&&(m=m.replace(/&/g,'&'));m=e.htmlEncodeAttr(m);}this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationChars.length);if(n._.indent)n.indentation();else if(m&&m.breakBeforeClose){n.lineBreak();n.indentation();}n._.output.push('');if(m&&m.breakAfterClose)n.lineBreak();},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.lineBreakChars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setRules:function(l,m){var n=this._.rules[l];if(n)e.extend(n,m,true);else this._.rules[l]=m;}}});j.add('menubutton',{requires:['button','contextmenu'],beforeInit:function(l){l.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var l=function(m){var n=this._;if(n.state===0)return;n.previousState=n.state;var o=n.menu;if(!o){o=n.menu=new j.contextMenu(m);o.definition.panel.attributes['aria-label']=m.lang.common.options;o.onHide=e.bind(function(){this.setState(n.previousState);},this);if(this.onMenu)o.addListener(this.onMenu);}if(n.on){o.hide();return;}this.setState(1);o.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(m){var n=m.panel;delete m.panel;this.base(m);this.hasArrow=true;this.click=l;},statics:{handler:{create:function(m){return new k.menuButton(m);}}}});})();j.add('dialogui');(function(){var l=function(t){var w=this; w._||(w._={});w._['default']=w._.initValue=t['default']||'';w._.required=t.required||false;var u=[w._];for(var v=1;v',u.label,'','');else{var B={type:'hbox',widths:u.widths,padding:0,children:[{type:'html',html:'