[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/_source/commandclasse
From: |
skwashd |
Subject: |
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/_source/commandclasses fck_othercommands.js, 1.2 fcknamedcommand.js, 1.2 fckpasteplaintextcommand.js, 1.2 fckstylecommand.js, 1.2 fckpastewordcommand.js, 1.2 fcktablecommand.js, 1.2 fcktextcolorcommand.js, 1.2 |
Date: |
Thu, 4 Aug 2005 05:54:00 +0200 |
Update of news_admin/js/fckeditor/editor/_source/commandclasses
Modified Files:
Branch: MAIN
fck_othercommands.js lines: +63 -5
fcknamedcommand.js lines: +1 -5
fckpasteplaintextcommand.js lines: +1 -4
fckstylecommand.js lines: +1 -4
fckpastewordcommand.js lines: +4 -4
fcktablecommand.js lines: +3 -4
fcktextcolorcommand.js lines: +32 -25
Log Message:
new newsletter builder, updated FCK and a few other things
====================================================
Index:
news_admin/js/fckeditor/editor/_source/commandclasses/fck_othercommands.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fck_othercommands.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fck_othercommands.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fck_othercommands.js:1.1
Tue May 24 14:32:53 2005
+++ news_admin/js/fckeditor/editor/_source/commandclasses/fck_othercommands.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -12,9 +12,6 @@
* Definition of other commands that are not available internaly in the
* browser (see FCKNamedCommand).
*
- * Version: 2.0 RC3
- * Modified: 2005-01-04 18:39:05
- *
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
*/
@@ -152,6 +149,13 @@
// Get the linked field form.
var oForm = FCK.LinkedField.form ;
+ if ( typeof( oForm.onsubmit ) == 'function' )
+ {
+ var bRet = oForm.onsubmit() ;
+ if ( bRet != null && bRet === false )
+ return ;
+ }
+
// Submit the form.
oForm.submit() ;
}
@@ -169,7 +173,10 @@
FCKNewPageCommand.prototype.Execute = function()
{
- FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ;
+ FCKUndo.SaveUndoStep() ;
+ FCK.SetHTML( '' ) ;
+// FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ;
+// FCK.SetHTML( FCKBrowserInfo.IsGecko ? '<br
_moz_editor_bogus_node="TRUE">' : '' ) ;
}
FCKNewPageCommand.prototype.GetState = function()
@@ -185,10 +192,61 @@
FCKSourceCommand.prototype.Execute = function()
{
+ if ( FCKBrowserInfo.IsGecko )
+ {
+ var iWidth = screen.width * 0.65 ;
+ var iHeight = screen.height * 0.65 ;
+ FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source,
'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ;
+ }
+ else
FCK.SwitchEditMode() ;
}
FCKSourceCommand.prototype.GetState = function()
{
return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF :
FCK_TRISTATE_ON ) ;
+}
+
+// ### Undo
+var FCKUndoCommand = function()
+{
+ this.Name = 'Undo' ;
+}
+
+FCKUndoCommand.prototype.Execute = function()
+{
+ if ( FCKBrowserInfo.IsIE )
+ FCKUndo.Undo() ;
+ else
+ FCK.ExecuteNamedCommand( 'Undo' ) ;
+}
+
+FCKUndoCommand.prototype.GetState = function()
+{
+ if ( FCKBrowserInfo.IsIE )
+ return ( FCKUndo.Typing || FCKUndo.CurrentIndex > 0 ?
FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+ else
+ return FCK.GetNamedCommandState( 'Undo' ) ;
+}
+
+// ### Redo
+var FCKRedoCommand = function()
+{
+ this.Name = 'Redo' ;
+}
+
+FCKRedoCommand.prototype.Execute = function()
+{
+ if ( FCKBrowserInfo.IsIE )
+ FCKUndo.Redo() ;
+ else
+ FCK.ExecuteNamedCommand( 'Redo' ) ;
+}
+
+FCKRedoCommand.prototype.GetState = function()
+{
+ if ( FCKBrowserInfo.IsIE )
+ return ( !FCKUndo.Typing && FCKUndo.CurrentIndex < (
FCKUndo.SavedData.length - 1 ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+ else
+ return FCK.GetNamedCommandState( 'Redo' ) ;
}
====================================================
Index: news_admin/js/fckeditor/editor/_source/commandclasses/fcknamedcommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fcknamedcommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fcknamedcommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fcknamedcommand.js:1.1
Tue May 24 14:32:53 2005
+++ news_admin/js/fckeditor/editor/_source/commandclasses/fcknamedcommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -11,9 +11,6 @@
* File Name: fcknamedcommand.js
* FCKNamedCommand Class: represents an internal browser command.
*
- * Version: 2.0 RC3
- * Modified: 2004-08-17 15:05:35
- *
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
*/
@@ -32,4 +29,3 @@
{
return FCK.GetNamedCommandState( this.Name ) ;
}
-
====================================================
Index:
news_admin/js/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js:1.1
Tue May 24 14:32:53 2005
+++
news_admin/js/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -11,9 +11,6 @@
* File Name: fckpasteplaintextcommand.js
* FCKPastePlainTextCommand Class: represents the
* "Paste as Plain Text" command.
- *
- * Version: 2.0 RC3
- * Modified: 2004-08-20 23:08:23
*
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
====================================================
Index: news_admin/js/fckeditor/editor/_source/commandclasses/fckstylecommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fckstylecommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fckstylecommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fckstylecommand.js:1.1
Tue May 24 14:32:53 2005
+++ news_admin/js/fckeditor/editor/_source/commandclasses/fckstylecommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -10,9 +10,6 @@
*
* 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 (address@hidden)
====================================================
Index:
news_admin/js/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js:1.1
Tue May 24 14:32:53 2005
+++
news_admin/js/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -11,9 +11,6 @@
* File Name: fckpastewordcommand.js
* FCKPasteWordCommand Class: represents the "Paste from Word" command.
*
- * Version: 2.0 RC3
- * Modified: 2004-08-30 23:20:46
- *
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
*/
@@ -30,5 +27,8 @@
FCKPasteWordCommand.prototype.GetState = function()
{
+ if ( FCKConfig.ForcePasteAsPlainText )
+ return FCK_TRISTATE_DISABLED ;
+ else
return FCK.GetNamedCommandState( 'Paste' ) ;
}
====================================================
Index: news_admin/js/fckeditor/editor/_source/commandclasses/fcktablecommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fcktablecommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fcktablecommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fcktablecommand.js:1.1
Tue May 24 14:32:53 2005
+++ news_admin/js/fckeditor/editor/_source/commandclasses/fcktablecommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -12,9 +12,6 @@
* FCKPastePlainTextCommand Class: represents the
* "Paste as Plain Text" command.
*
- * Version: 2.0 RC3
- * Modified: 2004-11-22 15:41:58
- *
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
*/
@@ -26,6 +23,8 @@
FCKTableCommand.prototype.Execute = function()
{
+ FCKUndo.SaveUndoStep() ;
+
switch ( this.Name )
{
case 'TableInsertRow' :
====================================================
Index:
news_admin/js/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js
diff -u
news_admin/js/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js:1.1
news_admin/js/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js:1.2
---
news_admin/js/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js:1.1
Tue May 24 14:32:53 2005
+++
news_admin/js/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js
Thu Aug 4 03:54:31 2005
@@ -1,6 +1,6 @@
/*
* FCKeditor - The text editor for internet
- * Copyright (C) 2003-2004 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
@@ -12,9 +12,6 @@
* FCKTextColorCommand Class: represents the text color comand. It shows
the
* color selection panel.
*
- * Version: 2.0 RC3
- * Modified: 2004-11-19 08:16:00
- *
* File Authors:
* Frederico Caldeira Knabben (address@hidden)
*/
@@ -85,14 +82,39 @@
return FCK_TRISTATE_OFF ;
}
+function FCKTextColorCommand_OnMouseOver() {
this.className='ColorSelected' ; }
+
+function FCKTextColorCommand_OnMouseOut() {
this.className='ColorDeselected' ; }
+
+function FCKTextColorCommand_OnClick()
+{
+ this.className = 'ColorDeselected' ;
+ this.Command.SetColor( '#' + this.Color ) ;
+ this.Command._Panel.Hide() ;
+}
+
+function FCKTextColorCommand_AutoOnClick()
+{
+ this.className = 'ColorDeselected' ;
+ this.Command.SetColor( '' ) ;
+ this.Command._Panel.Hide() ;
+}
+
+function FCKTextColorCommand_MoreOnClick()
+{
+ this.className = 'ColorDeselected' ;
+ this.Command._Panel.Hide() ;
+ FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle,
'dialog/fck_colorselector.html', 400, 330, this.Command.SetColor ) ;
+}
+
FCKTextColorCommand.prototype._CreatePanelBody = function( targetDocument,
targetDiv )
{
function CreateSelectionDiv()
{
var oDiv = targetDocument.createElement( "DIV" ) ;
oDiv.className = 'ColorDeselected' ;
- oDiv.onmouseover = function() {
this.className='ColorSelected' ; } ;
- oDiv.onmouseout = function() {
this.className='ColorDeselected' ; } ;
+ oDiv.onmouseover = FCKTextColorCommand_OnMouseOver ;
+ oDiv.onmouseout = FCKTextColorCommand_OnMouseOut ;
return oDiv ;
}
@@ -119,15 +141,10 @@
</table>' ;
oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command.SetColor( '' ) ;
- this.Command._Panel.Hide() ;
- }
+ oDiv.onclick = FCKTextColorCommand_AutoOnClick ;
// Create an array of colors based on the configuration file.
- var aColors = FCKConfig.FontColors.split(',') ;
+ var aColors = FCKConfig.FontColors.toString().split(',') ;
// Create the colors table based on the array.
var iCounter = 0 ;
@@ -142,12 +159,7 @@
oDiv.innerHTML = '<div class="ColorBoxBorder"><div
class="ColorBox" style="background-color: #' + aColors[iCounter] +
'"></div></div>' ;
oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command.SetColor( '#' + this.Color ) ;
- this.Command._Panel.Hide() ;
- }
+ oDiv.onclick = FCKTextColorCommand_OnClick ;
}
}
@@ -159,10 +171,5 @@
oDiv.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0"
border="0"><tr><td nowrap align="center">' + FCKLang.ColorMoreColors +
'</td></tr></table>' ;
oDiv.Command = this ;
- oDiv.onclick = function()
- {
- this.className = 'ColorDeselected' ;
- this.Command._Panel.Hide() ;
- FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle,
'dialog/fck_colorselector.html', 400, 330, this.Command.SetColor ) ;
- }
+ oDiv.onclick = FCKTextColorCommand_MoreOnClick ;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] news_admin/js/fckeditor/editor/_source/commandclasses fck_othercommands.js, 1.2 fcknamedcommand.js, 1.2 fckpasteplaintextcommand.js, 1.2 fckstylecommand.js, 1.2 fckpastewordcommand.js, 1.2 fcktablecommand.js, 1.2 fcktextcolorcommand.js, 1.2,
skwashd <=
- Prev by Date:
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/skins/silver fck_contextmenu.css, 1.2 fck_dialog.css, 1.2 fck_editor.css, 1.2
- Next by Date:
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages spellchecker.html, 1.2 wordWindow.js, 1.2
- Previous by thread:
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/skins/silver fck_contextmenu.css, 1.2 fck_dialog.css, 1.2 fck_editor.css, 1.2
- Next by thread:
[Phpgroupware-cvs] news_admin/js/fckeditor/editor/dialog/fck_spellerpages/spellerpages spellchecker.html, 1.2 wordWindow.js, 1.2
- Index(es):