mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 09:28:29 +01:00
update to FCK 2.6.3, please note: you probably have to delete your browser cache!
this should fix the <br type="_moz"> bug. -added the about button in all egw_config settings, as it enables the user to check the version of the editor -added the show-blocks button in all egw_config settings, as it enables the user to check the structure elements of his document
This commit is contained in:
parent
bad25ee249
commit
260ce05397
@ -27,17 +27,20 @@
|
||||
<title>FCKeditor - AFP - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
lcForm=REQUEST.Form()
|
||||
lcForm=STRTRAN(lcForm,"&",CHR(13)+CHR(10))
|
||||
@ -51,7 +54,7 @@
|
||||
lcWert=STRTRAN(lcWert,"<","<")
|
||||
lcWert=STRTRAN(lcWert,">",">") && ... if wanted remove/translate HTML Chars ...
|
||||
|
||||
? [<tr><td>]+lcVariable+[ =</td><td>]+lcWert+[</td></tr>]
|
||||
? [<tr><th>]+lcVariable+[ =</th><td><pre>]+lcWert+[</pre></td></tr>]
|
||||
ENDIF
|
||||
NEXT
|
||||
%>
|
||||
|
@ -28,24 +28,27 @@
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" >
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td noWrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
Dim sForm
|
||||
For Each sForm in Request.Form
|
||||
%>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><%=sForm%></b></td>
|
||||
<td width="100%" style="white-space:pre"><%=Server.HTMLEncode( Request.Form(sForm) )%></td>
|
||||
<th><%=sForm%></th>
|
||||
<td><pre><%=Server.HTMLEncode( Request.Form(sForm) )%></pre></td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
|
@ -38,23 +38,22 @@
|
||||
<cfif isDefined( 'FORM.fieldnames' )>
|
||||
<cfoutput>
|
||||
<hr />
|
||||
<style>
|
||||
<!--
|
||||
td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }
|
||||
-->
|
||||
</style>
|
||||
<table border="1" cellspacing="0" cellpadding="2" bordercolor="darkblue" bordercolordark="darkblue" bordercolorlight="darkblue">
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<th colspan="2" bgcolor="darkblue"><font color="white"><strong>Dump of FORM Variables</strong></font></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="lightskyblue">FieldNames</td>
|
||||
<th>FieldNames</th>
|
||||
<td>#FORM.fieldNames#</td>
|
||||
</tr>
|
||||
<cfloop list="#FORM.fieldnames#" index="key">
|
||||
<tr>
|
||||
<td valign="top" bgcolor="lightskyblue">#key#</td>
|
||||
<td style="white-space:pre">#HTMLEditFormat( evaluate( "FORM.#key#" ) )#</td>
|
||||
<th>#key#</th>
|
||||
<td><pre>#HTMLEditFormat( evaluate( "FORM.#key#" ) )#</pre></td>
|
||||
</tr>
|
||||
</cfloop>
|
||||
</table>
|
||||
|
@ -37,7 +37,7 @@
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -52,7 +52,7 @@ window.onload = function()
|
||||
It uses the "ReplaceTextarea" command to create the editor.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<div>
|
||||
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p></textarea>
|
||||
</div>
|
||||
|
@ -105,7 +105,7 @@ function ChangeLanguage( languageCode )
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -65,7 +65,7 @@ function ChangeLanguage( languageCode )
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -71,7 +71,7 @@ function ChangeLanguage( languageCode )
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -45,7 +45,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
@ -57,7 +57,7 @@ var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
// Set the custom configurations file path (in this way the original file is mantained).
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample06.config.js' ;
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample06.config.js' ;
|
||||
|
||||
// Let's use a custom toolbar for this sample.
|
||||
oFCKeditor.ToolbarSet = 'PluginTest' ;
|
||||
|
@ -37,7 +37,7 @@
|
||||
to </HTML>).
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -148,7 +148,7 @@ function ResetIsDirty()
|
||||
at runtime.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -57,7 +57,7 @@ function FCKeditor_OnFocus( editorInstance )
|
||||
in the JavaScript API.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
|
@ -39,7 +39,7 @@
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
|
@ -38,6 +38,6 @@
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<iframe src="sample11_frame.html" width="100%" height="300"></iframe>
|
||||
<iframe src="assets/sample11_frame.html" width="100%" height="300"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -76,7 +76,7 @@ function ChangeMode()
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
|
@ -125,7 +125,7 @@ function PrepareSave()
|
||||
operations so it will work even if the internal implementation changes.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="PrepareSave();">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank" onsubmit="PrepareSave();">
|
||||
<div id="Textarea">
|
||||
<input type="button" value="Switch to FCKeditor" onclick="Toggle()" />
|
||||
<br />
|
||||
|
@ -39,7 +39,7 @@
|
||||
or the "style" attribute, are avoided.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<form action="../php/sampleposteddata.php" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
@ -52,7 +52,7 @@ oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
// Instruct the editor to load our configurations from a custom file, leaving the
|
||||
// original configuration file untouched.
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample14.config.js' ;
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample14.config.js' ;
|
||||
|
||||
oFCKeditor.Height = 300 ;
|
||||
oFCKeditor.Value = '<p>This is some <span class="Bold">sample text<\/span>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
|
||||
|
@ -28,21 +28,24 @@
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
[iterate(client_postparams, local('this'))]
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>[#this->first]</b></td>
|
||||
<td width="100%" style="white-space:pre">[#this->second]</td>
|
||||
<th>[#this->first]</th>
|
||||
<td><pre>[#this->second]</pre></td>
|
||||
</tr>
|
||||
[/iterate]
|
||||
</table>
|
||||
|
@ -70,31 +70,33 @@ require '../../fckeditor.pl';
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" >
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
_HTML_TAG_
|
||||
|
||||
foreach $key (keys %FORM) {
|
||||
$postedValue = &specialchar_cnv($FORM{$key});
|
||||
print <<"_HTML_TAG_";
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>$key</b></td>
|
||||
<td width="100%" style="white-space:pre">$postedValue</td>
|
||||
<th>$key</th>
|
||||
<td><pre>$postedValue</pre></td>
|
||||
</tr>
|
||||
_HTML_TAG_
|
||||
}
|
||||
|
@ -28,17 +28,20 @@
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" >
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
|
||||
if ( isset( $_POST ) )
|
||||
@ -55,8 +58,8 @@ foreach ( $postArray as $sForm => $value )
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><?=$sForm?></b></td>
|
||||
<td width="100%" style="white-space:pre"><?=$postedValue?></td>
|
||||
<th><?php echo $sForm?></th>
|
||||
<td><pre><?php echo $postedValue?></pre></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@ -53,19 +53,22 @@ print """
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<table border="1" cellspacing="0" id="outputSample">
|
||||
<colgroup><col width="80"><col></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
"""
|
||||
for key in form.keys():
|
||||
try:
|
||||
value = form[key].value
|
||||
print """
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>%s</b></td>
|
||||
<td width="100%%" style="white-space:pre">%s</td>
|
||||
<th>%s</th>
|
||||
<td><pre>%s</pre></td>
|
||||
</tr>
|
||||
""" % (key, value)
|
||||
except Exception, e:
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Styles used in the samples pages.
|
||||
*/
|
||||
|
||||
body, td, input, select, textarea
|
||||
body, td, th, input, select, textarea
|
||||
{
|
||||
font-size: 12px;
|
||||
font-family: Arial, Verdana, Sans-Serif;
|
||||
@ -36,15 +36,39 @@ h1
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#outputSample
|
||||
{
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
white-space: pre; /* CSS2 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla*/
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
|
||||
word-wrap: break-word; /* IE */
|
||||
}
|
||||
|
||||
#outputSample thead th
|
||||
{
|
||||
color: #dddddd;
|
||||
background-color: #999999;
|
||||
padding: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#outputSample tbody th
|
||||
{
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ function OpenSample( sample )
|
||||
<option value="html/sample12.html">JavaScript : Sample 12 : Enter key behavior</option>
|
||||
<option value="html/sample13.html">JavaScript : Sample 13 : Dinamically switching with a Textarea</option>
|
||||
<option value="html/sample14.html">JavaScript : Sample 14 : XHTML 1.1</option>
|
||||
<option value="html/sample15.html">JavaScript : Sample 15 : Legacy HTML 4 tags</option>
|
||||
<option value="html/sample16.html">JavaScript : Sample 16 : Flash content editor</option>
|
||||
<option value=""></option>
|
||||
</optgroup>
|
||||
<optgroup label="Active Fox Pro">
|
||||
|
@ -33,261 +33,135 @@
|
||||
<h1>
|
||||
FCKeditor ChangeLog - What's New?</h1>
|
||||
<h3>
|
||||
Version 2.6</h3>
|
||||
<p>
|
||||
No changes. The stabilization of the 2.6 RC was completed successfully, as expected.</p>
|
||||
<h3>
|
||||
Version 2.6 RC</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2017">#2017</a>] The FCKeditorAPI.Instances
|
||||
object can now be used to access all FCKeditor instances available in the page.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1980">#1980</a>] <span
|
||||
style="color: #ff0000">Attention:</span> By default, the editor now produces <strong>
|
||||
and <em> instead of <b> and <i>.</li>
|
||||
</ul>
|
||||
Version 2.6.3</h3>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1924">#1924</a>] The dialog
|
||||
close button is now correctly positioned in IE in RTL languages.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1933">#1933</a>] Placeholder
|
||||
dialog will now display the placeholder value correctly in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/957">#957</a>] Pressing
|
||||
Enter or typing after a placeholder with the placeholder plugin will no longer generate
|
||||
colored text.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1952">#1952</a>] Fixed
|
||||
an issue in FCKTools.FixCssUrls that, other than wrong, was breaking Opera.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1695">#1695</a>] Removed
|
||||
Ctrl-Tab hotkey for Source mode and allowed Ctrl-T to work in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1666">#1666</a>] Fixed
|
||||
permission denied errors during opening popup menus in IE6 under domain relaxation
|
||||
mode.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1934">#1934</a>] Fixed
|
||||
JavaScript errors when calling Selection.EnsureSelection() in dialogs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1920">#1920</a>] Fixed
|
||||
SSL warning message when opening image and flash dialogs under HTTPS in IE6.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1955">#1955</a>] [<a
|
||||
target="_blank" href="http://dev.fckeditor.net/ticket/1981">#1981</a>] [<a target="_blank"
|
||||
href="http://dev.fckeditor.net/ticket/1985">#1985</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>]
|
||||
Fixed XHTML source formatting errors in non-IE browsers.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2000">#2000</a>] The #
|
||||
character is now properly encoded in file names returned by the File Browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1945">#1945</a>] New folders
|
||||
and file names are now properly sanitized against control characters. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1944">#1944</a>] Backslash
|
||||
character is now disallowed in current folder path.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added
|
||||
logic to override JavaScript errors occurring inside the editing frame due to user
|
||||
added JavaScript code.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1647">#1647</a>] Hitting
|
||||
ENTER on list items containing block elements will now create new list item elements,
|
||||
instead of adding further blocks to the same list item.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1411">#1411</a>] Label
|
||||
only combos now get properly grayed out when moving to source view.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2009">#2009</a>] Fixed
|
||||
an important bug regarding styles removal on styled text boundaries, introduced
|
||||
with the 2.6 Beta 1. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2011">#2011</a>] Internal
|
||||
CSS <style> tags where being outputted when FullPage=true.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2016">#2016</a>] The Link
|
||||
dialog now properly selects the first field when opening it to modify mailto or
|
||||
anchor links. This problem was also throwing an error in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2021">#2021</a>] The caret
|
||||
will no longer remain behind in the editing area when the placeholder dialog is
|
||||
opened.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2024">#2024</a>] Fixed
|
||||
JavaScript error in IE when the user tries to open dialogs in Source mode.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1853">#1853</a>] Setting
|
||||
ShiftEnterMode to p or div now works correctly when EnterMode is br.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1838">#1838</a>] Fixed
|
||||
the issue where context menus sometimes don't disappear after selecting an option.
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2412">#2412</a>] FCK.InsertHtml()
|
||||
is now properly removing selected contents after content insertion in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2420">#2420</a>] Spelling
|
||||
mistake corrections made by the spell checking dialog are now undoable. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2411">#2411</a>] Insert
|
||||
anchor was not working for non-empty selections.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2426">#2426</a>] It was
|
||||
impossible to switch between editor areas with a single click.</li>
|
||||
<li>Language file updates for the following languages:
|
||||
<ul>
|
||||
<li>Canadian French</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2402">#2402</a>] Catalan
|
||||
</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2400">#2400</a>] Chinese
|
||||
(Simplified and Traditional)</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2401">#2401</a>] Croatian</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2422">#2422</a>] Czech</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2417">#2417</a>] Dutch</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2428">#2428</a>] French</li>
|
||||
<li>German</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2427">#2427</a>] Hebrew</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2410">#2410</a>] Hindi</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2405">#2405</a>] Japanese</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2409">#2409</a>] Norwegian
|
||||
and Norwegian Bokmål</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2429">#2429</a>] Spanish</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2406">#2406</a>] Vietnamese</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2028">#2028</a>] Fixed
|
||||
JavaScript error when EnterMode=br and user tries to insert a page break.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2002">#2002</a>] Fixed
|
||||
the issue where the maximize editor button does not vertically expand the editing
|
||||
area in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1842">#1842</a>] PHP integration:
|
||||
fixed filename encoding problems in file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1832">#1832</a>] Calling
|
||||
FCK.InsertHtml() in non-IE browsers would now activate the document processor as
|
||||
expected.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1998">#1998</a>] The native
|
||||
XMLHttpRequest class is now used in IE, whenever it is available.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1792">#1792</a>] In IE,
|
||||
the browser was able to enter in an infinite loop when working with multiple editors
|
||||
in the same page. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1948">#1948</a>] Some
|
||||
CSS rules are reset to dialog elements to avoid conflict with the page CSS.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1965">#1965</a>] IE was
|
||||
having problems with SpellerPages, causing some errors to be thrown when completing
|
||||
the spell checking in some situations.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2042">#2042</a>] The FitWindow
|
||||
command was throwing an error if executed in an editor where its relative button
|
||||
is not present in the toolbar.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/922">#922</a>] Implemented
|
||||
a generic document processor for <OBJECT> and <EMBED> tags.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1831">#1831</a>] Fixed
|
||||
the issue where the placeholder icon for <EMBED> tags does not always show
|
||||
up in IE7.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2049">#2049</a>] Fixed
|
||||
a deleted cursor CSS attribute in the minified CSS inside fck_dialog_common.js.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1806">#1806</a>] In IE,
|
||||
the caret will not any more move to the previous line when selecting a Format style
|
||||
inside an empty paragraph.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1990">#1990</a>] In IE,
|
||||
dialogs using API calls which deals with the selection, like InsertHtml now can
|
||||
be sure the selection will be placed in the correct position.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1997">#1997</a>] With
|
||||
IE, the first character of table captions where being lost on table creation.</li>
|
||||
<li>The selection and cursor position was not being properly handled when creating some
|
||||
elements like forms and tables.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/662">#662</a>] In the
|
||||
Perl sample files, the GetServerPath function will now calculate the path properly.</li>
|
||||
</ul>
|
||||
<p>
|
||||
This version has been sponsored by <a href="http://www.dataillusion.com/fs/">Data Illusion
|
||||
survey software solutions</a>.</p>
|
||||
<h3>
|
||||
Version 2.6 Beta 1</h3>
|
||||
Version 2.6.3 Beta</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/35">#35</a>] <strong>New
|
||||
(and cool!) floating dialog system</strong>, avoiding problems with popup blockers
|
||||
and enhancing the editor usability.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1886">#1886</a>] <strong>
|
||||
Adobe AIR</strong> compatibility.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/123">#123</a>] Full support
|
||||
for <strong>document.domain</strong> with automatic domain detection.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1622">#1622</a>] New <strong>
|
||||
inline CSS cache</strong> feature, making it possible to avoid downloading the CSS
|
||||
files for the editing area and skins. For that, it is enough to set the EditorAreaCSS,
|
||||
SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|<minified
|
||||
CSS styles". All internal CSS links are already using this feature. </li>
|
||||
<li>New language file for <strong>Canadian French</strong>.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/439">#439</a>] Added a
|
||||
new <strong>context menu option for opening links</strong> in the editor.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2220">#2220</a>] <strong>
|
||||
Email links</strong> from the Link dialog <strong>are now encoded</strong> by default
|
||||
to prevent being harvested by spammers. (Kudos to asuter for proposing the patch)
|
||||
</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2234">#2234</a>] Added
|
||||
the ability to create, modify and remove <strong>DIV containers</strong>. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2247">#2247</a>] The <strong>
|
||||
SHIFT+SPACE</strong> keystroke will now <strong>produce a &nbsp;</strong> character.
|
||||
</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2252">#2252</a>] It's
|
||||
now possible to enable the browsers default menu using the configuration file (FCKConfig.BrowserContextMenu
|
||||
option). </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2032">#2032</a>] Added
|
||||
HTML samples for legacy HTML and Flash HTML. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/234">#234</a>] Introduced
|
||||
the "PreventSubmitHandler" setting, which makes it possible to instruct the editor
|
||||
to not handle the hidden field update on form submit events.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1643">#1643</a>] Resolved
|
||||
several "strict warning" messages in Firefox when running FCKeditor.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1522">#1522</a>] The ENTER
|
||||
key will now work properly in IE with the cursor at the start of a formatted block.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's
|
||||
possible to define in the Styles that a Style (with an empty class) must be shown
|
||||
selected only when no class is present in the current element, and selecting that
|
||||
item will clear the current class (it does apply to any attribute, not only classes).</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/191">#191</a>] The scrollbars
|
||||
are now being properly shown in Firefox Mac when placing FCKeditor inside a hidden
|
||||
div.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/503">#503</a>] Orphaned
|
||||
<li> elements now get properly enclosed in a <ul> on output.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/309">#309</a>] The ENTER
|
||||
key will not any more break <button> elements at the beginning of paragraphs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1654">#1654</a>] The editor
|
||||
was not loading on a specific unknown situation. The breaking point has been removed.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1707">#1707</a>] The editor
|
||||
no longer hangs when operating on documents imported from Microsoft Word.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Floating
|
||||
panels attached to a shared toolbar among multiple FCKeditor instances are no longer
|
||||
misplaced when the editing areas are absolutely or relatively positioned.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1715">#1715</a>] The ShowDropDialog
|
||||
is now enforced only when ForcePasteAsPlainText = true.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1336">#1336</a>] Sometimes
|
||||
the autogrow plugin didn't work properly in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1728">#1728</a>] External
|
||||
toolbars are now properly sized in Opera.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1782">#1782</a>] Clicking
|
||||
on radio buttons or checkboxes in the editor in IE will no longer cause lockups
|
||||
in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/805">#805</a>] The FCKConfig.Keystrokes
|
||||
commands where executed even if the command itself was disabled.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/982">#982</a>] The button
|
||||
to empty the box in the "Paste from Word" has been removed as it leads to confusion
|
||||
for some users.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1682">#1682</a>] Editing
|
||||
control elements in Firefox, Opera and Safari now works properly.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1613">#1613</a>] The editor
|
||||
was surrounded by a <div> element that wasn't really needed.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/676">#676</a>] If a form
|
||||
control was moved in IE after creating it, then it did lose its name.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/738">#738</a>] It wasn't
|
||||
possible to change the type of an existing button.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1854">#1854</a>] Indentation
|
||||
now works inside table cells.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1717">#1717</a>] The editor
|
||||
was entering on looping on some specific cases when dealing with invalid source
|
||||
markup.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1530">#1530</a>] Pasting
|
||||
text into the "Find what" fields in the Find and Replace dialog would now activate
|
||||
the find and replace buttons.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1828">#1828</a>] The Find/Replace
|
||||
dialog will no longer display wrong starting positions for the match when there
|
||||
are multiple and identical characters preceding the character at the real starting
|
||||
point of the match.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1878">#1878</a>] Fixed
|
||||
a JavaScript error which occurs in the Find/Replace dialog when the user presses
|
||||
"Find" or "Replace" after the "No match found" message has appeared.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1355">#1355</a>] Line
|
||||
breaks and spaces are now conserved when converting to and from the "Formatted"
|
||||
format.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1670">#1670</a>] Improved
|
||||
the background color behind smiley icons and special characters in their corresponding
|
||||
dialogs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1693">#1693</a>] Custom
|
||||
error messages are now properly displayed in the file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/970">#970</a>] The text
|
||||
and value fields in the selection box dialog will no longer extend beyond the dialog
|
||||
limits when the user inputs a very long text or value for one of the selection options.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/479">#479</a>] Fixed the
|
||||
issue where pressing Enter in an <o:p> tag in IE does not generate line breaks.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/481">#481</a>] Fixed the
|
||||
issue where the image preview in image dialog sometimes doesn't display after selecting
|
||||
the image from server browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1488">#1488</a>] PHP integration:
|
||||
the FCKeditor class is now more PHP5/6 friendly ("public" keyword is used instead
|
||||
of depreciated "var").</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1815">#1815</a>] PHP integration:
|
||||
removed closing tag: "?>", so no additional whitespace added when files are included.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1906">#1906</a>] PHP file
|
||||
browser: fixed problems with DetectHtml() function when open_basedir was set.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1871">#1871</a>] PHP file
|
||||
browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1872">#1872</a>] Perl
|
||||
file browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1873">#1873</a>] Python
|
||||
file browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1572">#1572</a>] ColdFusion
|
||||
integration: fixed issues with setting the editor height.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1692">#1692</a>] ColdFusion
|
||||
file browser: it is possible now to define TempDirectory to avoid issues with GetTempdirectory()
|
||||
returning an empty string.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1379">#1379</a>] ColdFusion
|
||||
file browser: resolved issues with OnRequestEnd.cfm breaking the file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1509">#1509</a>] InsertHtml()
|
||||
in IE will no longer turn the preceding normal whitespace into &nbsp;.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/958">#958</a>] The AddItem
|
||||
method now has an additional fifth parameter "customData" that will be sent to the
|
||||
Execute method of the command for that menu item, allowing a single command to be
|
||||
used for different menu items..</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1502">#1502</a>] The RemoveFormat
|
||||
command now also removes the attributes from the cleaned text. The list of attributes
|
||||
is configurable with FCKConfig.RemoveAttributes.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1596">#1596</a>] On Safari,
|
||||
dialogs have now right-to-left layout when it runs a RTL language, like Arabic.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1344">#1344</a>] Added
|
||||
warning message on Copy and Cut operation failure on IE due to paste permission
|
||||
settings.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1868">#1868</a>] Links
|
||||
to file browser has been changed to avoid requests containing double dots.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2319">#2319</a>] On Opera
|
||||
and Firefox 3, the entire page was scrolling on SHIFT+ENTER, or when EnterMode='br'.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2321">#2321</a>] On Firefox
|
||||
3, the entire page was scrolling when inserting block elements with the FCK.InsertElement
|
||||
function, used by the Table and Horizontal Rule buttons.. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/692">#692</a>] Added some
|
||||
hints in editor/css/fck_editorarea.css on how to handle style items that would break
|
||||
the style combo. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2263">#2263</a>] Fixed
|
||||
a JavaScript error in IE which occurs when there are placeholder elements in the
|
||||
document and the user has pressed the Source button.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2314">#2314</a>] Corrected
|
||||
mixed up Chinese translations for the blockquote command.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2323">#2323</a>] Fixed
|
||||
the issue where the show blocks command loses the current selection from the view
|
||||
area when editing a long document.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed
|
||||
the issue where the fit window command loses the current selection and scroll position
|
||||
in the editing area.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1917">#1917</a>] Fixed
|
||||
the issue where the merge down command for tables cells does not work in IE for
|
||||
more than two cells.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2320">#2320</a>] Fixed
|
||||
the issue where the Find/Replace dialog scrolls the entire page.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1645">#1645</a>] Added
|
||||
warning message about Firefox 3's strict origin policy.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2272">#2272</a>] Improved
|
||||
the garbage filter in Paste from Word dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2327">#2327</a>] Fixed
|
||||
invalid HTML in the Paste dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1907">#1907</a>] Fixed
|
||||
sporadic "FCKeditorAPI is not defined" errors in Firefox 3.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2356">#2356</a>] Fixed
|
||||
access denied error in IE7 when FCKeditor is launched from local filesystem.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1150">#1150</a>] Fixed
|
||||
the type="_moz" attribute that sometimes appear in <br> tags in non-IE browsers.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1229">#1229</a>] Converting
|
||||
multiple contiguous paragraphs to Formatted will now be merged into a single <PRE>
|
||||
block.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1627">#1627</a>] Samples
|
||||
failed to load from local filesystem in IE7.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2363">#2363</a>] There
|
||||
were some sporadic "Permission Denied" errors with IE on some situations.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2135">#2135</a>] Fixed
|
||||
a data loss bug in IE when there are @import statements in the editor's CSS files,
|
||||
and IE's cache is set to "Check for newer versions on every visit".</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2376">#2376</a>] FCK.InsertHtml()
|
||||
will now insert to the last selected position after the user has selected things
|
||||
outside of FCKeditor, in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2368">#2368</a>] Fixed
|
||||
broken protect source logic for comments in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2387">#2387</a>] Fixed
|
||||
JavaScript error with list commands when the editable document is selected with
|
||||
Ctrl-A.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2390">#2390</a>] Fixed
|
||||
the issue where indent styles in JavaScript-generated <p> blocks are erased
|
||||
in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2394">#2394</a>] Fixed
|
||||
JavaScript error with the "split vertically" command in IE when attempting to split
|
||||
cells in the last row of a table.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2316">#2316</a>] The sample
|
||||
posted data page has now the table fixed at 100% width. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2396">#2396</a>] SpellerPages
|
||||
was causing a "Permission Denied" error in some situations. </li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="_whatsnew_history.html">See previous versions history</a>
|
||||
</p>
|
||||
<a href="_whatsnew_history.html">See previous versions history</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -32,6 +32,420 @@
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor ChangeLog - What's New?</h1>
|
||||
<h3>
|
||||
Version 2.6.2</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2043">#2043</a>] The debug
|
||||
script is not any more part of the compressed files. If FCKeditor native debugging
|
||||
features (FCKDebug) are required, the _source folder must be present in your installation.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2248">#2248</a>] Calling
|
||||
FCK.InsertHtml( 'nbsp;') was inserting a plain space instead of a non breaking space
|
||||
character.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2273">#2273</a>] The dragresizetable
|
||||
plugin now works in Firefox 3 as well.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2254">#2254</a>] Minor
|
||||
fix in FCKSelection for nodeTagName object.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1614">#1614</a>] Unified
|
||||
FCKConfig.FullBasePath with FCKConfig.BasePath.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2127">#2127</a>] Changed
|
||||
floating dialogs to use fixed positioning so that they are no longer affected by
|
||||
scrolling.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2018">#2018</a>] Reversed
|
||||
the fix for <a target="_blank" href="http://dev.fckeditor.net/ticket/183">#183</a>
|
||||
which broke FCKeditorAPI's cleanup logic. A new configuration directive <strong>MsWebBrowserControlCompat</strong>
|
||||
has been added for those who wish to force the #183 fix to be enabled.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2276">#2276</a>] [<a
|
||||
target="_blank" href="http://dev.fckeditor.net/ticket/2279">#2279</a>] On Opera
|
||||
and Firefox 3, the entire page was scrolling on ENTER.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2149">#2149</a>] CSS urls
|
||||
with querystring parameters were not being accepted for CSS values in the configuration
|
||||
file (like EditorAreaCSS).</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2287">#2287</a>] On some
|
||||
specific cases, with Firefox 2, some extra spacing was appearing in the final HTML
|
||||
on posting, if inserting two successive tables.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2287">#2287</a>] Block
|
||||
elements (like tables or horizontal rules) will be inserted correctly now when the
|
||||
cursor is at the start or the end of blocks. No extra paragraphs will be included
|
||||
in this operation.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2149">#2197</a>] The TAB
|
||||
key will now have the default browser behavior if TabSpaces=0. It will move the
|
||||
focus out of the editor (expect on Safari).</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2296">#2296</a>] Fixed
|
||||
permission denied error on clicking on files in the file browser.</li>
|
||||
</ul>
|
||||
<h3>
|
||||
Version 2.6.1</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2150">#2150</a>] The searching
|
||||
speed of the Find/Replace dialog has been vastly improved.</li>
|
||||
<li>New language file for <strong>Gujarati</strong> (by Nilam Doctor).</li>
|
||||
<li>A new TabIndex property has been added to the JavaScript integration files.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2215">#2215</a>] Following
|
||||
the above new feature, the ReplaceTextarea method will now copy the textarea.tabIndex
|
||||
value if available.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2163">#2163</a>] If the
|
||||
FCKConfig.DocType setting points to a HTML DocType then the output won't generate
|
||||
self-closing tags (it will output <img > instead of <img />).</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2173">#2173</a>] A throbber
|
||||
will be shown in the Quick Uploads.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2142">#2142</a>] HTML
|
||||
samples will now use sampleposteddata.php in action parameter inside a form.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/768">#768</a>] It is no
|
||||
longer possible for an image to have its width and height defined with both HTML
|
||||
attributes and inline CSS styles in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1426">#1426</a>] Fixed
|
||||
the error loading fckstyles.xml in servers which cannot return the correct content
|
||||
type header for .xml files.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2102">#2102</a>] Fixed
|
||||
FCKConfig.DocType which stopped working in FCKeditor 2.6.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2039">#2039</a>] Fixed
|
||||
the locking up issue in the Find/Replace dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2124">#2124</a>] PHP File
|
||||
Browser: fixed issue with resolving paths on Windows servers with PHP 5.2.4/5.2.5.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2059">#2059</a>] Fixed
|
||||
the error in the toolbar name in fckeditor.py.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2065">#2065</a>] Floating
|
||||
dialogs will now block the user from re-selecting the editing area by pressing Tab.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2114">#2114</a>] Added
|
||||
a workaround for an IE6 bug which causes floating dialogs to appear blank after
|
||||
opening it for the first time.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2136">#2136</a>] Fixed
|
||||
JavaScript error in IE when opening the bullet list properties dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1633">#1633</a>] External
|
||||
styles should no longer interfere with the appearance of the editor and floating
|
||||
panels now.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2113">#2113</a>] Fixed
|
||||
unneeded <span class="Apple-style-span"> created after inserting
|
||||
special characters.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2170">#2170</a>] Fixed
|
||||
Ctrl-Insert hotkey for copying.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2125">#2125</a>] Fixed
|
||||
the issue that FCK.InsertHtml() doesn't insert contents at the caret position when
|
||||
dialogs are opened in IE. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1764">#1764</a>] FCKeditor
|
||||
will no longer catch focus in IE on load when StartupFocus is false and the initial
|
||||
content is empty.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2126">#2126</a>] Opening
|
||||
and closing floating dialogs will no longer cause toolbar button states to become
|
||||
frozen.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2159">#2159</a>] Selection
|
||||
are now correctly restored when undoing changes made by the Replace dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2160">#2160</a>] "Match
|
||||
whole word" in the Find and Replace dialog will now find words next to punctuation
|
||||
marks as well.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2162">#2162</a>] If the
|
||||
configuration is set to work including the <head> (FullPage), references to
|
||||
stylesheets added by Firefox extensions won't be added to the output.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2168">#2168</a>] Comments
|
||||
won't generate new paragraphs in the output.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2184">#2184</a>] Fixed
|
||||
several validation errors in the File Browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1383">#1383</a>] Fixed
|
||||
an IE issue where pressing backspace may merge a hyperlink on the previous line
|
||||
with the text on the current line.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1691">#1691</a>] Creation
|
||||
of links in Safari failed if there was no selection.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2188">#2188</a>] PreserveSessionOnFileBrowser
|
||||
is now removed as it was made obsolete with 2.6.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/898">#898</a>] The styles
|
||||
for the editing area are applied in the image preview dialog.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2056">#2056</a>] Fixed
|
||||
several validation errors in the dialogs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2063">#2063</a>] Fixed
|
||||
some problems in asp related to the use of network paths for the location of the
|
||||
uploaded files.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1593">#1593</a>] The "Sample
|
||||
Posted Data" page will now properly wrap the text.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2239">#2239</a>] The PHP
|
||||
code in sampleposteddata.php has been changed from "<?=" to "<? echo".</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2241">#2241</a>] Fixed
|
||||
404 error in floating panels when FCKeditor is installed to a different domain.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2066">#2066</a>] Added
|
||||
a workaround for a Mac Safari 3.1 browser bug which caused the Fit Window button
|
||||
to give a blank screen.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2218">#2218</a>] Improved
|
||||
Gecko based browser detection to accept Epiphany/Gecko as well.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2193">#2193</a>] Fixed
|
||||
the issue where the caret cannot reach the last character of a paragraph in Opera
|
||||
9.50.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2264">#2264</a>] Fixed
|
||||
empty spaces that appear at the top of the editor in Opera 9.50.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2238">#2238</a>] The <object>
|
||||
placeholder was not being properly displayed in the compressed distribution version
|
||||
and nightly builds.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2115">#2115</a>] Fixed
|
||||
JavaScript (permission denied) error in Firefox when file has been uploaded.</li>
|
||||
</ul>
|
||||
<h3>
|
||||
Version 2.6</h3>
|
||||
<p>
|
||||
No changes. The stabilization of the 2.6 RC was completed successfully, as expected.</p>
|
||||
<h3>
|
||||
Version 2.6 RC</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2017">#2017</a>] The FCKeditorAPI.Instances
|
||||
object can now be used to access all FCKeditor instances available in the page.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1980">#1980</a>] <span
|
||||
style="color: #ff0000">Attention:</span> By default, the editor now produces <strong>
|
||||
and <em> instead of <b> and <i>.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1924">#1924</a>] The dialog
|
||||
close button is now correctly positioned in IE in RTL languages.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1933">#1933</a>] Placeholder
|
||||
dialog will now display the placeholder value correctly in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/957">#957</a>] Pressing
|
||||
Enter or typing after a placeholder with the placeholder plugin will no longer generate
|
||||
colored text.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1952">#1952</a>] Fixed
|
||||
an issue in FCKTools.FixCssUrls that, other than wrong, was breaking Opera.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1695">#1695</a>] Removed
|
||||
Ctrl-Tab hotkey for Source mode and allowed Ctrl-T to work in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1666">#1666</a>] Fixed
|
||||
permission denied errors during opening popup menus in IE6 under domain relaxation
|
||||
mode.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1934">#1934</a>] Fixed
|
||||
JavaScript errors when calling Selection.EnsureSelection() in dialogs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1920">#1920</a>] Fixed
|
||||
SSL warning message when opening image and flash dialogs under HTTPS in IE6.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1955">#1955</a>] [<a
|
||||
target="_blank" href="http://dev.fckeditor.net/ticket/1981">#1981</a>] [<a target="_blank"
|
||||
href="http://dev.fckeditor.net/ticket/1985">#1985</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/1989">#1989</a>]
|
||||
Fixed XHTML source formatting errors in non-IE browsers.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2000">#2000</a>] The #
|
||||
character is now properly encoded in file names returned by the File Browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1945">#1945</a>] New folders
|
||||
and file names are now properly sanitized against control characters. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1944">#1944</a>] Backslash
|
||||
character is now disallowed in current folder path.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1055">#1055</a>] Added
|
||||
logic to override JavaScript errors occurring inside the editing frame due to user
|
||||
added JavaScript code.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1647">#1647</a>] Hitting
|
||||
ENTER on list items containing block elements will now create new list item elements,
|
||||
instead of adding further blocks to the same list item.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1411">#1411</a>] Label
|
||||
only combos now get properly grayed out when moving to source view.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2009">#2009</a>] Fixed
|
||||
an important bug regarding styles removal on styled text boundaries, introduced
|
||||
with the 2.6 Beta 1. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2011">#2011</a>] Internal
|
||||
CSS <style> tags where being outputted when FullPage=true.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2016">#2016</a>] The Link
|
||||
dialog now properly selects the first field when opening it to modify mailto or
|
||||
anchor links. This problem was also throwing an error in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2021">#2021</a>] The caret
|
||||
will no longer remain behind in the editing area when the placeholder dialog is
|
||||
opened.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2024">#2024</a>] Fixed
|
||||
JavaScript error in IE when the user tries to open dialogs in Source mode.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1853">#1853</a>] Setting
|
||||
ShiftEnterMode to p or div now works correctly when EnterMode is br.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1838">#1838</a>] Fixed
|
||||
the issue where context menus sometimes don't disappear after selecting an option.
|
||||
</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2028">#2028</a>] Fixed
|
||||
JavaScript error when EnterMode=br and user tries to insert a page break.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2002">#2002</a>] Fixed
|
||||
the issue where the maximize editor button does not vertically expand the editing
|
||||
area in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1842">#1842</a>] PHP integration:
|
||||
fixed filename encoding problems in file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1832">#1832</a>] Calling
|
||||
FCK.InsertHtml() in non-IE browsers would now activate the document processor as
|
||||
expected.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1998">#1998</a>] The native
|
||||
XMLHttpRequest class is now used in IE, whenever it is available.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1792">#1792</a>] In IE,
|
||||
the browser was able to enter in an infinite loop when working with multiple editors
|
||||
in the same page. </li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1948">#1948</a>] Some
|
||||
CSS rules are reset to dialog elements to avoid conflict with the page CSS.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1965">#1965</a>] IE was
|
||||
having problems with SpellerPages, causing some errors to be thrown when completing
|
||||
the spell checking in some situations.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2042">#2042</a>] The FitWindow
|
||||
command was throwing an error if executed in an editor where its relative button
|
||||
is not present in the toolbar.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/922">#922</a>] Implemented
|
||||
a generic document processor for <OBJECT> and <EMBED> tags.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1831">#1831</a>] Fixed
|
||||
the issue where the placeholder icon for <EMBED> tags does not always show
|
||||
up in IE7.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2049">#2049</a>] Fixed
|
||||
a deleted cursor CSS attribute in the minified CSS inside fck_dialog_common.js.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1806">#1806</a>] In IE,
|
||||
the caret will not any more move to the previous line when selecting a Format style
|
||||
inside an empty paragraph.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1990">#1990</a>] In IE,
|
||||
dialogs using API calls which deals with the selection, like InsertHtml now can
|
||||
be sure the selection will be placed in the correct position.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1997">#1997</a>] With
|
||||
IE, the first character of table captions where being lost on table creation.</li>
|
||||
<li>The selection and cursor position was not being properly handled when creating some
|
||||
elements like forms and tables.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/662">#662</a>] In the
|
||||
Perl sample files, the GetServerPath function will now calculate the path properly.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2208">#2208</a>] Added
|
||||
missing translations in Italian language file.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2096">#2096</a>] Added
|
||||
the codepage to basexml file. Filenames with special chars should now display properly.</li>
|
||||
</ul>
|
||||
<h3>
|
||||
Version 2.6 Beta 1</h3>
|
||||
<p>
|
||||
New Features and Improvements:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/35">#35</a>] <strong>New
|
||||
(and cool!) floating dialog system</strong>, avoiding problems with popup blockers
|
||||
and enhancing the editor usability.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1886">#1886</a>] <strong>
|
||||
Adobe AIR</strong> compatibility.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/123">#123</a>] Full support
|
||||
for <strong>document.domain</strong> with automatic domain detection.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1622">#1622</a>] New <strong>
|
||||
inline CSS cache</strong> feature, making it possible to avoid downloading the CSS
|
||||
files for the editing area and skins. For that, it is enough to set the EditorAreaCSS,
|
||||
SkinEditorCSS and SkinDialogCSS to string values in the format "/absolute/path/for/urls/|<minified
|
||||
CSS styles". All internal CSS links are already using this feature. </li>
|
||||
<li>New language file for <strong>Canadian French</strong>.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Fixed Bugs:</p>
|
||||
<ul>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1643">#1643</a>] Resolved
|
||||
several "strict warning" messages in Firefox when running FCKeditor.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1522">#1522</a>] The ENTER
|
||||
key will now work properly in IE with the cursor at the start of a formatted block.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's
|
||||
possible to define in the Styles that a Style (with an empty class) must be shown
|
||||
selected only when no class is present in the current element, and selecting that
|
||||
item will clear the current class (it does apply to any attribute, not only classes).</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/191">#191</a>] The scrollbars
|
||||
are now being properly shown in Firefox Mac when placing FCKeditor inside a hidden
|
||||
div.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/503">#503</a>] Orphaned
|
||||
<li> elements now get properly enclosed in a <ul> on output.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/309">#309</a>] The ENTER
|
||||
key will not any more break <button> elements at the beginning of paragraphs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1654">#1654</a>] The editor
|
||||
was not loading on a specific unknown situation. The breaking point has been removed.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1707">#1707</a>] The editor
|
||||
no longer hangs when operating on documents imported from Microsoft Word.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Floating
|
||||
panels attached to a shared toolbar among multiple FCKeditor instances are no longer
|
||||
misplaced when the editing areas are absolutely or relatively positioned.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1715">#1715</a>] The ShowDropDialog
|
||||
is now enforced only when ForcePasteAsPlainText = true.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1336">#1336</a>] Sometimes
|
||||
the autogrow plugin didn't work properly in Firefox.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1728">#1728</a>] External
|
||||
toolbars are now properly sized in Opera.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1782">#1782</a>] Clicking
|
||||
on radio buttons or checkboxes in the editor in IE will no longer cause lockups
|
||||
in IE.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/805">#805</a>] The FCKConfig.Keystrokes
|
||||
commands where executed even if the command itself was disabled.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/982">#982</a>] The button
|
||||
to empty the box in the "Paste from Word" has been removed as it leads to confusion
|
||||
for some users.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1682">#1682</a>] Editing
|
||||
control elements in Firefox, Opera and Safari now works properly.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1613">#1613</a>] The editor
|
||||
was surrounded by a <div> element that wasn't really needed.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/676">#676</a>] If a form
|
||||
control was moved in IE after creating it, then it did lose its name.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/738">#738</a>] It wasn't
|
||||
possible to change the type of an existing button.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1854">#1854</a>] Indentation
|
||||
now works inside table cells.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1717">#1717</a>] The editor
|
||||
was entering on looping on some specific cases when dealing with invalid source
|
||||
markup.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1530">#1530</a>] Pasting
|
||||
text into the "Find what" fields in the Find and Replace dialog would now activate
|
||||
the find and replace buttons.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1828">#1828</a>] The Find/Replace
|
||||
dialog will no longer display wrong starting positions for the match when there
|
||||
are multiple and identical characters preceding the character at the real starting
|
||||
point of the match.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1878">#1878</a>] Fixed
|
||||
a JavaScript error which occurs in the Find/Replace dialog when the user presses
|
||||
"Find" or "Replace" after the "No match found" message has appeared.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1355">#1355</a>] Line
|
||||
breaks and spaces are now conserved when converting to and from the "Formatted"
|
||||
format.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1670">#1670</a>] Improved
|
||||
the background color behind smiley icons and special characters in their corresponding
|
||||
dialogs.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1693">#1693</a>] Custom
|
||||
error messages are now properly displayed in the file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/970">#970</a>] The text
|
||||
and value fields in the selection box dialog will no longer extend beyond the dialog
|
||||
limits when the user inputs a very long text or value for one of the selection options.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/479">#479</a>] Fixed the
|
||||
issue where pressing Enter in an <o:p> tag in IE does not generate line breaks.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/481">#481</a>] Fixed the
|
||||
issue where the image preview in image dialog sometimes doesn't display after selecting
|
||||
the image from server browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1488">#1488</a>] PHP integration:
|
||||
the FCKeditor class is now more PHP5/6 friendly ("public" keyword is used instead
|
||||
of depreciated "var").</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1815">#1815</a>] PHP integration:
|
||||
removed closing tag: "?>", so no additional whitespace added when files are included.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1906">#1906</a>] PHP file
|
||||
browser: fixed problems with DetectHtml() function when open_basedir was set.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1871">#1871</a>] PHP file
|
||||
browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1872">#1872</a>] Perl
|
||||
file browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1873">#1873</a>] Python
|
||||
file browser: permissions applied with the chmod command are now configurable.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1572">#1572</a>] ColdFusion
|
||||
integration: fixed issues with setting the editor height.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1692">#1692</a>] ColdFusion
|
||||
file browser: it is possible now to define TempDirectory to avoid issues with GetTempdirectory()
|
||||
returning an empty string.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1379">#1379</a>] ColdFusion
|
||||
file browser: resolved issues with OnRequestEnd.cfm breaking the file browser.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1509">#1509</a>] InsertHtml()
|
||||
in IE will no longer turn the preceding normal whitespace into &nbsp;.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/958">#958</a>] The AddItem
|
||||
method now has an additional fifth parameter "customData" that will be sent to the
|
||||
Execute method of the command for that menu item, allowing a single command to be
|
||||
used for different menu items..</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1502">#1502</a>] The RemoveFormat
|
||||
command now also removes the attributes from the cleaned text. The list of attributes
|
||||
is configurable with FCKConfig.RemoveAttributes.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1596">#1596</a>] On Safari,
|
||||
dialogs have now right-to-left layout when it runs a RTL language, like Arabic.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1344">#1344</a>] Added
|
||||
warning message on Copy and Cut operation failure on IE due to paste permission
|
||||
settings.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1868">#1868</a>] Links
|
||||
to file browser has been changed to avoid requests containing double dots.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1229">#1229</a>] Converting
|
||||
multiple contiguous paragraphs to Formatted will now be merged into a single <PRE>
|
||||
block.</li>
|
||||
<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1627">#1627</a>] Samples
|
||||
failed to load from local filesystem in IE7.</li>
|
||||
</ul>
|
||||
<h3>
|
||||
Version 2.5.1</h3>
|
||||
<p>
|
||||
|
@ -89,6 +89,9 @@ FCKContextMenu.prototype.AttachToElement = function( element )
|
||||
|
||||
function FCKContextMenu_Document_OnContextMenu( e )
|
||||
{
|
||||
if ( FCKConfig.BrowserContextMenu )
|
||||
return true ;
|
||||
|
||||
var el = e.target ;
|
||||
|
||||
while ( el )
|
||||
@ -114,6 +117,9 @@ function FCKContextMenu_Document_OnMouseDown( e )
|
||||
if( !e || e.button != 2 )
|
||||
return false ;
|
||||
|
||||
if ( FCKConfig.BrowserContextMenu )
|
||||
return true ;
|
||||
|
||||
var el = e.target ;
|
||||
|
||||
while ( el )
|
||||
@ -145,6 +151,9 @@ function FCKContextMenu_Document_OnMouseDown( e )
|
||||
|
||||
function FCKContextMenu_Document_OnMouseUp( e )
|
||||
{
|
||||
if ( FCKConfig.BrowserContextMenu )
|
||||
return true ;
|
||||
|
||||
var overrideButton = FCKContextMenu_OverrideButton ;
|
||||
|
||||
if ( overrideButton )
|
||||
@ -164,7 +173,7 @@ function FCKContextMenu_Document_OnMouseUp( e )
|
||||
|
||||
function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )
|
||||
{
|
||||
if ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) )
|
||||
if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu )
|
||||
return true ;
|
||||
|
||||
var eTarget = el || this ;
|
||||
|
@ -39,6 +39,13 @@ FCKDocumentFragment.prototype =
|
||||
targetNode.appendChild( this.RootNode ) ;
|
||||
},
|
||||
|
||||
AppendHtml : function( html )
|
||||
{
|
||||
var eTmpDiv = this.RootNode.ownerDocument.createElement( 'div' ) ;
|
||||
eTmpDiv.innerHTML = html ;
|
||||
FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ;
|
||||
},
|
||||
|
||||
InsertAfterNode : function( existingNode )
|
||||
{
|
||||
FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
|
||||
|
@ -41,7 +41,6 @@ FCKDomRange.prototype =
|
||||
{
|
||||
// For text nodes, the node itself is the StartNode.
|
||||
var eStart = innerRange.startContainer ;
|
||||
var eEnd = innerRange.endContainer ;
|
||||
|
||||
var oElementPath = new FCKElementPath( eStart ) ;
|
||||
this.StartNode = eStart.nodeType == 3 ? eStart : eStart.childNodes[ innerRange.startOffset ] ;
|
||||
@ -49,28 +48,40 @@ FCKDomRange.prototype =
|
||||
this.StartBlock = oElementPath.Block ;
|
||||
this.StartBlockLimit = oElementPath.BlockLimit ;
|
||||
|
||||
if ( eStart != eEnd )
|
||||
oElementPath = new FCKElementPath( eEnd ) ;
|
||||
|
||||
// The innerRange.endContainer[ innerRange.endOffset ] is not
|
||||
// usually part of the range, but the marker for the range end. So,
|
||||
// let's get the previous available node as the real end.
|
||||
var eEndNode = eEnd ;
|
||||
if ( innerRange.endOffset == 0 )
|
||||
if ( innerRange.collapsed )
|
||||
{
|
||||
while ( eEndNode && !eEndNode.previousSibling )
|
||||
eEndNode = eEndNode.parentNode ;
|
||||
|
||||
if ( eEndNode )
|
||||
eEndNode = eEndNode.previousSibling ;
|
||||
this.EndNode = this.StartNode ;
|
||||
this.EndContainer = this.StartContainer ;
|
||||
this.EndBlock = this.StartBlock ;
|
||||
this.EndBlockLimit = this.StartBlockLimit ;
|
||||
}
|
||||
else if ( eEndNode.nodeType == 1 )
|
||||
eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ;
|
||||
else
|
||||
{
|
||||
var eEnd = innerRange.endContainer ;
|
||||
|
||||
this.EndNode = eEndNode ;
|
||||
this.EndContainer = eEnd ;
|
||||
this.EndBlock = oElementPath.Block ;
|
||||
this.EndBlockLimit = oElementPath.BlockLimit ;
|
||||
if ( eStart != eEnd )
|
||||
oElementPath = new FCKElementPath( eEnd ) ;
|
||||
|
||||
// The innerRange.endContainer[ innerRange.endOffset ] is not
|
||||
// usually part of the range, but the marker for the range end. So,
|
||||
// let's get the previous available node as the real end.
|
||||
var eEndNode = eEnd ;
|
||||
if ( innerRange.endOffset == 0 )
|
||||
{
|
||||
while ( eEndNode && !eEndNode.previousSibling )
|
||||
eEndNode = eEndNode.parentNode ;
|
||||
|
||||
if ( eEndNode )
|
||||
eEndNode = eEndNode.previousSibling ;
|
||||
}
|
||||
else if ( eEndNode.nodeType == 1 )
|
||||
eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ;
|
||||
|
||||
this.EndNode = eEndNode ;
|
||||
this.EndContainer = eEnd ;
|
||||
this.EndBlock = oElementPath.Block ;
|
||||
this.EndBlockLimit = oElementPath.BlockLimit ;
|
||||
}
|
||||
}
|
||||
|
||||
this._Cache = {} ;
|
||||
@ -458,13 +469,13 @@ FCKDomRange.prototype =
|
||||
// Also note that the node that we use for "address base" would change during backtracking.
|
||||
var addrStart = this._Range.startContainer ;
|
||||
var addrEnd = this._Range.endContainer ;
|
||||
while ( curStart && curStart.nodeType == 3 )
|
||||
while ( curStart && addrStart.nodeType == 3 )
|
||||
{
|
||||
bookmark.Start[0] += curStart.length ;
|
||||
addrStart = curStart ;
|
||||
curStart = curStart.previousSibling ;
|
||||
}
|
||||
while ( curEnd && curEnd.nodeType == 3 )
|
||||
while ( curEnd && addrEnd.nodeType == 3 )
|
||||
{
|
||||
bookmark.End[0] += curEnd.length ;
|
||||
addrEnd = curEnd ;
|
||||
@ -863,6 +874,12 @@ FCKDomRange.prototype =
|
||||
this.ExtractContents().AppendTo( oFixedBlock ) ;
|
||||
FCKDomTools.TrimNode( oFixedBlock ) ;
|
||||
|
||||
// If the fixed block is empty (not counting bookmark nodes)
|
||||
// Add a <br /> inside to expand it.
|
||||
if ( FCKDomTools.CheckIsEmptyElement(oFixedBlock, function( element ) { return element.getAttribute('_fck_bookmark') != 'true' ; } )
|
||||
&& FCKBrowserInfo.IsGeckoLike )
|
||||
FCKTools.AppendBogusBr( oFixedBlock ) ;
|
||||
|
||||
// Insert the fixed block into the DOM.
|
||||
this.InsertNode( oFixedBlock ) ;
|
||||
|
||||
|
@ -136,7 +136,7 @@ FCKDomRangeIterator.prototype =
|
||||
// The found boundary must be set as the next one at this
|
||||
// point. (#1717)
|
||||
if ( nodeName != 'br' )
|
||||
this._NextNode = currentNode ;
|
||||
this._NextNode = FCKDomTools.GetNextSourceNode( currentNode, true, null, lastNode ) ;
|
||||
}
|
||||
|
||||
closeRange = true ;
|
||||
|
@ -96,11 +96,11 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
||||
var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ;
|
||||
|
||||
oIFrame.frameBorder = 0 ;
|
||||
oIFrame.width = oIFrame.height = '100%' ;
|
||||
oIFrame.style.width = oIFrame.style.height = '100%' ;
|
||||
|
||||
if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE )
|
||||
{
|
||||
window._FCKHtmlToLoad = sOverrideError + html ;
|
||||
window._FCKHtmlToLoad = html.replace( /<head>/i, '<head>' + sOverrideError ) ;
|
||||
oIFrame.src = 'javascript:void( (function(){' +
|
||||
'document.open() ;' +
|
||||
'document.domain="' + document.domain + '" ;' +
|
||||
@ -132,7 +132,7 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
||||
var oDoc = this.Window.document ;
|
||||
|
||||
oDoc.open() ;
|
||||
oDoc.write( sOverrideError + html ) ;
|
||||
oDoc.write( html.replace( /<head>/i, '<head>' + sOverrideError ) ) ;
|
||||
oDoc.close() ;
|
||||
}
|
||||
|
||||
@ -150,18 +150,23 @@ FCKEditingArea.prototype.Start = function( html, secondCall )
|
||||
if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
|
||||
{
|
||||
var editArea = this ;
|
||||
( oIFrame.onreadystatechange = function()
|
||||
{
|
||||
if ( oIFrame.readyState == 'complete' )
|
||||
{
|
||||
oIFrame.onreadystatechange = null ;
|
||||
editArea.Window._FCKEditingArea = editArea ;
|
||||
FCKEditingArea_CompleteStart.call( editArea.Window ) ;
|
||||
}
|
||||
// It happened that IE changed the state to "complete" after the
|
||||
// "if" and before the "onreadystatechange" assignement, making we
|
||||
// lost the event call, so we do a manual call just to be sure.
|
||||
} )() ;
|
||||
|
||||
// Using a IE alternative for DOMContentLoaded, similar to the
|
||||
// solution proposed at http://javascript.nwbox.com/IEContentLoaded/
|
||||
setTimeout( function()
|
||||
{
|
||||
try
|
||||
{
|
||||
editArea.Window.document.documentElement.doScroll("left") ;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
setTimeout( arguments.callee, 0 ) ;
|
||||
return ;
|
||||
}
|
||||
editArea.Window._FCKEditingArea = editArea ;
|
||||
FCKEditingArea_CompleteStart.call( editArea.Window ) ;
|
||||
}, 0 ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -246,6 +251,7 @@ FCKEditingArea.prototype.MakeEditable = function()
|
||||
if ( this._BodyHTML )
|
||||
{
|
||||
oDoc.body.innerHTML = this._BodyHTML ;
|
||||
oDoc.body.offsetLeft ; // Don't remove, this is a hack to fix Opera 9.50, see #2264.
|
||||
this._BodyHTML = null ;
|
||||
}
|
||||
|
||||
|
@ -43,17 +43,21 @@ var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces )
|
||||
oKeystrokeHandler.SetKeystrokes( [
|
||||
[ 13 , 'Enter' ],
|
||||
[ SHIFT + 13, 'ShiftEnter' ],
|
||||
[ 9 , 'Tab' ],
|
||||
[ 8 , 'Backspace' ],
|
||||
[ CTRL + 8 , 'CtrlBackspace' ],
|
||||
[ CTRL + 8 , 'CtrlBackspace' ],
|
||||
[ 46 , 'Delete' ]
|
||||
] ) ;
|
||||
|
||||
if ( tabSpaces > 0 )
|
||||
this.TabText = '' ;
|
||||
|
||||
// Safari by default inserts 4 spaces on TAB, while others make the editor
|
||||
// loose focus. So, we need to handle it here to not include those spaces.
|
||||
if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari )
|
||||
{
|
||||
this.TabText = '' ;
|
||||
while ( tabSpaces-- > 0 )
|
||||
while ( tabSpaces-- )
|
||||
this.TabText += '\xa0' ;
|
||||
|
||||
oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] );
|
||||
}
|
||||
|
||||
oKeystrokeHandler.AttachToElement( targetWindow.document ) ;
|
||||
@ -163,6 +167,28 @@ FCKEnterKey.prototype.DoBackspace = function()
|
||||
return false ;
|
||||
}
|
||||
|
||||
// On IE, it is better for us handle the deletion if the caret is preceeded
|
||||
// by a <br> (#1383).
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
var previousElement = FCKDomTools.GetPreviousSourceElement( oRange.StartNode, true ) ;
|
||||
|
||||
if ( previousElement && previousElement.nodeName.toLowerCase() == 'br' )
|
||||
{
|
||||
// Create a range that starts after the <br> and ends at the
|
||||
// current range position.
|
||||
var testRange = oRange.Clone() ;
|
||||
testRange.SetStart( previousElement, 4 ) ;
|
||||
|
||||
// If that range is empty, we can proceed cleaning that <br> manually.
|
||||
if ( testRange.CheckIsEmpty() )
|
||||
{
|
||||
previousElement.parentNode.removeChild( previousElement ) ;
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var oStartBlock = oRange.StartBlock ;
|
||||
var oEndBlock = oRange.EndBlock ;
|
||||
|
||||
@ -504,10 +530,8 @@ FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
|
||||
oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ;
|
||||
}
|
||||
|
||||
if ( FCKBrowserInfo.IsSafari )
|
||||
if ( FCKBrowserInfo.IsGeckoLike )
|
||||
FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ;
|
||||
else if ( FCKBrowserInfo.IsGeckoLike )
|
||||
( eNextBlock || eNewBlock ).scrollIntoView( false ) ;
|
||||
|
||||
oRange.Select() ;
|
||||
}
|
||||
@ -590,10 +614,7 @@ FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag )
|
||||
|
||||
eLineBreak.parentNode.insertBefore( dummy, eLineBreak.nextSibling ) ;
|
||||
|
||||
if ( FCKBrowserInfo.IsSafari )
|
||||
FCKDomTools.ScrollIntoView( dummy, false ) ;
|
||||
else
|
||||
dummy.scrollIntoView( false ) ;
|
||||
FCKDomTools.ScrollIntoView( dummy, false ) ;
|
||||
|
||||
dummy.parentNode.removeChild( dummy ) ;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction )
|
||||
|
||||
function FCKIECleanup_Cleanup()
|
||||
{
|
||||
if ( !this._FCKCleanupObj || !window.FCKUnloadFlag )
|
||||
if ( !this._FCKCleanupObj || ( FCKConfig.MsWebBrowserControlCompat && !window.FCKUnloadFlag ) )
|
||||
return ;
|
||||
|
||||
var aItems = this._FCKCleanupObj.Items ;
|
||||
|
@ -66,11 +66,12 @@ var FCKPanel = function( parentWindow )
|
||||
else
|
||||
{
|
||||
var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ;
|
||||
FCKTools.ResetStyles( oIFrame );
|
||||
oIFrame.src = 'javascript:void(0)' ;
|
||||
oIFrame.allowTransparency = true ;
|
||||
oIFrame.frameBorder = '0' ;
|
||||
oIFrame.scrolling = 'no' ;
|
||||
oIFrame.width = oIFrame.height = 0 ;
|
||||
oIFrame.style.width = oIFrame.style.height = '0px' ;
|
||||
FCKDomTools.SetElementStyles( oIFrame,
|
||||
{
|
||||
position : 'absolute',
|
||||
@ -277,8 +278,8 @@ FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
||||
{
|
||||
var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
|
||||
var iHeight = eMainNode.offsetHeight ;
|
||||
me._IFrame.width = iWidth ;
|
||||
me._IFrame.height = iHeight ;
|
||||
me._IFrame.style.width = iWidth + 'px' ;
|
||||
me._IFrame.style.height = iHeight + 'px' ;
|
||||
|
||||
}, 0 ) ;
|
||||
|
||||
@ -303,7 +304,7 @@ FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock )
|
||||
|
||||
// It is better to set the sizes to 0, otherwise Firefox would have
|
||||
// rendering problems.
|
||||
this._IFrame.width = this._IFrame.height = 0 ;
|
||||
this._IFrame.style.width = this._IFrame.style.height = '0px' ;
|
||||
|
||||
this._IsOpened = false ;
|
||||
|
||||
|
@ -221,6 +221,8 @@ FCKStyle.prototype =
|
||||
if ( FCKDomTools.GetAttributeValue( pathElement, att ) != this.GetFinalAttributeValue( att ) )
|
||||
continue ;
|
||||
|
||||
/*jsl:fallthru*/
|
||||
|
||||
default :
|
||||
FCKDomTools.RemoveAttribute( pathElement, att ) ;
|
||||
}
|
||||
@ -373,6 +375,8 @@ FCKStyle.prototype =
|
||||
if ( FCKDomTools.GetAttributeValue( currentNode, att ) != this.GetFinalAttributeValue( att ) )
|
||||
continue ;
|
||||
|
||||
/*jsl:fallthru*/
|
||||
|
||||
default :
|
||||
FCKDomTools.RemoveAttribute( currentNode, att ) ;
|
||||
}
|
||||
@ -546,6 +550,8 @@ FCKStyle.prototype =
|
||||
if ( FCKDomTools.GetAttributeValue( innerElement, att ) != this.GetFinalAttributeValue( att ) )
|
||||
continue ;
|
||||
|
||||
/*jsl:fallthru*/
|
||||
|
||||
default :
|
||||
FCKDomTools.RemoveAttribute( innerElement, att ) ;
|
||||
}
|
||||
@ -781,7 +787,7 @@ FCKStyle.prototype =
|
||||
{
|
||||
if ( !isTag )
|
||||
{
|
||||
value = value.replace( /\n/g, '<BR>' ) ;
|
||||
value = value.replace( /\n/g, '<br>' ) ;
|
||||
value = value.replace( /[ \t]{2,}/g,
|
||||
function ( match )
|
||||
{
|
||||
@ -802,40 +808,126 @@ FCKStyle.prototype =
|
||||
// Handle converting from a regular block to a <pre> block.
|
||||
var innerHTML = block.innerHTML.Trim() ;
|
||||
|
||||
// 1. Delete ANSI whitespaces immediately before and after <BR> because they are not visible.
|
||||
// 2. Mark down any <BR /> nodes here so they can be turned into \n in the next step and avoid being compressed.
|
||||
innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<BR />' ) ;
|
||||
// 1. Delete ANSI whitespaces immediately before and after <BR> because
|
||||
// they are not visible.
|
||||
// 2. Mark down any <BR /> nodes here so they can be turned into \n in
|
||||
// the next step and avoid being compressed.
|
||||
innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<br />' ) ;
|
||||
|
||||
// 3. Compress other ANSI whitespaces since they're only visible as one single space previously.
|
||||
// 3. Compress other ANSI whitespaces since they're only visible as one
|
||||
// single space previously.
|
||||
// 4. Convert to spaces since is no longer needed in <PRE>.
|
||||
// 5. Convert any <BR /> to \n. This must not be done earlier because the \n would then get compressed.
|
||||
// 5. Convert any <BR /> to \n. This must not be done earlier because
|
||||
// the \n would then get compressed.
|
||||
var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
|
||||
var results = [] ;
|
||||
htmlIterator.Each( function( isTag, value )
|
||||
{
|
||||
if ( !isTag )
|
||||
value = value.replace( /([ \t\n\r]+| )/g, ' ' ) ;
|
||||
else if ( isTag && value == '<BR />' )
|
||||
else if ( isTag && value == '<br />' )
|
||||
value = '\n' ;
|
||||
results.push( value ) ;
|
||||
} ) ;
|
||||
|
||||
// Assigning innerHTML to <PRE> in IE causes all linebreaks to be reduced to spaces.
|
||||
// Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't contained in another node
|
||||
// since the node reference is changed after outerHTML assignment.
|
||||
// Assigning innerHTML to <PRE> in IE causes all linebreaks to be
|
||||
// reduced to spaces.
|
||||
// Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't
|
||||
// contained in another node since the node reference is changed after
|
||||
// outerHTML assignment.
|
||||
// So, we need some hacks to workaround IE bugs here.
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
var temp = doc.createElement( 'div' ) ;
|
||||
temp.appendChild( newBlock ) ;
|
||||
newBlock.outerHTML = '<PRE>\n' + results.join( '' ) + '</PRE>' ;
|
||||
newBlock.outerHTML = '<pre>\n' + results.join( '' ) + '</pre>' ;
|
||||
newBlock = temp.removeChild( temp.firstChild ) ;
|
||||
}
|
||||
else
|
||||
newBlock.innerHTML = results.join( '' ) ;
|
||||
|
||||
return newBlock ;
|
||||
},
|
||||
|
||||
/**
|
||||
* Merge a <pre> block with a previous <pre> block, if available.
|
||||
*/
|
||||
_CheckAndMergePre : function( previousBlock, preBlock )
|
||||
{
|
||||
// Check if the previous block and the current block are next
|
||||
// to each other.
|
||||
if ( previousBlock != FCKDomTools.GetPreviousSourceElement( preBlock, true ) )
|
||||
return ;
|
||||
|
||||
// Merge the previous <pre> block contents into the current <pre>
|
||||
// block.
|
||||
//
|
||||
// Another thing to be careful here is that currentBlock might contain
|
||||
// a '\n' at the beginning, and previousBlock might contain a '\n'
|
||||
// towards the end. These new lines are not normally displayed but they
|
||||
// become visible after merging.
|
||||
var innerHTML = previousBlock.innerHTML.replace( /\n$/, '' ) + '\n\n' +
|
||||
preBlock.innerHTML.replace( /^\n/, '' ) ;
|
||||
|
||||
// Buggy IE normalizes innerHTML from <pre>, breaking whitespaces.
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
preBlock.outerHTML = '<pre>' + innerHTML + '</pre>' ;
|
||||
else
|
||||
preBlock.innerHTML = innerHTML ;
|
||||
|
||||
// Remove the previous <pre> block.
|
||||
//
|
||||
// The preBlock must not be moved or deleted from the DOM tree. This
|
||||
// guarantees the FCKDomRangeIterator in _ApplyBlockStyle would not
|
||||
// get lost at the next iteration.
|
||||
FCKDomTools.RemoveNode( previousBlock ) ;
|
||||
},
|
||||
|
||||
_CheckAndSplitPre : function( newBlock )
|
||||
{
|
||||
var lastNewBlock ;
|
||||
|
||||
var cursor = newBlock.firstChild ;
|
||||
|
||||
// We are not splitting <br><br> at the beginning of the block, so
|
||||
// we'll start from the second child.
|
||||
cursor = cursor && cursor.nextSibling ;
|
||||
|
||||
while ( cursor )
|
||||
{
|
||||
var next = cursor.nextSibling ;
|
||||
|
||||
// If we have two <BR>s, and they're not at the beginning or the end,
|
||||
// then we'll split up the contents following them into another block.
|
||||
// Stop processing if we are at the last child couple.
|
||||
if ( next && next.nextSibling && cursor.nodeName.IEquals( 'br' ) && next.nodeName.IEquals( 'br' ) )
|
||||
{
|
||||
// Remove the first <br>.
|
||||
FCKDomTools.RemoveNode( cursor ) ;
|
||||
|
||||
// Move to the node after the second <br>.
|
||||
cursor = next.nextSibling ;
|
||||
|
||||
// Remove the second <br>.
|
||||
FCKDomTools.RemoveNode( next ) ;
|
||||
|
||||
// Create the block that will hold the child nodes from now on.
|
||||
lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || newBlock, FCKDomTools.CloneElement( newBlock ) ) ;
|
||||
|
||||
continue ;
|
||||
}
|
||||
|
||||
// If we split it, then start moving the nodes to the new block.
|
||||
if ( lastNewBlock )
|
||||
{
|
||||
cursor = cursor.previousSibling ;
|
||||
FCKDomTools.MoveNode(cursor.nextSibling, lastNewBlock ) ;
|
||||
}
|
||||
|
||||
cursor = cursor.nextSibling ;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Apply an inline style to a FCKDomRange.
|
||||
*
|
||||
@ -856,76 +948,41 @@ FCKStyle.prototype =
|
||||
|
||||
var block ;
|
||||
var doc = range.Window.document ;
|
||||
|
||||
var preBlocks = [] ;
|
||||
var convertedPreBlocks = [] ;
|
||||
var previousPreBlock ;
|
||||
|
||||
while( ( block = iterator.GetNextParagraph() ) ) // Only one =
|
||||
{
|
||||
// Create the new node right before the current one.
|
||||
var newBlock = this.BuildElement( doc ) ;
|
||||
|
||||
// Check if we are changing from/to <pre>.
|
||||
var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
|
||||
var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
|
||||
|
||||
var toPre = newBlockIsPre && !blockIsPre ;
|
||||
var fromPre = !newBlockIsPre && blockIsPre ;
|
||||
|
||||
// Move everything from the current node to the new one.
|
||||
var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
|
||||
var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
|
||||
if ( newBlockIsPre && !blockIsPre )
|
||||
{
|
||||
if ( toPre )
|
||||
newBlock = this._ToPre( doc, block, newBlock ) ;
|
||||
preBlocks.push( newBlock ) ;
|
||||
}
|
||||
else if ( !newBlockIsPre && blockIsPre )
|
||||
{
|
||||
else if ( fromPre )
|
||||
newBlock = this._FromPre( doc, block, newBlock ) ;
|
||||
convertedPreBlocks.push( newBlock ) ;
|
||||
}
|
||||
else // Convering from a regular block to another regular block.
|
||||
FCKDomTools.MoveChildren( block, newBlock ) ;
|
||||
|
||||
// Replace the current block.
|
||||
block.parentNode.insertBefore( newBlock, block ) ;
|
||||
FCKDomTools.RemoveNode( block ) ;
|
||||
}
|
||||
|
||||
// Merge adjacent <PRE> blocks for #1229.
|
||||
for ( var i = 0 ; i < preBlocks.length - 1 ; i++ )
|
||||
{
|
||||
// Check if the next block in HTML equals the next <PRE> block generated.
|
||||
if ( FCKDomTools.GetNextSourceElement( preBlocks[i], true, [], [], true ) != preBlocks[i+1] )
|
||||
continue ;
|
||||
|
||||
// Merge the upper <PRE> block's content into the lower <PRE> block.
|
||||
// Remove the upper <PRE> block.
|
||||
preBlocks[i+1].innerHTML = preBlocks[i].innerHTML + '\n\n' + preBlocks[i+1].innerHTML ;
|
||||
FCKDomTools.RemoveNode( preBlocks[i] ) ;
|
||||
}
|
||||
|
||||
// Split converted <PRE> blocks for #1229.
|
||||
for ( var i = 0 ; i < convertedPreBlocks.length ; i++ )
|
||||
{
|
||||
var currentBlock = convertedPreBlocks[i] ;
|
||||
var lastNewBlock = null ;
|
||||
for ( var j = 0 ; j < currentBlock.childNodes.length ; j++ )
|
||||
// Complete other tasks after inserting the node in the DOM.
|
||||
if ( newBlockIsPre )
|
||||
{
|
||||
var cursor = currentBlock.childNodes[j] ;
|
||||
|
||||
// If we have two <BR>s, and they're not at the beginning or the end,
|
||||
// then we'll split up the contents following them into another block.
|
||||
if ( cursor.nodeName.IEquals( 'br' ) && j != 0 && j != currentBlock.childNodes.length - 2
|
||||
&& cursor.nextSibling && cursor.nextSibling.nodeName.IEquals( 'br' ) )
|
||||
{
|
||||
FCKDomTools.RemoveNode( cursor.nextSibling ) ;
|
||||
FCKDomTools.RemoveNode( cursor ) ;
|
||||
j-- ; // restart at current index at next iteration
|
||||
lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || currentBlock, doc.createElement( currentBlock.nodeName ) ) ;
|
||||
continue ;
|
||||
}
|
||||
|
||||
if ( lastNewBlock )
|
||||
{
|
||||
FCKDomTools.MoveNode( cursor, lastNewBlock ) ;
|
||||
j-- ; // restart at current index at next iteration
|
||||
}
|
||||
if ( previousPreBlock )
|
||||
this._CheckAndMergePre( previousPreBlock, newBlock ) ; // Merge successive <pre> blocks.
|
||||
previousPreBlock = newBlock ;
|
||||
}
|
||||
else if ( fromPre )
|
||||
this._CheckAndSplitPre( newBlock ) ; // Split <br><br> in successive <pre>s.
|
||||
}
|
||||
|
||||
// Re-select the original range.
|
||||
|
@ -32,10 +32,14 @@ FCKXml.prototype =
|
||||
oXmlHttp.open( 'GET', urlToCall, false ) ;
|
||||
oXmlHttp.send( null ) ;
|
||||
|
||||
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
|
||||
oXml = oXmlHttp.responseXML ;
|
||||
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
|
||||
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 || ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) )
|
||||
{
|
||||
oXml = oXmlHttp.responseXML ;
|
||||
// #1426: Fallback if responseXML isn't set for some
|
||||
// reason (e.g. improperly configured web server)
|
||||
if ( !oXml )
|
||||
oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ;
|
||||
}
|
||||
else
|
||||
oXml = null ;
|
||||
|
||||
|
@ -40,14 +40,19 @@ FCKXml.prototype =
|
||||
|
||||
oXmlHttp.send( null ) ;
|
||||
|
||||
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
|
||||
this.DOMDocument = oXmlHttp.responseXML ;
|
||||
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
|
||||
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 || ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) )
|
||||
{
|
||||
this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ;
|
||||
this.DOMDocument.async = false ;
|
||||
this.DOMDocument.resolveExternals = false ;
|
||||
this.DOMDocument.loadXML( oXmlHttp.responseText ) ;
|
||||
this.DOMDocument = oXmlHttp.responseXML ;
|
||||
|
||||
// #1426: Fallback if responseXML isn't set for some
|
||||
// reason (e.g. improperly configured web server)
|
||||
if ( !this.DOMDocument || this.DOMDocument.firstChild == null )
|
||||
{
|
||||
this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ;
|
||||
this.DOMDocument.async = false ;
|
||||
this.DOMDocument.resolveExternals = false ;
|
||||
this.DOMDocument.loadXML( oXmlHttp.responseText ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -311,6 +311,65 @@ FCKUnlinkCommand.prototype.GetState = function()
|
||||
return state ;
|
||||
}
|
||||
|
||||
FCKVisitLinkCommand = function()
|
||||
{
|
||||
this.Name = 'VisitLink';
|
||||
}
|
||||
FCKVisitLinkCommand.prototype =
|
||||
{
|
||||
GetState : function()
|
||||
{
|
||||
if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
|
||||
return FCK_TRISTATE_DISABLED ;
|
||||
var state = FCK.GetNamedCommandState( 'Unlink' ) ;
|
||||
|
||||
if ( state == FCK_TRISTATE_OFF )
|
||||
{
|
||||
var el = FCKSelection.MoveToAncestorNode( 'A' ) ;
|
||||
if ( !el.href )
|
||||
state = FCK_TRISTATE_DISABLED ;
|
||||
}
|
||||
|
||||
return state ;
|
||||
},
|
||||
|
||||
Execute : function()
|
||||
{
|
||||
var el = FCKSelection.MoveToAncestorNode( 'A' ) ;
|
||||
var url = el.getAttribute( '_fcksavedurl' ) || el.getAttribute( 'href', 2 ) ;
|
||||
|
||||
// Check if it's a full URL.
|
||||
// If not full URL, we'll need to apply the BaseHref setting.
|
||||
if ( ! /:\/\//.test( url ) )
|
||||
{
|
||||
var baseHref = FCKConfig.BaseHref ;
|
||||
var parentWindow = FCK.GetInstanceObject( 'parent' ) ;
|
||||
if ( !baseHref )
|
||||
{
|
||||
baseHref = parentWindow.document.location.href ;
|
||||
baseHref = baseHref.substring( 0, baseHref.lastIndexOf( '/' ) + 1 ) ;
|
||||
}
|
||||
|
||||
if ( /^\//.test( url ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
baseHref = baseHref.match( /^.*:\/\/+[^\/]+/ )[0] ;
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
baseHref = parentWindow.document.location.protocol + '://' + parentWindow.parent.document.location.host ;
|
||||
}
|
||||
}
|
||||
|
||||
url = baseHref + url ;
|
||||
}
|
||||
|
||||
if ( !window.open( url, '_blank' ) )
|
||||
alert( FCKLang.VisitLinkBlocked ) ;
|
||||
}
|
||||
} ;
|
||||
|
||||
// FCKSelectAllCommand
|
||||
var FCKSelectAllCommand = function()
|
||||
{
|
||||
@ -516,3 +575,60 @@ FCKAnchorDeleteCommand.prototype =
|
||||
return FCK.GetNamedCommandState( 'Unlink') ;
|
||||
}
|
||||
};
|
||||
|
||||
var FCKDeleteDivCommand = function()
|
||||
{
|
||||
}
|
||||
FCKDeleteDivCommand.prototype =
|
||||
{
|
||||
GetState : function()
|
||||
{
|
||||
if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
|
||||
return FCK_TRISTATE_DISABLED ;
|
||||
|
||||
var node = FCKSelection.GetParentElement() ;
|
||||
var path = new FCKElementPath( node ) ;
|
||||
return path.BlockLimit && path.BlockLimit.nodeName.IEquals( 'div' ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
|
||||
},
|
||||
|
||||
Execute : function()
|
||||
{
|
||||
// Create an undo snapshot before doing anything.
|
||||
FCKUndo.SaveUndoStep() ;
|
||||
|
||||
// Find out the nodes to delete.
|
||||
var nodes = FCKDomTools.GetSelectedDivContainers() ;
|
||||
|
||||
// Remember the current selection position.
|
||||
var range = new FCKDomRange( FCK.EditorWindow ) ;
|
||||
range.MoveToSelection() ;
|
||||
var bookmark = range.CreateBookmark() ;
|
||||
|
||||
// Delete the container DIV node.
|
||||
for ( var i = 0 ; i < nodes.length ; i++)
|
||||
FCKDomTools.RemoveNode( nodes[i], true ) ;
|
||||
|
||||
// Restore selection.
|
||||
range.MoveToBookmark( bookmark ) ;
|
||||
range.Select() ;
|
||||
}
|
||||
} ;
|
||||
|
||||
// FCKRuleCommand
|
||||
var FCKNbsp = function()
|
||||
{
|
||||
this.Name = 'Non Breaking Space' ;
|
||||
}
|
||||
|
||||
FCKNbsp.prototype =
|
||||
{
|
||||
Execute : function()
|
||||
{
|
||||
FCK.InsertHtml( ' ' ) ;
|
||||
},
|
||||
|
||||
GetState : function()
|
||||
{
|
||||
return ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_OFF ) ;
|
||||
}
|
||||
} ;
|
||||
|
@ -37,6 +37,11 @@ FCKFitWindow.prototype.Execute = function()
|
||||
var eBodyStyle = eBody.style ;
|
||||
var eParent ;
|
||||
|
||||
// Save the current selection and scroll position.
|
||||
var oRange = new FCKDomRange( FCK.EditorWindow ) ;
|
||||
oRange.MoveToSelection() ;
|
||||
var oEditorScrollPos = FCKTools.GetScrollPosition( FCK.EditorWindow ) ;
|
||||
|
||||
// No original style properties known? Go fullscreen.
|
||||
if ( !this.IsMaximized )
|
||||
{
|
||||
@ -83,6 +88,7 @@ FCKFitWindow.prototype.Execute = function()
|
||||
var oViewPaneSize = FCKTools.GetViewPaneSize( eMainWindow ) ;
|
||||
|
||||
eEditorFrameStyle.position = "absolute";
|
||||
eEditorFrame.offsetLeft ; // Kludge for Safari 3.1 browser bug, do not remove. See #2066.
|
||||
eEditorFrameStyle.zIndex = FCKConfig.FloatingPanelsZIndex - 1;
|
||||
eEditorFrameStyle.left = "0px";
|
||||
eEditorFrameStyle.top = "0px";
|
||||
@ -159,6 +165,10 @@ FCKFitWindow.prototype.Execute = function()
|
||||
FCK.EditingArea.MakeEditable() ;
|
||||
|
||||
FCK.Focus() ;
|
||||
|
||||
// Restore the selection and scroll position of inside the document.
|
||||
oRange.Select() ;
|
||||
FCK.EditorWindow.scrollTo( oEditorScrollPos.X, oEditorScrollPos.Y ) ;
|
||||
}
|
||||
|
||||
FCKFitWindow.prototype.GetState = function()
|
||||
|
@ -44,6 +44,23 @@ FCKShowBlockCommand.prototype.Execute = function()
|
||||
else
|
||||
body.className += ' FCK__ShowBlocks' ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
try
|
||||
{
|
||||
FCK.EditorDocument.selection.createRange().select() ;
|
||||
}
|
||||
catch ( e )
|
||||
{}
|
||||
}
|
||||
else
|
||||
{
|
||||
var focus = FCK.EditorWindow.getSelection().focusNode ;
|
||||
if ( focus.nodeType != 1 )
|
||||
focus = focus.parentNode ;
|
||||
FCKDomTools.ScrollIntoView( focus, false ) ;
|
||||
}
|
||||
|
||||
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,8 @@ function InitializeAPI()
|
||||
// objects that aren't really FCKeditor instances.
|
||||
var sScript =
|
||||
'window.FCKeditorAPI = {' +
|
||||
'Version : "2.6",' +
|
||||
'VersionBuild : "18638",' +
|
||||
'Version : "2.6.3",' +
|
||||
'VersionBuild : "19836",' +
|
||||
'Instances : new Object(),' +
|
||||
|
||||
'GetInstance : function( name )' +
|
||||
@ -115,7 +115,7 @@ function InitializeAPI()
|
||||
{
|
||||
FCKAdobeAIR.FCKeditorAPI_Evaluate( oParentWindow, sScript ) ;
|
||||
}
|
||||
else if ( FCKBrowserInfo.IsSafari || FCKBrowserInfo.IsGecko19 )
|
||||
else if ( FCKBrowserInfo.IsSafari )
|
||||
{
|
||||
// oParentWindow.eval in Safari and Gran Paradiso executes in the calling window
|
||||
// environment, instead of the parent one. The following should make it work.
|
||||
@ -164,13 +164,15 @@ function _AttachFormSubmitToAPI()
|
||||
|
||||
function FCKeditorAPI_Cleanup()
|
||||
{
|
||||
if ( ! window.FCKUnloadFlag )
|
||||
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat
|
||||
&& !window.FCKUnloadFlag )
|
||||
return ;
|
||||
delete FCKeditorAPI.Instances[ FCK.Name ] ;
|
||||
}
|
||||
function FCKeditorAPI_ConfirmCleanup()
|
||||
{
|
||||
window.FCKUnloadFlag = true ;
|
||||
if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat )
|
||||
window.FCKUnloadFlag = true ;
|
||||
}
|
||||
FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ;
|
||||
FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;
|
||||
|
@ -198,6 +198,13 @@ var FCK =
|
||||
// Ignore space only or empty text.
|
||||
if ( oNewBlock || oNode.nodeValue.Trim().length > 0 )
|
||||
bMoveNode = true ;
|
||||
break;
|
||||
|
||||
// Comment Node
|
||||
case 8 :
|
||||
if ( oNewBlock )
|
||||
bMoveNode = true ;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( bMoveNode )
|
||||
@ -402,6 +409,8 @@ var FCK =
|
||||
FCK.EditorDocument.detachEvent("onselectionchange", Doc_OnSelectionChange ) ;
|
||||
}
|
||||
|
||||
FCKTempBin.Reset();
|
||||
|
||||
if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
|
||||
{
|
||||
// Save the resetIsDirty for later use (async)
|
||||
@ -622,7 +631,8 @@ var FCK =
|
||||
|
||||
var sHtml ;
|
||||
|
||||
// Update the HTML in the view output to show.
|
||||
// Update the HTML in the view output to show, also update
|
||||
// FCKTempBin for IE to avoid #2263.
|
||||
if ( bIsWysiwyg )
|
||||
{
|
||||
FCKCommands.GetCommand( 'ShowBlocks' ).SaveState() ;
|
||||
@ -631,6 +641,9 @@ var FCK =
|
||||
|
||||
sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
FCKTempBin.ToHtml() ;
|
||||
|
||||
if ( sHtml == null )
|
||||
return false ;
|
||||
}
|
||||
@ -664,9 +677,22 @@ var FCK =
|
||||
// object that may internally supply this feature.
|
||||
var range = new FCKDomRange( this.EditorWindow ) ;
|
||||
|
||||
// Move to the selection and delete it.
|
||||
range.MoveToSelection() ;
|
||||
range.DeleteContents() ;
|
||||
|
||||
if ( FCKListsLib.BlockElements[ elementName ] != null )
|
||||
{
|
||||
range.SplitBlock() ;
|
||||
if ( range.StartBlock )
|
||||
{
|
||||
if ( range.CheckStartOfBlock() )
|
||||
range.MoveToPosition( range.StartBlock, 3 ) ;
|
||||
else if ( range.CheckEndOfBlock() )
|
||||
range.MoveToPosition( range.StartBlock, 4 ) ;
|
||||
else
|
||||
range.SplitBlock() ;
|
||||
}
|
||||
|
||||
range.InsertNode( element ) ;
|
||||
|
||||
var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ], true ) ;
|
||||
@ -687,18 +713,16 @@ var FCK =
|
||||
else
|
||||
range.MoveToPosition( element, 4 ) ;
|
||||
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
if ( FCKBrowserInfo.IsGeckoLike )
|
||||
{
|
||||
if ( next )
|
||||
next.scrollIntoView( false ) ;
|
||||
element.scrollIntoView( false ) ;
|
||||
FCKDomTools.ScrollIntoView( next, false );
|
||||
FCKDomTools.ScrollIntoView( element, false );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Delete the current selection and insert the node.
|
||||
range.MoveToSelection() ;
|
||||
range.DeleteContents() ;
|
||||
// Insert the node.
|
||||
range.InsertNode( element ) ;
|
||||
|
||||
// Move the selection right after the new element.
|
||||
@ -887,6 +911,14 @@ function _FCK_PaddingNodeListener()
|
||||
if ( FCK.EditorDocument.body.childNodes.length == 1
|
||||
&& FCK.EditorDocument.body.firstChild == paddingNode )
|
||||
{
|
||||
/*
|
||||
* Bug #1764: Don't move the selection if the
|
||||
* current selection isn't in the editor
|
||||
* document.
|
||||
*/
|
||||
if ( FCKSelection._GetSelectionDocument( FCK.EditorDocument.selection ) != FCK.EditorDocument )
|
||||
return ;
|
||||
|
||||
var range = FCK.EditorDocument.body.createTextRange() ;
|
||||
var clearContents = false ;
|
||||
if ( !paddingNode.childNodes.firstChild )
|
||||
@ -909,6 +941,9 @@ function _FCK_EditingArea_OnLoad()
|
||||
FCK.EditorWindow = FCK.EditingArea.Window ;
|
||||
FCK.EditorDocument = FCK.EditingArea.Document ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
FCKTempBin.ToElements() ;
|
||||
|
||||
FCK.InitializeBehaviors() ;
|
||||
|
||||
// Listen for mousedown and mouseup events for tracking drag and drops.
|
||||
@ -1061,6 +1096,28 @@ var FCKTempBin =
|
||||
while ( i < this.Elements.length )
|
||||
this.Elements[ i++ ] = null ;
|
||||
this.Elements.length = 0 ;
|
||||
},
|
||||
|
||||
ToHtml : function()
|
||||
{
|
||||
for ( var i = 0 ; i < this.Elements.length ; i++ )
|
||||
{
|
||||
this.Elements[i] = '<div> ' + this.Elements[i].outerHTML + '</div>' ;
|
||||
this.Elements[i].isHtml = true ;
|
||||
}
|
||||
},
|
||||
|
||||
ToElements : function()
|
||||
{
|
||||
var node = FCK.EditorDocument.createElement( 'div' ) ;
|
||||
for ( var i = 0 ; i < this.Elements.length ; i++ )
|
||||
{
|
||||
if ( this.Elements[i].isHtml )
|
||||
{
|
||||
node.innerHTML = this.Elements[i] ;
|
||||
this.Elements[i] = node.firstChild.removeChild( node.firstChild.lastChild ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
@ -1173,3 +1230,23 @@ function FCKFocusManager_Win_OnFocus()
|
||||
FCK.Events.FireEvent( "OnFocus" ) ;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* #1633 : Protect the editor iframe from external styles.
|
||||
* Notice that we can't use FCKTools.ResetStyles here since FCKTools isn't
|
||||
* loaded yet.
|
||||
*/
|
||||
(function()
|
||||
{
|
||||
var el = window.frameElement ;
|
||||
var width = el.width ;
|
||||
var height = el.height ;
|
||||
if ( /^\d+$/.test( width ) ) width += 'px' ;
|
||||
if ( /^\d+$/.test( height ) ) height += 'px' ;
|
||||
var style = el.style ;
|
||||
style.border = style.padding = style.margin = 0 ;
|
||||
style.backgroundColor = 'transparent';
|
||||
style.backgroundImage = 'none';
|
||||
style.width = width ;
|
||||
style.height = height ;
|
||||
})() ;
|
||||
|
@ -127,6 +127,8 @@ function FCK_ContextMenu_GetListener( listenerName )
|
||||
if ( bIsAnchor )
|
||||
return ;
|
||||
|
||||
menu.AddSeparator() ;
|
||||
menu.AddItem( 'VisitLink', FCKLang.VisitLink ) ;
|
||||
menu.AddSeparator() ;
|
||||
if ( bInsideLink )
|
||||
menu.AddItem( 'Link', FCKLang.EditLink , 34 ) ;
|
||||
@ -292,6 +294,21 @@ function FCK_ContextMenu_GetListener( listenerName )
|
||||
menu.AddItem( 'NumberedList', FCKLang.NumberedListProp, 26 ) ;
|
||||
}
|
||||
}} ;
|
||||
|
||||
case 'DivContainer':
|
||||
return {
|
||||
AddItems : function( menu, tag, tagName )
|
||||
{
|
||||
var currentBlocks = FCKDomTools.GetSelectedDivContainers() ;
|
||||
|
||||
if ( currentBlocks.length > 0 )
|
||||
{
|
||||
menu.AddSeparator() ;
|
||||
menu.AddItem( 'EditDiv', FCKLang.EditDiv, 75 ) ;
|
||||
menu.AddItem( 'DeleteDiv', FCKLang.DeleteDiv, 76 ) ;
|
||||
}
|
||||
}} ;
|
||||
|
||||
}
|
||||
return null ;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ FCK.InitializeBehaviors = function()
|
||||
|
||||
// only perform the patched behavior if we're in an <a> tag, or the End key is pressed.
|
||||
var parentTag = node.parentNode.tagName.toLowerCase() ;
|
||||
if ( ! ( parentTag == 'a' || String(node.parentNode.contentEditable) == 'false' ||
|
||||
if ( ! ( parentTag == 'a' || ( !FCKBrowserInfo.IsOpera && String(node.parentNode.contentEditable) == 'false' ) ||
|
||||
( ! ( FCKListsLib.BlockElements[parentTag] || FCKListsLib.NonEmptyBlockElements[parentTag] )
|
||||
&& keyCode == 35 ) ) )
|
||||
return ;
|
||||
@ -349,6 +349,9 @@ FCK._ExecPaste = function()
|
||||
// selected content if any.
|
||||
FCK.InsertHtml = function( html )
|
||||
{
|
||||
var doc = FCK.EditorDocument,
|
||||
range;
|
||||
|
||||
html = FCKConfig.ProtectedSource.Protect( html ) ;
|
||||
html = FCK.ProtectEvents( html ) ;
|
||||
html = FCK.ProtectUrls( html ) ;
|
||||
@ -357,11 +360,45 @@ FCK.InsertHtml = function( html )
|
||||
// Save an undo snapshot first.
|
||||
FCKUndo.SaveUndoStep() ;
|
||||
|
||||
// Insert the HTML code.
|
||||
this.EditorDocument.execCommand( 'inserthtml', false, html ) ;
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
{
|
||||
html = html.replace( / $/, '$&<span _fcktemp="1"/>' ) ;
|
||||
|
||||
var docFrag = new FCKDocumentFragment( this.EditorDocument ) ;
|
||||
docFrag.AppendHtml( html ) ;
|
||||
|
||||
var lastNode = docFrag.RootNode.lastChild ;
|
||||
|
||||
range = new FCKDomRange( this.EditorWindow ) ;
|
||||
range.MoveToSelection() ;
|
||||
range.DeleteContents() ;
|
||||
range.InsertNode( docFrag.RootNode ) ;
|
||||
|
||||
range.MoveToPosition( lastNode, 4 ) ;
|
||||
}
|
||||
else
|
||||
doc.execCommand( 'inserthtml', false, html ) ;
|
||||
|
||||
this.Focus() ;
|
||||
|
||||
FCKDocumentProcessor.Process( FCK.EditorDocument ) ;
|
||||
// Save the caret position before calling document processor.
|
||||
if ( !range )
|
||||
{
|
||||
range = new FCKDomRange( this.EditorWindow ) ;
|
||||
range.MoveToSelection() ;
|
||||
}
|
||||
var bookmark = range.CreateBookmark() ;
|
||||
|
||||
FCKDocumentProcessor.Process( doc ) ;
|
||||
|
||||
// Restore caret position, ignore any errors in case the document
|
||||
// processor removed the bookmark <span>s for some reason.
|
||||
try
|
||||
{
|
||||
range.MoveToBookmark( bookmark ) ;
|
||||
range.Select() ;
|
||||
}
|
||||
catch ( e ) {}
|
||||
|
||||
// For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call.
|
||||
this.Events.FireEvent( "OnSelectionChange" ) ;
|
||||
@ -401,6 +438,12 @@ FCK.CreateLink = function( url, noUndo )
|
||||
// Creates the array that will be returned. It contains one or more created links (see #220).
|
||||
var aCreatedLinks = new Array() ;
|
||||
|
||||
// Only for Safari, a collapsed selection may create a link. All other
|
||||
// browser will have no links created. So, we check it here and return
|
||||
// immediatelly, having the same cross browser behavior.
|
||||
if ( FCKSelection.GetSelection().isCollapsed )
|
||||
return aCreatedLinks ;
|
||||
|
||||
FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
|
||||
|
||||
if ( url.length > 0 )
|
||||
@ -420,12 +463,6 @@ FCK.CreateLink = function( url, noUndo )
|
||||
var oLink = oLinksInteractor.snapshotItem( i ) ;
|
||||
oLink.href = url ;
|
||||
|
||||
// It may happen that the browser (aka Safari) decides to use the
|
||||
// URL as the link content to not leave it empty. In this case,
|
||||
// let's reset it.
|
||||
if ( sTempUrl == oLink.innerHTML )
|
||||
oLink.innerHTML = '' ;
|
||||
|
||||
aCreatedLinks.push( oLink ) ;
|
||||
}
|
||||
}
|
||||
|
@ -29,11 +29,11 @@ FCK._GetBehaviorsStyle = function()
|
||||
{
|
||||
if ( !FCK._BehaviorsStyle )
|
||||
{
|
||||
var sBasePath = FCKConfig.FullBasePath ;
|
||||
var sBasePath = FCKConfig.BasePath ;
|
||||
var sTableBehavior = '' ;
|
||||
var sStyle ;
|
||||
|
||||
// The behaviors should be pointed using the FullBasePath to avoid security
|
||||
// The behaviors should be pointed using the BasePath to avoid security
|
||||
// errors when using a different BaseHref.
|
||||
sStyle = '<style type="text/css" _fcktemp="true">' ;
|
||||
|
||||
@ -136,6 +136,8 @@ FCK.InitializeBehaviors = function( dontReturn )
|
||||
|
||||
this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ;
|
||||
|
||||
this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save( true ) ; } ) ;
|
||||
|
||||
// Catch cursor selection changes.
|
||||
this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ;
|
||||
|
||||
@ -150,6 +152,7 @@ FCK.InsertHtml = function( html )
|
||||
html = FCK.ProtectTags( html ) ;
|
||||
|
||||
// FCK.Focus() ;
|
||||
FCKSelection.Restore() ;
|
||||
FCK.EditorWindow.focus() ;
|
||||
|
||||
FCKUndo.SaveUndoStep() ;
|
||||
|
@ -28,7 +28,6 @@ var FCKBrowserInfo =
|
||||
IsIE : /*@cc_on!@*/false,
|
||||
IsIE7 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 7 ),
|
||||
IsIE6 : /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 6 ),
|
||||
IsGecko : s.Contains('gecko/'),
|
||||
IsSafari : s.Contains(' applewebkit/'), // Read "IsWebKit"
|
||||
IsOpera : !!window.opera,
|
||||
IsAIR : s.Contains(' adobeair/'),
|
||||
@ -38,11 +37,13 @@ var FCKBrowserInfo =
|
||||
// Completes the browser info with further Gecko information.
|
||||
(function( browserInfo )
|
||||
{
|
||||
browserInfo.IsGecko = ( navigator.product == 'Gecko' ) && !browserInfo.IsSafari && !browserInfo.IsOpera ;
|
||||
browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ;
|
||||
|
||||
if ( browserInfo.IsGecko )
|
||||
{
|
||||
var geckoVersion = s.match( /gecko\/(\d+)/ )[1] ;
|
||||
var geckoMatch = s.match( /rv:(\d+\.\d+)/ ) ;
|
||||
var geckoVersion = geckoMatch && parseFloat( geckoMatch[1] ) ;
|
||||
|
||||
// Actually "10" refers to Gecko versions before Firefox 1.5, when
|
||||
// Gecko 1.8 (build 20051111) has been released.
|
||||
@ -51,11 +52,10 @@ var FCKBrowserInfo =
|
||||
// than 20051111, so we must also check for the revision number not to
|
||||
// be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111).
|
||||
|
||||
// TODO: Future versions may consider the rv number only, but it is
|
||||
// still to check that all Gecko based browser present the rv number.
|
||||
browserInfo.IsGecko10 = ( ( geckoVersion < 20051111 ) || ( /rv:1\.7/.test(s) ) ) ;
|
||||
browserInfo.IsGecko19 = /rv:1\.9/.test(s) ;
|
||||
if ( geckoVersion )
|
||||
{
|
||||
browserInfo.IsGecko10 = ( geckoVersion < 1.8 ) ;
|
||||
browserInfo.IsGecko19 = ( geckoVersion > 1.8 ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
browserInfo.IsGecko10 = false ;
|
||||
})(FCKBrowserInfo) ;
|
||||
|
@ -51,6 +51,7 @@ FCKCommands.GetCommand = function( commandName )
|
||||
case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ;
|
||||
case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ;
|
||||
case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ;
|
||||
case 'VisitLink' : oCommand = new FCKVisitLinkCommand() ; break ;
|
||||
case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ;
|
||||
case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ;
|
||||
case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ;
|
||||
@ -79,6 +80,7 @@ FCKCommands.GetCommand = function( commandName )
|
||||
case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;
|
||||
case 'PageBreak' : oCommand = new FCKPageBreakCommand() ; break ;
|
||||
case 'Rule' : oCommand = new FCKRuleCommand() ; break ;
|
||||
case 'Nbsp' : oCommand = new FCKNbsp() ; break ;
|
||||
|
||||
case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;
|
||||
case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;
|
||||
@ -94,6 +96,9 @@ FCKCommands.GetCommand = function( commandName )
|
||||
case 'Indent' : oCommand = new FCKIndentCommand( 'indent', FCKConfig.IndentLength ) ; break ;
|
||||
case 'Outdent' : oCommand = new FCKIndentCommand( 'outdent', FCKConfig.IndentLength * -1 ) ; break ;
|
||||
case 'Blockquote' : oCommand = new FCKBlockQuoteCommand() ; break ;
|
||||
case 'CreateDiv' : oCommand = new FCKDialogCommand( 'CreateDiv', FCKLang.CreateDiv, 'dialog/fck_div.html', 380, 210, null, null, true ) ; break ;
|
||||
case 'EditDiv' : oCommand = new FCKDialogCommand( 'EditDiv', FCKLang.EditDiv, 'dialog/fck_div.html', 380, 210, null, null, false ) ; break ;
|
||||
case 'DeleteDiv' : oCommand = new FCKDeleteDivCommand() ; break ;
|
||||
|
||||
case 'TableInsertRowAfter' : oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ;
|
||||
case 'TableInsertRowBefore' : oCommand = new FCKTableCommand('TableInsertRowBefore') ; break ;
|
||||
|
@ -42,13 +42,12 @@ if ( document.location.protocol == 'file:' )
|
||||
sFullProtocol += 'localhost/' ;
|
||||
|
||||
FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ;
|
||||
FCKConfig.FullBasePath = FCKConfig.BasePath ;
|
||||
}
|
||||
else
|
||||
{
|
||||
FCKConfig.BasePath = document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ;
|
||||
FCKConfig.FullBasePath = document.location.protocol + '//' + document.location.host + FCKConfig.BasePath ;
|
||||
}
|
||||
FCKConfig.BasePath = document.location.protocol + '//' + document.location.host +
|
||||
document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ;
|
||||
|
||||
FCKConfig.FullBasePath = FCKConfig.BasePath ;
|
||||
|
||||
FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ;
|
||||
|
||||
|
@ -21,36 +21,39 @@
|
||||
* Debug window control and operations.
|
||||
*/
|
||||
|
||||
var FCKDebug = new Object() ;
|
||||
// Public function defined here must be declared in fckdebug_empty.js.
|
||||
|
||||
FCKDebug._GetWindow = function()
|
||||
var FCKDebug =
|
||||
{
|
||||
if ( !this.DebugWindow || this.DebugWindow.closed )
|
||||
this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
|
||||
|
||||
return this.DebugWindow ;
|
||||
}
|
||||
|
||||
FCKDebug.Output = function( message, color, noParse )
|
||||
{
|
||||
if ( ! FCKConfig.Debug )
|
||||
return ;
|
||||
|
||||
try
|
||||
Output : function( message, color, noParse )
|
||||
{
|
||||
this._GetWindow().Output( message, color ) ;
|
||||
}
|
||||
catch ( e ) {} // Ignore errors
|
||||
}
|
||||
if ( ! FCKConfig.Debug )
|
||||
return ;
|
||||
|
||||
FCKDebug.OutputObject = function( anyObject, color )
|
||||
{
|
||||
if ( ! FCKConfig.Debug )
|
||||
return ;
|
||||
try
|
||||
{
|
||||
this._GetWindow().Output( message, color ) ;
|
||||
}
|
||||
catch ( e ) {} // Ignore errors
|
||||
},
|
||||
|
||||
try
|
||||
OutputObject : function( anyObject, color )
|
||||
{
|
||||
this._GetWindow().OutputObject( anyObject, color ) ;
|
||||
if ( ! FCKConfig.Debug )
|
||||
return ;
|
||||
|
||||
try
|
||||
{
|
||||
this._GetWindow().OutputObject( anyObject, color ) ;
|
||||
}
|
||||
catch ( e ) {} // Ignore errors
|
||||
},
|
||||
|
||||
_GetWindow : function()
|
||||
{
|
||||
if ( !this.DebugWindow || this.DebugWindow.closed )
|
||||
this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
|
||||
|
||||
return this.DebugWindow ;
|
||||
}
|
||||
catch ( e ) {} // Ignore errors
|
||||
}
|
||||
} ;
|
||||
|
@ -75,15 +75,6 @@ var FCKDialog = ( function()
|
||||
} ) ;
|
||||
}
|
||||
|
||||
var resetStyles = function( element )
|
||||
{
|
||||
element.style.cssText = 'margin:0;' +
|
||||
'padding:0;' +
|
||||
'border:0;' +
|
||||
'background-color:transparent;' +
|
||||
'background-image:none;' ;
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Opens a dialog window using the standard dialog template.
|
||||
@ -107,13 +98,16 @@ var FCKDialog = ( function()
|
||||
|
||||
// Calculate the dialog position, centering it on the screen.
|
||||
var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
|
||||
var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
|
||||
var scrollPosition = { 'X' : 0, 'Y' : 0 } ;
|
||||
var useAbsolutePosition = FCKBrowserInfo.IsIE && ( !FCKBrowserInfo.IsIE7 || !FCKTools.IsStrictMode( topWindow.document ) ) ;
|
||||
if ( useAbsolutePosition )
|
||||
scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
|
||||
var iTop = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
|
||||
var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 ) / 2, 0 ) ;
|
||||
|
||||
// Setup the IFRAME that will hold the dialog.
|
||||
var dialog = topDocument.createElement( 'iframe' ) ;
|
||||
resetStyles( dialog ) ;
|
||||
FCKTools.ResetStyles( dialog ) ;
|
||||
dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
|
||||
|
||||
// Dummy URL for testing whether the code in fckdialog.js alone leaks memory.
|
||||
@ -123,7 +117,7 @@ var FCKDialog = ( function()
|
||||
dialog.allowTransparency = true ;
|
||||
FCKDomTools.SetElementStyles( dialog,
|
||||
{
|
||||
'position' : 'absolute',
|
||||
'position' : ( useAbsolutePosition ) ? 'absolute' : 'fixed',
|
||||
'top' : iTop + 'px',
|
||||
'left' : iLeft + 'px',
|
||||
'width' : width + 'px',
|
||||
@ -179,7 +173,7 @@ var FCKDialog = ( function()
|
||||
{
|
||||
// Setup the DIV that will be used to cover.
|
||||
cover = topDocument.createElement( 'div' ) ;
|
||||
resetStyles( cover ) ;
|
||||
FCKTools.ResetStyles( cover ) ;
|
||||
FCKDomTools.SetElementStyles( cover,
|
||||
{
|
||||
'position' : 'absolute',
|
||||
@ -195,7 +189,7 @@ var FCKDialog = ( function()
|
||||
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
||||
{
|
||||
var iframe = topDocument.createElement( 'iframe' ) ;
|
||||
resetStyles( iframe ) ;
|
||||
FCKTools.ResetStyles( iframe ) ;
|
||||
iframe.hideFocus = true ;
|
||||
iframe.frameBorder = 0 ;
|
||||
iframe.src = FCKTools.GetVoidUrl() ;
|
||||
@ -218,12 +212,23 @@ var FCKDialog = ( function()
|
||||
topDocument.body.appendChild( cover ) ;
|
||||
|
||||
FCKFocusManager.Lock() ;
|
||||
|
||||
// Prevent the user from refocusing the disabled
|
||||
// editing window by pressing Tab. (Bug #2065)
|
||||
var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ;
|
||||
el._fck_originalTabIndex = el.tabIndex ;
|
||||
el.tabIndex = -1 ;
|
||||
},
|
||||
|
||||
HideMainCover : function()
|
||||
{
|
||||
FCKDomTools.RemoveNode( cover ) ;
|
||||
FCKFocusManager.Unlock() ;
|
||||
|
||||
// Revert the tab index hack. (Bug #2065)
|
||||
var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ;
|
||||
el.tabIndex = el._fck_originalTabIndex ;
|
||||
FCKDomTools.ClearElementJSProperty( el, '_fck_originalTabIndex' ) ;
|
||||
},
|
||||
|
||||
GetCover : function()
|
||||
|
@ -45,7 +45,7 @@ var FCKDocumentProcessor_CreateFakeImage = function( fakeClass, realElement )
|
||||
{
|
||||
var oImg = FCKTools.GetElementDocument( realElement ).createElement( 'IMG' ) ;
|
||||
oImg.className = fakeClass ;
|
||||
oImg.src = FCKConfig.FullBasePath + 'images/spacer.gif' ;
|
||||
oImg.src = FCKConfig.BasePath + 'images/spacer.gif' ;
|
||||
oImg.setAttribute( '_fckfakelement', 'true', 0 ) ;
|
||||
oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ;
|
||||
return oImg ;
|
||||
@ -142,24 +142,29 @@ FCKEmbedAndObjectProcessor = (function()
|
||||
el.parentNode.replaceChild( replaceElement, el ) ;
|
||||
}
|
||||
|
||||
var processElementsByName = function( elementName, doc )
|
||||
{
|
||||
var aObjects = doc.getElementsByTagName( elementName );
|
||||
for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
|
||||
processElement( aObjects[i] ) ;
|
||||
}
|
||||
|
||||
var processObjectAndEmbed = function( doc )
|
||||
{
|
||||
processElementsByName( 'object', doc );
|
||||
processElementsByName( 'embed', doc );
|
||||
}
|
||||
|
||||
return FCKTools.Merge( FCKDocumentProcessor.AppendNew(),
|
||||
{
|
||||
ProcessDocument : function( doc )
|
||||
{
|
||||
// Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs
|
||||
// without the setTimeout().
|
||||
FCKTools.RunFunction( function()
|
||||
{
|
||||
// Process OBJECTs first, since EMBEDs can sometimes go inside OBJECTS (e.g. Flash).
|
||||
var aObjects = doc.getElementsByTagName( 'object' );
|
||||
for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
|
||||
processElement( aObjects[i] ) ;
|
||||
|
||||
// Now process any EMBEDs left.
|
||||
var aEmbeds = doc.getElementsByTagName( 'embed' ) ;
|
||||
for ( var i = aEmbeds.length - 1 ; i >= 0 ; i-- )
|
||||
processElement( aEmbeds[i] ) ;
|
||||
} ) ;
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
FCKTools.RunFunction( processObjectAndEmbed, this, [ doc ] ) ;
|
||||
else
|
||||
processObjectAndEmbed( doc ) ;
|
||||
},
|
||||
|
||||
RefreshView : function( placeHolder, original )
|
||||
@ -247,3 +252,19 @@ FCKEmbedAndObjectProcessor.AddCustomHandler( function( el, fakeImg )
|
||||
fakeImg.className = 'FCK__Flash' ;
|
||||
fakeImg.setAttribute( '_fckflash', 'true', 0 );
|
||||
} ) ;
|
||||
|
||||
// Buggy <span class="Apple-style-span"> tags added by Safari.
|
||||
if ( FCKBrowserInfo.IsSafari )
|
||||
{
|
||||
FCKDocumentProcessor.AppendNew().ProcessDocument = function( doc )
|
||||
{
|
||||
var spans = doc.getElementsByClassName ?
|
||||
doc.getElementsByClassName( 'Apple-style-span' ) :
|
||||
Array.prototype.filter.call(
|
||||
doc.getElementsByTagName( 'span' ),
|
||||
function( item ){ return item.className == 'Apple-style-span' ; }
|
||||
) ;
|
||||
for ( var i = spans.length - 1 ; i >= 0 ; i-- )
|
||||
FCKDomTools.RemoveNode( spans[i], true ) ;
|
||||
}
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ var FCKDomTools =
|
||||
|
||||
SetElementMarker : function ( markerObj, element, attrName, value)
|
||||
{
|
||||
var id = String( parseInt( Math.random() * 0xfffffff, 10 ) ) ;
|
||||
var id = String( parseInt( Math.random() * 0xffffffff, 10 ) ) ;
|
||||
element._FCKMarkerId = id ;
|
||||
element[attrName] = value ;
|
||||
if ( ! markerObj[id] )
|
||||
@ -972,8 +972,9 @@ var FCKDomTools =
|
||||
},
|
||||
|
||||
/**
|
||||
* Current implementation for ScrollIntoView (due to #1462). We don't have
|
||||
* a complete implementation here, just the things that fit our needs.
|
||||
* Current implementation for ScrollIntoView (due to #1462 and #2279). We
|
||||
* don't have a complete implementation here, just the things that fit our
|
||||
* needs.
|
||||
*/
|
||||
ScrollIntoView : function( element, alignTop )
|
||||
{
|
||||
@ -988,22 +989,21 @@ var FCKDomTools =
|
||||
// Appends the height it we are about to align the bottoms.
|
||||
if ( alignTop === false )
|
||||
{
|
||||
offset += element.offsetHeight ;
|
||||
offset += element.offsetHeight || 0 ;
|
||||
|
||||
// Consider the margin in the scroll, which is ok for our current
|
||||
// needs, but needs investigation if we will be using this function
|
||||
// in other places.
|
||||
offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ;
|
||||
offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) || 0 ;
|
||||
}
|
||||
|
||||
// Appends the offsets for the entire element hierarchy.
|
||||
offset += element.offsetTop ;
|
||||
while ( ( element = element.offsetParent ) )
|
||||
offset += element.offsetTop || 0 ;
|
||||
var elementPosition = FCKTools.GetDocumentPosition( window, element ) ;
|
||||
offset += elementPosition.y ;
|
||||
|
||||
// Scroll the window to the desired position, if not already visible.
|
||||
var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
|
||||
if ( offset > 0 && offset > currentScroll )
|
||||
if ( offset > 0 && ( offset > currentScroll || offset < currentScroll - windowHeight ) )
|
||||
window.scrollTo( 0, offset ) ;
|
||||
},
|
||||
|
||||
@ -1020,5 +1020,38 @@ var FCKDomTools =
|
||||
|
||||
// In the DTD # == text node.
|
||||
return ( childDTD['#'] && !FCKListsLib.NonEditableElements[ nodeName ] ) ;
|
||||
},
|
||||
|
||||
GetSelectedDivContainers : function()
|
||||
{
|
||||
var currentBlocks = [] ;
|
||||
var range = new FCKDomRange( FCK.EditorWindow ) ;
|
||||
range.MoveToSelection() ;
|
||||
|
||||
var startNode = range.GetTouchedStartNode() ;
|
||||
var endNode = range.GetTouchedEndNode() ;
|
||||
var currentNode = startNode ;
|
||||
|
||||
if ( startNode == endNode )
|
||||
{
|
||||
while ( endNode.nodeType == 1 && endNode.lastChild )
|
||||
endNode = endNode.lastChild ;
|
||||
endNode = FCKDomTools.GetNextSourceNode( endNode ) ;
|
||||
}
|
||||
|
||||
while ( currentNode && currentNode != endNode )
|
||||
{
|
||||
if ( currentNode.nodeType != 3 || !/^[ \t\n]*$/.test( currentNode.nodeValue ) )
|
||||
{
|
||||
var path = new FCKElementPath( currentNode ) ;
|
||||
var blockLimit = path.BlockLimit ;
|
||||
if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && currentBlocks.IndexOf( blockLimit ) == -1 )
|
||||
currentBlocks.push( blockLimit ) ;
|
||||
}
|
||||
|
||||
currentNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
|
||||
}
|
||||
|
||||
return currentBlocks ;
|
||||
}
|
||||
} ;
|
||||
|
@ -50,6 +50,7 @@ var FCKLanguageManager = FCK.Language =
|
||||
fr : 'French',
|
||||
'fr-ca' : 'French (Canada)',
|
||||
gl : 'Galician',
|
||||
gu : 'Gujarati',
|
||||
he : 'Hebrew',
|
||||
hi : 'Hindi',
|
||||
hr : 'Croatian',
|
||||
|
@ -78,6 +78,7 @@ ProtectUrlsArea : /<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/
|
||||
|
||||
Html4DocType : /HTML 4\.0 Transitional/i ,
|
||||
DocTypeTag : /<!DOCTYPE[^>]*>/i ,
|
||||
HtmlDocType : /DTD HTML/ ,
|
||||
|
||||
// These regex are used to save the original event attributes in the HTML.
|
||||
TagsWithEvent : /<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g ,
|
||||
|
@ -75,9 +75,17 @@ FCKSelection.GetParentElement = function()
|
||||
var oSel = this.GetSelection() ;
|
||||
if ( oSel )
|
||||
{
|
||||
// make the common case fast - for collapsed/nearly collapsed selections just return anchor.parent.
|
||||
// if anchorNode == focusNode, see if the selection is text only or including nodes.
|
||||
// if text only, return the parent node.
|
||||
// if the selection includes DOM nodes, then the anchorNode is the nearest container.
|
||||
if ( oSel.anchorNode && oSel.anchorNode == oSel.focusNode )
|
||||
return oSel.anchorNode.parentNode ;
|
||||
{
|
||||
var oRange = oSel.getRangeAt( 0 ) ;
|
||||
if ( oRange.collapsed || oRange.startContainer.nodeType == 3 )
|
||||
return oSel.anchorNode.parentNode ;
|
||||
else
|
||||
return oSel.anchorNode ;
|
||||
}
|
||||
|
||||
// looks like we're having a large selection here. To make the behavior same as IE's TextRange.parentElement(),
|
||||
// we need to find the nearest ancestor node which encapsulates both the beginning and the end of the selection.
|
||||
@ -162,7 +170,7 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
|
||||
|
||||
while ( oContainer )
|
||||
{
|
||||
if ( oContainer.nodeType == 1 && oContainer.tagName == nodeTagName ) return true ;
|
||||
if ( oContainer.nodeType == 1 && oContainer.nodeName.IEquals( nodeTagName ) ) return true ;
|
||||
oContainer = oContainer.parentNode ;
|
||||
}
|
||||
|
||||
@ -180,7 +188,7 @@ FCKSelection.MoveToAncestorNode = function( nodeTagName )
|
||||
|
||||
while ( oContainer )
|
||||
{
|
||||
if ( oContainer.nodeName == nodeTagName )
|
||||
if ( oContainer.nodeName.IEquals( nodeTagName ) )
|
||||
return oContainer ;
|
||||
|
||||
oContainer = oContainer.parentNode ;
|
||||
|
@ -147,7 +147,7 @@ FCKSelection.HasAncestorNode = function( nodeTagName )
|
||||
|
||||
while ( oContainer )
|
||||
{
|
||||
if ( oContainer.tagName == nodeTagName ) return true ;
|
||||
if ( oContainer.nodeName.IEquals( nodeTagName ) ) return true ;
|
||||
oContainer = oContainer.parentNode ;
|
||||
}
|
||||
|
||||
@ -209,10 +209,11 @@ FCKSelection.GetSelection = function()
|
||||
return FCK.EditorDocument.selection ;
|
||||
}
|
||||
|
||||
FCKSelection.Save = function()
|
||||
FCKSelection.Save = function( noFocus )
|
||||
{
|
||||
// Ensures the editor has the selection focus. (#1801)
|
||||
FCK.Focus() ;
|
||||
if ( !noFocus )
|
||||
FCK.Focus() ;
|
||||
|
||||
var editorDocument = FCK.EditorDocument ;
|
||||
|
||||
@ -259,8 +260,11 @@ FCKSelection.Restore = function()
|
||||
try
|
||||
{
|
||||
// Don't repeat the restore process if the editor document is already selected.
|
||||
if ( this._GetSelectionDocument( FCK.EditorDocument.selection ) == FCK.EditorDocument )
|
||||
if ( String( this._GetSelectionDocument( FCK.EditorDocument.selection ).body.contentEditable ) == 'true' )
|
||||
{
|
||||
FCK.IsSelectionChangeLocked = false ;
|
||||
return ;
|
||||
}
|
||||
this.SelectionData.select() ;
|
||||
}
|
||||
catch ( e ) {}
|
||||
|
@ -550,7 +550,11 @@ FCKTableHandler.VerticalSplitCell = function()
|
||||
// 1. Insert a new row.
|
||||
var newCellRowIndex = currentRowIndex + 1 ;
|
||||
var newRow = FCK.EditorDocument.createElement( 'tr' ) ;
|
||||
currentCell.parentNode.parentNode.insertBefore( newRow, currentCell.parentNode.parentNode.rows[newCellRowIndex] ) ;
|
||||
var tBody = currentCell.parentNode.parentNode ;
|
||||
if ( tBody.rows.length > newCellRowIndex )
|
||||
tBody.insertBefore( newRow, tBody.rows[newCellRowIndex] ) ;
|
||||
else
|
||||
tBody.appendChild( newRow ) ;
|
||||
|
||||
// 2. +1 to rowSpan for all cells crossing currentCell's row.
|
||||
for ( var i = 0 ; i < tableMap[currentRowIndex].length ; )
|
||||
@ -677,6 +681,11 @@ FCKTableHandler._CreateTableMap = function( table )
|
||||
// This function is the inverse of _CreateTableMap - it takes in a table map and converts it to an HTML table.
|
||||
FCKTableHandler._InstallTableMap = function( tableMap, table )
|
||||
{
|
||||
// Workaround for #1917 : MSIE will always report a cell's rowSpan as 1 as long
|
||||
// as the cell is not attached to a row. So we'll need an alternative attribute
|
||||
// for storing the calculated rowSpan in IE.
|
||||
var rowSpanAttr = FCKBrowserInfo.IsIE ? "_fckrowspan" : "rowSpan" ;
|
||||
|
||||
// Clear the table of all rows first.
|
||||
while ( table.rows.length > 0 )
|
||||
{
|
||||
@ -692,7 +701,7 @@ FCKTableHandler._InstallTableMap = function( tableMap, table )
|
||||
var cell = tableMap[i][j] ;
|
||||
if ( cell.parentNode )
|
||||
cell.parentNode.removeChild( cell ) ;
|
||||
cell.colSpan = cell.rowSpan = 1 ;
|
||||
cell.colSpan = cell[rowSpanAttr] = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,7 +736,7 @@ FCKTableHandler._InstallTableMap = function( tableMap, table )
|
||||
if ( ! cell || cell._rowScanned === true )
|
||||
continue ;
|
||||
if ( tableMap[j-1] && tableMap[j-1][i] == cell )
|
||||
cell.rowSpan++ ;
|
||||
cell[rowSpanAttr]++ ;
|
||||
if ( ! tableMap[j+1] || tableMap[j+1][i] != cell )
|
||||
cell._rowScanned = true ;
|
||||
}
|
||||
@ -765,6 +774,11 @@ FCKTableHandler._InstallTableMap = function( tableMap, table )
|
||||
continue ;
|
||||
}
|
||||
rowObj.appendChild( cell ) ;
|
||||
if ( rowSpanAttr != 'rowSpan' )
|
||||
{
|
||||
cell.rowSpan = cell[rowSpanAttr] ;
|
||||
cell.removeAttribute( rowSpanAttr ) ;
|
||||
}
|
||||
j += cell.colSpan ;
|
||||
if ( cell.colSpan == 1 )
|
||||
cell.removeAttribute( 'colspan' ) ;
|
||||
|
@ -71,6 +71,7 @@ FCKToolbarItems.GetItem = function( itemName )
|
||||
case 'Outdent' : oItem = new FCKToolbarButton( 'Outdent' , FCKLang.DecreaseIndent, null, null, false, true, 28 ) ; break ;
|
||||
case 'Indent' : oItem = new FCKToolbarButton( 'Indent' , FCKLang.IncreaseIndent, null, null, false, true, 29 ) ; break ;
|
||||
case 'Blockquote' : oItem = new FCKToolbarButton( 'Blockquote' , FCKLang.Blockquote, null, null, false, true, 73 ) ; break ;
|
||||
case 'CreateDiv' : oItem = new FCKToolbarButton( 'CreateDiv' , FCKLang.CreateDiv, null, null, false, true, 74 ) ; break ;
|
||||
|
||||
case 'Link' : oItem = new FCKToolbarButton( 'Link' , FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, false, true, 34 ) ; break ;
|
||||
case 'Unlink' : oItem = new FCKToolbarButton( 'Unlink' , FCKLang.RemoveLink, null, null, false, true, 35 ) ; break ;
|
||||
|
@ -81,7 +81,7 @@ FCKTools.AppendStyleSheet = function( domDocument, cssFileOrArrayOrDef )
|
||||
if ( typeof( cssFileOrArrayOrDef ) == 'string' )
|
||||
{
|
||||
// Test if the passed argument is an URL.
|
||||
if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) )
|
||||
if ( /[\\\/\.][^{}]*$/.test( cssFileOrArrayOrDef ) )
|
||||
{
|
||||
// The string may have several URLs separated by comma.
|
||||
return this.AppendStyleSheet( domDocument, cssFileOrArrayOrDef.split(',') ) ;
|
||||
@ -126,7 +126,7 @@ FCKTools.GetStyleHtml = (function()
|
||||
if ( typeof( cssFileOrArrayOrDef ) == 'string' )
|
||||
{
|
||||
// Test if the passed argument is an URL.
|
||||
if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) )
|
||||
if ( /[\\\/\.][^{}]*$/.test( cssFileOrArrayOrDef ) )
|
||||
{
|
||||
// The string may have several URLs separated by comma.
|
||||
return this.GetStyleHtml( cssFileOrArrayOrDef.split(','), markTemp ) ;
|
||||
@ -738,3 +738,12 @@ FCKTools.GetVoidUrl = function()
|
||||
|
||||
return "javascript: void(0);" ; // All other browsers.
|
||||
}
|
||||
|
||||
FCKTools.ResetStyles = function( element )
|
||||
{
|
||||
element.style.cssText = 'margin:0;' +
|
||||
'padding:0;' +
|
||||
'border:0;' +
|
||||
'background-color:transparent;' +
|
||||
'background-image:none;' ;
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ FCKTools.CreateXmlObject = function( object )
|
||||
{
|
||||
case 'XmlHttp' :
|
||||
// Try the native XMLHttpRequest introduced with IE7.
|
||||
try { return new XMLHttpRequest() ; } catch (e) {}
|
||||
if ( document.location.protocol != 'file:' )
|
||||
try { return new XMLHttpRequest() ; } catch (e) {}
|
||||
|
||||
aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ;
|
||||
break ;
|
||||
|
@ -70,8 +70,13 @@ FCKXHtml.GetXHTML = function( node, includeNode, format )
|
||||
// Strip the "XHTML" root node.
|
||||
sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ;
|
||||
|
||||
// Add a space in the tags with no closing tags, like <br/> -> <br />
|
||||
sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
|
||||
// According to the doctype set the proper end for self-closing tags
|
||||
// HTML: <br>
|
||||
// XHTML: Add a space, like <br/> -> <br />
|
||||
if (FCKConfig.DocType.length > 0 && FCKRegexLib.HtmlDocType.test( FCKConfig.DocType ) )
|
||||
sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, '>');
|
||||
else
|
||||
sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
|
||||
|
||||
if ( FCKConfig.ForceSimpleAmpersand )
|
||||
sXHTML = sXHTML.replace( FCKRegexLib.ForceSimpleAmpersand, '&' ) ;
|
||||
@ -199,9 +204,16 @@ FCKXHtml._AppendNode = function( xmlNode, htmlNode )
|
||||
|
||||
// Ignore bogus BR nodes in the DOM.
|
||||
if ( FCKBrowserInfo.IsGecko &&
|
||||
htmlNode.nextSibling &&
|
||||
( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )
|
||||
return false ;
|
||||
{
|
||||
if ( htmlNode.nextSibling )
|
||||
return false ;
|
||||
else
|
||||
{
|
||||
htmlNode.removeAttribute( '_moz_editor_bogus_node' ) ;
|
||||
htmlNode.removeAttribute( 'type' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// This is for elements that are instrumental to FCKeditor and
|
||||
// must be removed from the final HTML.
|
||||
@ -400,6 +412,13 @@ FCKXHtml.TagProcessors =
|
||||
if ( sSavedUrl != null )
|
||||
FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
|
||||
|
||||
// Bug #768 : If the width and height are defined inline CSS,
|
||||
// don't define it again in the HTML attributes.
|
||||
if ( htmlNode.style.width )
|
||||
node.removeAttribute( 'width' ) ;
|
||||
if ( htmlNode.style.height )
|
||||
node.removeAttribute( 'height' ) ;
|
||||
|
||||
return node ;
|
||||
},
|
||||
|
||||
|
@ -99,3 +99,16 @@ if ( FCKBrowserInfo.IsOpera )
|
||||
return node ;
|
||||
}
|
||||
}
|
||||
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
{
|
||||
// #2162, some Firefox extensions might add references to internal links
|
||||
FCKXHtml.TagProcessors['link'] = function( node, htmlNode )
|
||||
{
|
||||
if ( htmlNode.href.substr(0, 9).toLowerCase() == 'chrome://' )
|
||||
return false ;
|
||||
|
||||
return node ;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ FCKXHtml._GetMainXmlString = function()
|
||||
|
||||
FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
|
||||
{
|
||||
var aAttributes = htmlNode.attributes ;
|
||||
var aAttributes = htmlNode.attributes,
|
||||
bHasStyle ;
|
||||
|
||||
for ( var n = 0 ; n < aAttributes.length ; n++ )
|
||||
{
|
||||
@ -47,9 +48,9 @@ FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
|
||||
// attribute. It returns "null" for the nodeValue.
|
||||
else if ( sAttName == 'style' )
|
||||
{
|
||||
var data = FCKTools.ProtectFormStyles( htmlNode ) ;
|
||||
sAttValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase ) ;
|
||||
FCKTools.RestoreFormStyles( htmlNode, data ) ;
|
||||
// Just mark it to do it later in this function.
|
||||
bHasStyle = true ;
|
||||
continue ;
|
||||
}
|
||||
// There are two cases when the oAttribute.nodeValue must be used:
|
||||
// - for the "class" attribute
|
||||
@ -80,6 +81,15 @@ FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
|
||||
this._AppendAttribute( node, sAttName, sAttValue || oAttribute.nodeValue ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// IE loses the style attribute in JavaScript-created elements tags. (#2390)
|
||||
if ( bHasStyle || htmlNode.style.cssText.length > 0 )
|
||||
{
|
||||
var data = FCKTools.ProtectFormStyles( htmlNode ) ;
|
||||
var sStyleValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase ) ;
|
||||
FCKTools.RestoreFormStyles( htmlNode, data ) ;
|
||||
this._AppendAttribute( node, 'style', sStyleValue ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
|
||||
|
@ -26,10 +26,10 @@
|
||||
* file.
|
||||
*/
|
||||
|
||||
/*
|
||||
The "body" styles should match your editor web site, mainly regarding
|
||||
background color and font family and size.
|
||||
*/
|
||||
/**
|
||||
* The "body" styles should match your editor web site, mainly regarding
|
||||
* background color and font family and size.
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
@ -50,10 +50,10 @@ a[href]
|
||||
text-decoration: -moz-anchor-decoration; /* For Firefox 3, otherwise no underline will be used */
|
||||
}
|
||||
|
||||
/*
|
||||
Just uncomment the following block if you want to avoid spaces between
|
||||
paragraphs. Remember to apply the same style in your output front end page.
|
||||
*/
|
||||
/**
|
||||
* Just uncomment the following block if you want to avoid spaces between
|
||||
* paragraphs. Remember to apply the same style in your output front end page.
|
||||
*/
|
||||
|
||||
/*
|
||||
p, ul, li
|
||||
@ -63,12 +63,30 @@ p, ul, li
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Uncomment the following block, or only selected lines if appropriate,
|
||||
* if you have some style items that would break the styles combo box.
|
||||
* You can also write other CSS overrides inside the style block below
|
||||
* as needed and they will be applied to inside the style combo only.
|
||||
*/
|
||||
|
||||
/*
|
||||
The following are some sample styles used in the "Styles" toolbar command.
|
||||
You should instead remove them, and include the styles used by the site
|
||||
you are using the editor in.
|
||||
.SC_Item *, .SC_ItemSelected *
|
||||
{
|
||||
margin: 0px !important;
|
||||
padding: 0px !important;
|
||||
text-indent: 0px !important;
|
||||
clip: auto !important;
|
||||
position: static !important;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The following are some sample styles used in the "Styles" toolbar command.
|
||||
* You should instead remove them, and include the styles used by the site
|
||||
* you are using the editor in.
|
||||
*/
|
||||
|
||||
.Bold
|
||||
{
|
||||
font-weight: bold;
|
||||
|
@ -57,7 +57,7 @@
|
||||
// Attention: FCKConfig must be available in the page.
|
||||
function GetCommonDialogCss( prefix )
|
||||
{
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
|
||||
return FCKConfig.BasePath + 'dialog/common/' + '|.ImagePreviewArea{border:#000 1px solid;overflow:auto;width:100%;height:170px;background-color:#fff}.FlashPreviewArea{border:#000 1px solid;padding:5px;overflow:auto;width:100%;height:170px;background-color:#fff}.BtnReset{float:left;background-position:center center;background-image:url(images/reset.gif);width:16px;height:16px;background-repeat:no-repeat;border:1px none;font-size:1px}.BtnLocked,.BtnUnlocked{float:left;background-position:center center;background-image:url(images/locked.gif);width:16px;height:16px;background-repeat:no-repeat;border:none 1px;font-size:1px}.BtnUnlocked{background-image:url(images/unlocked.gif)}.BtnOver{border:outset 1px;cursor:pointer;cursor:hand}' ;
|
||||
}
|
||||
|
||||
@ -187,34 +187,7 @@ function OpenFileBrowser( url, width, height )
|
||||
sOptions += ",left=" + iLeft ;
|
||||
sOptions += ",top=" + iTop ;
|
||||
|
||||
// The "PreserveSessionOnFileBrowser" because the above code could be
|
||||
// blocked by popup blockers.
|
||||
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE )
|
||||
{
|
||||
// The following change has been made otherwise IE will open the file
|
||||
// browser on a different server session (on some cases):
|
||||
// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
|
||||
// by Simone Chiaretta.
|
||||
var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ;
|
||||
|
||||
if ( oWindow )
|
||||
{
|
||||
// Detect Yahoo popup blocker.
|
||||
try
|
||||
{
|
||||
var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user.
|
||||
oWindow.opener = window ;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert( oEditor.FCKLang.BrowseServerBlocked ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
alert( oEditor.FCKLang.BrowseServerBlocked ) ;
|
||||
}
|
||||
else
|
||||
window.open( url, 'FCKBrowseWindow', sOptions ) ;
|
||||
window.open( url, 'FCKBrowseWindow', sOptions ) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -78,8 +78,8 @@ window.onload = function()
|
||||
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
|
||||
<span fcklang="DlgAboutVersion">version</span>
|
||||
<br />
|
||||
<b>2.6</b><br />
|
||||
Build 18638</td>
|
||||
<b>2.6.3</b><br />
|
||||
Build 19836</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
@ -119,10 +119,7 @@ function Ok()
|
||||
var aNewAnchors = oEditor.FCK.CreateLink( '#' ) ;
|
||||
|
||||
if ( aNewAnchors.length == 0 )
|
||||
{
|
||||
// Nothing was selected, so now just create a normal A
|
||||
aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ;
|
||||
}
|
||||
aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ;
|
||||
else
|
||||
{
|
||||
// Remove the fake href
|
||||
@ -136,7 +133,18 @@ function Ok()
|
||||
oAnchor = aNewAnchors[i] ;
|
||||
|
||||
// Set the name
|
||||
oAnchor.name = sNewName ;
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
// Setting anchor names directly in IE will trash the HTML code stored
|
||||
// in FCKTempBin after undos. See #2263.
|
||||
var replaceAnchor = oEditor.FCK.EditorDocument.createElement( '<a name="' +
|
||||
FCKTools.HTMLEncode( sNewName ).replace( '"', '"' ) + '">' ) ;
|
||||
oEditor.FCKDomTools.MoveChildren( oAnchor, replaceAnchor ) ;
|
||||
oAnchor.parentNode.replaceChild( replaceAnchor, oAnchor ) ;
|
||||
oAnchor = replaceAnchor ;
|
||||
}
|
||||
else
|
||||
oAnchor.name = sNewName ;
|
||||
|
||||
// IE does require special processing to show the Anchor's image
|
||||
// Opera doesn't allow to select empty anchors
|
||||
|
@ -97,7 +97,7 @@ document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
|
||||
<br />
|
||||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
||||
<script type="text/javascript">
|
||||
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ;
|
||||
document.write( '<iframe name="UploadWindow" style="DISPLAY: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -236,6 +236,10 @@ function SetUrl( url, width, height )
|
||||
|
||||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
||||
{
|
||||
// Remove animation
|
||||
window.parent.Throbber.Hide() ;
|
||||
GetE( 'divUpload' ).style.display = '' ;
|
||||
|
||||
switch ( errorNumber )
|
||||
{
|
||||
case 0 : // No errors
|
||||
@ -288,5 +292,9 @@ function CheckUpload()
|
||||
return false ;
|
||||
}
|
||||
|
||||
// Show animation
|
||||
window.parent.Throbber.Show( 100 ) ;
|
||||
GetE( 'divUpload' ).style.display = 'none' ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;
|
||||
<br />
|
||||
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" />
|
||||
<script type="text/javascript">
|
||||
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"></iframe>' ) ;
|
||||
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -447,6 +447,10 @@ function SetUrl( url, width, height, alt )
|
||||
|
||||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
||||
{
|
||||
// Remove animation
|
||||
window.parent.Throbber.Hide() ;
|
||||
GetE( 'divUpload' ).style.display = '' ;
|
||||
|
||||
switch ( errorNumber )
|
||||
{
|
||||
case 0 : // No errors
|
||||
@ -500,5 +504,9 @@ function CheckUpload()
|
||||
return false ;
|
||||
}
|
||||
|
||||
// Show animation
|
||||
window.parent.Throbber.Show( 100 ) ;
|
||||
GetE( 'divUpload' ).style.display = 'none' ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
@ -34,9 +34,9 @@
|
||||
var FCKTools = window.parent.FCKTools ;
|
||||
var FCKConfig = window.parent.FCKConfig ;
|
||||
|
||||
// Sets the Skin CSS
|
||||
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;
|
||||
document.write( FCKTools.GetStyleHtml( GetCommonDialogCss( '../' ) ) ) ;
|
||||
// Set the preview CSS
|
||||
document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) ) ;
|
||||
document.write( FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ) ;
|
||||
|
||||
if ( window.parent.FCKConfig.BaseHref.length > 0 )
|
||||
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
|
||||
@ -50,7 +50,7 @@ window.onload = function()
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body style="color: #000000; background-color: #ffffff">
|
||||
<body>
|
||||
<div>
|
||||
<a id="lnkPreview" onclick="return false;" style="cursor: default">
|
||||
<img id="imgPreview" onload="window.parent.UpdateOriginal();"
|
||||
|
@ -108,7 +108,9 @@
|
||||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
|
||||
<br />
|
||||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
||||
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe>
|
||||
<script type="text/javascript">
|
||||
document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
<div id="divTarget" style="DISPLAY: none">
|
||||
|
@ -77,36 +77,187 @@ oRegex.PopupFeatures = /(?:^|,)([^=]+)=(\d+|yes|no)/gi ;
|
||||
|
||||
var oParser = new Object() ;
|
||||
|
||||
oParser.ParseEMailUrl = function( emailUrl )
|
||||
// This method simply returns the two inputs in numerical order. You can even
|
||||
// provide strings, as the method would parseInt() the values.
|
||||
oParser.SortNumerical = function(a, b)
|
||||
{
|
||||
return parseInt( a, 10 ) - parseInt( b, 10 ) ;
|
||||
}
|
||||
|
||||
oParser.ParseEMailParams = function(sParams)
|
||||
{
|
||||
// Initialize the oEMailParams object.
|
||||
var oEMailParams = new Object() ;
|
||||
oEMailParams.Subject = '' ;
|
||||
oEMailParams.Body = '' ;
|
||||
|
||||
var aMatch = sParams.match( /(^|^\?|&)subject=([^&]+)/i ) ;
|
||||
if ( aMatch ) oEMailParams.Subject = decodeURIComponent( aMatch[2] ) ;
|
||||
|
||||
aMatch = sParams.match( /(^|^\?|&)body=([^&]+)/i ) ;
|
||||
if ( aMatch ) oEMailParams.Body = decodeURIComponent( aMatch[2] ) ;
|
||||
|
||||
return oEMailParams ;
|
||||
}
|
||||
|
||||
// This method returns either an object containing the email info, or FALSE
|
||||
// if the parameter is not an email link.
|
||||
oParser.ParseEMailUri = function( sUrl )
|
||||
{
|
||||
// Initializes the EMailInfo object.
|
||||
var oEMailInfo = new Object() ;
|
||||
oEMailInfo.Address = '' ;
|
||||
oEMailInfo.Subject = '' ;
|
||||
oEMailInfo.Body = '' ;
|
||||
oEMailInfo.Address = '' ;
|
||||
oEMailInfo.Subject = '' ;
|
||||
oEMailInfo.Body = '' ;
|
||||
|
||||
var oParts = emailUrl.match( /^([^\?]+)\??(.+)?/ ) ;
|
||||
if ( oParts )
|
||||
var aLinkInfo = sUrl.match( /^(\w+):(.*)$/ ) ;
|
||||
if ( aLinkInfo && aLinkInfo[1] == 'mailto' )
|
||||
{
|
||||
// Set the e-mail address.
|
||||
oEMailInfo.Address = oParts[1] ;
|
||||
|
||||
// Look for the optional e-mail parameters.
|
||||
if ( oParts[2] )
|
||||
// This seems to be an unprotected email link.
|
||||
var aParts = aLinkInfo[2].match( /^([^\?]+)\??(.+)?/ ) ;
|
||||
if ( aParts )
|
||||
{
|
||||
var oMatch = oParts[2].match( /(^|&)subject=([^&]+)/i ) ;
|
||||
if ( oMatch ) oEMailInfo.Subject = decodeURIComponent( oMatch[2] ) ;
|
||||
// Set the e-mail address.
|
||||
oEMailInfo.Address = aParts[1] ;
|
||||
|
||||
oMatch = oParts[2].match( /(^|&)body=([^&]+)/i ) ;
|
||||
if ( oMatch ) oEMailInfo.Body = decodeURIComponent( oMatch[2] ) ;
|
||||
// Look for the optional e-mail parameters.
|
||||
if ( aParts[2] )
|
||||
{
|
||||
var oEMailParams = oParser.ParseEMailParams( aParts[2] ) ;
|
||||
oEMailInfo.Subject = oEMailParams.Subject ;
|
||||
oEMailInfo.Body = oEMailParams.Body ;
|
||||
}
|
||||
}
|
||||
return oEMailInfo ;
|
||||
}
|
||||
else if ( aLinkInfo && aLinkInfo[1] == 'javascript' )
|
||||
{
|
||||
// This may be a protected email.
|
||||
|
||||
// Try to match the url against the EMailProtectionFunction.
|
||||
var func = FCKConfig.EMailProtectionFunction ;
|
||||
if ( func != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
// Escape special chars.
|
||||
func = func.replace( /([\/^$*+.?()\[\]])/g, '\\$1' ) ;
|
||||
|
||||
// Define the possible keys.
|
||||
var keys = new Array('NAME', 'DOMAIN', 'SUBJECT', 'BODY') ;
|
||||
|
||||
// Get the order of the keys (hold them in the array <pos>) and
|
||||
// the function replaced by regular expression patterns.
|
||||
var sFunc = func ;
|
||||
var pos = new Array() ;
|
||||
for ( var i = 0 ; i < keys.length ; i ++ )
|
||||
{
|
||||
var rexp = new RegExp( keys[i] ) ;
|
||||
var p = func.search( rexp ) ;
|
||||
if ( p >= 0 )
|
||||
{
|
||||
sFunc = sFunc.replace( rexp, '\'([^\']*)\'' ) ;
|
||||
pos[pos.length] = p + ':' + keys[i] ;
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the available keys.
|
||||
pos.sort( oParser.SortNumerical ) ;
|
||||
|
||||
// Replace the excaped single quotes in the url, such they do
|
||||
// not affect the regexp afterwards.
|
||||
aLinkInfo[2] = aLinkInfo[2].replace( /\\'/g, '###SINGLE_QUOTE###' ) ;
|
||||
|
||||
// Create the regexp and execute it.
|
||||
var rFunc = new RegExp( '^' + sFunc + '$' ) ;
|
||||
var aMatch = rFunc.exec( aLinkInfo[2] ) ;
|
||||
if ( aMatch )
|
||||
{
|
||||
var aInfo = new Array();
|
||||
for ( var i = 1 ; i < aMatch.length ; i ++ )
|
||||
{
|
||||
var k = pos[i-1].match(/^\d+:(.+)$/) ;
|
||||
aInfo[k[1]] = aMatch[i].replace(/###SINGLE_QUOTE###/g, '\'') ;
|
||||
}
|
||||
|
||||
// Fill the EMailInfo object that will be returned
|
||||
oEMailInfo.Address = aInfo['NAME'] + '@' + aInfo['DOMAIN'] ;
|
||||
oEMailInfo.Subject = decodeURIComponent( aInfo['SUBJECT'] ) ;
|
||||
oEMailInfo.Body = decodeURIComponent( aInfo['BODY'] ) ;
|
||||
|
||||
return oEMailInfo ;
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Try to match the email against the encode protection.
|
||||
var aMatch = aLinkInfo[2].match( /^location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'$/ ) ;
|
||||
if ( aMatch )
|
||||
{
|
||||
// The link is encoded
|
||||
oEMailInfo.Address = eval( aMatch[1] ) ;
|
||||
if ( aMatch[2] )
|
||||
{
|
||||
var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ;
|
||||
oEMailInfo.Subject = oEMailParams.Subject ;
|
||||
oEMailInfo.Body = oEMailParams.Body ;
|
||||
}
|
||||
return oEMailInfo ;
|
||||
}
|
||||
}
|
||||
|
||||
return oEMailInfo ;
|
||||
return false;
|
||||
}
|
||||
|
||||
oParser.CreateEMailUri = function( address, subject, body )
|
||||
{
|
||||
// Switch for the EMailProtection setting.
|
||||
switch ( FCKConfig.EMailProtection )
|
||||
{
|
||||
case 'function' :
|
||||
var func = FCKConfig.EMailProtectionFunction ;
|
||||
if ( func == null )
|
||||
{
|
||||
if ( FCKConfig.Debug )
|
||||
{
|
||||
alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
// Split the email address into name and domain parts.
|
||||
var aAddressParts = address.split( '@', 2 ) ;
|
||||
if ( aAddressParts[1] == undefined )
|
||||
{
|
||||
aAddressParts[1] = '' ;
|
||||
}
|
||||
|
||||
// Replace the keys by their values (embedded in single quotes).
|
||||
func = func.replace(/NAME/g, "'" + aAddressParts[0].replace(/'/g, '\\\'') + "'") ;
|
||||
func = func.replace(/DOMAIN/g, "'" + aAddressParts[1].replace(/'/g, '\\\'') + "'") ;
|
||||
func = func.replace(/SUBJECT/g, "'" + encodeURIComponent( subject ).replace(/'/g, '\\\'') + "'") ;
|
||||
func = func.replace(/BODY/g, "'" + encodeURIComponent( body ).replace(/'/g, '\\\'') + "'") ;
|
||||
|
||||
return 'javascript:' + func ;
|
||||
|
||||
case 'encode' :
|
||||
var aParams = [] ;
|
||||
var aAddressCode = [] ;
|
||||
|
||||
if ( subject.length > 0 )
|
||||
aParams.push( 'subject='+ encodeURIComponent( subject ) ) ;
|
||||
if ( body.length > 0 )
|
||||
aParams.push( 'body=' + encodeURIComponent( body ) ) ;
|
||||
for ( var i = 0 ; i < address.length ; i++ )
|
||||
aAddressCode.push( address.charCodeAt( i ) ) ;
|
||||
|
||||
return 'javascript:location.href=\'mailto:\'+String.fromCharCode(' + aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\'' ;
|
||||
}
|
||||
|
||||
// EMailProtection 'none'
|
||||
|
||||
var sBaseUri = 'mailto:' + address ;
|
||||
|
||||
var sParams = '' ;
|
||||
@ -263,28 +414,26 @@ function LoadSelection()
|
||||
// Search for the protocol.
|
||||
var sProtocol = oRegex.UriProtocol.exec( sHRef ) ;
|
||||
|
||||
if ( sProtocol )
|
||||
// Search for a protected email link.
|
||||
var oEMailInfo = oParser.ParseEMailUri( sHRef );
|
||||
|
||||
if ( oEMailInfo )
|
||||
{
|
||||
sType = 'email' ;
|
||||
|
||||
GetE('txtEMailAddress').value = oEMailInfo.Address ;
|
||||
GetE('txtEMailSubject').value = oEMailInfo.Subject ;
|
||||
GetE('txtEMailBody').value = oEMailInfo.Body ;
|
||||
}
|
||||
else if ( sProtocol )
|
||||
{
|
||||
sProtocol = sProtocol[0].toLowerCase() ;
|
||||
GetE('cmbLinkProtocol').value = sProtocol ;
|
||||
|
||||
// Remove the protocol and get the remaining URL.
|
||||
var sUrl = sHRef.replace( oRegex.UriProtocol, '' ) ;
|
||||
|
||||
if ( sProtocol == 'mailto:' ) // It is an e-mail link.
|
||||
{
|
||||
sType = 'email' ;
|
||||
|
||||
var oEMailInfo = oParser.ParseEMailUrl( sUrl ) ;
|
||||
GetE('txtEMailAddress').value = oEMailInfo.Address ;
|
||||
GetE('txtEMailSubject').value = oEMailInfo.Subject ;
|
||||
GetE('txtEMailBody').value = oEMailInfo.Body ;
|
||||
}
|
||||
else // It is a normal link.
|
||||
{
|
||||
sType = 'url' ;
|
||||
GetE('txtUrl').value = sUrl ;
|
||||
}
|
||||
sType = 'url' ;
|
||||
GetE('txtUrl').value = sUrl ;
|
||||
}
|
||||
else if ( sHRef.substr(0,1) == '#' && sHRef.length > 1 ) // It is an anchor link.
|
||||
{
|
||||
@ -650,13 +799,17 @@ function BrowseServer()
|
||||
|
||||
function SetUrl( url )
|
||||
{
|
||||
document.getElementById('txtUrl').value = url ;
|
||||
GetE('txtUrl').value = url ;
|
||||
OnUrlChange() ;
|
||||
dialog.SetSelectedTab( 'Info' ) ;
|
||||
}
|
||||
|
||||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
||||
{
|
||||
// Remove animation
|
||||
window.parent.Throbber.Hide() ;
|
||||
GetE( 'divUpload' ).style.display = '' ;
|
||||
|
||||
switch ( errorNumber )
|
||||
{
|
||||
case 0 : // No errors
|
||||
@ -709,6 +862,10 @@ function CheckUpload()
|
||||
return false ;
|
||||
}
|
||||
|
||||
// Show animation
|
||||
window.parent.Throbber.Show( 100 ) ;
|
||||
GetE( 'divUpload' ).style.display = 'none' ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ window.onload = function()
|
||||
dialog.SetOkButton( true ) ;
|
||||
dialog.SetAutoSize( true ) ;
|
||||
|
||||
SelectField( 'txtStartPosition' ) ;
|
||||
SelectField( sListType == 'OL' ? 'txtStartPosition' : 'selBulleted' ) ;
|
||||
}
|
||||
|
||||
function Ok()
|
||||
|
@ -64,7 +64,7 @@ window.onload = function ()
|
||||
|
||||
var eFrameSpace = document.getElementById( 'xFrameSpace' ) ;
|
||||
eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' +
|
||||
'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"></iframe>' ;
|
||||
'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"><\/iframe>' ;
|
||||
|
||||
var oFrame = eFrameSpace.firstChild ;
|
||||
|
||||
@ -187,7 +187,7 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||
var html = oNode.innerHTML ;
|
||||
|
||||
html = html.replace(/<o:p>\s*<\/o:p>/g, '') ;
|
||||
html = html.replace(/<o:p>.*?<\/o:p>/g, ' ') ;
|
||||
html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, ' ') ;
|
||||
|
||||
// Remove mso-xxx styles.
|
||||
html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ;
|
||||
@ -224,6 +224,10 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||
if ( bRemoveStyles )
|
||||
html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
|
||||
|
||||
// Remove style, meta and link tags
|
||||
html = html.replace( /<STYLE[^>]*>[\s\S]*?<\/STYLE[^>]*>/gi, '' ) ;
|
||||
html = html.replace( /<(?:META|LINK)[^>]*>\s*/gi, '' ) ;
|
||||
|
||||
// Remove empty styles.
|
||||
html = html.replace( /\s*style="\s*"/gi, '' ) ;
|
||||
|
||||
@ -234,25 +238,28 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||
// Remove Lang attributes
|
||||
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
||||
|
||||
html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
|
||||
html = html.replace( /<SPAN\s*>([\s\S]*?)<\/SPAN>/gi, '$1' ) ;
|
||||
|
||||
html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
|
||||
html = html.replace( /<FONT\s*>([\s\S]*?)<\/FONT>/gi, '$1' ) ;
|
||||
|
||||
// Remove XML elements and declarations
|
||||
html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ;
|
||||
|
||||
// Remove w: tags with contents.
|
||||
html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '' ) ;
|
||||
|
||||
// Remove Tags with XML namespace declarations: <o:p><\/o:p>
|
||||
html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ;
|
||||
|
||||
// Remove comments [SF BUG-1481861].
|
||||
html = html.replace(/<\!--.*?-->/g, '' ) ;
|
||||
html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ;
|
||||
|
||||
html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ;
|
||||
|
||||
html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;
|
||||
|
||||
// Remove "display:none" tags.
|
||||
html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none(.*?)<\/\1>/ig, '' ) ;
|
||||
html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none[\s\S]*?<\/\1>/ig, '' ) ;
|
||||
|
||||
// Remove language tags
|
||||
html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
||||
@ -267,8 +274,8 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||
html = html.replace( /<H(\d)([^>]*)>/gi, '<h$1>' ) ;
|
||||
|
||||
// Word likes to insert extra <font> tags, when using MSIE. (Wierd).
|
||||
html = html.replace( /<(H\d)><FONT[^>]*>(.*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );
|
||||
html = html.replace( /<(H\d)><EM>(.*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );
|
||||
html = html.replace( /<(H\d)><FONT[^>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );
|
||||
html = html.replace( /<(H\d)><EM>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -282,7 +289,7 @@ function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||
html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
|
||||
|
||||
// Transform <P> to <DIV>
|
||||
var re = new RegExp( '(<P)([^>]*>.*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error
|
||||
var re = new RegExp( '(<P)([^>]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error
|
||||
html = html.replace( re, '<div$2<\/div>' ) ;
|
||||
|
||||
// Remove empty tags (three times, just to be sure).
|
||||
|
@ -34,6 +34,12 @@ var oEditor = dialog.InnerDialogLoaded() ;
|
||||
var dialogArguments = dialog.Args() ;
|
||||
|
||||
var FCKLang = oEditor.FCKLang ;
|
||||
var FCKDomTools = oEditor.FCKDomTools ;
|
||||
var FCKDomRange = oEditor.FCKDomRange ;
|
||||
var FCKListsLib = oEditor.FCKListsLib ;
|
||||
var FCKTools = oEditor.FCKTools ;
|
||||
var EditorDocument = oEditor.FCK.EditorDocument ;
|
||||
var HighlightStyle = oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ) ;
|
||||
|
||||
dialog.AddTab( 'Find', FCKLang.DlgFindTitle ) ;
|
||||
dialog.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ;
|
||||
@ -51,38 +57,312 @@ function OnDialogTabChange( tabCode )
|
||||
dialog.SetAutoSize( true ) ;
|
||||
}
|
||||
|
||||
// Place a range at the start of document.
|
||||
// This will be the starting point of our search.
|
||||
var GlobalRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
|
||||
|
||||
function ResetGlobalRange()
|
||||
GetNextNonEmptyTextNode = function( node, stopNode )
|
||||
{
|
||||
GlobalRange.SetStart( oEditor.FCK.EditorDocument.body, 1 ) ;
|
||||
GlobalRange.SetEnd( oEditor.FCK.EditorDocument.body, 1 ) ;
|
||||
GlobalRange.Collapse( true ) ;
|
||||
}
|
||||
ResetGlobalRange() ;
|
||||
|
||||
var HighlightRange = null ;
|
||||
function Highlight()
|
||||
{
|
||||
if ( HighlightRange )
|
||||
ClearHighlight() ;
|
||||
var cloneRange = GlobalRange.Clone() ;
|
||||
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).ApplyToRange( cloneRange, false, true ) ;
|
||||
HighlightRange = cloneRange ;
|
||||
GlobalRange = HighlightRange.Clone() ;
|
||||
while ( ( node = FCKDomTools.GetNextSourceNode( node, false, 3, stopNode ) ) && node && node.length < 1 )
|
||||
1 ;
|
||||
return node ;
|
||||
}
|
||||
|
||||
function ClearHighlight()
|
||||
CharacterCursor = function( arg )
|
||||
{
|
||||
if ( HighlightRange )
|
||||
if ( arg.nodeType && arg.nodeType == 9 )
|
||||
{
|
||||
oEditor.FCKStyles.GetStyle( '_FCK_SelectionHighlight' ).RemoveFromRange( HighlightRange, false, true ) ;
|
||||
HighlightRange = null ;
|
||||
this._textNode = GetNextNonEmptyTextNode( arg.body, arg.documentElement ) ;
|
||||
this._offset = 0 ;
|
||||
this._doc = arg ;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._textNode = arguments[0] ;
|
||||
this._offset = arguments[1] ;
|
||||
this._doc = FCKTools.GetElementDocument( arguments[0] ) ;
|
||||
}
|
||||
}
|
||||
CharacterCursor.prototype =
|
||||
{
|
||||
GetCharacter : function()
|
||||
{
|
||||
return ( this._textNode && this._textNode.nodeValue.charAt( this._offset ) ) || null ;
|
||||
},
|
||||
|
||||
// Non-normalized.
|
||||
GetTextNode : function()
|
||||
{
|
||||
return this._textNode ;
|
||||
},
|
||||
|
||||
// Non-normalized.
|
||||
GetIndex : function()
|
||||
{
|
||||
return this._offset ;
|
||||
},
|
||||
|
||||
// Return value means whehther we've crossed a line break or a paragraph boundary.
|
||||
MoveNext : function()
|
||||
{
|
||||
if ( this._offset < this._textNode.length - 1 )
|
||||
{
|
||||
this._offset++ ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
var crossed = false ;
|
||||
var curNode = this._textNode ;
|
||||
while ( ( curNode = FCKDomTools.GetNextSourceNode( curNode ) )
|
||||
&& curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) )
|
||||
{
|
||||
var tag = curNode.nodeName.toLowerCase() ;
|
||||
if ( FCKListsLib.BlockElements[tag] || tag == 'br' )
|
||||
crossed = true ;
|
||||
}
|
||||
|
||||
this._textNode = curNode ;
|
||||
this._offset = 0 ;
|
||||
return crossed ;
|
||||
},
|
||||
|
||||
// Return value means whehther we've crossed a line break or a paragraph boundary.
|
||||
MoveBack : function()
|
||||
{
|
||||
if ( this._offset > 0 && this._textNode.length > 0 )
|
||||
{
|
||||
this._offset = Math.min( this._offset - 1, this._textNode.length - 1 ) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
var crossed = false ;
|
||||
var curNode = this._textNode ;
|
||||
while ( ( curNode = FCKDomTools.GetPreviousSourceNode( curNode ) )
|
||||
&& curNode && ( curNode.nodeType != 3 || curNode.length < 1 ) )
|
||||
{
|
||||
var tag = curNode.nodeName.toLowerCase() ;
|
||||
if ( FCKListsLib.BlockElements[tag] || tag == 'br' )
|
||||
crossed = true ;
|
||||
}
|
||||
|
||||
this._textNode = curNode ;
|
||||
this._offset = curNode.length - 1 ;
|
||||
return crossed ;
|
||||
},
|
||||
|
||||
Clone : function()
|
||||
{
|
||||
return new CharacterCursor( this._textNode, this._offset ) ;
|
||||
}
|
||||
} ;
|
||||
|
||||
CharacterRange = function( initCursor, maxLength )
|
||||
{
|
||||
this._cursors = initCursor.push ? initCursor : [initCursor] ;
|
||||
this._maxLength = maxLength ;
|
||||
this._highlightRange = null ;
|
||||
}
|
||||
CharacterRange.prototype =
|
||||
{
|
||||
ToDomRange : function()
|
||||
{
|
||||
var firstCursor = this._cursors[0] ;
|
||||
var lastCursor = this._cursors[ this._cursors.length - 1 ] ;
|
||||
var domRange = new FCKDomRange( FCKTools.GetElementWindow( firstCursor.GetTextNode() ) ) ;
|
||||
var w3cRange = domRange._Range = domRange.CreateRange() ;
|
||||
w3cRange.setStart( firstCursor.GetTextNode(), firstCursor.GetIndex() ) ;
|
||||
w3cRange.setEnd( lastCursor.GetTextNode(), lastCursor.GetIndex() + 1 ) ;
|
||||
domRange._UpdateElementInfo() ;
|
||||
return domRange ;
|
||||
},
|
||||
|
||||
Highlight : function()
|
||||
{
|
||||
if ( this._cursors.length < 1 )
|
||||
return ;
|
||||
|
||||
var domRange = this.ToDomRange() ;
|
||||
HighlightStyle.ApplyToRange( domRange, false, true ) ;
|
||||
this._highlightRange = domRange ;
|
||||
|
||||
var charRange = CharacterRange.CreateFromDomRange( domRange ) ;
|
||||
var focusNode = domRange.StartNode ;
|
||||
if ( focusNode.nodeType != 1 )
|
||||
focusNode = focusNode.parentNode ;
|
||||
FCKDomTools.ScrollIntoView( focusNode, false ) ;
|
||||
this._cursors = charRange._cursors ;
|
||||
},
|
||||
|
||||
RemoveHighlight : function()
|
||||
{
|
||||
if ( this._highlightRange )
|
||||
{
|
||||
HighlightStyle.RemoveFromRange( this._highlightRange, false, true ) ;
|
||||
var charRange = CharacterRange.CreateFromDomRange( this._highlightRange ) ;
|
||||
this._cursors = charRange._cursors ;
|
||||
this._highlightRange = null ;
|
||||
}
|
||||
},
|
||||
|
||||
GetHighlightDomRange : function()
|
||||
{
|
||||
return this._highlightRange;
|
||||
},
|
||||
|
||||
MoveNext : function()
|
||||
{
|
||||
var next = this._cursors[ this._cursors.length - 1 ].Clone() ;
|
||||
var retval = next.MoveNext() ;
|
||||
if ( retval )
|
||||
this._cursors = [] ;
|
||||
this._cursors.push( next ) ;
|
||||
if ( this._cursors.length > this._maxLength )
|
||||
this._cursors.shift() ;
|
||||
return retval ;
|
||||
},
|
||||
|
||||
MoveBack : function()
|
||||
{
|
||||
var prev = this._cursors[0].Clone() ;
|
||||
var retval = prev.MoveBack() ;
|
||||
if ( retval )
|
||||
this._cursors = [] ;
|
||||
this._cursors.unshift( prev ) ;
|
||||
if ( this._cursors.length > this._maxLength )
|
||||
this._cursors.pop() ;
|
||||
return retval ;
|
||||
},
|
||||
|
||||
GetEndCharacter : function()
|
||||
{
|
||||
if ( this._cursors.length < 1 )
|
||||
return null ;
|
||||
var retval = this._cursors[ this._cursors.length - 1 ].GetCharacter() ;
|
||||
return retval ;
|
||||
},
|
||||
|
||||
GetNextRange : function( len )
|
||||
{
|
||||
if ( this._cursors.length == 0 )
|
||||
return null ;
|
||||
var cur = this._cursors[ this._cursors.length - 1 ].Clone() ;
|
||||
cur.MoveNext() ;
|
||||
return new CharacterRange( cur, len ) ;
|
||||
},
|
||||
|
||||
GetCursors : function()
|
||||
{
|
||||
return this._cursors ;
|
||||
}
|
||||
} ;
|
||||
|
||||
CharacterRange.CreateFromDomRange = function( domRange )
|
||||
{
|
||||
var w3cRange = domRange._Range ;
|
||||
var startContainer = w3cRange.startContainer ;
|
||||
var endContainer = w3cRange.endContainer ;
|
||||
var startTextNode, startIndex, endTextNode, endIndex ;
|
||||
|
||||
if ( startContainer.nodeType == 3 )
|
||||
{
|
||||
startTextNode = startContainer ;
|
||||
startIndex = w3cRange.startOffset ;
|
||||
}
|
||||
else if ( domRange.StartNode.nodeType == 3 )
|
||||
{
|
||||
startTextNode = domRange.StartNode ;
|
||||
startIndex = 0 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
startTextNode = GetNextNonEmptyTextNode( domRange.StartNode, domRange.StartNode.parentNode ) ;
|
||||
if ( !startTextNode )
|
||||
return null ;
|
||||
startIndex = 0 ;
|
||||
}
|
||||
|
||||
if ( endContainer.nodeType == 3 && w3cRange.endOffset > 0 )
|
||||
{
|
||||
endTextNode = endContainer ;
|
||||
endIndex = w3cRange.endOffset - 1 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
endTextNode = domRange.EndNode ;
|
||||
while ( endTextNode.nodeType != 3 )
|
||||
endTextNode = endTextNode.lastChild ;
|
||||
endIndex = endTextNode.length - 1 ;
|
||||
}
|
||||
|
||||
var cursors = [] ;
|
||||
var current = new CharacterCursor( startTextNode, startIndex ) ;
|
||||
cursors.push( current ) ;
|
||||
if ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) && !domRange.CheckIsEmpty() )
|
||||
{
|
||||
do
|
||||
{
|
||||
current = current.Clone() ;
|
||||
current.MoveNext() ;
|
||||
cursors.push( current ) ;
|
||||
}
|
||||
while ( !( current.GetTextNode() == endTextNode && current.GetIndex() == endIndex ) ) ;
|
||||
}
|
||||
|
||||
return new CharacterRange( cursors, cursors.length ) ;
|
||||
}
|
||||
|
||||
// Knuth-Morris-Pratt Algorithm for stream input
|
||||
KMP_NOMATCH = 0 ;
|
||||
KMP_ADVANCED = 1 ;
|
||||
KMP_MATCHED = 2 ;
|
||||
KmpMatch = function( pattern, ignoreCase )
|
||||
{
|
||||
var overlap = [ -1 ] ;
|
||||
for ( var i = 0 ; i < pattern.length ; i++ )
|
||||
{
|
||||
overlap.push( overlap[i] + 1 ) ;
|
||||
while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern.charAt( overlap[ i + 1 ] - 1 ) )
|
||||
overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1 ;
|
||||
}
|
||||
this._Overlap = overlap ;
|
||||
this._State = 0 ;
|
||||
this._IgnoreCase = ( ignoreCase === true ) ;
|
||||
if ( ignoreCase )
|
||||
this.Pattern = pattern.toLowerCase();
|
||||
else
|
||||
this.Pattern = pattern ;
|
||||
}
|
||||
KmpMatch.prototype = {
|
||||
FeedCharacter : function( c )
|
||||
{
|
||||
if ( this._IgnoreCase )
|
||||
c = c.toLowerCase();
|
||||
|
||||
while ( true )
|
||||
{
|
||||
if ( c == this.Pattern.charAt( this._State ) )
|
||||
{
|
||||
this._State++ ;
|
||||
if ( this._State == this.Pattern.length )
|
||||
{
|
||||
// found a match, start over, don't care about partial matches involving the current match
|
||||
this._State = 0;
|
||||
return KMP_MATCHED;
|
||||
}
|
||||
return KMP_ADVANCED ;
|
||||
}
|
||||
else if ( this._State == 0 )
|
||||
return KMP_NOMATCH;
|
||||
else
|
||||
this._State = this._Overlap[ this._State ];
|
||||
}
|
||||
|
||||
return null ;
|
||||
},
|
||||
|
||||
Reset : function()
|
||||
{
|
||||
this._State = 0 ;
|
||||
}
|
||||
};
|
||||
|
||||
// Place a range at the start of document.
|
||||
function OnLoad()
|
||||
{
|
||||
// First of all, translate the dialog box texts.
|
||||
@ -133,78 +413,12 @@ function GetMatchWord()
|
||||
return !! ( GetE(idMap['CheckWord']).checked ) ;
|
||||
}
|
||||
|
||||
// Get the data pointed to by a bookmark.
|
||||
function GetData( bookmark )
|
||||
{
|
||||
var cursor = oEditor.FCK.EditorDocument.documentElement ;
|
||||
for ( var i = 0 ; i < bookmark.length ; i++ )
|
||||
{
|
||||
var target = bookmark[i] ;
|
||||
var currentIndex = -1 ;
|
||||
if ( cursor.nodeType != 3 )
|
||||
{
|
||||
for (var j = 0 ; j < cursor.childNodes.length ; j++ )
|
||||
{
|
||||
var candidate = cursor.childNodes[j] ;
|
||||
if ( candidate.nodeType == 3 &&
|
||||
candidate.previousSibling &&
|
||||
candidate.previousSibling.nodeType == 3 )
|
||||
continue ;
|
||||
currentIndex++ ;
|
||||
if ( currentIndex == target )
|
||||
{
|
||||
cursor = candidate ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
if ( currentIndex < target )
|
||||
return null ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( i != bookmark.length - 1 )
|
||||
return null ;
|
||||
while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 )
|
||||
{
|
||||
target -= cursor.length ;
|
||||
cursor = cursor.nextSibling ;
|
||||
}
|
||||
cursor = cursor.nodeValue.charAt( target ) ;
|
||||
if ( cursor == "" )
|
||||
cursor = null ;
|
||||
}
|
||||
}
|
||||
return cursor ;
|
||||
}
|
||||
|
||||
// With this function, we can treat the bookmark as an iterator for DFS.
|
||||
function NextPosition( bookmark )
|
||||
{
|
||||
// See if there's anything further down the tree.
|
||||
var next = bookmark.concat( [0] ) ;
|
||||
if ( GetData( next ) != null )
|
||||
return next ;
|
||||
|
||||
// Nothing down there? See if there's anything next to me.
|
||||
var next = bookmark.slice( 0, bookmark.length - 1 ).concat( [ bookmark[ bookmark.length - 1 ] + 1 ] ) ;
|
||||
if ( GetData( next ) != null )
|
||||
return next ;
|
||||
|
||||
// Nothing even next to me? See if there's anything next to my ancestors.
|
||||
for ( var i = bookmark.length - 1 ; i > 0 ; i-- )
|
||||
{
|
||||
var next = bookmark.slice( 0, i - 1 ).concat( [ bookmark[ i - 1 ] + 1 ] ) ;
|
||||
if ( GetData( next ) != null )
|
||||
return next ;
|
||||
}
|
||||
|
||||
// There's absolutely nothing left to walk, return null.
|
||||
return null ;
|
||||
}
|
||||
|
||||
// Is this character a unicode whitespace?
|
||||
// Reference: http://unicode.org/Public/UNIDATA/PropList.txt
|
||||
function CheckIsWhitespace( c )
|
||||
/* Is this character a unicode whitespace or a punctuation mark?
|
||||
* References:
|
||||
* http://unicode.org/Public/UNIDATA/PropList.txt (whitespaces)
|
||||
* http://php.chinaunix.net/manual/tw/ref.regex.php (punctuation marks)
|
||||
*/
|
||||
function CheckIsWordSeparator( c )
|
||||
{
|
||||
var code = c.charCodeAt( 0 );
|
||||
if ( code >= 9 && code <= 0xd )
|
||||
@ -225,212 +439,103 @@ function CheckIsWhitespace( c )
|
||||
case 0x3000:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return /[.,"'?!;:]/.test( c ) ;
|
||||
}
|
||||
|
||||
// Knuth-Morris-Pratt Algorithm for stream input
|
||||
KMP_NOMATCH = 0 ;
|
||||
KMP_ADVANCED = 1 ;
|
||||
KMP_MATCHED = 2 ;
|
||||
function KmpMatch( pattern, ignoreCase )
|
||||
{
|
||||
var overlap = [ -1 ] ;
|
||||
for ( var i = 0 ; i < pattern.length ; i++ )
|
||||
{
|
||||
overlap.push( overlap[i] + 1 ) ;
|
||||
while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern.charAt( overlap[ i + 1 ] - 1 ) )
|
||||
overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1 ;
|
||||
}
|
||||
this._Overlap = overlap ;
|
||||
this._State = 0 ;
|
||||
this._IgnoreCase = ( ignoreCase === true ) ;
|
||||
if ( ignoreCase )
|
||||
this.Pattern = pattern.toLowerCase();
|
||||
else
|
||||
this.Pattern = pattern ;
|
||||
}
|
||||
KmpMatch.prototype = {
|
||||
"FeedCharacter" : function( c )
|
||||
{
|
||||
if ( this._IgnoreCase )
|
||||
c = c.toLowerCase();
|
||||
|
||||
while ( true )
|
||||
{
|
||||
if ( c == this.Pattern.charAt( this._State ) )
|
||||
{
|
||||
this._State++ ;
|
||||
if ( this._State == this.Pattern.length )
|
||||
{
|
||||
// found a match, start over, don't care about partial matches involving the current match
|
||||
this._State = 0;
|
||||
return KMP_MATCHED;
|
||||
}
|
||||
return KMP_ADVANCED ;
|
||||
}
|
||||
else if ( this._State == 0 )
|
||||
return KMP_NOMATCH;
|
||||
else
|
||||
this._State = this._Overlap[ this._State ];
|
||||
}
|
||||
|
||||
return null ;
|
||||
},
|
||||
"Reset" : function()
|
||||
{
|
||||
this._State = 0 ;
|
||||
}
|
||||
};
|
||||
|
||||
FindRange = null ;
|
||||
function _Find()
|
||||
{
|
||||
// Start from the end of the current selection.
|
||||
var matcher = new KmpMatch( GetSearchString(), ! GetCheckCase() ) ;
|
||||
var cursor = GlobalRange.CreateBookmark2().End ;
|
||||
var matchState = KMP_NOMATCH ;
|
||||
var matchBookmark = null ;
|
||||
var matchBookmarkStart = [] ;
|
||||
|
||||
// Match finding.
|
||||
while ( true )
|
||||
{
|
||||
// Perform KMP stream matching.
|
||||
// - Reset KMP matcher if we encountered a block element.
|
||||
var data = GetData( cursor ) ;
|
||||
if ( data )
|
||||
{
|
||||
if ( data.tagName )
|
||||
{
|
||||
if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] )
|
||||
{
|
||||
matcher.Reset();
|
||||
matchBookmarkStart = [] ;
|
||||
}
|
||||
}
|
||||
else if ( data.charAt != undefined )
|
||||
{
|
||||
matchState = matcher.FeedCharacter(data) ;
|
||||
|
||||
// No possible match of any useful substring in the pattern for the currently scanned character.
|
||||
// So delete any positional information.
|
||||
if ( matchState == KMP_NOMATCH )
|
||||
matchBookmarkStart = [] ;
|
||||
// We've matched something, but it's not a complete match, so let's just mark down the position for backtracking later.
|
||||
else if ( matchState == KMP_ADVANCED )
|
||||
{
|
||||
matchBookmarkStart.push( cursor.concat( [] ) ) ;
|
||||
if ( matchBookmarkStart.length > matcher._State )
|
||||
matchBookmarkStart.shift() ;
|
||||
}
|
||||
// Found a complete match! Mark down the ending position as well.
|
||||
else if ( matchState == KMP_MATCHED )
|
||||
{
|
||||
// It is possible to get a KMP_MATCHED without KMP_ADVANCED when the match pattern is only 1 character.
|
||||
// So need to check and mark down the starting position as well.
|
||||
if ( matchBookmarkStart.length == 0 )
|
||||
matchBookmarkStart = [cursor.concat( [] )] ;
|
||||
|
||||
matchBookmark = { 'Start' : matchBookmarkStart.shift(), 'End' : cursor.concat( [] ) } ;
|
||||
matchBookmark.End[ matchBookmark.End.length - 1 ]++;
|
||||
|
||||
// Wait, do we have to match a whole word?
|
||||
// If yes, carry out additional checks on what we've got.
|
||||
if ( GetMatchWord() )
|
||||
{
|
||||
var startOk = false ;
|
||||
var endOk = false ;
|
||||
var start = matchBookmark.Start ;
|
||||
var end = matchBookmark.End ;
|
||||
if ( start[ start.length - 1 ] == 0 )
|
||||
startOk = true ;
|
||||
else
|
||||
{
|
||||
var cursorBeforeStart = start.slice( 0, start.length - 1 ) ;
|
||||
cursorBeforeStart.push( start[ start.length - 1 ] - 1 ) ;
|
||||
var dataBeforeStart = GetData( cursorBeforeStart ) ;
|
||||
if ( dataBeforeStart == null || dataBeforeStart.charAt == undefined )
|
||||
startOk = true ;
|
||||
else if ( CheckIsWhitespace( dataBeforeStart ) )
|
||||
startOk = true ;
|
||||
}
|
||||
|
||||
// this is already one character beyond the last char, no need to move
|
||||
var cursorAfterEnd = end ;
|
||||
var dataAfterEnd = GetData( cursorAfterEnd );
|
||||
if ( dataAfterEnd == null || dataAfterEnd.charAt == undefined )
|
||||
endOk = true ;
|
||||
else if ( CheckIsWhitespace( dataAfterEnd ) )
|
||||
endOk = true ;
|
||||
|
||||
if ( startOk && endOk )
|
||||
break ;
|
||||
else
|
||||
matcher.Reset() ;
|
||||
}
|
||||
else
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Perform DFS across the document, until we've reached the end.
|
||||
cursor = NextPosition( cursor ) ;
|
||||
if ( cursor == null )
|
||||
break;
|
||||
}
|
||||
|
||||
// If we've found a match, highlight the match.
|
||||
if ( matchState == KMP_MATCHED )
|
||||
{
|
||||
GlobalRange.MoveToBookmark2( matchBookmark ) ;
|
||||
Highlight() ;
|
||||
var focus = GlobalRange._Range.endContainer ;
|
||||
while ( focus && focus.nodeType != 1 )
|
||||
focus = focus.parentNode ;
|
||||
|
||||
if ( focus )
|
||||
{
|
||||
if ( oEditor.FCKBrowserInfo.IsSafari )
|
||||
oEditor.FCKDomTools.ScrollIntoView( focus, false ) ;
|
||||
else
|
||||
focus.scrollIntoView( false ) ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
var searchString = GetSearchString() ;
|
||||
if ( !FindRange )
|
||||
FindRange = new CharacterRange( new CharacterCursor( EditorDocument ), searchString.length ) ;
|
||||
else
|
||||
{
|
||||
ResetGlobalRange() ;
|
||||
return false ;
|
||||
FindRange.RemoveHighlight() ;
|
||||
FindRange = FindRange.GetNextRange( searchString.length ) ;
|
||||
}
|
||||
var matcher = new KmpMatch( searchString, ! GetCheckCase() ) ;
|
||||
var matchState = KMP_NOMATCH ;
|
||||
var character = '%' ;
|
||||
|
||||
while ( character != null )
|
||||
{
|
||||
while ( ( character = FindRange.GetEndCharacter() ) )
|
||||
{
|
||||
matchState = matcher.FeedCharacter( character ) ;
|
||||
if ( matchState == KMP_MATCHED )
|
||||
break ;
|
||||
if ( FindRange.MoveNext() )
|
||||
matcher.Reset() ;
|
||||
}
|
||||
|
||||
if ( matchState == KMP_MATCHED )
|
||||
{
|
||||
if ( GetMatchWord() )
|
||||
{
|
||||
var cursors = FindRange.GetCursors() ;
|
||||
var head = cursors[ cursors.length - 1 ].Clone() ;
|
||||
var tail = cursors[0].Clone() ;
|
||||
if ( !head.MoveNext() && !CheckIsWordSeparator( head.GetCharacter() ) )
|
||||
continue ;
|
||||
if ( !tail.MoveBack() && !CheckIsWordSeparator( tail.GetCharacter() ) )
|
||||
continue ;
|
||||
}
|
||||
|
||||
FindRange.Highlight() ;
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
|
||||
FindRange = null ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
function Find()
|
||||
{
|
||||
if ( ! _Find() )
|
||||
{
|
||||
ClearHighlight() ;
|
||||
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
}
|
||||
|
||||
function Replace()
|
||||
{
|
||||
if ( GlobalRange.CheckIsCollapsed() )
|
||||
var saveUndoStep = function( selectRange )
|
||||
{
|
||||
if (! _Find() )
|
||||
{
|
||||
ClearHighlight() ;
|
||||
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
var ieRange ;
|
||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||
ieRange = document.selection.createRange() ;
|
||||
|
||||
selectRange.Select() ;
|
||||
oEditor.FCKUndo.SaveUndoStep() ;
|
||||
var cloneRange = selectRange.Clone() ;
|
||||
cloneRange.Collapse( false ) ;
|
||||
cloneRange.Select() ;
|
||||
|
||||
if ( ieRange )
|
||||
setTimeout( function(){ ieRange.select() ; }, 1 ) ;
|
||||
}
|
||||
|
||||
if ( FindRange && FindRange.GetHighlightDomRange() )
|
||||
{
|
||||
var range = FindRange.GetHighlightDomRange() ;
|
||||
var bookmark = range.CreateBookmark() ;
|
||||
FindRange.RemoveHighlight() ;
|
||||
range.MoveToBookmark( bookmark ) ;
|
||||
|
||||
saveUndoStep( range ) ;
|
||||
range.DeleteContents() ;
|
||||
range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
||||
range._UpdateElementInfo() ;
|
||||
|
||||
FindRange = CharacterRange.CreateFromDomRange( range ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oEditor.FCKUndo.SaveUndoStep() ;
|
||||
GlobalRange.DeleteContents() ;
|
||||
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
||||
GlobalRange.Collapse( false ) ;
|
||||
if ( ! _Find() )
|
||||
{
|
||||
FindRange && FindRange.RemoveHighlight() ;
|
||||
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,21 +546,34 @@ function ReplaceAll()
|
||||
|
||||
while ( _Find() )
|
||||
{
|
||||
dialog.Selection.EnsureSelection() ;
|
||||
GlobalRange.DeleteContents() ;
|
||||
GlobalRange.InsertNode( oEditor.FCK.EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
||||
GlobalRange.Collapse( false ) ;
|
||||
var range = FindRange.GetHighlightDomRange() ;
|
||||
var bookmark = range.CreateBookmark() ;
|
||||
FindRange.RemoveHighlight() ;
|
||||
range.MoveToBookmark( bookmark) ;
|
||||
|
||||
range.DeleteContents() ;
|
||||
range.InsertNode( EditorDocument.createTextNode( GetReplaceString() ) ) ;
|
||||
range._UpdateElementInfo() ;
|
||||
|
||||
FindRange = CharacterRange.CreateFromDomRange( range ) ;
|
||||
replaceCount++ ;
|
||||
}
|
||||
if ( replaceCount == 0 )
|
||||
{
|
||||
ClearHighlight() ;
|
||||
FindRange && FindRange.RemoveHighlight() ;
|
||||
alert( FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
dialog.Cancel() ;
|
||||
}
|
||||
|
||||
window.onunload = function(){ ClearHighlight() ; }
|
||||
window.onunload = function()
|
||||
{
|
||||
if ( FindRange )
|
||||
{
|
||||
FindRange.RemoveHighlight() ;
|
||||
FindRange.ToDomRange().Select() ;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="OnLoad()" style="overflow: hidden">
|
||||
|
@ -52,7 +52,12 @@ function OnSpellerControlsLoad( controlsWindow )
|
||||
function oSpeller_OnFinished( numberOCorrections )
|
||||
{
|
||||
if ( numberOCorrections > 0 )
|
||||
oEditor.FCK.SetData( document.getElementById('txtHtml').value ) ;
|
||||
{
|
||||
oEditor.FCKUndo.SaveUndoStep() ;
|
||||
oEditor.FCK.EditorDocument.body.innerHTML = document.getElementById('txtHtml').value ;
|
||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||
oEditor.FCKSelection.Collapse( true ) ;
|
||||
}
|
||||
window.parent.Cancel() ;
|
||||
}
|
||||
|
||||
|
@ -3,29 +3,10 @@ header('Content-type: text/html; charset=utf-8');
|
||||
|
||||
// The following variables values must reflect your installation needs.
|
||||
|
||||
//$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
|
||||
$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
|
||||
//$aspell_prog = 'aspell'; // by FredCK (for Linux)
|
||||
|
||||
if ($_GET['aspell_path'])
|
||||
{
|
||||
$aspell_prog = $_GET['aspell_path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$aspell_prog = 'aspell';
|
||||
}
|
||||
|
||||
if ($_GET['spellchecker_lang'])
|
||||
{
|
||||
$lang = $_GET['spellchecker_lang'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang = 'en_US';
|
||||
}
|
||||
|
||||
//$lang = 'en_US';
|
||||
|
||||
$lang = 'en_US';
|
||||
$aspell_opts = "-a --lang=$lang --encoding=utf-8 -H --rem-sgml-check=alt"; // by FredCK
|
||||
|
||||
$tempfiledir = "./";
|
||||
|
@ -27,6 +27,8 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
// Domain relaxation logic.
|
||||
(function()
|
||||
{
|
||||
@ -190,6 +192,19 @@ var Sizer = function()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* IE6 has a similar bug where it sometimes thinks $('contents') has an
|
||||
* offsetHeight of 0 (#2114).
|
||||
*/
|
||||
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
|
||||
{
|
||||
var originalRefreshContainerSize = retval.RefreshContainerSize ;
|
||||
retval.RefreshContainerSize = function()
|
||||
{
|
||||
FCKTools.SetTimeout( originalRefreshContainerSize, 1, retval ) ;
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = function()
|
||||
{
|
||||
retval.RefreshContainerSize() ;
|
||||
@ -232,10 +247,13 @@ var Throbber = function()
|
||||
|
||||
var throbberParent = $( 'throbberBlock' ) ;
|
||||
|
||||
// Create the throbber blocks.
|
||||
var classIds = [ 1,2,3,4,5,4,3,2 ] ;
|
||||
while ( classIds.length > 0 )
|
||||
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ;
|
||||
if (throbberParent.childNodes.length == 0)
|
||||
{
|
||||
// Create the throbber blocks.
|
||||
var classIds = [ 1,2,3,4,5,4,3,2 ] ;
|
||||
while ( classIds.length > 0 )
|
||||
throbberParent.appendChild( document.createElement( 'div' ) ).className = ' throbber_' + classIds.shift() ;
|
||||
}
|
||||
|
||||
// Center the throbber.
|
||||
var frm = $( 'contents' ) ;
|
||||
@ -248,6 +266,10 @@ var Throbber = function()
|
||||
// Show it.
|
||||
throbberParent.style.visibility = '' ;
|
||||
|
||||
// Hide tabs and buttons:
|
||||
$( 'Tabs' ).style.visibility = 'hidden' ;
|
||||
$( 'PopupButtons' ).style.visibility = 'hidden' ;
|
||||
|
||||
// Setup the animation interval.
|
||||
timer = setInterval( updateThrobber, 100 ) ;
|
||||
},
|
||||
@ -260,9 +282,11 @@ var Throbber = function()
|
||||
timer = null ;
|
||||
}
|
||||
|
||||
var throbberParent = document.getElementById( 'throbberBlock' ) ;
|
||||
if ( throbberParent )
|
||||
FCKDomTools.RemoveNode( throbberParent ) ;
|
||||
$( 'throbberBlock' ).style.visibility = 'hidden' ;
|
||||
|
||||
// Show tabs and buttons:
|
||||
$( 'Tabs' ).style.visibility = '' ;
|
||||
$( 'PopupButtons' ).style.visibility = '' ;
|
||||
}
|
||||
} ;
|
||||
}() ;
|
||||
@ -617,7 +641,7 @@ var onReadyRegister = function()
|
||||
E.FCKLanguageManager.TranslatePage( document ) ;
|
||||
|
||||
// Create the IFRAME that holds the dialog contents.
|
||||
$( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"></iframe>' ;
|
||||
$( 'innerContents' ).innerHTML = '<iframe id="frmMain" src="' + Args().Page + '" name="frmMain" frameborder="0" width="100%" height="100%" scrolling="auto" style="visibility: hidden;" allowtransparency="true"><\/iframe>' ;
|
||||
} ;
|
||||
|
||||
window.InnerDialogLoaded = function()
|
||||
@ -727,6 +751,7 @@ var onReadyRegister = function()
|
||||
}
|
||||
} ;
|
||||
})() ;
|
||||
// ]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="Init();" class="PopupBody">
|
||||
@ -734,7 +759,9 @@ var onReadyRegister = function()
|
||||
<div id="header">
|
||||
<div id="TitleArea" class="PopupTitle PopupTitleBorder">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
document.write( Args().Title ) ;
|
||||
// ]]>
|
||||
</script>
|
||||
<div id="closeButton" onclick="Cancel();"></div>
|
||||
</div>
|
||||
@ -772,12 +799,14 @@ document.write( Args().Title ) ;
|
||||
<div class="cover" id="cover" style="display:none"></div>
|
||||
<div id="throbberBlock" style="position: absolute; visibility: hidden"></div>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
// Set the class name for language direction.
|
||||
document.body.className += ' ' + langDir ;
|
||||
|
||||
var cover = $( 'cover' ) ;
|
||||
cover.style.backgroundColor = FCKConfig.BackgroundBlockerColor ;
|
||||
FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ;
|
||||
// ]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -29,6 +29,37 @@
|
||||
<meta http-equiv="Cache-Control" content="public">
|
||||
<script type="text/javascript">
|
||||
|
||||
// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
|
||||
// without security.fileuri.strict_origin_policy disabled.
|
||||
if ( document.location.protocol == 'file:' )
|
||||
{
|
||||
try
|
||||
{
|
||||
window.parent.document.domain ;
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
window.addEventListener( 'load', function()
|
||||
{
|
||||
document.body.innerHTML = '\
|
||||
<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
|
||||
<p>\
|
||||
<b>Your browser security settings don\'t allow FCKeditor to be opened from\
|
||||
the local filesystem.<\/b>\
|
||||
<\/p>\
|
||||
<p>\
|
||||
Please open the <b>about:config<\/b> page and disable the\
|
||||
"security.fileuri.strict_origin_policy" option; then load this page again.\
|
||||
<\/p>\
|
||||
<p>\
|
||||
Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
|
||||
for more information.\
|
||||
<\/p>\
|
||||
<\/div>' ;
|
||||
}, false ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// Save a reference to the default domain.
|
||||
var FCK_ORIGINAL_DOMAIN ;
|
||||
|
||||
@ -134,9 +165,16 @@ FCKConfig_LoadPageConfig() ;
|
||||
|
||||
FCKConfig_PreProcess() ;
|
||||
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
|
||||
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)}' ) ;
|
||||
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}' ) ;
|
||||
// Load the full debug script.
|
||||
if ( FCKConfig.Debug )
|
||||
LoadScript( '_source/internals/fckdebug.js' ) ;
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
|
||||
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)}' ) ;
|
||||
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}' ) ;
|
||||
|
||||
// Popup the debug window if debug mode is set to true. It guarantees that the
|
||||
// first debug message will not be lost.
|
||||
@ -215,7 +253,8 @@ function WaitForActive( editorInstance, newStatus )
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
FCKTools.RunFunction( window.onresize ) ;
|
||||
|
||||
_AttachFormSubmitToAPI() ;
|
||||
if ( !FCKConfig.PreventSubmitHandler )
|
||||
_AttachFormSubmitToAPI() ;
|
||||
|
||||
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
||||
|
||||
|
@ -31,6 +31,37 @@
|
||||
@Packager.RemoveLine -->
|
||||
<script type="text/javascript">
|
||||
|
||||
// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem
|
||||
// without security.fileuri.strict_origin_policy disabled.
|
||||
if ( document.location.protocol == 'file:' )
|
||||
{
|
||||
try
|
||||
{
|
||||
window.parent.document.domain ;
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
window.addEventListener( 'load', function()
|
||||
{
|
||||
document.body.innerHTML = '\
|
||||
<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
|
||||
<p>\
|
||||
<b>Your browser security settings don\'t allow FCKeditor to be opened from\
|
||||
the local filesystem.<\/b>\
|
||||
<\/p>\
|
||||
<p>\
|
||||
Please open the <b>about:config<\/b> page and disable the\
|
||||
"security.fileuri.strict_origin_policy" option; then load this page again.\
|
||||
<\/p>\
|
||||
<p>\
|
||||
Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
|
||||
for more information.\
|
||||
<\/p>\
|
||||
<\/div>' ;
|
||||
}, false ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// Save a reference to the default domain.
|
||||
var FCK_ORIGINAL_DOMAIN ;
|
||||
|
||||
@ -103,7 +134,7 @@ LoadScript( '_source/internals/fck.js' ) ;
|
||||
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
|
||||
LoadScript( '_source/internals/fckconfig.js' ) ;
|
||||
|
||||
LoadScript( '_source/internals/fckdebug.js' ) ;
|
||||
LoadScript( '_source/internals/fckdebug_empty.js' ) ;
|
||||
LoadScript( '_source/internals/fckdomtools.js' ) ;
|
||||
LoadScript( '_source/internals/fcktools.js' ) ;
|
||||
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
|
||||
@ -237,12 +268,19 @@ FCKConfig_LoadPageConfig() ;
|
||||
|
||||
FCKConfig_PreProcess() ;
|
||||
|
||||
var FCK_InternalCSS = FCKConfig.FullBasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine
|
||||
var FCK_ShowTableBordersCSS = FCKConfig.FullBasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine
|
||||
// Load the full debug script.
|
||||
if ( FCKConfig.Debug )
|
||||
LoadScript( '_source/internals/fckdebug.js' ) ;
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; // @Packager.RemoveLine
|
||||
var FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; // @Packager.RemoveLine
|
||||
/* @Packager.RemoveLine
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor
|
||||
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)}' ) ;
|
||||
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}' ) ;
|
||||
// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
|
||||
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)}' ) ;
|
||||
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}' ) ;
|
||||
@Packager.RemoveLine */
|
||||
|
||||
// Popup the debug window if debug mode is set to true. It guarantees that the
|
||||
@ -322,7 +360,8 @@ function WaitForActive( editorInstance, newStatus )
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
FCKTools.RunFunction( window.onresize ) ;
|
||||
|
||||
_AttachFormSubmitToAPI() ;
|
||||
if ( !FCKConfig.PreventSubmitHandler )
|
||||
_AttachFormSubmitToAPI() ;
|
||||
|
||||
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
||||
|
||||
|
@ -24,27 +24,24 @@
|
||||
body
|
||||
{
|
||||
background-color: #f1f1e3;
|
||||
margin-top:0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0px 0px 0px 0px ;
|
||||
padding: 0px 0px 0px 0px ;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.Frame
|
||||
{
|
||||
background-color: #f1f1e3;
|
||||
border-color: #f1f1e3;
|
||||
border-right: thin inset;
|
||||
border-top: thin inset;
|
||||
border-left: thin inset;
|
||||
border-bottom: thin inset;
|
||||
border: thin inset #f1f1e3;
|
||||
}
|
||||
|
||||
body.FileArea
|
||||
{
|
||||
|
||||
background-color: #ffffff;
|
||||
margin: 10px;
|
||||
}
|
||||
@ -70,11 +67,8 @@ body, td, input, select
|
||||
|
||||
.Button, button
|
||||
{
|
||||
border-right: #737357 1px solid;
|
||||
border-top: #737357 1px solid;
|
||||
border-left: #737357 1px solid;
|
||||
color: #3b3b1f;
|
||||
border-bottom: #737357 1px solid;
|
||||
border: #737357 1px solid;
|
||||
background-color: #c7c78f;
|
||||
}
|
||||
|
||||
@ -87,3 +81,7 @@ body, td, input, select
|
||||
{
|
||||
background-image: url(images/Folder.gif);
|
||||
}
|
||||
|
||||
.fullHeight {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
|
||||
@ -27,7 +28,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="js/fckxml.js"></script>
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
// Automatically detect the correct document.domain (#1919).
|
||||
(function()
|
||||
{
|
||||
@ -41,7 +42,8 @@
|
||||
var test = window.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
catch( e )
|
||||
{}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
||||
|
@ -23,6 +23,7 @@
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Folder path</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript">
|
||||
@ -39,7 +40,8 @@
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
catch( e )
|
||||
{}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
||||
@ -58,12 +60,6 @@
|
||||
}
|
||||
})() ;
|
||||
|
||||
function OnResize()
|
||||
{
|
||||
divName.style.width = "1px" ;
|
||||
divName.style.width = tdName.offsetWidth + "px" ;
|
||||
}
|
||||
|
||||
function SetCurrentFolder( resourceType, folderPath )
|
||||
{
|
||||
document.getElementById('tdName').innerHTML = folderPath ;
|
||||
@ -76,8 +72,8 @@ window.onload = function()
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body bottomMargin="0" topMargin="0">
|
||||
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<body>
|
||||
<table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<button style="WIDTH: 100%" type="button">
|
||||
@ -87,7 +83,7 @@ window.onload = function()
|
||||
<td> </td>
|
||||
<td id="tdName" width="100%" nowrap class="ActualFolder">/</td>
|
||||
<td> </td>
|
||||
<td><img height="8" src="images/ButtonArrow.gif" width="12"></td>
|
||||
<td><img height="8" src="images/ButtonArrow.gif" width="12" alt=""></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -23,10 +23,11 @@
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Create Folder</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
function SetCurrentFolder( resourceType, folderPath )
|
||||
{
|
||||
@ -93,8 +94,8 @@ window.onload = function()
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body bottomMargin="0" topMargin="0">
|
||||
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<body>
|
||||
<table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" style="WIDTH: 100%" onclick="CreateFolder();">
|
||||
|
@ -24,10 +24,11 @@
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Folders</title>
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
var sActiveFolder ;
|
||||
|
||||
@ -66,12 +67,12 @@ oListManager.AddItem = function( folderName, folderPath )
|
||||
// Add the folder icon cell.
|
||||
var oCell = oRow.insertCell(-1) ;
|
||||
oCell.width = 16 ;
|
||||
oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"></a>' ;
|
||||
oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"><\/a>' ;
|
||||
|
||||
// Add the folder name cell.
|
||||
oCell = oRow.insertCell(-1) ;
|
||||
oCell.noWrap = true ;
|
||||
oCell.innerHTML = ' ' + sLink + folderName + '</a>' ;
|
||||
oCell.innerHTML = ' ' + sLink + folderName + '<\/a>' ;
|
||||
|
||||
this.TableRows[ folderPath ] = oRow ;
|
||||
}
|
||||
@ -186,7 +187,7 @@ window.onload = function()
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
|
||||
<body class="FileArea">
|
||||
<table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<tr id="trUp" style="DISPLAY: none">
|
||||
<td width="16"><a id="linkUpIcon" href="#"><img alt="" src="images/FolderUp.gif" width="16" height="16" border="0"></a></td>
|
||||
|
@ -21,9 +21,10 @@
|
||||
*
|
||||
* This page shows all resources available in a folder in the File Browser.
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<head>
|
||||
<link href="browser.css" type="text/css" rel="stylesheet" />
|
||||
<title>Resources</title>
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -23,10 +23,11 @@
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Available types</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script language="javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
function SetResourceType( type )
|
||||
{
|
||||
@ -42,21 +43,24 @@ var aTypes = [
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
var oCombo = document.getElementById('cmbType') ;
|
||||
oCombo.innerHTML = '' ;
|
||||
for ( var i = 0 ; i < aTypes.length ; i++ )
|
||||
{
|
||||
if ( oConnector.ShowAllTypes || aTypes[i][0] == oConnector.ResourceType )
|
||||
AddSelectOption( document.getElementById('cmbType'), aTypes[i][1], aTypes[i][0] ) ;
|
||||
AddSelectOption( oCombo, aTypes[i][1], aTypes[i][0] ) ;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body bottomMargin="0" topMargin="0">
|
||||
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<body>
|
||||
<table class="fullHeight" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
Resource Type<BR>
|
||||
<select id="cmbType" style="WIDTH: 100%" onchange="SetResourceType(this.value);">
|
||||
<option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -21,11 +21,11 @@
|
||||
*
|
||||
* Page used to upload new files in the current folder.
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html>
|
||||
<head>
|
||||
<title>File Upload</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="browser.css" type="text/css" rel="stylesheet" />
|
||||
<link href="browser.css" type="text/css" rel="stylesheet" >
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -95,9 +95,9 @@ window.onload = function()
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body bottommargin="0" topmargin="0">
|
||||
<body>
|
||||
<form id="frmUpload" action="" target="frmUploadWorker" method="post" enctype="multipart/form-data" onsubmit="return OnSubmit();">
|
||||
<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||
<table class="fullHeight" cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<span id="eUploadMessage">Upload a new file in this folder</span><br>
|
||||
|
@ -35,7 +35,8 @@
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
catch( e )
|
||||
{}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
||||
|
@ -61,7 +61,25 @@ FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer )
|
||||
{
|
||||
if ( oXmlHttp.readyState == 4 )
|
||||
{
|
||||
if ( ( oXmlHttp.status != 200 && oXmlHttp.status != 304 ) || oXmlHttp.responseXML == null || oXmlHttp.responseXML.firstChild == null )
|
||||
var oXml ;
|
||||
try
|
||||
{
|
||||
// this is the same test for an FF2 bug as in fckxml_gecko.js
|
||||
// but we've moved the responseXML assignment into the try{}
|
||||
// so we don't even have to check the return status codes.
|
||||
var test = oXmlHttp.responseXML.firstChild ;
|
||||
oXml = oXmlHttp.responseXML ;
|
||||
}
|
||||
catch ( e )
|
||||
{
|
||||
try
|
||||
{
|
||||
oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ;
|
||||
}
|
||||
catch ( e ) {}
|
||||
}
|
||||
|
||||
if ( !oXml || !oXml.firstChild || oXml.firstChild.nodeName == 'parsererror' )
|
||||
{
|
||||
alert( 'The server didn\'t send back a proper XML response. Please contact your system administrator.\n\n' +
|
||||
'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')\n\n' +
|
||||
@ -70,7 +88,7 @@ FCKXml.prototype.LoadUrl = function( urlToCall, asyncFunctionPointer )
|
||||
return ;
|
||||
}
|
||||
|
||||
oFCKXml.DOMDocument = oXmlHttp.responseXML ;
|
||||
oFCKXml.DOMDocument = oXml ;
|
||||
asyncFunctionPointer( oFCKXml ) ;
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ Sub SetXmlHeaders()
|
||||
Response.CacheControl = "no-cache"
|
||||
|
||||
' Set the response format.
|
||||
Response.CodePage = 65001
|
||||
Response.CharSet = "UTF-8"
|
||||
Response.ContentType = "text/xml"
|
||||
End Sub
|
||||
|
@ -103,7 +103,7 @@ Sub CreateFolder( resourceType, currentFolder )
|
||||
Else
|
||||
' Map the virtual path to the local server path of the current folder.
|
||||
Dim sServerDir
|
||||
sServerDir = ServerMapFolder( resourceType, CombinePaths(currentFolder, sNewFolderName), "CreateFolder" )
|
||||
sServerDir = ServerMapFolder( resourceType, CombineLocalPaths(currentFolder, sNewFolderName), "CreateFolder" )
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
@ -171,7 +171,7 @@ Sub FileUpload( resourceType, currentFolder, sCommand )
|
||||
|
||||
Do While ( True )
|
||||
Dim sFilePath
|
||||
sFilePath = sServerDir & sFileName
|
||||
sFilePath = CombineLocalPaths(sServerDir, sFileName)
|
||||
|
||||
If ( oFSO.FileExists( sFilePath ) ) Then
|
||||
iCounter = iCounter + 1
|
||||
|
@ -25,6 +25,12 @@ function CombinePaths( sBasePath, sFolder)
|
||||
CombinePaths = RemoveFromEnd( sBasePath, "/" ) & "/" & RemoveFromStart( sFolder, "/" )
|
||||
end function
|
||||
|
||||
function CombineLocalPaths( sBasePath, sFolder)
|
||||
sFolder = replace(sFolder, "/", "\")
|
||||
' The RemoveFrom* functions use RegExp, so we must escape the \
|
||||
CombineLocalPaths = RemoveFromEnd( sBasePath, "\\" ) & "\" & RemoveFromStart( sFolder, "\\" )
|
||||
end function
|
||||
|
||||
Function GetResourceTypePath( resourceType, sCommand )
|
||||
if ( sCommand = "QuickUpload") then
|
||||
GetResourceTypePath = ConfigQuickUploadPath.Item( resourceType )
|
||||
@ -69,7 +75,7 @@ Function ServerMapFolder( resourceType, folderPath, sCommand )
|
||||
CreateServerFolder sResourceTypePath
|
||||
|
||||
' Return the resource type directory combined with the required path.
|
||||
ServerMapFolder = CombinePaths( sResourceTypePath, folderPath )
|
||||
ServerMapFolder = CombineLocalPaths( sResourceTypePath, folderPath )
|
||||
End Function
|
||||
|
||||
Sub CreateServerFolder( folderPath )
|
||||
@ -79,6 +85,10 @@ Sub CreateServerFolder( folderPath )
|
||||
Dim sParent
|
||||
sParent = oFSO.GetParentFolderName( folderPath )
|
||||
|
||||
' If folderPath is a network path (\\server\folder\) then sParent is an empty string.
|
||||
' Get out.
|
||||
if (sParent = "") then exit sub
|
||||
|
||||
' Check if the parent exists, or create it.
|
||||
If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent )
|
||||
|
||||
@ -214,37 +224,9 @@ end function
|
||||
Sub SendUploadResults( errorNumber, fileUrl, fileName, customMsg )
|
||||
Response.Clear
|
||||
Response.Write "<script type=""text/javascript"">"
|
||||
Response.Write "(function()"
|
||||
Response.Write "{"
|
||||
Response.Write "var d = document.domain ;"
|
||||
|
||||
Response.Write " while ( true )"
|
||||
Response.Write " {"
|
||||
' Test if we can access a parent property.
|
||||
Response.Write " try"
|
||||
Response.Write " {"
|
||||
Response.Write " var test = window.top.opener.document.domain ;"
|
||||
Response.Write " break ;"
|
||||
Response.Write " }"
|
||||
Response.Write " catch( e ) {}"
|
||||
|
||||
' Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
Response.Write " d = d.replace( /.*?(?:\.|$)/, '' ) ;"
|
||||
|
||||
Response.Write " if ( d.length == 0 )"
|
||||
' It was not able to detect the domain.
|
||||
Response.Write " break ;"
|
||||
Response.Write ""
|
||||
Response.Write " try"
|
||||
Response.Write " {"
|
||||
Response.Write " document.domain = d ;"
|
||||
Response.Write " }"
|
||||
Response.Write " catch (e)"
|
||||
Response.Write " {"
|
||||
Response.Write " break ;"
|
||||
Response.Write " }"
|
||||
Response.Write " }"
|
||||
Response.Write "})() ;"
|
||||
' Minified version of the document.domain automatic fix script (#1919).
|
||||
' The original script can be found at _dev/domain_fix_template.js
|
||||
Response.Write "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"
|
||||
|
||||
Response.Write "window.parent.OnUploadCompleted(" & errorNumber & ",""" & Replace( fileUrl, """", "\""" ) & """,""" & Replace( fileName, """", "\""" ) & """,""" & Replace( customMsg , """", "\""" ) & """) ;"
|
||||
Response.Write "</script>"
|
||||
|
@ -47,38 +47,9 @@
|
||||
function SendUploadResults(errorNumber, fileUrl, fileName, customMsg)
|
||||
{
|
||||
WriteOutput('<script type="text/javascript">');
|
||||
WriteOutput("(function()"&
|
||||
"{"&
|
||||
" var d = document.domain ;"&
|
||||
""&
|
||||
" while ( true )"&
|
||||
" {"&
|
||||
// Test if we can access a parent property.
|
||||
" try"&
|
||||
" {"&
|
||||
" var test = window.top.opener.document.domain ;"&
|
||||
" break ;"&
|
||||
" }"&
|
||||
" catch( e ) {}"&
|
||||
""&
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
" d = d.replace( /.*?(?:\.|$)/, '' ) ;"&
|
||||
""&
|
||||
" if ( d.length == 0 )"&
|
||||
// It was not able to detect the domain.
|
||||
" break ;"&
|
||||
""&
|
||||
" try"&
|
||||
" {"&
|
||||
" document.domain = d ;"&
|
||||
" }"&
|
||||
" catch (e)"&
|
||||
" {"&
|
||||
" break ;"&
|
||||
" }"&
|
||||
" }"&
|
||||
"})() ;");
|
||||
|
||||
// Minified version of the document.domain automatic fix script (#1919).
|
||||
// The original script can be found at _dev/domain_fix_template.js
|
||||
WriteOutput("(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();");
|
||||
WriteOutput('window.parent.OnUploadCompleted(' & errorNumber & ', "' & JSStringFormat(fileUrl) & '", "' & JSStringFormat(fileName) & '", "' & JSStringFormat(customMsg) & '");' );
|
||||
WriteOutput('</script>');
|
||||
}
|
||||
|
@ -265,41 +265,13 @@
|
||||
<cfargument name="fileName" required="false" type="String" default="">
|
||||
<cfargument name="customMsg" required="false" type="String" default="">
|
||||
|
||||
<!--- Minified version of the document.domain automatic fix script (#1919).
|
||||
The original script can be found at _dev/domain_fix_template.js --->
|
||||
<cfoutput>
|
||||
<script type="text/javascript">
|
||||
(function()
|
||||
{
|
||||
var d = document.domain ;
|
||||
|
||||
while ( true )
|
||||
{
|
||||
// Test if we can access a parent property.
|
||||
try
|
||||
{
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
||||
|
||||
if ( d.length == 0 )
|
||||
break ; // It was not able to detect the domain.
|
||||
|
||||
try
|
||||
{
|
||||
document.domain = d ;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
}
|
||||
})() ;
|
||||
|
||||
window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" );
|
||||
</script>
|
||||
(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();
|
||||
window.parent.OnUploadCompleted( #errorNumber#, "#JSStringFormat(fileUrl)#", "#JSStringFormat(fileName)#", "#JSStringFormat(customMsg)#" );
|
||||
</script>
|
||||
</cfoutput>
|
||||
<cfabort>
|
||||
</cffunction>
|
||||
|
@ -74,38 +74,15 @@
|
||||
-type='string',
|
||||
-description='Sets the HTML response for the FCKEditor Quick Upload feature.'
|
||||
);
|
||||
$__html_reply__ = '\
|
||||
<script type="text/javascript">
|
||||
(function()
|
||||
{
|
||||
var d = document.domain ;
|
||||
|
||||
while ( true )
|
||||
{
|
||||
// Test if we can access a parent property.
|
||||
try
|
||||
{
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
$__html_reply__ = '<script type="text/javascript">';
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\\.|$)/, "" ) ;
|
||||
// Minified version of the document.domain automatic fix script (#1919).
|
||||
// The original script can be found at _dev/domain_fix_template.js
|
||||
// Note: in Lasso replace \ with \\
|
||||
$__html_reply__ = $__html_reply__ + "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();";
|
||||
|
||||
if ( d.length == 0 )
|
||||
break ; // It was not able to detect the domain.
|
||||
|
||||
try
|
||||
{
|
||||
document.domain = d ;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
}
|
||||
})() ;
|
||||
$__html_reply__ = $__html_reply__ + '\
|
||||
window.parent.OnUploadCompleted(' + #errorNumber + ',"'
|
||||
+ string_replace(#fileUrl, -find='"', -replace='\\"') + '","'
|
||||
+ string_replace(#fileName, -find='"', -replace='\\"') + '","'
|
||||
|
@ -169,41 +169,14 @@ sub SendUploadResults
|
||||
|
||||
local($sErrorNumber, $sFileUrl, $sFileName, $customMsg) = @_;
|
||||
|
||||
# Minified version of the document.domain automatic fix script (#1919).
|
||||
# The original script can be found at _dev/domain_fix_template.js
|
||||
# Note: in Perl replace \ with \\ and $ with \$
|
||||
print <<EOF;
|
||||
Content-type: text/html
|
||||
|
||||
<script type="text/javascript">
|
||||
// Automatically detect the correct document.domain (#1919).
|
||||
(function()
|
||||
{
|
||||
var d = document.domain ;
|
||||
|
||||
while ( true )
|
||||
{
|
||||
// Test if we can access a parent property.
|
||||
try
|
||||
{
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\\.|\$)/, '' ) ;
|
||||
|
||||
if ( d.length == 0 )
|
||||
break ; // It was not able to detect the domain.
|
||||
|
||||
try
|
||||
{
|
||||
document.domain = d ;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
}
|
||||
})() ;
|
||||
(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();
|
||||
|
||||
EOF
|
||||
print 'window.parent.OnUploadCompleted(' . $sErrorNumber . ',"' . JS_cnv($sFileUrl) . '","' . JS_cnv($sFileName) . '","' . JS_cnv($customMsg) . '") ;';
|
||||
|
@ -28,24 +28,23 @@ global $Config ;
|
||||
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
|
||||
// authenticated users can access this file or use some kind of session checking.
|
||||
$Config['Enabled'] = false ;
|
||||
|
||||
function deny_no_egw_session(&$account)
|
||||
{
|
||||
die('Access denied!');
|
||||
die('Access denied!');
|
||||
}
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'currentapp' => 'home',
|
||||
'noheader' => true,
|
||||
'autocreate_session_callback' => 'deny_no_egw_session',
|
||||
)
|
||||
'flags' => array(
|
||||
'currentapp' => 'home',
|
||||
'noheader' => true,
|
||||
'autocreate_session_callback' => 'deny_no_egw_session',
|
||||
)
|
||||
);
|
||||
// will not continue, unless the header get's included and there is a valid eGW session
|
||||
require('../../../../../../../header.inc.php');
|
||||
|
||||
if ($GLOBALS['egw']->session->session_flags == 'N' && // allow only non anonymous sessions,
|
||||
($app=$GLOBALS['egw']->session->appsession($_GET['ServerPath'],'FCKeditor')) && // check if path is stored in the session and
|
||||
isset($GLOBALS['egw_info']['user']['apps'][$app])) // user has access to the stored application (as we can only check of home above)
|
||||
if ($GLOBALS['egw']->session->session_flags == 'N' && // allow only non anonymous sessions,
|
||||
($app=$GLOBALS['egw']->session->appsession($_GET['ServerPath'],'FCKeditor')) && // check if path is stored in the session and
|
||||
isset($GLOBALS['egw_info']['user']['apps'][$app])) // user has access to the stored application (as we can only check of home above)
|
||||
{
|
||||
$Config['UserFilesPath'] = $_GET['ServerPath'];
|
||||
$Config['Enabled'] = true;
|
||||
@ -72,7 +71,7 @@ $Config['SecureImageUploads'] = true;
|
||||
$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
|
||||
|
||||
// Allowed Resource Types.
|
||||
$Config['ConfigAllowedTypes'] = array('Image');//array('File', 'Image', 'Flash', 'Media') ;
|
||||
$Config['ConfigAllowedTypes'] = array('Image'); //array('File', 'Image', 'Flash', 'Media') ;
|
||||
|
||||
// For security, HTML is allowed in the first Kb of data for files having the
|
||||
// following extensions only.
|
||||
@ -150,7 +149,7 @@ $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
||||
$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
|
||||
$Config['DeniedExtensions']['Image'] = array() ;
|
||||
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath']; // . 'image/' ;
|
||||
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath']; // . 'image/' ;
|
||||
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;
|
||||
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
|
||||
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
|
||||
|
@ -154,6 +154,8 @@ function GetRootPath()
|
||||
global $_SERVER;
|
||||
}
|
||||
$sRealPath = realpath( './' ) ;
|
||||
// #2124 ensure that no slash is at the end
|
||||
$sRealPath = rtrim($sRealPath,"\\/");
|
||||
|
||||
$sSelfPath = $_SERVER['PHP_SELF'] ;
|
||||
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
|
||||
@ -178,6 +180,7 @@ function Server_MapPath( $path )
|
||||
if ( function_exists( 'apache_lookup_uri' ) )
|
||||
{
|
||||
$info = apache_lookup_uri( $path ) ;
|
||||
// RalfBecker 2008/04/15: remove index.{html|php} added by apache
|
||||
return str_replace(array('/index.html','/index.php'),'',$info->filename) . $info->path_info ;
|
||||
}
|
||||
|
||||
@ -277,40 +280,13 @@ function SanitizeFileName( $sNewFileName )
|
||||
// This is the function that sends the results of the uploading process.
|
||||
function SendUploadResults( $errorNumber, $fileUrl = '', $fileName = '', $customMsg = '' )
|
||||
{
|
||||
// Minified version of the document.domain automatic fix script (#1919).
|
||||
// The original script can be found at _dev/domain_fix_template.js
|
||||
echo <<<EOF
|
||||
<script type="text/javascript">
|
||||
(function()
|
||||
{
|
||||
var d = document.domain ;
|
||||
|
||||
while ( true )
|
||||
{
|
||||
// Test if we can access a parent property.
|
||||
try
|
||||
{
|
||||
var test = window.top.opener.document.domain ;
|
||||
break ;
|
||||
}
|
||||
catch( e ) {}
|
||||
|
||||
// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
|
||||
d = d.replace( /.*?(?:\.|$)/, '' ) ;
|
||||
|
||||
if ( d.length == 0 )
|
||||
break ; // It was not able to detect the domain.
|
||||
|
||||
try
|
||||
{
|
||||
document.domain = d ;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
break ;
|
||||
}
|
||||
}
|
||||
})() ;
|
||||
|
||||
(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();
|
||||
EOF;
|
||||
|
||||
$rpl = array( '\\' => '\\\\', '"' => '\\"' ) ;
|
||||
echo 'window.parent.OnUploadCompleted(' . $errorNumber . ',"' . strtr( $fileUrl, $rpl ) . '","' . strtr( $fileName, $rpl ) . '", "' . strtr( $customMsg, $rpl ) . '") ;' ;
|
||||
echo '</script>' ;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user