Revision 852
Added by doc over 17 years ago
| trunk/CHANGELOG | ||
|---|---|---|
| 10 | 10 |
# = Bugfix |
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
|
| 13 |
------------------------------------- 2.7.1 ------------------------------------- |
|
| 14 |
01-Jul-2008 Thomas Hornik |
|
| 15 |
# page-names with doubled (or more) points can not be handled if php runs as cgi. Thanks to forum member hgi2001. |
|
| 13 |
------------------------------------- 2.7.1 ------------------------------------- |
|
| 14 |
02-Jul-2008 Christian Sommer |
|
| 15 |
! updated to latest FCKEditor version 2.6.2 |
|
| 16 |
01-Jul-2008 Thomas Hornik |
|
| 17 |
# page-names with doubled (or more) points can not be handled if php runs as cgi. Thanks to forum member hgi2001. |
|
| 16 | 18 |
29-June-2008 Christian Sommer |
| 17 | 19 |
! applied additional mail check to forgot login form |
| 18 | 20 |
28-June-2008 Christian Sommer |
| trunk/wb/modules/fckeditor/info.php | ||
|---|---|---|
| 26 | 26 |
Authors: P. Widlund, S. Braunewell, M. Gallas (ruebenwurzel), Wouldlouper, C. Sommer (doc) |
| 27 | 27 |
Started to track applied changes in info.php from 27.03.2007 onwards (cs) |
| 28 | 28 |
----------------------------------------------------------------------------------------------------------- |
| 29 |
v2.86 (doc.. Christian Sommer; Jul 2, 2008) |
|
| 30 |
+ update to FCKEditor release v2.62 |
|
| 31 |
|
|
| 29 | 32 |
v2.85 (doc.. Christian Sommer; Apr 10, 2008) |
| 30 | 33 |
+ fixed WB-Link Plugin to work with WB versions below 2.7 ($admin->page_is_visible() only available in WB 2.7) |
| 31 | 34 |
|
| ... | ... | |
| 108 | 111 |
$module_directory = 'fckeditor'; |
| 109 | 112 |
$module_name = 'FCKeditor'; |
| 110 | 113 |
$module_function = 'WYSIWYG'; |
| 111 |
$module_version = '2.85';
|
|
| 114 |
$module_version = '2.86';
|
|
| 112 | 115 |
$module_platform = '2.6.x'; |
| 113 | 116 |
$module_author = 'Christian Sommer, P. Widlund, S. Braunewell, M. Gallas, Wouldlouper'; |
| 114 | 117 |
$module_license = 'GNU General Public License'; |
| 115 |
$module_description = 'This module allows you to edit the contents of a page using <a href="http://www.fckeditor.net/" target="_blank">FCKeditor v2.6</a>.'; |
|
| 118 |
$module_description = 'This module allows you to edit the contents of a page using <a href="http://www.fckeditor.net/" target="_blank">FCKeditor v2.6.2</a>.';
|
|
| 116 | 119 |
|
| 117 | 120 |
?> |
| trunk/wb/modules/fckeditor/languages/DE.php | ||
|---|---|---|
| 27 | 27 |
*/ |
| 28 | 28 |
|
| 29 | 29 |
// Deutsche Modulbeschreibung |
| 30 |
$module_description = 'Dieses Modul erlaubt das bearbeiten von Seiteninhalten mit dem <a href="http://www.fckeditor.net/" target="_blank">FCKeditor v2.6</a>.'; |
|
| 30 |
$module_description = 'Dieses Modul erlaubt das bearbeiten von Seiteninhalten mit dem <a href="http://www.fckeditor.net/" target="_blank">FCKeditor v2.6.2</a>.';
|
|
| 31 | 31 |
|
| 32 | 32 |
?> |
| trunk/wb/modules/fckeditor/fckeditor/fckeditor.php | ||
|---|---|---|
| 25 | 25 |
* strict error messages with PHP 5). |
| 26 | 26 |
*/ |
| 27 | 27 |
|
| 28 |
/** |
|
| 29 |
* Check if browser is compatible with FCKeditor. |
|
| 30 |
* Return true if is compatible. |
|
| 31 |
* |
|
| 32 |
* @return boolean |
|
| 33 |
*/ |
|
| 34 |
function FCKeditor_IsCompatibleBrowser() |
|
| 35 |
{
|
|
| 36 |
if ( isset( $_SERVER ) ) {
|
|
| 37 |
$sAgent = $_SERVER['HTTP_USER_AGENT'] ; |
|
| 38 |
} |
|
| 39 |
else {
|
|
| 40 |
global $HTTP_SERVER_VARS ; |
|
| 41 |
if ( isset( $HTTP_SERVER_VARS ) ) {
|
|
| 42 |
$sAgent = $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ; |
|
| 43 |
} |
|
| 44 |
else {
|
|
| 45 |
global $HTTP_USER_AGENT ; |
|
| 46 |
$sAgent = $HTTP_USER_AGENT ; |
|
| 47 |
} |
|
| 48 |
} |
|
| 49 |
|
|
| 50 |
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false ) |
|
| 51 |
{
|
|
| 52 |
$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ; |
|
| 53 |
return ($iVersion >= 5.5) ; |
|
| 54 |
} |
|
| 55 |
else if ( strpos($sAgent, 'Gecko/') !== false ) |
|
| 56 |
{
|
|
| 57 |
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ; |
|
| 58 |
return ($iVersion >= 20030210) ; |
|
| 59 |
} |
|
| 60 |
else if ( strpos($sAgent, 'Opera/') !== false ) |
|
| 61 |
{
|
|
| 62 |
$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ; |
|
| 63 |
return ($fVersion >= 9.5) ; |
|
| 64 |
} |
|
| 65 |
else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) ) |
|
| 66 |
{
|
|
| 67 |
$iVersion = $matches[1] ; |
|
| 68 |
return ( $matches[1] >= 522 ) ; |
|
| 69 |
} |
|
| 70 |
else |
|
| 71 |
return false ; |
|
| 72 |
} |
|
| 73 |
|
|
| 74 | 28 |
if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
|
| 75 | 29 |
include_once( 'fckeditor_php4.php' ) ; |
| 76 | 30 |
else |
| trunk/wb/modules/fckeditor/fckeditor/fckpackager.xml | ||
|---|---|---|
| 77 | 77 |
<File path="editor/_source/internals/fck.js" /> |
| 78 | 78 |
<File path="editor/_source/internals/fck_ie.js" /> |
| 79 | 79 |
<File path="editor/_source/internals/fckconfig.js" /> |
| 80 |
<File path="editor/_source/internals/fckdebug.js" /> |
|
| 80 |
<File path="editor/_source/internals/fckdebug_empty.js" />
|
|
| 81 | 81 |
<File path="editor/_source/internals/fckdomtools.js" /> |
| 82 | 82 |
<File path="editor/_source/internals/fcktools.js" /> |
| 83 | 83 |
<File path="editor/_source/internals/fcktools_ie.js" /> |
| ... | ... | |
| 173 | 173 |
<File path="editor/_source/internals/fck.js" /> |
| 174 | 174 |
<File path="editor/_source/internals/fck_gecko.js" /> |
| 175 | 175 |
<File path="editor/_source/internals/fckconfig.js" /> |
| 176 |
<File path="editor/_source/internals/fckdebug.js" /> |
|
| 176 |
<File path="editor/_source/internals/fckdebug_empty.js" />
|
|
| 177 | 177 |
<File path="editor/_source/internals/fckdomtools.js" /> |
| 178 | 178 |
<File path="editor/_source/internals/fcktools.js" /> |
| 179 | 179 |
<File path="editor/_source/internals/fcktools_gecko.js" /> |
| trunk/wb/modules/fckeditor/fckeditor/fckconfig.js | ||
|---|---|---|
| 21 | 21 |
* Editor configuration settings. |
| 22 | 22 |
* |
| 23 | 23 |
* Follow this link for more information: |
| 24 |
* http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings
|
|
| 24 |
* http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
|
|
| 25 | 25 |
*/ |
| 26 | 26 |
|
| 27 | 27 |
FCKConfig.CustomConfigurationsPath = '' ; |
| ... | ... | |
| 87 | 87 |
FCKConfig.ToolbarStartExpanded = true ; |
| 88 | 88 |
FCKConfig.ToolbarCanCollapse = true ; |
| 89 | 89 |
FCKConfig.IgnoreEmptyParagraphValue = true ; |
| 90 |
FCKConfig.PreserveSessionOnFileBrowser = false ; |
|
| 91 | 90 |
FCKConfig.FloatingPanelsZIndex = 10000 ; |
| 92 | 91 |
FCKConfig.HtmlEncodeOutput = false ; |
| 93 | 92 |
|
| ... | ... | |
| 128 | 127 |
[ CTRL + 84 /*T*/, true ], |
| 129 | 128 |
[ CTRL + 88 /*X*/, true ], |
| 130 | 129 |
[ CTRL + 86 /*V*/, 'Paste' ], |
| 130 |
[ CTRL + 45 /*INS*/, true ], |
|
| 131 | 131 |
[ SHIFT + 45 /*INS*/, 'Paste' ], |
| 132 | 132 |
[ CTRL + 88 /*X*/, 'Cut' ], |
| 133 | 133 |
[ SHIFT + 46 /*DEL*/, 'Cut' ], |
| ... | ... | |
| 314 | 314 |
|
| 315 | 315 |
FCKConfig.BackgroundBlockerColor = '#ffffff' ; |
| 316 | 316 |
FCKConfig.BackgroundBlockerOpacity = 0.50 ; |
| 317 |
|
|
| 318 |
FCKConfig.MsWebBrowserControlCompat = false ; |
|
| trunk/wb/modules/fckeditor/fckeditor/fckeditor.js | ||
|---|---|---|
| 59 | 59 |
*/ |
| 60 | 60 |
FCKeditor.MinWidth = 750 ; |
| 61 | 61 |
|
| 62 |
FCKeditor.prototype.Version = '2.6' ; |
|
| 63 |
FCKeditor.prototype.VersionBuild = '18638' ;
|
|
| 62 |
FCKeditor.prototype.Version = '2.6.2' ;
|
|
| 63 |
FCKeditor.prototype.VersionBuild = '19417' ;
|
|
| 64 | 64 |
|
| 65 | 65 |
FCKeditor.prototype.Create = function() |
| 66 | 66 |
{
|
| ... | ... | |
| 88 | 88 |
{
|
| 89 | 89 |
var sWidth = this.Width.toString().indexOf('%') > 0 ? this.Width : this.Width + 'px' ;
|
| 90 | 90 |
var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ;
|
| 91 |
sHtml += '<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="width:' + sWidth + ';height:' + sHeight + '">' + this._HTMLEncode( this.Value ) + '<\/textarea>' ; |
|
| 91 |
|
|
| 92 |
sHtml += '<textarea name="' + this.InstanceName + |
|
| 93 |
'" rows="4" cols="40" style="width:' + sWidth + |
|
| 94 |
';height:' + sHeight ; |
|
| 95 |
|
|
| 96 |
if ( this.TabIndex ) |
|
| 97 |
sHtml += '" tabindex="' + this.TabIndex ; |
|
| 98 |
|
|
| 99 |
sHtml += '">' + |
|
| 100 |
this._HTMLEncode( this.Value ) + |
|
| 101 |
'<\/textarea>' ; |
|
| 92 | 102 |
} |
| 93 | 103 |
|
| 94 | 104 |
return sHtml ; |
| ... | ... | |
| 116 | 126 |
} |
| 117 | 127 |
|
| 118 | 128 |
oTextarea.style.display = 'none' ; |
| 129 |
|
|
| 130 |
if ( oTextarea.tabIndex ) |
|
| 131 |
this.TabIndex = oTextarea.tabIndex ; |
|
| 132 |
|
|
| 119 | 133 |
this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ; |
| 120 | 134 |
this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ; |
| 121 | 135 |
} |
| ... | ... | |
| 158 | 172 |
catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ }
|
| 159 | 173 |
|
| 160 | 174 |
var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + encodeURIComponent( this.InstanceName ) ; |
| 161 |
if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet ; |
|
| 175 |
if (this.ToolbarSet) |
|
| 176 |
sLink += '&Toolbar=' + this.ToolbarSet ; |
|
| 162 | 177 |
|
| 163 |
return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="0" scrolling="no"></iframe>' ; |
|
| 178 |
html = '<iframe id="' + this.InstanceName + |
|
| 179 |
'___Frame" src="' + sLink + |
|
| 180 |
'" width="' + this.Width + |
|
| 181 |
'" height="' + this.Height ; |
|
| 182 |
|
|
| 183 |
if ( this.TabIndex ) |
|
| 184 |
html += '" tabindex="' + this.TabIndex ; |
|
| 185 |
|
|
| 186 |
html += '" frameborder="0" scrolling="no"></iframe>' ; |
|
| 187 |
|
|
| 188 |
return html ; |
|
| 164 | 189 |
} |
| 165 | 190 |
|
| 166 | 191 |
FCKeditor.prototype._IsCompatibleBrowser = function() |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_flash/fck_flash.js | ||
|---|---|---|
| 236 | 236 |
|
| 237 | 237 |
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) |
| 238 | 238 |
{
|
| 239 |
// Remove animation |
|
| 240 |
window.parent.Throbber.Hide() ; |
|
| 241 |
GetE( 'divUpload' ).style.display = '' ; |
|
| 242 |
|
|
| 239 | 243 |
switch ( errorNumber ) |
| 240 | 244 |
{
|
| 241 | 245 |
case 0 : // No errors |
| ... | ... | |
| 288 | 292 |
return false ; |
| 289 | 293 |
} |
| 290 | 294 |
|
| 295 |
// Show animation |
|
| 296 |
window.parent.Throbber.Show( 100 ) ; |
|
| 297 |
GetE( 'divUpload' ).style.display = 'none' ; |
|
| 298 |
|
|
| 291 | 299 |
return true ; |
| 292 | 300 |
} |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_link.html | ||
|---|---|---|
| 108 | 108 |
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br /> |
| 109 | 109 |
<br /> |
| 110 | 110 |
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> |
| 111 |
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe> |
|
| 111 |
<script type="text/javascript"> |
|
| 112 |
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ; |
|
| 113 |
</script> |
|
| 112 | 114 |
</form> |
| 113 | 115 |
</div> |
| 114 | 116 |
<div id="divTarget" style="DISPLAY: none"> |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_about.html | ||
|---|---|---|
| 78 | 78 |
border-left: #000000 1px solid; border-bottom: #000000 1px solid"> |
| 79 | 79 |
<span fcklang="DlgAboutVersion">version</span> |
| 80 | 80 |
<br /> |
| 81 |
<b>2.6</b><br /> |
|
| 82 |
Build 18638</td>
|
|
| 81 |
<b>2.6.2</b><br />
|
|
| 82 |
Build 19417</td>
|
|
| 83 | 83 |
</tr> |
| 84 | 84 |
</table> |
| 85 | 85 |
</td> |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_replace.html | ||
|---|---|---|
| 34 | 34 |
var dialogArguments = dialog.Args() ; |
| 35 | 35 |
|
| 36 | 36 |
var FCKLang = oEditor.FCKLang ; |
| 37 |
var FCKDomTools = oEditor.FCKDomTools ; |
|
| 38 |
var FCKDomRange = oEditor.FCKDomRange ; |
|
| 39 |
var FCKListsLib = oEditor.FCKListsLib ; |
|
| 40 |
var FCKTools = oEditor.FCKTools ; |
|
| 41 |
var EditorDocument = oEditor.FCK.EditorDocument ; |
|
| 42 |
var HighlightStyle = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ) ; |
|
| 37 | 43 |
|
| 38 | 44 |
dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ; |
| 39 | 45 |
dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; |
| ... | ... | |
| 51 | 57 |
dialog.SetAutoSize( true ) ; |
| 52 | 58 |
} |
| 53 | 59 |
|
| 54 |
// Place a range at the start of document. |
|
| 55 |
// This will be the starting point of our search. |
|
| 56 |
var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; |
|
| 57 |
|
|
| 58 |
function ResetGlobalRange() |
|
| 60 |
GetNextNonEmptyTextNode = function( node, stopNode ) |
|
| 59 | 61 |
{
|
| 60 |
GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
|
|
| 61 |
GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
|
|
| 62 |
GlobalRange.Collapse( true ) ;
|
|
| 62 |
while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 )
|
|
| 63 |
1 ;
|
|
| 64 |
return node ;
|
|
| 63 | 65 |
} |
| 64 |
ResetGlobalRange() ; |
|
| 65 | 66 |
|
| 66 |
var HighlightRange = null ; |
|
| 67 |
function Highlight() |
|
| 67 |
CharacterCursor = function( arg ) |
|
| 68 | 68 |
{
|
| 69 |
if ( HighlightRange ) |
|
| 70 |
ClearHighlight() ; |
|
| 71 |
var cloneRange = GlobalRange.Clone() ; |
|
| 72 |
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ; |
|
| 73 |
HighlightRange = cloneRange ; |
|
| 74 |
GlobalRange = HighlightRange.Clone() ; |
|
| 75 |
} |
|
| 76 |
|
|
| 77 |
function ClearHighlight() |
|
| 78 |
{
|
|
| 79 |
if ( HighlightRange ) |
|
| 69 |
if ( arg.nodeType && arg.nodeType == 9 ) |
|
| 80 | 70 |
{
|
| 81 |
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ; |
|
| 82 |
HighlightRange = null ; |
|
| 71 |
this._textNode = GetNextNonEmptyTextNode( arg.body, arg.documentElement ) ; |
|
| 72 |
this._offset = 0 ; |
|
| 73 |
this._doc = arg ; |
|
| 83 | 74 |
} |
| 75 |
else |
|
| 76 |
{
|
|
| 77 |
this._textNode = arguments[0] ; |
|
| 78 |
this._offset = arguments[1] ; |
|
| 79 |
this._doc = FCKTools.GetElementDocument( arguments[0] ) ; |
|
| 80 |
} |
|
| 84 | 81 |
} |
| 85 |
|
|
| 86 |
function OnLoad() |
|
| 82 |
CharacterCursor.prototype = |
|
| 87 | 83 |
{
|
| 88 |
// First of all, translate the dialog box texts. |
|
| 89 |
oEditor.FCKLanguageManager.TranslatePage( document ) ; |
|
| 84 |
GetCharacter : function() |
|
| 85 |
{
|
|
| 86 |
return ( this._textNode && this._textNode.nodeValue.charAt( this._offset ) ) || null ; |
|
| 87 |
}, |
|
| 90 | 88 |
|
| 91 |
// Show the appropriate tab at startup.
|
|
| 92 |
if ( dialogArguments.CustomValue == 'Find' )
|
|
| 89 |
// Non-normalized.
|
|
| 90 |
GetTextNode : function()
|
|
| 93 | 91 |
{
|
| 94 |
dialog.SetSelectedTab( 'Find' ) ; |
|
| 95 |
dialog.SetAutoSize( true ) ; |
|
| 96 |
} |
|
| 97 |
else |
|
| 98 |
dialog.SetSelectedTab( 'Replace' ) ; |
|
| 92 |
return this._textNode ; |
|
| 93 |
}, |
|
| 99 | 94 |
|
| 100 |
SelectField( 'txtFind' + dialogArguments.CustomValue ) ; |
|
| 101 |
} |
|
| 95 |
// Non-normalized. |
|
| 96 |
GetIndex : function() |
|
| 97 |
{
|
|
| 98 |
return this._offset ; |
|
| 99 |
}, |
|
| 102 | 100 |
|
| 103 |
function btnStat() |
|
| 104 |
{
|
|
| 105 |
GetE('btnReplace').disabled =
|
|
| 106 |
GetE('btnReplaceAll').disabled =
|
|
| 107 |
GetE('btnFind').disabled =
|
|
| 108 |
( GetE(idMap["FindText"]).value.length == 0 ) ; |
|
| 109 |
} |
|
| 101 |
// Return value means whehther we've crossed a line break or a paragraph boundary. |
|
| 102 |
MoveNext : function() |
|
| 103 |
{
|
|
| 104 |
if ( this._offset < this._textNode.length - 1 ) |
|
| 105 |
{
|
|
| 106 |
this._offset++ ; |
|
| 107 |
return false ; |
|
| 108 |
} |
|
| 110 | 109 |
|
| 111 |
function btnStatDelayed() |
|
| 112 |
{
|
|
| 113 |
setTimeout( btnStat, 1 ) ; |
|
| 114 |
} |
|
| 110 |
var crossed = false ; |
|
| 111 |
var curNode = this._textNode ; |
|
| 112 |
while ( ( curNode = FCKDomTools.GetNextSourceNode( curNode ) ) |
|
| 113 |
&& curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) ) |
|
| 114 |
{
|
|
| 115 |
var tag = curNode.nodeName.toLowerCase() ; |
|
| 116 |
if ( FCKListsLib.BlockElements[tag] || tag == 'br' ) |
|
| 117 |
crossed = true ; |
|
| 118 |
} |
|
| 115 | 119 |
|
| 116 |
function GetSearchString()
|
|
| 117 |
{
|
|
| 118 |
return GetE(idMap['FindText']).value ;
|
|
| 119 |
}
|
|
| 120 |
this._textNode = curNode ;
|
|
| 121 |
this._offset = 0 ;
|
|
| 122 |
return crossed ;
|
|
| 123 |
},
|
|
| 120 | 124 |
|
| 121 |
function GetReplaceString() |
|
| 122 |
{
|
|
| 123 |
return GetE("txtReplace").value ;
|
|
| 124 |
} |
|
| 125 |
// Return value means whehther we've crossed a line break or a paragraph boundary. |
|
| 126 |
MoveBack : function() |
|
| 127 |
{
|
|
| 128 |
if ( this._offset > 0 && this._textNode.length > 0 ) |
|
| 129 |
{
|
|
| 130 |
this._offset = Math.min( this._offset - 1, this._textNode.length - 1 ) ; |
|
| 131 |
return false ; |
|
| 132 |
} |
|
| 125 | 133 |
|
| 126 |
function GetCheckCase() |
|
| 127 |
{
|
|
| 128 |
return !! ( GetE(idMap['CheckCase']).checked ) ; |
|
| 129 |
} |
|
| 134 |
var crossed = false ; |
|
| 135 |
var curNode = this._textNode ; |
|
| 136 |
while ( ( curNode = FCKDomTools.GetPreviousSourceNode( curNode ) ) |
|
| 137 |
&& curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) ) |
|
| 138 |
{
|
|
| 139 |
var tag = curNode.nodeName.toLowerCase() ; |
|
| 140 |
if ( FCKListsLib.BlockElements[tag] || tag == 'br' ) |
|
| 141 |
crossed = true ; |
|
| 142 |
} |
|
| 130 | 143 |
|
| 131 |
function GetMatchWord() |
|
| 144 |
this._textNode = curNode ; |
|
| 145 |
this._offset = curNode.length - 1 ; |
|
| 146 |
return crossed ; |
|
| 147 |
}, |
|
| 148 |
|
|
| 149 |
Clone : function() |
|
| 150 |
{
|
|
| 151 |
return new CharacterCursor( this._textNode, this._offset ) ; |
|
| 152 |
} |
|
| 153 |
} ; |
|
| 154 |
|
|
| 155 |
CharacterRange = function( initCursor, maxLength ) |
|
| 132 | 156 |
{
|
| 133 |
return !! ( GetE(idMap['CheckWord']).checked ) ; |
|
| 157 |
this._cursors = initCursor.push ? initCursor : [initCursor] ; |
|
| 158 |
this._maxLength = maxLength ; |
|
| 159 |
this._highlightRange = null ; |
|
| 134 | 160 |
} |
| 135 |
|
|
| 136 |
// Get the data pointed to by a bookmark. |
|
| 137 |
function GetData( bookmark ) |
|
| 161 |
CharacterRange.prototype = |
|
| 138 | 162 |
{
|
| 139 |
var cursor = oEditor.FCK.EditorDocument.documentElement ; |
|
| 140 |
for ( var i = 0 ; i < bookmark.length ; i++ ) |
|
| 163 |
ToDomRange : function() |
|
| 141 | 164 |
{
|
| 142 |
var target = bookmark[i] ; |
|
| 143 |
var currentIndex = -1 ; |
|
| 144 |
if ( cursor.nodeType != 3 ) |
|
| 165 |
var firstCursor = this._cursors[0] ; |
|
| 166 |
var lastCursor = this._cursors[ this._cursors.length - 1 ] ; |
|
| 167 |
var domRange = new FCKDomRange( FCKTools.GetElementWindow( firstCursor.GetTextNode() ) ) ; |
|
| 168 |
var w3cRange = domRange._Range = domRange.CreateRange() ; |
|
| 169 |
w3cRange.setStart( firstCursor.GetTextNode(), firstCursor.GetIndex() ) ; |
|
| 170 |
w3cRange.setEnd( lastCursor.GetTextNode(), lastCursor.GetIndex() + 1 ) ; |
|
| 171 |
domRange._UpdateElementInfo() ; |
|
| 172 |
return domRange ; |
|
| 173 |
}, |
|
| 174 |
|
|
| 175 |
Highlight : function() |
|
| 176 |
{
|
|
| 177 |
if ( this._cursors.length < 1 ) |
|
| 178 |
return ; |
|
| 179 |
|
|
| 180 |
var domRange = this.ToDomRange() ; |
|
| 181 |
HighlightStyle.ApplyToRange( domRange, false, true ) ; |
|
| 182 |
this._highlightRange = domRange ; |
|
| 183 |
|
|
| 184 |
var charRange = CharacterRange.CreateFromDomRange( domRange ) ; |
|
| 185 |
var focusNode = domRange.StartNode ; |
|
| 186 |
if ( focusNode.nodeType != 1 ) |
|
| 187 |
focusNode = focusNode.parentNode ; |
|
| 188 |
focusNode.scrollIntoView( false ) ; |
|
| 189 |
this._cursors = charRange._cursors ; |
|
| 190 |
}, |
|
| 191 |
|
|
| 192 |
RemoveHighlight : function() |
|
| 193 |
{
|
|
| 194 |
if ( this._highlightRange ) |
|
| 145 | 195 |
{
|
| 146 |
for (var j = 0 ; j < cursor.childNodes.length ; j++ ) |
|
| 147 |
{
|
|
| 148 |
var candidate = cursor.childNodes[j] ; |
|
| 149 |
if ( candidate.nodeType == 3 && |
|
| 150 |
candidate.previousSibling && |
|
| 151 |
candidate.previousSibling.nodeType == 3 ) |
|
| 152 |
continue ; |
|
| 153 |
currentIndex++ ; |
|
| 154 |
if ( currentIndex == target ) |
|
| 155 |
{
|
|
| 156 |
cursor = candidate ; |
|
| 157 |
break ; |
|
| 158 |
} |
|
| 159 |
} |
|
| 160 |
if ( currentIndex < target ) |
|
| 161 |
return null ; |
|
| 196 |
HighlightStyle.RemoveFromRange( this._highlightRange, false, true ) ; |
|
| 197 |
var charRange = CharacterRange.CreateFromDomRange( this._highlightRange ) ; |
|
| 198 |
this._cursors = charRange._cursors ; |
|
| 199 |
this._highlightRange = null ; |
|
| 162 | 200 |
} |
| 163 |
else |
|
| 164 |
{
|
|
| 165 |
if ( i != bookmark.length - 1 ) |
|
| 166 |
return null ; |
|
| 167 |
while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 ) |
|
| 168 |
{
|
|
| 169 |
target -= cursor.length ; |
|
| 170 |
cursor = cursor.nextSibling ; |
|
| 171 |
} |
|
| 172 |
cursor = cursor.nodeValue.charAt( target ) ; |
|
| 173 |
if ( cursor == "" ) |
|
| 174 |
cursor = null ; |
|
| 175 |
} |
|
| 201 |
}, |
|
| 202 |
|
|
| 203 |
GetHighlightDomRange : function() |
|
| 204 |
{
|
|
| 205 |
return this._highlightRange; |
|
| 206 |
}, |
|
| 207 |
|
|
| 208 |
MoveNext : function() |
|
| 209 |
{
|
|
| 210 |
var next = this._cursors[ this._cursors.length - 1 ].Clone() ; |
|
| 211 |
var retval = next.MoveNext() ; |
|
| 212 |
if ( retval ) |
|
| 213 |
this._cursors = [] ; |
|
| 214 |
this._cursors.push( next ) ; |
|
| 215 |
if ( this._cursors.length > this._maxLength ) |
|
| 216 |
this._cursors.shift() ; |
|
| 217 |
return retval ; |
|
| 218 |
}, |
|
| 219 |
|
|
| 220 |
MoveBack : function() |
|
| 221 |
{
|
|
| 222 |
var prev = this._cursors[0].Clone() ; |
|
| 223 |
var retval = prev.MoveBack() ; |
|
| 224 |
if ( retval ) |
|
| 225 |
this._cursors = [] ; |
|
| 226 |
this._cursors.unshift( prev ) ; |
|
| 227 |
if ( this._cursors.length > this._maxLength ) |
|
| 228 |
this._cursors.pop() ; |
|
| 229 |
return retval ; |
|
| 230 |
}, |
|
| 231 |
|
|
| 232 |
GetEndCharacter : function() |
|
| 233 |
{
|
|
| 234 |
if ( this._cursors.length < 1 ) |
|
| 235 |
return null ; |
|
| 236 |
var retval = this._cursors[ this._cursors.length - 1 ].GetCharacter() ; |
|
| 237 |
return retval ; |
|
| 238 |
}, |
|
| 239 |
|
|
| 240 |
GetNextRange : function( len ) |
|
| 241 |
{
|
|
| 242 |
if ( this._cursors.length == 0 ) |
|
| 243 |
return null ; |
|
| 244 |
var cur = this._cursors[ this._cursors.length - 1 ].Clone() ; |
|
| 245 |
cur.MoveNext() ; |
|
| 246 |
return new CharacterRange( cur, len ) ; |
|
| 247 |
}, |
|
| 248 |
|
|
| 249 |
GetCursors : function() |
|
| 250 |
{
|
|
| 251 |
return this._cursors ; |
|
| 176 | 252 |
} |
| 177 |
return cursor ; |
|
| 178 |
} |
|
| 253 |
} ; |
|
| 179 | 254 |
|
| 180 |
// With this function, we can treat the bookmark as an iterator for DFS. |
|
| 181 |
function NextPosition( bookmark ) |
|
| 255 |
CharacterRange.CreateFromDomRange = function( domRange ) |
|
| 182 | 256 |
{
|
| 183 |
// See if there's anything further down the tree.
|
|
| 184 |
var next = bookmark.concat( [0] ) ;
|
|
| 185 |
if ( GetData( next ) != null )
|
|
| 186 |
return next ;
|
|
| 257 |
var w3cRange = domRange._Range ;
|
|
| 258 |
var startContainer = w3cRange.startContainer ;
|
|
| 259 |
var endContainer = w3cRange.endContainer ;
|
|
| 260 |
var startTextNode, startIndex, endTextNode, endIndex ;
|
|
| 187 | 261 |
|
| 188 |
// Nothing down there? See if there's anything next to me. |
|
| 189 |
var next = bookmark.slice( 0, bookmark.length - 1 ).concat( [ bookmark[ bookmark.length - 1 ] + 1 ] ) ; |
|
| 190 |
if ( GetData( next ) != null ) |
|
| 191 |
return next ; |
|
| 262 |
if ( startContainer.nodeType == 3 ) |
|
| 263 |
{
|
|
| 264 |
startTextNode = startContainer ; |
|
| 265 |
startIndex = w3cRange.startOffset ; |
|
| 266 |
} |
|
| 267 |
else if ( domRange.StartNode.nodeType == 3 ) |
|
| 268 |
{
|
|
| 269 |
startTextNode = domRange.StartNode ; |
|
| 270 |
startIndex = 0 ; |
|
| 271 |
} |
|
| 272 |
else |
|
| 273 |
{
|
|
| 274 |
startTextNode = GetNextNonEmptyTextNode( domRange.StartNode, domRange.StartNode.parentNode ) ; |
|
| 275 |
if ( !startTextNode ) |
|
| 276 |
return null ; |
|
| 277 |
startIndex = 0 ; |
|
| 278 |
} |
|
| 192 | 279 |
|
| 193 |
// Nothing even next to me? See if there's anything next to my ancestors. |
|
| 194 |
for ( var i = bookmark.length - 1 ; i > 0 ; i-- ) |
|
| 280 |
if ( endContainer.nodeType == 3 && w3cRange.endOffset > 0 ) |
|
| 195 | 281 |
{
|
| 196 |
var next = bookmark.slice( 0, i - 1 ).concat( [ bookmark[ i - 1 ] + 1 ] ) ; |
|
| 197 |
if ( GetData( next ) != null ) |
|
| 198 |
return next ; |
|
| 282 |
endTextNode = endContainer ; |
|
| 283 |
endIndex = w3cRange.endOffset - 1 ; |
|
| 199 | 284 |
} |
| 285 |
else |
|
| 286 |
{
|
|
| 287 |
endTextNode = domRange.EndNode ; |
|
| 288 |
while ( endTextNode.nodeType != 3 ) |
|
| 289 |
endTextNode = endTextNode.lastChild ; |
|
| 290 |
endIndex = endTextNode.length - 1 ; |
|
| 291 |
} |
|
| 200 | 292 |
|
| 201 |
// There's absolutely nothing left to walk, return null. |
|
| 202 |
return null ; |
|
| 203 |
} |
|
| 204 |
|
|
| 205 |
// Is this character a unicode whitespace? |
|
| 206 |
// Reference: http://unicode.org/Public/UNIDATA/PropList.txt |
|
| 207 |
function CheckIsWhitespace( c ) |
|
| 208 |
{
|
|
| 209 |
var code = c.charCodeAt( 0 ); |
|
| 210 |
if ( code >= 9 && code <= 0xd ) |
|
| 211 |
return true; |
|
| 212 |
if ( code >= 0x2000 && code <= 0x200a ) |
|
| 213 |
return true; |
|
| 214 |
switch ( code ) |
|
| 293 |
var cursors = [] ; |
|
| 294 |
var current = new CharacterCursor( startTextNode, startIndex ) ; |
|
| 295 |
cursors.push( current ) ; |
|
| 296 |
if ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) && !domRange.CheckIsEmpty() ) |
|
| 215 | 297 |
{
|
| 216 |
case 0x20: |
|
| 217 |
case 0x85: |
|
| 218 |
case 0xa0: |
|
| 219 |
case 0x1680: |
|
| 220 |
case 0x180e: |
|
| 221 |
case 0x2028: |
|
| 222 |
case 0x2029: |
|
| 223 |
case 0x202f: |
|
| 224 |
case 0x205f: |
|
| 225 |
case 0x3000: |
|
| 226 |
return true; |
|
| 227 |
default: |
|
| 228 |
return false; |
|
| 298 |
do |
|
| 299 |
{
|
|
| 300 |
current = current.Clone() ; |
|
| 301 |
current.MoveNext() ; |
|
| 302 |
cursors.push( current ) ; |
|
| 303 |
} |
|
| 304 |
while ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) ) ; |
|
| 229 | 305 |
} |
| 306 |
|
|
| 307 |
return new CharacterRange( cursors, cursors.length ) ; |
|
| 230 | 308 |
} |
| 231 | 309 |
|
| 232 | 310 |
// Knuth-Morris-Pratt Algorithm for stream input |
| 233 | 311 |
KMP_NOMATCH = 0 ; |
| 234 | 312 |
KMP_ADVANCED = 1 ; |
| 235 | 313 |
KMP_MATCHED = 2 ; |
| 236 |
function KmpMatch( pattern, ignoreCase )
|
|
| 314 |
KmpMatch = function( pattern, ignoreCase )
|
|
| 237 | 315 |
{
|
| 238 | 316 |
var overlap = [ -1 ] ; |
| 239 | 317 |
for ( var i = 0 ; i < pattern.length ; i++ ) |
| ... | ... | |
| 251 | 329 |
this.Pattern = pattern ; |
| 252 | 330 |
} |
| 253 | 331 |
KmpMatch.prototype = {
|
| 254 |
"FeedCharacter" : function( c )
|
|
| 332 |
FeedCharacter : function( c )
|
|
| 255 | 333 |
{
|
| 256 | 334 |
if ( this._IgnoreCase ) |
| 257 | 335 |
c = c.toLowerCase(); |
| ... | ... | |
| 277 | 355 |
|
| 278 | 356 |
return null ; |
| 279 | 357 |
}, |
| 280 |
"Reset" : function() |
|
| 358 |
|
|
| 359 |
Reset : function() |
|
| 281 | 360 |
{
|
| 282 | 361 |
this._State = 0 ; |
| 283 | 362 |
} |
| 284 | 363 |
}; |
| 285 | 364 |
|
| 286 |
function _Find() |
|
| 365 |
// Place a range at the start of document. |
|
| 366 |
function OnLoad() |
|
| 287 | 367 |
{
|
| 288 |
// Start from the end of the current selection. |
|
| 289 |
var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ; |
|
| 290 |
var cursor = GlobalRange.CreateBookmark2().End ; |
|
| 291 |
var matchState = KMP_NOMATCH ; |
|
| 292 |
var matchBookmark = null ; |
|
| 293 |
var matchBookmarkStart = [] ; |
|
| 368 |
// First of all, translate the dialog box texts. |
|
| 369 |
oEditor.FCKLanguageManager.TranslatePage( document ) ; |
|
| 294 | 370 |
|
| 295 |
// Match finding.
|
|
| 296 |
while ( true )
|
|
| 371 |
// Show the appropriate tab at startup.
|
|
| 372 |
if ( dialogArguments.CustomValue == 'Find' )
|
|
| 297 | 373 |
{
|
| 298 |
// Perform KMP stream matching. |
|
| 299 |
// - Reset KMP matcher if we encountered a block element. |
|
| 300 |
var data = GetData( cursor ) ; |
|
| 301 |
if ( data ) |
|
| 302 |
{
|
|
| 303 |
if ( data.tagName ) |
|
| 304 |
{
|
|
| 305 |
if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] ) |
|
| 306 |
{
|
|
| 307 |
matcher.Reset(); |
|
| 308 |
matchBookmarkStart = [] ; |
|
| 309 |
} |
|
| 310 |
} |
|
| 311 |
else if ( data.charAt != undefined ) |
|
| 312 |
{
|
|
| 313 |
matchState = matcher.FeedCharacter(data) ; |
|
| 374 |
dialog.SetSelectedTab( 'Find' ) ; |
|
| 375 |
dialog.SetAutoSize( true ) ; |
|
| 376 |
} |
|
| 377 |
else |
|
| 378 |
dialog.SetSelectedTab( 'Replace' ) ; |
|
| 314 | 379 |
|
| 315 |
// No possible match of any useful substring in the pattern for the currently scanned character. |
|
| 316 |
// So delete any positional information. |
|
| 317 |
if ( matchState == KMP_NOMATCH ) |
|
| 318 |
matchBookmarkStart = [] ; |
|
| 319 |
// We've matched something, but it's not a complete match, so let's just mark down the position for backtracking later. |
|
| 320 |
else if ( matchState == KMP_ADVANCED ) |
|
| 321 |
{
|
|
| 322 |
matchBookmarkStart.push( cursor.concat( [] ) ) ; |
|
| 323 |
if ( matchBookmarkStart.length > matcher._State ) |
|
| 324 |
matchBookmarkStart.shift() ; |
|
| 325 |
} |
|
| 326 |
// Found a complete match! Mark down the ending position as well. |
|
| 327 |
else if ( matchState == KMP_MATCHED ) |
|
| 328 |
{
|
|
| 329 |
// It is possible to get a KMP_MATCHED without KMP_ADVANCED when the match pattern is only 1 character. |
|
| 330 |
// So need to check and mark down the starting position as well. |
|
| 331 |
if ( matchBookmarkStart.length == 0 ) |
|
| 332 |
matchBookmarkStart = [cursor.concat( [] )] ; |
|
| 380 |
SelectField( 'txtFind' + dialogArguments.CustomValue ) ; |
|
| 381 |
} |
|
| 333 | 382 |
|
| 334 |
matchBookmark = { 'Start' : matchBookmarkStart.shift(), 'End' : cursor.concat( [] ) } ;
|
|
| 335 |
matchBookmark.End[ matchBookmark.End.length - 1 ]++; |
|
| 383 |
function btnStat() |
|
| 384 |
{
|
|
| 385 |
GetE('btnReplace').disabled =
|
|
| 386 |
GetE('btnReplaceAll').disabled =
|
|
| 387 |
GetE('btnFind').disabled =
|
|
| 388 |
( GetE(idMap["FindText"]).value.length == 0 ) ; |
|
| 389 |
} |
|
| 336 | 390 |
|
| 337 |
// Wait, do we have to match a whole word? |
|
| 338 |
// If yes, carry out additional checks on what we've got. |
|
| 339 |
if ( GetMatchWord() ) |
|
| 340 |
{
|
|
| 341 |
var startOk = false ; |
|
| 342 |
var endOk = false ; |
|
| 343 |
var start = matchBookmark.Start ; |
|
| 344 |
var end = matchBookmark.End ; |
|
| 345 |
if ( start[ start.length - 1 ] == 0 ) |
|
| 346 |
startOk = true ; |
|
| 347 |
else |
|
| 348 |
{
|
|
| 349 |
var cursorBeforeStart = start.slice( 0, start.length - 1 ) ; |
|
| 350 |
cursorBeforeStart.push( start[ start.length - 1 ] - 1 ) ; |
|
| 351 |
var dataBeforeStart = GetData( cursorBeforeStart ) ; |
|
| 352 |
if ( dataBeforeStart == null || dataBeforeStart.charAt == undefined ) |
|
| 353 |
startOk = true ; |
|
| 354 |
else if ( CheckIsWhitespace( dataBeforeStart ) ) |
|
| 355 |
startOk = true ; |
|
| 356 |
} |
|
| 391 |
function btnStatDelayed() |
|
| 392 |
{
|
|
| 393 |
setTimeout( btnStat, 1 ) ; |
|
| 394 |
} |
|
| 357 | 395 |
|
| 358 |
// this is already one character beyond the last char, no need to move |
|
| 359 |
var cursorAfterEnd = end ; |
|
| 360 |
var dataAfterEnd = GetData( cursorAfterEnd ); |
|
| 361 |
if ( dataAfterEnd == null || dataAfterEnd.charAt == undefined ) |
|
| 362 |
endOk = true ; |
|
| 363 |
else if ( CheckIsWhitespace( dataAfterEnd ) ) |
|
| 364 |
endOk = true ; |
|
| 396 |
function GetSearchString() |
|
| 397 |
{
|
|
| 398 |
return GetE(idMap['FindText']).value ; |
|
| 399 |
} |
|
| 365 | 400 |
|
| 366 |
if ( startOk && endOk ) |
|
| 367 |
break ; |
|
| 368 |
else |
|
| 369 |
matcher.Reset() ; |
|
| 370 |
} |
|
| 371 |
else |
|
| 372 |
break ; |
|
| 373 |
} |
|
| 374 |
} |
|
| 375 |
} |
|
| 401 |
function GetReplaceString() |
|
| 402 |
{
|
|
| 403 |
return GetE("txtReplace").value ;
|
|
| 404 |
} |
|
| 376 | 405 |
|
| 377 |
// Perform DFS across the document, until we've reached the end. |
|
| 378 |
cursor = NextPosition( cursor ) ; |
|
| 379 |
if ( cursor == null ) |
|
| 380 |
break; |
|
| 406 |
function GetCheckCase() |
|
| 407 |
{
|
|
| 408 |
return !! ( GetE(idMap['CheckCase']).checked ) ; |
|
| 409 |
} |
|
| 410 |
|
|
| 411 |
function GetMatchWord() |
|
| 412 |
{
|
|
| 413 |
return !! ( GetE(idMap['CheckWord']).checked ) ; |
|
| 414 |
} |
|
| 415 |
|
|
| 416 |
/* Is this character a unicode whitespace or a punctuation mark? |
|
| 417 |
* References: |
|
| 418 |
* http://unicode.org/Public/UNIDATA/PropList.txt (whitespaces) |
|
| 419 |
* http://php.chinaunix.net/manual/tw/ref.regex.php (punctuation marks) |
|
| 420 |
*/ |
|
| 421 |
function CheckIsWordSeparator( c ) |
|
| 422 |
{
|
|
| 423 |
var code = c.charCodeAt( 0 ); |
|
| 424 |
if ( code >= 9 && code <= 0xd ) |
|
| 425 |
return true; |
|
| 426 |
if ( code >= 0x2000 && code <= 0x200a ) |
|
| 427 |
return true; |
|
| 428 |
switch ( code ) |
|
| 429 |
{
|
|
| 430 |
case 0x20: |
|
| 431 |
case 0x85: |
|
| 432 |
case 0xa0: |
|
| 433 |
case 0x1680: |
|
| 434 |
case 0x180e: |
|
| 435 |
case 0x2028: |
|
| 436 |
case 0x2029: |
|
| 437 |
case 0x202f: |
|
| 438 |
case 0x205f: |
|
| 439 |
case 0x3000: |
|
| 440 |
return true; |
|
| 441 |
default: |
|
| 381 | 442 |
} |
| 443 |
return /[.,"'?!;:]/.test( c ) ; |
|
| 444 |
} |
|
| 382 | 445 |
|
| 383 |
// If we've found a match, highlight the match. |
|
| 384 |
if ( matchState == KMP_MATCHED ) |
|
| 446 |
FindRange = null ; |
|
| 447 |
function _Find() |
|
| 448 |
{
|
|
| 449 |
var searchString = GetSearchString() ; |
|
| 450 |
if ( !FindRange ) |
|
| 451 |
FindRange = new CharacterRange( new CharacterCursor( EditorDocument ), searchString.length ) ; |
|
| 452 |
else |
|
| 385 | 453 |
{
|
| 386 |
GlobalRange.MoveToBookmark2( matchBookmark ) ; |
|
| 387 |
Highlight() ; |
|
| 388 |
var focus = GlobalRange._Range.endContainer ; |
|
| 389 |
while ( focus && focus.nodeType != 1 ) |
|
| 390 |
focus = focus.parentNode ; |
|
| 454 |
FindRange.RemoveHighlight() ; |
|
| 455 |
FindRange = FindRange.GetNextRange( searchString.length ) ; |
|
| 456 |
} |
|
| 457 |
var matcher = new KmpMatch( searchString, ! GetCheckCase() ) ; |
|
| 458 |
var matchState = KMP_NOMATCH ; |
|
| 459 |
var character = '%' ; |
|
| 391 | 460 |
|
| 392 |
if ( focus ) |
|
| 461 |
while ( character != null ) |
|
| 462 |
{
|
|
| 463 |
while ( ( character = FindRange.GetEndCharacter() ) ) |
|
| 393 | 464 |
{
|
| 394 |
if ( oEditor.FCKBrowserInfo.IsSafari ) |
|
| 395 |
oEditor.FCKDomTools.ScrollIntoView( focus, false ) ; |
|
| 396 |
else |
|
| 397 |
focus.scrollIntoView( false ) ; |
|
| 465 |
matchState = matcher.FeedCharacter( character ) ; |
|
| 466 |
if ( matchState == KMP_MATCHED ) |
|
| 467 |
break ; |
|
| 468 |
if ( FindRange.MoveNext() ) |
|
| 469 |
matcher.Reset() ; |
|
| 398 | 470 |
} |
| 399 | 471 |
|
| 400 |
return true ; |
|
| 472 |
if ( matchState == KMP_MATCHED ) |
|
| 473 |
{
|
|
| 474 |
if ( GetMatchWord() ) |
|
| 475 |
{
|
|
| 476 |
var cursors = FindRange.GetCursors() ; |
|
| 477 |
var head = cursors[ cursors.length - 1 ].Clone() ; |
|
| 478 |
var tail = cursors[0].Clone() ; |
|
| 479 |
if ( !head.MoveNext() && !CheckIsWordSeparator( head.GetCharacter() ) ) |
|
| 480 |
continue ; |
|
| 481 |
if ( !tail.MoveBack() && !CheckIsWordSeparator( tail.GetCharacter() ) ) |
|
| 482 |
continue ; |
|
| 483 |
} |
|
| 484 |
|
|
| 485 |
FindRange.Highlight() ; |
|
| 486 |
return true ; |
|
| 487 |
} |
|
| 401 | 488 |
} |
| 402 |
else |
|
| 403 |
{
|
|
| 404 |
ResetGlobalRange() ; |
|
| 405 |
return false ; |
|
| 406 |
} |
|
| 489 |
|
|
| 490 |
FindRange = null ; |
|
| 491 |
return false ; |
|
| 407 | 492 |
} |
| 408 | 493 |
|
| 409 | 494 |
function Find() |
| 410 | 495 |
{
|
| 411 | 496 |
if ( ! _Find() ) |
| 412 |
{
|
|
| 413 |
ClearHighlight() ; |
|
| 414 | 497 |
alert( FCKLang.DlgFindNotFoundMsg ) ; |
| 415 |
} |
|
| 416 | 498 |
} |
| 417 | 499 |
|
| 418 | 500 |
function Replace() |
| 419 | 501 |
{
|
| 420 |
if ( GlobalRange.CheckIsCollapsed() )
|
|
| 502 |
var saveUndoStep = function( selectRange )
|
|
| 421 | 503 |
{
|
| 422 |
if (! _Find() ) |
|
| 504 |
var ieRange ; |
|
| 505 |
if ( oEditor.FCKBrowserInfo.IsIE ) |
|
| 506 |
ieRange = document.selection.createRange() ; |
|
| 507 |
|
|
| 508 |
selectRange.Select() ; |
|
| 509 |
oEditor.FCKUndo.SaveUndoStep() ; |
|
| 510 |
var cloneRange = selectRange.Clone() ; |
|
| 511 |
cloneRange.Collapse( false ) ; |
|
| 512 |
cloneRange.Select() ; |
|
| 513 |
|
|
| 514 |
if ( ieRange ) |
|
| 515 |
setTimeout( function(){ ieRange.select() ; }, 1 ) ;
|
|
| 516 |
} |
|
| 517 |
|
|
| 518 |
if ( FindRange && FindRange.GetHighlightDomRange() ) |
|
| 519 |
{
|
|
| 520 |
var range = FindRange.GetHighlightDomRange() ; |
|
| 521 |
var bookmark = range.CreateBookmark() ; |
|
| 522 |
FindRange.RemoveHighlight() ; |
|
| 523 |
range.MoveToBookmark( bookmark ) ; |
|
| 524 |
|
|
| 525 |
saveUndoStep( range ) ; |
|
| 526 |
range.DeleteContents() ; |
|
| 527 |
range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|
| 528 |
range._UpdateElementInfo() ; |
|
| 529 |
|
|
| 530 |
FindRange = CharacterRange.CreateFromDomRange( range ) ; |
|
| 531 |
} |
|
| 532 |
else |
|
| 533 |
{
|
|
| 534 |
if ( ! _Find() ) |
|
| 423 | 535 |
{
|
| 424 |
ClearHighlight() ;
|
|
| 536 |
FindRange && FindRange.RemoveHighlight() ;
|
|
| 425 | 537 |
alert( FCKLang.DlgFindNotFoundMsg ) ; |
| 426 | 538 |
} |
| 427 | 539 |
} |
| 428 |
else |
|
| 429 |
{
|
|
| 430 |
oEditor.FCKUndo.SaveUndoStep() ; |
|
| 431 |
GlobalRange.DeleteContents() ; |
|
| 432 |
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|
| 433 |
GlobalRange.Collapse( false ) ; |
|
| 434 |
} |
|
| 435 | 540 |
} |
| 436 | 541 |
|
| 437 | 542 |
function ReplaceAll() |
| ... | ... | |
| 441 | 546 |
|
| 442 | 547 |
while ( _Find() ) |
| 443 | 548 |
{
|
| 444 |
dialog.Selection.EnsureSelection() ; |
|
| 445 |
GlobalRange.DeleteContents() ; |
|
| 446 |
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|
| 447 |
GlobalRange.Collapse( false ) ; |
|
| 549 |
var range = FindRange.GetHighlightDomRange() ; |
|
| 550 |
var bookmark = range.CreateBookmark() ; |
|
| 551 |
FindRange.RemoveHighlight() ; |
|
| 552 |
range.MoveToBookmark( bookmark) ; |
|
| 553 |
|
|
| 554 |
range.DeleteContents() ; |
|
| 555 |
range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ; |
|
| 556 |
range._UpdateElementInfo() ; |
|
| 557 |
|
|
| 558 |
FindRange = CharacterRange.CreateFromDomRange( range ) ; |
|
| 448 | 559 |
replaceCount++ ; |
| 449 | 560 |
} |
| 450 | 561 |
if ( replaceCount == 0 ) |
| 451 | 562 |
{
|
| 452 |
ClearHighlight() ;
|
|
| 563 |
FindRange && FindRange.RemoveHighlight() ;
|
|
| 453 | 564 |
alert( FCKLang.DlgFindNotFoundMsg ) ; |
| 454 | 565 |
} |
| 455 | 566 |
dialog.Cancel() ; |
| 456 | 567 |
} |
| 457 | 568 |
|
| 458 |
window.onunload = function(){ ClearHighlight() ; }
|
|
| 569 |
window.onunload = function() |
|
| 570 |
{
|
|
| 571 |
if ( FindRange ) |
|
| 572 |
{
|
|
| 573 |
FindRange.RemoveHighlight() ; |
|
| 574 |
FindRange.ToDomRange().Select() ; |
|
| 575 |
} |
|
| 576 |
} |
|
| 459 | 577 |
</script> |
| 460 | 578 |
</head> |
| 461 | 579 |
<body onload="OnLoad()" style="overflow: hidden"> |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_image/fck_image.js | ||
|---|---|---|
| 447 | 447 |
|
| 448 | 448 |
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) |
| 449 | 449 |
{
|
| 450 |
// Remove animation |
|
| 451 |
window.parent.Throbber.Hide() ; |
|
| 452 |
GetE( 'divUpload' ).style.display = '' ; |
|
| 453 |
|
|
| 450 | 454 |
switch ( errorNumber ) |
| 451 | 455 |
{
|
| 452 | 456 |
case 0 : // No errors |
| ... | ... | |
| 500 | 504 |
return false ; |
| 501 | 505 |
} |
| 502 | 506 |
|
| 507 |
// Show animation |
|
| 508 |
window.parent.Throbber.Show( 100 ) ; |
|
| 509 |
GetE( 'divUpload' ).style.display = 'none' ; |
|
| 510 |
|
|
| 503 | 511 |
return true ; |
| 504 | 512 |
} |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_image/fck_image_preview.html | ||
|---|---|---|
| 34 | 34 |
var FCKTools = window.parent.FCKTools ; |
| 35 | 35 |
var FCKConfig = window.parent.FCKConfig ; |
| 36 | 36 |
|
| 37 |
// Sets the Skin CSS
|
|
| 38 |
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
|
|
| 39 |
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ;
|
|
| 37 |
// Set the preview CSS
|
|
| 38 |
document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) ) ;
|
|
| 39 |
document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ) ;
|
|
| 40 | 40 |
|
| 41 | 41 |
if ( window.parent.FCKConfig.BaseHref.length > 0 ) |
| 42 | 42 |
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ; |
| ... | ... | |
| 50 | 50 |
|
| 51 | 51 |
</script> |
| 52 | 52 |
</head> |
| 53 |
<body style="color: #000000; background-color: #ffffff">
|
|
| 53 |
<body> |
|
| 54 | 54 |
<div> |
| 55 | 55 |
<a id="lnkPreview" onclick="return false;" style="cursor: default"> |
| 56 | 56 |
<img id="imgPreview" onload="window.parent.UpdateOriginal();" |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_image.html | ||
|---|---|---|
| 165 | 165 |
<br /> |
| 166 | 166 |
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" /> |
| 167 | 167 |
<script type="text/javascript"> |
| 168 |
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; |
|
| 168 |
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
|
|
| 169 | 169 |
</script> |
| 170 | 170 |
</form> |
| 171 | 171 |
</div> |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_link/fck_link.js | ||
|---|---|---|
| 650 | 650 |
|
| 651 | 651 |
function SetUrl( url ) |
| 652 | 652 |
{
|
| 653 |
document.getElementById('txtUrl').value = url ;
|
|
| 653 |
GetE('txtUrl').value = url ;
|
|
| 654 | 654 |
OnUrlChange() ; |
| 655 | 655 |
dialog.SetSelectedTab( 'Info' ) ; |
| 656 | 656 |
} |
| 657 | 657 |
|
| 658 | 658 |
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) |
| 659 | 659 |
{
|
| 660 |
// Remove animation |
|
| 661 |
window.parent.Throbber.Hide() ; |
|
| 662 |
GetE( 'divUpload' ).style.display = '' ; |
|
| 663 |
|
|
| 660 | 664 |
switch ( errorNumber ) |
| 661 | 665 |
{
|
| 662 | 666 |
case 0 : // No errors |
| ... | ... | |
| 709 | 713 |
return false ; |
| 710 | 714 |
} |
| 711 | 715 |
|
| 716 |
// Show animation |
|
| 717 |
window.parent.Throbber.Show( 100 ) ; |
|
| 718 |
GetE( 'divUpload' ).style.display = 'none' ; |
|
| 719 |
|
|
| 712 | 720 |
return true ; |
| 713 | 721 |
} |
| 714 | 722 |
|
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_flash.html | ||
|---|---|---|
| 97 | 97 |
<br /> |
| 98 | 98 |
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" /> |
| 99 | 99 |
<script type="text/javascript"> |
| 100 |
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ; |
|
| 100 |
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
|
|
| 101 | 101 |
</script> |
| 102 | 102 |
</form> |
| 103 | 103 |
</div> |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/common/fck_dialog_common.js | ||
|---|---|---|
| 57 | 57 |
// Attention: FCKConfig must be available in the page. |
| 58 | 58 |
function GetCommonDialogCss( prefix ) |
| 59 | 59 |
{
|
| 60 |
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor |
|
| 60 |
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
|
|
| 61 | 61 |
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}' ;
|
| 62 | 62 |
} |
| 63 | 63 |
|
| ... | ... | |
| 187 | 187 |
sOptions += ",left=" + iLeft ; |
| 188 | 188 |
sOptions += ",top=" + iTop ; |
| 189 | 189 |
|
| 190 |
// The "PreserveSessionOnFileBrowser" because the above code could be |
|
| 191 |
// blocked by popup blockers. |
|
| 192 |
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE ) |
|
| 193 |
{
|
|
| 194 |
// The following change has been made otherwise IE will open the file |
|
| 195 |
// browser on a different server session (on some cases): |
|
| 196 |
// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678 |
|
| 197 |
// by Simone Chiaretta. |
|
| 198 |
var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ; |
|
| 199 |
|
|
| 200 |
if ( oWindow ) |
|
| 201 |
{
|
|
| 202 |
// Detect Yahoo popup blocker. |
|
| 203 |
try |
|
| 204 |
{
|
|
| 205 |
var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user. |
|
| 206 |
oWindow.opener = window ; |
|
| 207 |
} |
|
| 208 |
catch(e) |
|
| 209 |
{
|
|
| 210 |
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
|
| 211 |
} |
|
| 212 |
} |
|
| 213 |
else |
|
| 214 |
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
|
| 215 |
} |
|
| 216 |
else |
|
| 217 |
window.open( url, 'FCKBrowseWindow', sOptions ) ; |
|
| 190 |
window.open( url, 'FCKBrowseWindow', sOptions ) ; |
|
| 218 | 191 |
} |
| 219 | 192 |
|
| 220 | 193 |
/** |
| trunk/wb/modules/fckeditor/fckeditor/editor/dialog/fck_listprop.html | ||
|---|---|---|
| 67 | 67 |
dialog.SetOkButton( true ) ; |
| 68 | 68 |
dialog.SetAutoSize( true ) ; |
| 69 | 69 |
|
| 70 |
SelectField( 'txtStartPosition' ) ;
|
|
| 70 |
SelectField( sListType == 'OL' ? 'txtStartPosition' : 'selBulleted' ) ;
|
|
| 71 | 71 |
} |
| 72 | 72 |
|
| 73 | 73 |
function Ok() |
| trunk/wb/modules/fckeditor/fckeditor/editor/fckeditor.original.html | ||
|---|---|---|
| 103 | 103 |
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ; |
| 104 | 104 |
LoadScript( '_source/internals/fckconfig.js' ) ; |
| 105 | 105 |
|
| 106 |
LoadScript( '_source/internals/fckdebug.js' ) ; |
|
| 106 |
LoadScript( '_source/internals/fckdebug_empty.js' ) ;
|
|
| 107 | 107 |
LoadScript( '_source/internals/fckdomtools.js' ) ; |
| 108 | 108 |
LoadScript( '_source/internals/fcktools.js' ) ; |
| 109 | 109 |
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ; |
| ... | ... | |
| 237 | 237 |
|
| 238 | 238 |
FCKConfig_PreProcess() ; |
| 239 | 239 |
|
| 240 |
var FCK_InternalCSS = FCKConfig.FullBasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine |
|
| 241 |
var FCK_ShowTableBordersCSS = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine |
|
| 240 |
// Load the full debug script. |
|
| 241 |
if ( FCKConfig.Debug ) |
|
| 242 |
LoadScript( '_source/internals/fckdebug.js' ) ; |
|
| 243 |
|
|
| 244 |
</script> |
|
| 245 |
<script type="text/javascript"> |
|
| 246 |
|
|
| 247 |
var FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine |
|
| 248 |
var FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine |
|
| 242 | 249 |
/* @Packager.RemoveLine |
| 243 |
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor |
|
| 244 |
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;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__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}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}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:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.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)}' ) ;
|
|
| 245 |
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.FullBasePath + 'css/', '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,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}' ) ;
|
|
| 250 |
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
|
|
| 251 |
var FCK_InternalCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;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}.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}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}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:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.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)}' ) ;
|
|
| 252 |
var FCK_ShowTableBordersCSS = FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', '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,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}' ) ;
|
|
| 246 | 253 |
@Packager.RemoveLine */ |
| 247 | 254 |
|
| 248 | 255 |
// Popup the debug window if debug mode is set to true. It guarantees that the |
| trunk/wb/modules/fckeditor/fckeditor/editor/lang/_translationstatus.txt | ||
|---|---|---|
| 44 | 44 |
fr-ca.js Found: 411 Missing: 0 |
| 45 | 45 |
fr.js Found: 411 Missing: 0 |
| 46 | 46 |
gl.js Found: 381 Missing: 30 |
| 47 |
gu.js Found: 411 Missing: 0 |
|
| 47 | 48 |
he.js Found: 411 Missing: 0 |
| 48 | 49 |
hi.js Found: 411 Missing: 0 |
| 49 | 50 |
hr.js Found: 411 Missing: 0 |
| 50 | 51 |
hu.js Found: 411 Missing: 0 |
| 51 |
it.js Found: 396 Missing: 15
|
|
| 52 |
it.js Found: 410 Missing: 1
|
|
| 52 | 53 |
ja.js Found: 411 Missing: 0 |
| 53 | 54 |
km.js Found: 370 Missing: 41 |
| 54 | 55 |
ko.js Found: 390 Missing: 21 |
| trunk/wb/modules/fckeditor/fckeditor/editor/lang/it.js | ||
|---|---|---|
| 45 | 45 |
InsertLink : "Inserisci/Modifica collegamento", |
| 46 | 46 |
RemoveLink : "Elimina collegamento", |
| 47 | 47 |
Anchor : "Inserisci/Modifica Ancora", |
| 48 |
AnchorDelete : "Remove Anchor", //MISSING
|
|
| 48 |
AnchorDelete : "Rimuovi Ancora",
|
|
| 49 | 49 |
InsertImageLbl : "Immagine", |
| 50 | 50 |
InsertImage : "Inserisci/Modifica immagine", |
| 51 | 51 |
InsertFlashLbl : "Oggetto Flash", |
| ... | ... | |
| 105 | 105 |
ImageButton : "Bottone immagine", |
| 106 | 106 |
|
| 107 | 107 |
FitWindow : "Massimizza l'area dell'editor", |
| 108 |
ShowBlocks : "Show Blocks", //MISSING
|
|
| 108 |
ShowBlocks : "Visualizza Blocchi",
|
|
| 109 | 109 |
|
| 110 | 110 |
// Context Menu |
| 111 | 111 |
EditLink : "Modifica collegamento", |
| 112 | 112 |
CellCM : "Cella", |
| 113 | 113 |
RowCM : "Riga", |
| 114 | 114 |
ColumnCM : "Colonna", |
| 115 |
InsertRowAfter : "Insert Row After", //MISSING
|
|
| 116 |
InsertRowBefore : "Insert Row Before", //MISSING
|
|
| 115 |
InsertRowAfter : "Inserisci Riga Dopo",
|
|
| 116 |
InsertRowBefore : "Inserisci Riga Prima",
|
|
| 117 | 117 |
DeleteRows : "Elimina righe", |
| 118 |
InsertColumnAfter : "Insert Column After", //MISSING
|
|
| 119 |
InsertColumnBefore : "Insert Column Before", //MISSING
|
|
| 118 |
InsertColumnAfter : "Inserisci Colonna Dopo",
|
|
| 119 |
InsertColumnBefore : "Inserisci Colonna Prima",
|
|
| 120 | 120 |
DeleteColumns : "Elimina colonne", |
| 121 |
InsertCellAfter : "Insert Cell After", //MISSING
|
|
| 122 |
InsertCellBefore : "Insert Cell Before", //MISSING
|
|
| 121 |
InsertCellAfter : "Inserisci Cella Dopo",
|
|
| 122 |
InsertCellBefore : "Inserisci Cella Prima",
|
|
| 123 | 123 |
DeleteCells : "Elimina celle", |
| 124 | 124 |
MergeCells : "Unisce celle", |
| 125 |
MergeRight : "Merge Right", //MISSING
|
|
| 126 |
MergeDown : "Merge Down", //MISSING
|
|
| 127 |
HorizontalSplitCell : "Split Cell Horizontally", //MISSING
|
|
| 128 |
VerticalSplitCell : "Split Cell Vertically", //MISSING
|
|
| 125 |
MergeRight : "Unisci a Destra",
|
|
| 126 |
MergeDown : "Unisci in Basso",
|
|
| 127 |
HorizontalSplitCell : "Dividi Cella Orizzontalmente",
|
|
| 128 |
VerticalSplitCell : "Dividi Cella Verticalmente",
|
|
| 129 | 129 |
TableDelete : "Cancella Tabella", |
| 130 | 130 |
CellProperties : "Proprietà cella", |
| 131 | 131 |
TableProperties : "Proprietà tabella", |
| ... | ... | |
| 332 | 332 |
DlgCellBtnSelect : "Scegli...", |
| 333 | 333 |
|
| 334 | 334 |
// Find and Replace Dialog |
| 335 |
DlgFindAndReplaceTitle : "Find and Replace", //MISSING
|
|
| 335 |
DlgFindAndReplaceTitle : "Cerca e Sostituisci",
|
|
| 336 | 336 |
|
| 337 | 337 |
// Find Dialog |
| 338 | 338 |
DlgFindTitle : "Trova", |
| ... | ... | |
| 356 | 356 |
PasteFromWord : "Incolla da Word", |
| 357 | 357 |
|
| 358 | 358 |
DlgPasteMsg2 : "Incolla il testo all'interno dell'area sottostante usando la scorciatoia di tastiere (<STRONG>Ctrl+V</STRONG>) e premi <STRONG>OK</STRONG>.", |
| 359 |
DlgPasteSec : "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.", //MISSING
|
|
| 359 |
DlgPasteSec : "A causa delle impostazioni di sicurezza del browser,l'editor non è in grado di accedere direttamente agli appunti. E' pertanto necessario incollarli di nuovo in questa finestra.",
|
|
| 360 | 360 |
DlgPasteIgnoreFont : "Ignora le definizioni di Font", |
| 361 | 361 |
DlgPasteRemoveStyles : "Rimuovi le definizioni di Stile", |
| 362 | 362 |
|
| trunk/wb/modules/fckeditor/fckeditor/editor/plugins/dragresizetable/fckplugin.js | ||
|---|---|---|
| 88 | 88 |
}, |
| 89 | 89 |
"_ResizeBarMouseDownListener" : function( evt ) |
| 90 | 90 |
{
|
| 91 |
if ( ! evt ) |
|
| 92 |
evt = window.event ; |
|
| 93 | 91 |
if ( FCKDragTableHandler._LeftCell ) |
| 94 | 92 |
FCKDragTableHandler._MouseMoveMode = 1 ; |
| 95 | 93 |
if ( FCKBrowserInfo.IsIE ) |
| ... | ... | |
| 121 | 119 |
FCKDragTableHandler._MinimumX = minX + offset.x ; |
| 122 | 120 |
FCKDragTableHandler._MaximumX = maxX + offset.x ; |
| 123 | 121 |
FCKDragTableHandler._LastX = null ; |
| 122 |
|
|
| 123 |
if (evt.preventDefault) |
|
| 124 |
evt.preventDefault(); |
|
| 125 |
else |
|
| 126 |
evt.returnValue = false; |
|
| 124 | 127 |
}, |
| 125 | 128 |
"_ResizeBarMouseUpListener" : function( evt ) |
| 126 | 129 |
{
|
| 127 |
if ( ! evt ) |
|
| 128 |
evt = window.event ; |
|
| 129 | 130 |
FCKDragTableHandler._MouseMoveMode = 0 ; |
| 130 | 131 |
FCKDragTableHandler._HideResizeBar() ; |
| 131 | 132 |
|
| ... | ... | |
| 218 | 219 |
}, |
| 219 | 220 |
"_ResizeBarMouseMoveListener" : function( evt ) |
| 220 | 221 |
{
|
| 221 |
if ( ! evt ) |
|
| 222 |
evt = window.event ; |
|
| 223 | 222 |
if ( FCKDragTableHandler._MouseMoveMode == 0 ) |
| 224 | 223 |
return FCKDragTableHandler._MouseFindHandler( FCK, evt ) ; |
| 225 | 224 |
else |
| ... | ... | |
| 421 | 420 |
// Disable drag and drop, and selection for the filler image. |
| 422 | 421 |
var disabledListener = function( evt ) |
| 423 | 422 |
{
|
| 424 |
if ( ! evt ) |
|
| 425 |
evt = window.event ; |
|
| 426 | 423 |
if ( evt.preventDefault ) |
| 427 | 424 |
evt.preventDefault() ; |
| 428 | 425 |
else |
| trunk/wb/modules/fckeditor/fckeditor/editor/fckdialog.html | ||
|---|---|---|
| 27 | 27 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 28 | 28 |
<meta name="robots" content="noindex, nofollow" /> |
| 29 | 29 |
<script type="text/javascript"> |
| 30 |
// <![CDATA[ |
|
| 31 |
|
|
| 30 | 32 |
// Domain relaxation logic. |
| 31 | 33 |
(function() |
| 32 | 34 |
{
|
| ... | ... | |
| 190 | 192 |
} |
| 191 | 193 |
} |
| 192 | 194 |
|
| 195 |
/** |
|
| 196 |
* IE6 has a similar bug where it sometimes thinks $('contents') has an
|
|
| 197 |
* offsetHeight of 0 (#2114). |
|
| 198 |
*/ |
|
| 199 |
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) |
|
| 200 |
{
|
|
| 201 |
var originalRefreshContainerSize = retval.RefreshContainerSize ; |
|
| 202 |
retval.RefreshContainerSize = function() |
|
| 203 |
{
|
|
| 204 |
FCKTools.SetTimeout( originalRefreshContainerSize, 1, retval ) ; |
|
| 205 |
} |
|
| 206 |
} |
|
| 207 |
|
|
| 193 | 208 |
window.onresize = function() |
| 194 | 209 |
{
|
| 195 | 210 |
retval.RefreshContainerSize() ; |
| ... | ... | |
| 232 | 247 |
|
| 233 | 248 |
var throbberParent = $( 'throbberBlock' ) ; |
| 234 | 249 |
|
| 235 |
// Create the throbber blocks. |
|
| 236 |
var classIds = [ 1,2,3,4,5,4,3,2 ] ; |
|
| 237 |
while ( classIds.length > 0 ) |
|
| 238 |
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ; |
|
| 250 |
if (throbberParent.childNodes.length == 0) |
|
| 251 |
{
|
|
| 252 |
// Create the throbber blocks. |
|
| 253 |
var classIds = [ 1,2,3,4,5,4,3,2 ] ; |
|
| 254 |
while ( classIds.length > 0 ) |
|
| 255 |
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ; |
|
| 256 |
} |
|
| 239 | 257 |
|
| 240 | 258 |
// Center the throbber. |
| 241 | 259 |
var frm = $( 'contents' ) ; |
| ... | ... | |
| 248 | 266 |
// Show it. |
| 249 | 267 |
throbberParent.style.visibility = '' ; |
| 250 | 268 |
|
| 269 |
// Hide tabs and buttons: |
|
| 270 |
$( 'Tabs' ).style.visibility = 'hidden' ; |
|
| 271 |
$( 'PopupButtons' ).style.visibility = 'hidden' ; |
|
| 272 |
|
|
| 251 | 273 |
// Setup the animation interval. |
| 252 | 274 |
timer = setInterval( updateThrobber, 100 ) ; |
| 253 | 275 |
}, |
| ... | ... | |
| 260 | 282 |
timer = null ; |
| 261 | 283 |
} |
| 262 | 284 |
|
| 263 |
var throbberParent = document.getElementById( 'throbberBlock' ) ; |
|
| 264 |
if ( throbberParent ) |
|
| 265 |
FCKDomTools.RemoveNode( throbberParent ) ; |
|
| 285 |
$( 'throbberBlock' ).style.visibility = 'hidden' ; |
|
| 286 |
|
|
| 287 |
// Show tabs and buttons: |
|
| 288 |
$( 'Tabs' ).style.visibility = '' ; |
|
| 289 |
$( 'PopupButtons' ).style.visibility = '' ; |
|
Also available in: Unified diff
Updated to latest FCKEditor version 2.6.2