Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Apr 17, 10:51 PM

in-portal

Index: trunk/admin/editor/cmseditor/editor/css/fck_editorarea.css
===================================================================
--- trunk/admin/editor/cmseditor/editor/css/fck_editorarea.css (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/css/fck_editorarea.css (revision 1695)
@@ -1,51 +1,42 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_editorarea.css
* 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.
*
* Version: 2.0 RC3
* Modified: 2005-02-10 11:46:11
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-body
-{
- font-family: Arial, Verdana, Sans-Serif;
- font-size: 12px;
- padding: 5px 5px 5px 5px;
- margin: 0px;
- border-style: none;
- background-color: #ffffff;
-}
.Bold
{
font-weight: bold;
}
.Code
{
border: #8b4513 1px solid;
padding-right: 5px;
padding-left: 5px;
color: #000066;
font-family: 'Courier New' , Monospace;
background-color: #ff9933;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/css/fck_editorarea.css
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fckcommands.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fckcommands.js (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fckcommands.js (revision 1695)
@@ -1,121 +1,124 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fckcommands.js
* Define all commands available in the editor.
*
* Version: 2.0 RC3
* Modified: 2005-03-02 08:22:35
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var FCKCommands = FCK.Commands = new Object() ;
FCKCommands.LoadedCommands = new Object() ;
FCKCommands.RegisterCommand = function( commandName, command )
{
this.LoadedCommands[ commandName ] = command ;
}
FCKCommands.GetCommand = function( commandName )
{
- var oCommand = FCKCommands.LoadedCommands[ commandName ] ;
+ var oCommand = FCKCommands.LoadedCommands[ commandName ] ;
+
+
if ( oCommand )
return oCommand ;
+
switch ( commandName )
{
case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 390, FCKCommands.GetFullPageState ) ; break ;
case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 330, FCK.GetNamedCommandState, 'CreateLink' ) ; break ;
case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 170 ) ; break ;
case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html' , 370, 170 ) ; break ;
case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html' , 370, 170 ) ; break ;
case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330 ) ; break ;
case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindTitle , 'dialog/fck_find.html' , 340, 170 ) ; break ;
case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgReplaceTitle , 'dialog/fck_replace.html' , 340, 200 ) ; break ;
case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html?ImageButton' , 450, 400 ) ; break ;
case 'Document' : oCommand = new FCKDialogCommand( 'Document' , FCKLang.DlgDocTitle , 'dialog/fck_document.html' , 450, 400 ) ; break ;
case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 300 ) ; break ;
case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ;
case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 400, 250 ) ; break ;
case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 400, 250 ) ; break ;
case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 500, 250 ) ; break ;
case 'UniversalKey' : oCommand = new FCKDialogCommand( 'UniversalKey', FCKLang.UniversalKeyboard , 'dialog/fck_universalkey.html', 415, 300 ) ; break ;
case 'Style' : oCommand = new FCKStyleCommand() ; break ;
case 'FontName' : oCommand = new FCKFontNameCommand() ; break ;
case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ;
case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ;
case 'Source' : oCommand = new FCKSourceCommand() ; break ;
case 'Preview' : oCommand = new FCKPreviewCommand() ; break ;
case 'Save' : oCommand = new FCKSaveCommand() ; break ;
case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;
case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;
case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;
case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ;
case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ;
case 'TableInsertRow' : oCommand = new FCKTableCommand('TableInsertRow') ; break ;
case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ;
case 'TableInsertColumn' : oCommand = new FCKTableCommand('TableInsertColumn') ; break ;
case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ;
case 'TableInsertCell' : oCommand = new FCKTableCommand('TableInsertCell') ; break ;
case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ;
case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ;
case 'TableSplitCell' : oCommand = new FCKTableCommand('TableSplitCell') ; break ;
case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 230 ) ; break ;
case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 230 ) ; break ;
case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 230 ) ; break ;
case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 230 ) ; break ;
case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 230 ) ; break ;
case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 230 ) ; break ;
case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 230 ) ; break ;
case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 380 ) ; break ;
case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 400 ) ; break ;
case 'SpellCheck' : oCommand = new FCKSpellCheckCommand() ; break ;
// Generic Undefined command (usually used when a command is under development).
case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ;
// By default we assume that it is a named command.
default:
if ( FCKRegexLib.NamedCommands.test( commandName ) )
oCommand = new FCKNamedCommand( commandName ) ;
else
{
alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ;
return ;
}
}
FCKCommands.LoadedCommands[ commandName ] = oCommand ;
return oCommand ;
}
// Gets the state of the "Document Properties" button. It must be enabled only
// when "Full Page" editing is available.
FCKCommands.GetFullPageState = function()
{
return FCKConfig.FullPage ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
}
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fckcommands.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js (revision 1695)
@@ -1,208 +1,207 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_2.js
* This is the second part of the "FCK" object creation. This is the main
* object that represents an editor instance.
*
* Version: 2.0 RC3
* Modified: 2005-03-02 10:44:27
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
// This collection is used by the browser specific implementations to tell
// wich named commands must be handled separately.
FCK.RedirectNamedCommands = new Object() ;
FCK.ExecuteNamedCommand = function( commandName, commandParameter )
{
if ( FCK.RedirectNamedCommands[ commandName ] != null ) {
FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ;
}
else
{
FCK.Focus() ;
//alert(commandName);
if (commandName == "Undo")
{
if (confirm("This will delete everything on this page. Are you sure?"))
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
} else
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}
}
FCK.GetNamedCommandState = function( commandName )
{
try
{
if (commandName == 'InsertHorizontalRule')
return FCK_TRISTATE_OFF;
if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) )
return FCK_TRISTATE_DISABLED ;
else {
switch ( commandName )
{
/*
case 'CreateLink' :
case 'Unlink' :
oDocument = FCK.Selection.MoveToAncestorNode( 'A' ) ;
if ( oDocument )
{
//FCK.Selection.MoveToNode( oDocument ) ;
if (oDocument.getAttribute('label',2) == 'Doc')
return FCK_TRISTATE_DISABLED;
else
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
} else
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
break;
*/
default:
return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ;
}
}
}
catch ( e )
{
return FCK_TRISTATE_OFF ;
}
}
FCK.GetNamedCommandValue = function( commandName )
{
var sValue = '' ;
var eState = FCK.GetNamedCommandState( commandName ) ;
if ( eState == FCK_TRISTATE_DISABLED )
return null ;
try
{
sValue = this.EditorDocument.queryCommandValue( commandName ) ;
}
catch(e) {}
return sValue ? sValue : '' ;
}
FCK.CleanAndPaste = function( html )
{
// Remove all SPAN tags
html = html.replace(/<\/?SPAN[^>]*>/gi, "" );
// Remove Class attributes
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove Style attributes
html = html.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi, "<$1$3") ;
// Remove Lang attributes
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
// Remove XML elements and declarations
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
// Remove Tags with XML namespace declarations: <o:p></o:p>
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
// Replace the &nbsp;
html = html.replace(/&nbsp;/, " " );
// Transform <P> to <DIV>
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
html = html.replace( re, "<div$2</div>" ) ;
FCK.InsertHtml( html ) ;
}
FCK.Preview = function()
{
- oWindow = window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ;
-
- if ( FCKBrowserInfo.IsIE ) {
- oWindow.attachEvent( "onload", FCK.SetPreview ) ;
+ if (typeof(FCKConfig.template_name) != 'undefined' && FCKConfig.template_name != '')
+ {
+ oWindow = window.open(FCKConfig.project_path+'index.php?t='+FCKConfig.template_name, 'prewiev', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') ;
+ if ( FCKBrowserInfo.IsIE ) {
+ oWindow.attachEvent( "onload", FCK.SetPreview ) ;
+ }
+ else
+ oWindow.addEventListener( 'load', this.SetPreview, true ) ;
+ } else {
+ var oWindow = window.open( '', null, 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' ) ;
+ var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
+ oWindow.document.write( sHTML );
+ oWindow.document.close();
}
- else
- oWindow.addEventListener( 'load', this.SetPreview, true ) ;
-/*
- var sHTML = '<html><head><link href="' + FCKConfig.EditorAreaCSS + '" rel="stylesheet" type="text/css" /></head><body>' + FCK.GetHTML() + '</body></html>' ;
-
- oWindow.document.write( sHTML );
- oWindow.document.close();
- // TODO: The CSS of the editor area must be configurable.
- // oWindow.document.createStyleSheet( config.EditorAreaCSS );
-*/
}
FCK.SetPreview = function()
{
oWindow.document.getElementById('block_'+FCKConfig.block_id).innerHTML = FCK.GetHTML();
}
function show_props(obj, objName) {
var result = "";
for (var i in obj) {
result = objName + "." + i + " = " + obj[i] + " \n";
alert(result);
}
//return result;
}
FCK.SwitchEditMode = function()
{
// Check if the actual mode is WYSIWYG.
var bWYSIWYG = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
// Display/Hide the TRs.
document.getElementById('eWysiwyg').style.display = bWYSIWYG ? 'none' : '' ;
document.getElementById('eSource').style.display = bWYSIWYG ? '' : 'none' ;
// Update the HTML in the view output to show.
if ( bWYSIWYG )
document.getElementById('eSourceField').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML( FCKConfig.FormatSource ) : FCK.GetHTML( FCKConfig.FormatSource ) ) ;
else
FCK.SetHTML( FCK.GetHTML(), true ) ;
// Updates the actual mode status.
FCK.EditMode = bWYSIWYG ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
// Update the toolbar.
FCKToolbarSet.RefreshModeState() ;
// Set the Focus.
FCK.Focus() ;
}
FCK.CreateElement = function( tag )
{
var e = FCK.EditorDocument.createElement( tag ) ;
return FCK.InsertElementAndGetIt( e ) ;
}
FCK.InsertElementAndGetIt = function( e )
{
e.setAttribute( '__FCKTempLabel', 1 ) ;
this.InsertElement( e ) ;
var aEls = FCK.EditorDocument.getElementsByTagName( e.tagName ) ;
for ( var i = 0 ; i < aEls.length ; i++ )
{
if ( aEls[i].getAttribute( '__FCKTempLabel' ) )
{
aEls[i].removeAttribute( '__FCKTempLabel' ) ;
return aEls[i] ;
}
}
}
Property changes on: trunk/admin/editor/cmseditor/editor/_source/internals/fck_2.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fckstylecommand.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/commandclasses/fckstylecommand.js (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/_source/commandclasses/fckstylecommand.js (revision 1695)
@@ -1,91 +1,138 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fckstylecommand.js
* FCKStyleCommand Class: represents the "Style" command.
*
* Version: 2.0 RC3
* Modified: 2004-11-22 11:07:24
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var FCKStyleCommand = function()
{
this.Name = 'Style' ;
-
// Load the Styles defined in the XML file.
this.StylesLoader = new FCKStylesLoader() ;
this.StylesLoader.Load( FCKConfig.StylesXmlPath ) ;
this.Styles = this.StylesLoader.Styles ;
}
FCKStyleCommand.prototype.Execute = function( styleName, styleComboItem )
{
+ if (styleName == "Clear Styles")
+ {
+ //alert(FCKSelection.GetParentElement());
+ if (FCKBrowserInfo.IsIE)
+ {
+ var selected = FCKSelection.GetParentElement();
+ RemoveStyles(selected.childNodes);
+ } else
+ FCK.ExecuteNamedCommand('RemoveFormat');
+ return ;
+ }
+
if ( styleComboItem.Selected )
styleComboItem.Style.RemoveFromSelection() ;
else
styleComboItem.Style.ApplyToSelection() ;
FCK.Focus() ;
FCK.Events.FireEvent( "OnSelectionChange" ) ;
}
+
+function RemoveStyles(nodes)
+{
+ //alert(nodes.length);
+ if (nodes.length > 0)
+ {
+ for ( var i=nodes.length-1; i>=0; i--)
+ {
+ if (nodes[i].childNodes.length > 0) {
+ RemoveStyles(nodes[i].childNodes);
+ } else {
+ if (nodes[i].parentNode.tagName == 'SPAN' && nodes[i].parentNode.id == '')
+ nodes[i].parentNode.outerHTML = nodes[i].parentNode.innerHTML;
+
+ }
+ }
+ }
+}
+
+
+
+function show_props(obj, objName) {
+ var result = "";
+ for (var i in obj) {
+ result = objName + "." + i + " = " + obj[i] + " \n";
+ alert(result);
+ }
+ //return result;
+ }
+
+
+
FCKStyleCommand.prototype.GetState = function()
{
var oSelection = FCK.EditorDocument.selection ;
-
+
if ( FCKSelection.GetType() == 'Control' )
{
var e = FCKSelection.GetSelectedElement() ;
- if ( e )
+ if ( e )
return this.StylesLoader.StyleGroups[ e.tagName ] ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
else
FCK_TRISTATE_OFF ;
}
else
return FCK_TRISTATE_OFF ;
}
FCKStyleCommand.prototype.GetActiveStyles = function()
{
var aActiveStyles = new Array() ;
if ( FCKSelection.GetType() == 'Control' )
this._CheckStyle( FCKSelection.GetSelectedElement(), aActiveStyles, false ) ;
else
this._CheckStyle( FCKSelection.GetParentElement(), aActiveStyles, true ) ;
-
+
return aActiveStyles ;
}
+
FCKStyleCommand.prototype._CheckStyle = function( element, targetArray, checkParent )
{
if ( ! element )
return ;
-
+ var style_exist = false;
if ( element.nodeType == 1 )
{
var aStyleGroup = this.StylesLoader.StyleGroups[ element.tagName ] ;
if ( aStyleGroup )
{
for ( var i = 0 ; i < aStyleGroup.length ; i++ )
{
- if ( aStyleGroup[i].IsEqual( element ) )
+ if ( aStyleGroup[i].IsEqual( element ) ) {
targetArray[ targetArray.length ] = aStyleGroup[i] ;
+ }
}
}
}
+
+
if ( checkParent )
this._CheckStyle( element.parentNode, targetArray, checkParent ) ;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/_source/commandclasses/fckstylecommand.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarspecialcombo.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarspecialcombo.js (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarspecialcombo.js (revision 1695)
@@ -1,110 +1,104 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fcktoolbarspecialcombo.js
* FCKToolbarSpecialCombo Class: This is a "abstract" base class to be used
* by the special combo toolbar elements like font name, font size, paragraph format, etc...
*
* The following properties and methods must be implemented when inheriting from
* this class:
* - Property: Command [ The command to be executed ]
* - Method: GetLabel() [ Returns the label ]
* - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ]
*
* Version: 2.0 RC3
* Modified: 2005-01-04 18:41:03
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var FCKToolbarSpecialCombo = function()
{
this.SourceView = false ;
this.ContextSensitive = true ;
}
FCKToolbarSpecialCombo.prototype.CreateInstance = function( parentToolbar )
{
+
this._Combo = new FCKSpecialCombo( this.GetLabel() ) ;
this._Combo.FieldWidth = 100 ;
this._Combo.PanelWidth = 150 ;
this._Combo.PanelMaxHeight = 150 ;
this.CreateItems( this._Combo ) ;
this._Combo.Create( parentToolbar.DOMRow.insertCell(-1) ) ;
this._Combo.Command = this.Command ;
this._Combo.OnSelect = function( itemId, item )
{
this.Command.Execute( itemId, item ) ;
}
}
FCKToolbarSpecialCombo.prototype.RefreshState = function()
{
- // Gets the actual state.
+// Gets the actual state.
var eState ;
-
// if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView )
// eState = FCK_TRISTATE_DISABLED ;
// else
// {
- var sValue = this.Command.GetState() ;
-
- if ( sValue != FCK_TRISTATE_DISABLED )
- {
- eState = FCK_TRISTATE_ON ;
-
- if ( !this.RefreshActiveItems )
+ var sValue = this.Command.GetState() ;
+ if ( sValue != FCK_TRISTATE_DISABLED )
{
- this.RefreshActiveItems = function( combo, value )
+ eState = FCK_TRISTATE_ON ;
+ if ( !this.RefreshActiveItems )
{
- this._Combo.DeselectAll() ;
- this._Combo.SelectItem( value ) ;
- this._Combo.SetLabelById( value ) ;
+ this.RefreshActiveItems = function( combo, value )
+ {
+ this._Combo.DeselectAll() ;
+ this._Combo.SelectItem( value ) ;
+ this._Combo.SetLabelById( value ) ;
+ }
}
+ this.RefreshActiveItems( this._Combo, sValue ) ;
}
- this.RefreshActiveItems( this._Combo, sValue ) ;
- }
- else
- eState = FCK_TRISTATE_DISABLED ;
-// }
-
+ else
+ eState = FCK_TRISTATE_DISABLED ;
// If there are no state changes then do nothing and return.
- if ( eState == this.State ) return ;
+ if ( eState == this.State ) return ;
+ if ( eState == FCK_TRISTATE_DISABLED )
+ {
+ this._Combo.DeselectAll() ;
+ this._Combo.SetLabel(FCKConfig.DefaultClass) ;
+ }
+ // Sets the actual state.
+ this.State = eState ;
- if ( eState == FCK_TRISTATE_DISABLED )
- {
- this._Combo.DeselectAll() ;
- this._Combo.SetLabel( '' ) ;
- }
-
- // Sets the actual state.
- this.State = eState ;
-
- // Updates the graphical state.
- this._Combo.SetEnabled( eState != FCK_TRISTATE_DISABLED ) ;
+ // Updates the graphical state.
+ this._Combo.SetEnabled( eState != FCK_TRISTATE_DISABLED ) ;
}
FCKToolbarSpecialCombo.prototype.Enable = function()
{
- this.RefreshState() ;
+ this.RefreshState();
}
FCKToolbarSpecialCombo.prototype.Disable = function()
{
this.State = FCK_TRISTATE_DISABLED ;
this._Combo.DeselectAll() ;
this._Combo.SetLabel( '' ) ;
this._Combo.SetEnabled( false ) ;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarspecialcombo.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarstylecombo.js
===================================================================
--- trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarstylecombo.js (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarstylecombo.js (revision 1695)
@@ -1,89 +1,92 @@
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fcktoolbarstylecombo.js
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
*
* Version: 2.0 RC3
* Modified: 2004-12-31 15:04:31
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
var FCKToolbarStyleCombo = function()
{
this.Command = FCKCommands.GetCommand( 'Style' ) ;
}
// Inherit from FCKToolbarSpecialCombo.
FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ;
FCKToolbarStyleCombo.prototype.GetLabel = function()
{
return FCKLang.Style ;
}
FCKToolbarStyleCombo.prototype.CreateItems = function( targetSpecialCombo )
{
// Add the Editor Area CSS to the Styles panel so the style classes are previewed correctly.
FCKTools.AppendStyleSheet( targetSpecialCombo._Panel.Document, FCKConfig.EditorAreaCSS ) ;
// For some reason Gecko is blocking inside the "RefreshVisibleItems" function.
if ( ! FCKBrowserInfo.IsGecko )
targetSpecialCombo.OnBeforeClick = this.RefreshVisibleItems ;
// Add the styles to the special combo.
for ( var s in this.Command.Styles )
{
var oStyle = this.Command.Styles[s] ;
if ( oStyle.IsObjectElement )
var oItem = targetSpecialCombo.AddItem( s, s ) ;
else
var oItem = targetSpecialCombo.AddItem( s, oStyle.GetOpenerTag() + s + oStyle.GetCloserTag() ) ;
oItem.Style = oStyle ;
}
}
FCKToolbarStyleCombo.prototype.RefreshActiveItems = function( targetSpecialCombo )
{
// Clear the actual selection.
targetSpecialCombo.DeselectAll() ;
// Get the active styles.
var aStyles = this.Command.GetActiveStyles() ;
if ( aStyles.length > 0 )
{
// Select the active styles in the combo.
- for ( var i = 0 ; i < aStyles.length ; i++ )
+ for ( var i = 0 ; i < aStyles.length ; i++ ) {
targetSpecialCombo.SelectItem( aStyles[i].Name ) ;
-
+ }
// Set the combo label to the first style in the collection.
targetSpecialCombo.SetLabelById( aStyles[0].Name ) ;
}
- else
- targetSpecialCombo.SetLabel('') ;
+ else {
+ targetSpecialCombo.SetLabel(FCKConfig.DefaultClass) ;
+ }
+
}
+
FCKToolbarStyleCombo.prototype.RefreshVisibleItems = function( targetSpecialCombo )
{
if ( FCKSelection.GetType() == 'Control' )
var sTagName = FCKSelection.GetSelectedElement().tagName ;
for ( var i in targetSpecialCombo.Items )
{
var oItem = targetSpecialCombo.Items[i] ;
if ( ( sTagName && oItem.Style.Element == sTagName ) || ( ! sTagName && ! oItem.Style.IsObjectElement ) )
oItem.style.display = '' ;
else
oItem.style.display = 'none' ; // For some reason Gecko is blocking here.
}
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/_source/classes/fcktoolbarstylecombo.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html
===================================================================
--- trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html (revision 1695)
@@ -1,71 +1,71 @@
<script>
var wordWindow = null;
var controlWindow = null;
function init_spell( spellerWindow ) {
if( spellerWindow ) {
if( spellerWindow.windowType == "wordWindow" ) {
wordWindow = spellerWindow;
} else if ( spellerWindow.windowType == "controlWindow" ) {
controlWindow = spellerWindow;
}
}
if( controlWindow && wordWindow ) {
// populate the speller object and start it off!
var speller = opener.speller;
wordWindow.speller = speller;
speller.startCheck( wordWindow, controlWindow );
}
}
// encodeForPost
function encodeForPost( str ) {
var s = new String( str );
s = encodeURIComponent( s );
// additionally encode single quotes to evade any PHP
// magic_quotes_gpc setting (it inserts escape characters and
// therefore skews the btye positions of misspelled words)
return s.replace( /\'/g, '%27' );
}
// post the text area data to the script that populates the speller
function postWords() {
var bodyDoc = window.frames[0].document;
bodyDoc.open();
bodyDoc.write('<html>');
bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>');
if (opener) {
var speller = opener.speller;
- bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">');
+ bodyDoc.write('<body class="defaulttext" onLoad="document.forms[0].submit();">');
bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '</p>'); // by FredCK
bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">');
for( var i = 0; i < speller.textInputs.length; i++ ) {
bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">');
}
bodyDoc.write('</form>');
bodyDoc.write('</body>');
} else {
- bodyDoc.write('<body class="normalText">');
+ bodyDoc.write('<body class="defaulttext">');
bodyDoc.write('<p><b>This page cannot be displayed</b></p><p>The window was not opened from another window.</p>');
bodyDoc.write('</body>');
}
bodyDoc.write('</html>');
bodyDoc.close();
}
</script>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<title>Speller Pages</title>
</head>
<frameset rows="*,201" onLoad="postWords();">
<frame src="blank.html">
<frame src="controls.html">
</frameset>
</html>
Property changes on: trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css
===================================================================
--- trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css (revision 1695)
@@ -1,49 +1,49 @@
.blend {
font-family: courier new;
font-size: 10pt;
border: 0;
margin-bottom:-1;
}
.normalLabel {
font-size:8pt;
}
-.normalText {
+.defaulttext {
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;
}
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/fckeditor.develop.html
===================================================================
--- trunk/admin/editor/cmseditor/editor/fckeditor.develop.html (nonexistent)
+++ trunk/admin/editor/cmseditor/editor/fckeditor.develop.html (revision 1695)
@@ -0,0 +1,75 @@
+<!--
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * File Name: fckeditor.original.html
+ * Main page that holds the editor.
+ *
+ * Version: 2.0 RC3
+ * Modified: 2005-03-02 10:54:21
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title>FCKeditor</title>
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <!-- @Packager.RemoveLine -->
+ <meta name="robots" content="noindex, nofollow" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <script type="text/javascript" src="lang/fcklanguagemanager.js"></script>
+ <!-- @Packager.RemoveLine
+ <meta http-equiv="Cache-Control" content="public">
+ @Packager.RemoveLine -->
+ <!-- @Packager.Remove.Start -->
+ <script type="text/javascript" src="_source/internals/fckcoreextensions.js"></script>
+ <script type="text/javascript" src="_source/globals/fck_constants.js"></script>
+ <script type="text/javascript" src="_source/internals/fckbrowserinfo.js"></script>
+ <script type="text/javascript" src="_source/internals/fckscriptloader.js"></script>
+ <script type="text/javascript" src="_source/internals/fckurlparams.js"></script>
+ <script type="text/javascript" src="_source/internals/fck.js"></script>
+ <script type="text/javascript" src="_source/internals/fckconfig.js"></script>
+ <script type="text/javascript" src="_source/globals/fckeditorapi.js"></script>
+ <script type="text/javascript" src="_source/internals/fck_onload.js"></script>
+ <!-- @Packager.Remove.End -->
+ <!-- @Packager.RemoveLine
+ <script type="text/javascript" src="js/fck_startup.js"></script>
+ @Packager.RemoveLine -->
+ </head>
+ <body>
+ <table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0" style="TABLE-LAYOUT: fixed">
+ <tr>
+ <td unselectable="on" style="OVERFLOW: hidden">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0">
+ <tr id="Collapsed" style="DISPLAY: none">
+ <td id="ExpandHandle" class="TB_Expand" unselectable="on" colspan="3" onclick="FCKToolbarSet.Expand();return false;"><img class="TB_ExpandImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td>
+ </tr>
+ <tr id="Expanded" style="DISPLAY: none">
+ <td id="CollapseHandle" style="DISPLAY: none" class="TB_Collapse"
+ unselectable="on" valign="bottom" onclick="FCKToolbarSet.Collapse();return false;"><img class="TB_CollapseImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td>
+ <td id="eToolbar" class="TB_ToolbarSet" unselectable="on"></td>
+ <td width="1" style="BACKGROUND-COLOR: #696969"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr id="eWysiwyg">
+ <td id="eWysiwygCell" height="100%" valign="top">
+ <iframe id="eEditorArea" class='defaulttext' name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckeditorarea.html"></iframe>
+ </td>
+ </tr>
+ <tr id="eSource" style="DISPLAY: none">
+ <td class="Source" height="100%" valign="top">
+ <textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 100%"></textarea>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
Property changes on: trunk/admin/editor/cmseditor/editor/fckeditor.develop.html
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/fckeditor.html
===================================================================
--- trunk/admin/editor/cmseditor/editor/fckeditor.html (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/fckeditor.html (revision 1695)
@@ -1,61 +1,75 @@
-<!--
+<!--
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
- * File Name: fckeditor.html
+ * File Name: fckeditor.original.html
* Main page that holds the editor.
*
+ * Version: 2.0 RC3
+ * Modified: 2005-03-02 10:54:21
+ *
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor</title>
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <!-- @Packager.RemoveLine -->
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="lang/fcklanguagemanager.js"></script>
+ <!-- @Packager.RemoveLine
<meta http-equiv="Cache-Control" content="public">
+ @Packager.RemoveLine -->
+ <!-- @Packager.Remove.Start -->
+ <script type="text/javascript" src="_source/internals/fckcoreextensions.js"></script>
+ <script type="text/javascript" src="_source/globals/fck_constants.js"></script>
+ <script type="text/javascript" src="_source/internals/fckbrowserinfo.js"></script>
+ <script type="text/javascript" src="_source/internals/fckscriptloader.js"></script>
+ <script type="text/javascript" src="_source/internals/fckurlparams.js"></script>
+ <script type="text/javascript" src="_source/internals/fck.js"></script>
+ <script type="text/javascript" src="_source/internals/fckconfig.js"></script>
+ <script type="text/javascript" src="_source/globals/fckeditorapi.js"></script>
+ <script type="text/javascript" src="_source/internals/fck_onload.js"></script>
+ <!-- @Packager.Remove.End -->
+ <!-- @Packager.RemoveLine
<script type="text/javascript" src="js/fck_startup.js"></script>
+ @Packager.RemoveLine -->
</head>
<body>
<table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0" style="TABLE-LAYOUT: fixed">
<tr>
<td unselectable="on" style="OVERFLOW: hidden">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr id="Collapsed" style="DISPLAY: none">
<td id="ExpandHandle" class="TB_Expand" unselectable="on" colspan="3" onclick="FCKToolbarSet.Expand();return false;"><img class="TB_ExpandImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td>
</tr>
<tr id="Expanded" style="DISPLAY: none">
<td id="CollapseHandle" style="DISPLAY: none" class="TB_Collapse"
unselectable="on" valign="bottom" onclick="FCKToolbarSet.Collapse();return false;"><img class="TB_CollapseImg" src="images/spacer.gif" width="8" height="4" unselectable="on"></td>
<td id="eToolbar" class="TB_ToolbarSet" unselectable="on"></td>
<td width="1" style="BACKGROUND-COLOR: #696969"></td>
</tr>
</table>
</td>
</tr>
<tr id="eWysiwyg">
<td id="eWysiwygCell" height="100%" valign="top">
- <iframe id="eEditorArea" name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckblank.html"></iframe>
+ <iframe id="eEditorArea" name="eEditorArea" height="100%" width="100%" frameborder="no" src="fckeditorarea.html"></iframe>
</td>
</tr>
<tr id="eSource" style="DISPLAY: none">
<td class="Source" height="100%" valign="top">
- <span style="font-size: 8pt; font-family: arial,verdana,sans-serif; color: #AA0000;">
- <span style="color: #FF0000;">You are in HTML mode. Use the [Source] button to switch back to WYSIWYG mode.</span><br>
- Please note that incorrect or invalid HTML may break the web site’s layout or produce undesirable results.
- This mode should be utilized only by expert users. Intechnic Corporation assumes no responsibility for problems caused by incorrect modifications of the HTML code.
- </span><hr>
- <textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 82%"></textarea>
+ <textarea id="eSourceField" dir="ltr" style="WIDTH: 100%; HEIGHT: 100%"></textarea>
</td>
</tr>
</table>
</body>
</html>
Property changes on: trunk/admin/editor/cmseditor/editor/fckeditor.html
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property
Index: trunk/admin/editor/cmseditor/editor/fckblank.html
===================================================================
--- trunk/admin/editor/cmseditor/editor/fckblank.html (revision 1694)
+++ trunk/admin/editor/cmseditor/editor/fckblank.html (revision 1695)
@@ -1,4 +1,4 @@
<html>
<head><title></title></head>
-<body></body>
+<body class='defaulttext'></body>
</html>
\ No newline at end of file
Property changes on: trunk/admin/editor/cmseditor/editor/fckblank.html
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property

Event Timeline