forked from Wavyzz/dolibarr
Mise jour de fckeditor la version 2.4
This commit is contained in:
@@ -1,34 +1,38 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* --- BEGIN LICENSE ---
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
<head>
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
<title>FCKeditor - Documentation</title>
|
*
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
<style type="text/css">
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
body { font-family: arial, verdana, sans-serif }
|
*
|
||||||
p { margin-left: 20px }
|
* --- END LICENSE ---
|
||||||
</style>
|
-->
|
||||||
</head>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body>
|
<head>
|
||||||
<h1>
|
<title>FCKeditor - Documentation</title>
|
||||||
FCKeditor Documentation</h1>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<p>
|
<style type="text/css">
|
||||||
You can find all the available documentation for FCKeditor online, at our wiki web
|
body { font-family: arial, verdana, sans-serif }
|
||||||
site:</p>
|
p { margin-left: 20px }
|
||||||
<blockquote dir="ltr" style="margin-right: 0px">
|
</style>
|
||||||
<p>
|
</head>
|
||||||
<a href="http://wiki.fckeditor.net/">http://wiki.fckeditor.net/</a></p>
|
<body>
|
||||||
</blockquote>
|
<h1>
|
||||||
</body>
|
FCKeditor Documentation</h1>
|
||||||
</html>
|
<p>
|
||||||
|
You can find the official documentation for FCKeditor online, at <a href="http://wiki.fckeditor.net/">
|
||||||
|
http://wiki.fckeditor.net/</a>.</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
38
htdocs/includes/fckeditor/_upgrade.html
Normal file
38
htdocs/includes/fckeditor/_upgrade.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<!--
|
||||||
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
|
*
|
||||||
|
* --- BEGIN LICENSE ---
|
||||||
|
*
|
||||||
|
* Licensed under the terms of any of the following licenses at your
|
||||||
|
* choice:
|
||||||
|
*
|
||||||
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
|
*
|
||||||
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
|
*
|
||||||
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
|
*
|
||||||
|
* --- END LICENSE ---
|
||||||
|
-->
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>FCKeditor - Upgrade</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<style type="text/css">
|
||||||
|
body { font-family: arial, verdana, sans-serif }
|
||||||
|
p { margin-left: 20px }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
FCKeditor Upgrade</h1>
|
||||||
|
<p>
|
||||||
|
Please check the following URL for notes regarding upgrade: <a href="http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade">
|
||||||
|
http://wiki.fckeditor.net/Developer%27s_Guide/Upgrade</a></p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
File diff suppressed because it is too large
Load Diff
218
htdocs/includes/fckeditor/editor/_packager.xml
Normal file
218
htdocs/includes/fckeditor/editor/_packager.xml
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<!--
|
||||||
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
|
*
|
||||||
|
* == BEGIN LICENSE ==
|
||||||
|
*
|
||||||
|
* Licensed under the terms of any of the following licenses at your
|
||||||
|
* choice:
|
||||||
|
*
|
||||||
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
|
*
|
||||||
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
|
*
|
||||||
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
|
*
|
||||||
|
* File Name: _packager.xml
|
||||||
|
* This is the configuration file used by the FCKeditor.Packager to create the
|
||||||
|
* compressed code files in the "js" folder.
|
||||||
|
*
|
||||||
|
* The FCKeditor.Packager software can be used to create the compressed files
|
||||||
|
* for the FCKeditor project only. Any other use of this software is illegal.
|
||||||
|
*
|
||||||
|
* Please check http://www.fckeditor.net/ckpackager for more info.
|
||||||
|
*
|
||||||
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
|
<Package>
|
||||||
|
<Constants removeDeclaration="false">
|
||||||
|
<Constant name="FCK_STATUS_NOTLOADED" value="0" />
|
||||||
|
<Constant name="FCK_STATUS_ACTIVE" value="1" />
|
||||||
|
<Constant name="FCK_STATUS_COMPLETE" value="2" />
|
||||||
|
<Constant name="FCK_TRISTATE_OFF" value="0" />
|
||||||
|
<Constant name="FCK_TRISTATE_ON" value="1" />
|
||||||
|
<Constant name="FCK_TRISTATE_DISABLED" value="-1" />
|
||||||
|
<Constant name="FCK_UNKNOWN" value="-9" />
|
||||||
|
<Constant name="FCK_TOOLBARITEM_ONLYICON" value="0" />
|
||||||
|
<Constant name="FCK_TOOLBARITEM_ONLYTEXT" value="1" />
|
||||||
|
<Constant name="FCK_TOOLBARITEM_ICONTEXT" value="2" />
|
||||||
|
<Constant name="FCK_EDITMODE_WYSIWYG" value="0" />
|
||||||
|
<Constant name="FCK_EDITMODE_SOURCE" value="1" />
|
||||||
|
</Constants>
|
||||||
|
<PackageFile name="fckeditorcode_ie.js">
|
||||||
|
<File path="editor/_source/fckconstants.js" />
|
||||||
|
<File path="editor/_source/fckjscoreextensions.js" />
|
||||||
|
<File path="editor/_source/classes/fckiecleanup.js" />
|
||||||
|
<File path="editor/_source/internals/fckbrowserinfo.js" />
|
||||||
|
<File path="editor/_source/internals/fckurlparams.js" />
|
||||||
|
<File path="editor/_source/classes/fckevents.js" />
|
||||||
|
<File path="editor/_source/internals/fck.js" />
|
||||||
|
<File path="editor/_source/internals/fck_ie.js" />
|
||||||
|
<File path="editor/_source/internals/fckconfig.js" />
|
||||||
|
<File path="editor/_source/internals/fckdebug.js" />
|
||||||
|
<File path="editor/_source/internals/fckdomtools.js" />
|
||||||
|
<File path="editor/_source/internals/fcktools.js" />
|
||||||
|
<File path="editor/_source/internals/fcktools_ie.js" />
|
||||||
|
<File path="editor/_source/fckeditorapi.js" />
|
||||||
|
<File path="editor/_source/classes/fckimagepreloader.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fckregexlib.js" />
|
||||||
|
<File path="editor/_source/internals/fcklanguagemanager.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtmlentities.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtml.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtml_ie.js" />
|
||||||
|
<File path="editor/_source/internals/fckcodeformatter.js" />
|
||||||
|
<File path="editor/_source/internals/fckundo_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckeditingarea.js" />
|
||||||
|
<File path="editor/_source/classes/fckkeystrokehandler.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fcklisthandler.js" />
|
||||||
|
<File path="editor/_source/classes/fckelementpath.js" />
|
||||||
|
<File path="editor/_source/classes/fckdomrange.js" />
|
||||||
|
<File path="editor/_source/classes/fckdomrange_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckdocumentfragment_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckw3crange.js" />
|
||||||
|
<File path="editor/_source/classes/fckenterkey.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fckdocumentprocessor.js" />
|
||||||
|
<File path="editor/_source/internals/fckselection.js" />
|
||||||
|
<File path="editor/_source/internals/fckselection_ie.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fcktablehandler.js" />
|
||||||
|
<File path="editor/_source/internals/fcktablehandler_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckxml_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckstyledef.js" />
|
||||||
|
<File path="editor/_source/classes/fckstyledef_ie.js" />
|
||||||
|
<File path="editor/_source/classes/fckstylesloader.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/commandclasses/fcknamedcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fck_othercommands.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckspellcheckcommand_ie.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fcktextcolorcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckpasteplaintextcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckpastewordcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fcktablecommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckstylecommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckfitwindow.js" />
|
||||||
|
<File path="editor/_source/internals/fckcommands.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckpanel.js" />
|
||||||
|
<File path="editor/_source/classes/fckicon.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbuttonui.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbutton.js" />
|
||||||
|
<File path="editor/_source/classes/fckspecialcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarspecialcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontscombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarpanelbutton.js" />
|
||||||
|
<File path="editor/_source/internals/fcktoolbaritems.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbar.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbreak_ie.js" />
|
||||||
|
<File path="editor/_source/internals/fcktoolbarset.js" />
|
||||||
|
<File path="editor/_source/internals/fckdialog.js" />
|
||||||
|
<File path="editor/_source/internals/fckdialog_ie.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckmenuitem.js" />
|
||||||
|
<File path="editor/_source/classes/fckmenublock.js" />
|
||||||
|
<File path="editor/_source/classes/fckmenublockpanel.js" />
|
||||||
|
<File path="editor/_source/classes/fckcontextmenu.js" />
|
||||||
|
<File path="editor/_source/internals/fck_contextmenu.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckplugin.js" />
|
||||||
|
<File path="editor/_source/internals/fckplugins.js" />
|
||||||
|
</PackageFile>
|
||||||
|
|
||||||
|
<PackageFile name="fckeditorcode_gecko.js">
|
||||||
|
<File path="editor/_source/fckconstants.js" />
|
||||||
|
<File path="editor/_source/fckjscoreextensions.js" />
|
||||||
|
<File path="editor/_source/internals/fckbrowserinfo.js" />
|
||||||
|
<File path="editor/_source/internals/fckurlparams.js" />
|
||||||
|
<File path="editor/_source/classes/fckevents.js" />
|
||||||
|
<File path="editor/_source/internals/fck.js" />
|
||||||
|
<File path="editor/_source/internals/fck_gecko.js" />
|
||||||
|
<File path="editor/_source/internals/fckconfig.js" />
|
||||||
|
<File path="editor/_source/internals/fckdebug.js" />
|
||||||
|
<File path="editor/_source/internals/fckdomtools.js" />
|
||||||
|
<File path="editor/_source/internals/fcktools.js" />
|
||||||
|
<File path="editor/_source/internals/fcktools_gecko.js" />
|
||||||
|
<File path="editor/_source/fckeditorapi.js" />
|
||||||
|
<File path="editor/_source/classes/fckimagepreloader.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fckregexlib.js" />
|
||||||
|
<File path="editor/_source/internals/fcklanguagemanager.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtmlentities.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtml.js" />
|
||||||
|
<File path="editor/_source/internals/fckxhtml_gecko.js" />
|
||||||
|
<File path="editor/_source/internals/fckcodeformatter.js" />
|
||||||
|
<File path="editor/_source/internals/fckundo_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckeditingarea.js" />
|
||||||
|
<File path="editor/_source/classes/fckkeystrokehandler.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fcklisthandler.js" />
|
||||||
|
<File path="editor/_source/classes/fckelementpath.js" />
|
||||||
|
<File path="editor/_source/classes/fckdomrange.js" />
|
||||||
|
<File path="editor/_source/classes/fckdomrange_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckdocumentfragment_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckw3crange.js" />
|
||||||
|
<File path="editor/_source/classes/fckenterkey.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fckdocumentprocessor.js" />
|
||||||
|
<File path="editor/_source/internals/fckselection.js" />
|
||||||
|
<File path="editor/_source/internals/fckselection_gecko.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/internals/fcktablehandler.js" />
|
||||||
|
<File path="editor/_source/internals/fcktablehandler_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckxml_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckstyledef.js" />
|
||||||
|
<File path="editor/_source/classes/fckstyledef_gecko.js" />
|
||||||
|
<File path="editor/_source/classes/fckstylesloader.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/commandclasses/fcknamedcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fck_othercommands.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckspellcheckcommand_gecko.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fcktextcolorcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckpasteplaintextcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckpastewordcommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fcktablecommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckstylecommand.js" />
|
||||||
|
<File path="editor/_source/commandclasses/fckfitwindow.js" />
|
||||||
|
<File path="editor/_source/internals/fckcommands.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckpanel.js" />
|
||||||
|
<File path="editor/_source/classes/fckicon.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbuttonui.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbutton.js" />
|
||||||
|
<File path="editor/_source/classes/fckspecialcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarspecialcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontscombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontsizecombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarfontformatcombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarstylecombo.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarpanelbutton.js" />
|
||||||
|
<File path="editor/_source/internals/fcktoolbaritems.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbar.js" />
|
||||||
|
<File path="editor/_source/classes/fcktoolbarbreak_gecko.js" />
|
||||||
|
<File path="editor/_source/internals/fcktoolbarset.js" />
|
||||||
|
<File path="editor/_source/internals/fckdialog.js" />
|
||||||
|
<File path="editor/_source/internals/fckdialog_gecko.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckmenuitem.js" />
|
||||||
|
<File path="editor/_source/classes/fckmenublock.js" />
|
||||||
|
<File path="editor/_source/classes/fckmenublockpanel.js" />
|
||||||
|
<File path="editor/_source/classes/fckcontextmenu.js" />
|
||||||
|
<File path="editor/_source/internals/fck_contextmenu.js" />
|
||||||
|
|
||||||
|
<File path="editor/_source/classes/fckplugin.js" />
|
||||||
|
<File path="editor/_source/internals/fckplugins.js" />
|
||||||
|
</PackageFile>
|
||||||
|
|
||||||
|
</Package>
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
<public:component lightweight="true">
|
<public:component lightweight="true">
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
|
|
||||||
function CancelEvent()
|
function CancelEvent()
|
||||||
{
|
{
|
||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onresizestart = CancelEvent ;
|
this.onresizestart = CancelEvent ;
|
||||||
this.onbeforeeditfocus = CancelEvent ;
|
this.onbeforeeditfocus = CancelEvent ;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</public:component>
|
</public:component>
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<public:component lightweight="true">
|
<public:component lightweight="true">
|
||||||
|
|
||||||
<public:attach event="oncontentready" onevent="ShowField()" />
|
<public:attach event="oncontentready" onevent="ShowField()" />
|
||||||
<public:attach event="ondoubleclick" onevent="EditField()" />
|
<public:attach event="ondoubleclick" onevent="EditField()" />
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
|
|
||||||
var bIsHiddenField = this.type == 'hidden' ;
|
var bIsHiddenField = this.type == 'hidden' ;
|
||||||
|
|
||||||
function ShowField()
|
function ShowField()
|
||||||
{
|
{
|
||||||
if ( bIsHiddenField )
|
if ( bIsHiddenField )
|
||||||
{
|
{
|
||||||
this.runtimeStyle.width = '20px' ;
|
this.runtimeStyle.width = '20px' ;
|
||||||
this.runtimeStyle.height = '20px' ;
|
this.runtimeStyle.height = '20px' ;
|
||||||
this.runtimeStyle.border = '1px dotted #FF0000' ;
|
this.runtimeStyle.border = '1px dotted #FF0000' ;
|
||||||
this.runtimeStyle.backgroundImage = 'url(css/behaviors/hiddenfield.gif)' ;
|
this.runtimeStyle.backgroundImage = 'url(css/behaviors/hiddenfield.gif)' ;
|
||||||
this.runtimeStyle.fontSize = '99px' ;
|
this.runtimeStyle.fontSize = '99px' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function EditField()
|
function EditField()
|
||||||
{
|
{
|
||||||
if ( bIsHiddenField )
|
if ( bIsHiddenField )
|
||||||
alert( this.outerHTML ) ;
|
alert( this.outerHTML ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</public:component>
|
</public:component>
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
<public:component lightweight="true">
|
<public:component lightweight="true">
|
||||||
|
|
||||||
<public:attach event="oncontentready" onevent="ShowBorders()" />
|
<public:attach event="oncontentready" onevent="ShowBorders()" />
|
||||||
<public:attach event="onpropertychange" onevent="OnPropertyChange()" />
|
<public:attach event="onpropertychange" onevent="OnPropertyChange()" />
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
|
|
||||||
var oClassRegex = /\s*FCK__ShowTableBorders/ ;
|
var oClassRegex = /\s*FCK__ShowTableBorders/ ;
|
||||||
|
|
||||||
function ShowBorders()
|
function ShowBorders()
|
||||||
{
|
{
|
||||||
if ( this.border == 0 )
|
if ( this.border == 0 )
|
||||||
{
|
{
|
||||||
if ( !oClassRegex.test( this.className ) )
|
if ( !oClassRegex.test( this.className ) )
|
||||||
this.className += ' FCK__ShowTableBorders' ;
|
this.className += ' FCK__ShowTableBorders' ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( oClassRegex.test( this.className ) )
|
if ( oClassRegex.test( this.className ) )
|
||||||
{
|
{
|
||||||
this.className = this.className.replace( oClassRegex, '' ) ;
|
this.className = this.className.replace( oClassRegex, '' ) ;
|
||||||
if ( this.className.length == 0 )
|
if ( this.className.length == 0 )
|
||||||
this.removeAttribute( 'className', 0 ) ;
|
this.removeAttribute( 'className', 0 ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function OnPropertyChange()
|
function OnPropertyChange()
|
||||||
{
|
{
|
||||||
if ( event.propertyName == 'border' || event.propertyName == 'className' )
|
if ( event.propertyName == 'border' || event.propertyName == 'className' )
|
||||||
ShowBorders.call(this) ;
|
ShowBorders.call(this) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</public:component>
|
</public:component>
|
||||||
|
|||||||
@@ -1,87 +1,96 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_editorarea.css
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the default CSS file used by the editor area. It defines the
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* initial font of the editor and background color.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* A user can configure the editor to use another CSS file. Just change
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* the value of the FCKConfig.EditorAreaCSS key in the configuration
|
*
|
||||||
* file.
|
* == END LICENSE ==
|
||||||
*
|
*
|
||||||
* File Authors:
|
* File Name: fck_editorarea.css
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* This is the default CSS file used by the editor area. It defines the
|
||||||
*/
|
* initial font of the editor and background color.
|
||||||
|
*
|
||||||
/*
|
* A user can configure the editor to use another CSS file. Just change
|
||||||
The "body" styles should match your editor web site, mainly regarding
|
* the value of the FCKConfig.EditorAreaCSS key in the configuration
|
||||||
background color and font family and size.
|
* file.
|
||||||
*/
|
*
|
||||||
|
* File Authors:
|
||||||
body
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
{
|
* Alfonso Martinez de Lizarrondo - Uritec (alfonso at uritec dot net)
|
||||||
background-color: #ffffff;
|
*/
|
||||||
padding: 5px 5px 5px 5px;
|
|
||||||
margin: 0px;
|
/*
|
||||||
}
|
The "body" styles should match your editor web site, mainly regarding
|
||||||
|
background color and font family and size.
|
||||||
body, td
|
*/
|
||||||
{
|
|
||||||
font-family: Arial, Verdana, Sans-Serif;
|
body
|
||||||
font-size: 12px;
|
{
|
||||||
}
|
background-color: #ffffff;
|
||||||
|
padding: 5px 5px 5px 5px;
|
||||||
a
|
margin: 0px;
|
||||||
{
|
}
|
||||||
color: #0000FF !important; /* For Firefox... mark as important, otherwise it becomes black */
|
|
||||||
}
|
body, td
|
||||||
|
{
|
||||||
/*
|
font-family: Arial, Verdana, Sans-Serif;
|
||||||
Just uncomment the following block if you want to avoid spaces between
|
font-size: 12px;
|
||||||
paragraphs. Remember to apply the same style in your output front end page.
|
}
|
||||||
*/
|
|
||||||
|
a[href]
|
||||||
/*
|
{
|
||||||
P, UL, LI
|
color: #0000FF !important; /* For Firefox... mark as important, otherwise it becomes black */
|
||||||
{
|
}
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 0px;
|
/*
|
||||||
}
|
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.
|
||||||
|
*/
|
||||||
/*
|
|
||||||
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
|
p, ul, li
|
||||||
you are using the editor in.
|
{
|
||||||
*/
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
.Bold
|
}
|
||||||
{
|
*/
|
||||||
font-weight: bold;
|
|
||||||
}
|
/*
|
||||||
|
The following are some sample styles used in the "Styles" toolbar command.
|
||||||
.Title
|
You should instead remove them, and include the styles used by the site
|
||||||
{
|
you are using the editor in.
|
||||||
font-weight: bold;
|
*/
|
||||||
font-size: 18px;
|
|
||||||
color: #cc3300;
|
.Bold
|
||||||
}
|
{
|
||||||
|
font-weight: bold;
|
||||||
.Code
|
}
|
||||||
{
|
|
||||||
border: #8b4513 1px solid;
|
.Title
|
||||||
padding-right: 5px;
|
{
|
||||||
padding-left: 5px;
|
font-weight: bold;
|
||||||
color: #000066;
|
font-size: 18px;
|
||||||
font-family: 'Courier New' , Monospace;
|
color: #cc3300;
|
||||||
background-color: #ff9933;
|
}
|
||||||
|
|
||||||
|
.Code
|
||||||
|
{
|
||||||
|
border: #8b4513 1px solid;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
color: #000066;
|
||||||
|
font-family: 'Courier New' , Monospace;
|
||||||
|
background-color: #ff9933;
|
||||||
}
|
}
|
||||||
@@ -1,88 +1,121 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_internal.css
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This CSS Style Sheet defines rules used by the editor for its internal use.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
/* Fix to allow putting the caret at the end of the
|
*
|
||||||
content in Firefox if clicking below the content */
|
* File Name: fck_internal.css
|
||||||
html
|
* This CSS Style Sheet defines rules used by the editor for its internal use.
|
||||||
{
|
*
|
||||||
min-height:100%;
|
* File Authors:
|
||||||
}
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
* Alfonso Martinez de Lizarrondo - Uritec (alfonso at uritec dot net)
|
||||||
|
*/
|
||||||
table.FCK__ShowTableBorders, table.FCK__ShowTableBorders td, table.FCK__ShowTableBorders th
|
|
||||||
{
|
/* Fix to allow putting the caret at the end of the
|
||||||
border: #d3d3d3 1px solid;
|
content in Firefox if clicking below the content */
|
||||||
}
|
html
|
||||||
|
{
|
||||||
form
|
min-height:100%;
|
||||||
{
|
}
|
||||||
border: 1px dotted #FF0000;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
table.FCK__ShowTableBorders, table.FCK__ShowTableBorders td, table.FCK__ShowTableBorders th
|
||||||
|
{
|
||||||
.FCK__Flash
|
border: #d3d3d3 1px solid;
|
||||||
{
|
}
|
||||||
border: darkgray 1px solid;
|
|
||||||
background-position: center center;
|
form
|
||||||
background-image: url(images/fck_flashlogo.gif);
|
{
|
||||||
background-repeat: no-repeat;
|
border: 1px dotted #FF0000;
|
||||||
width: 80px;
|
padding: 2px;
|
||||||
height: 80px;
|
}
|
||||||
}
|
|
||||||
|
.FCK__Flash
|
||||||
.FCK__Anchor
|
{
|
||||||
{
|
border: darkgray 1px solid;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-image: url(images/fck_anchor.gif);
|
background-image: url(images/fck_flashlogo.gif);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
width: 16px;
|
width: 80px;
|
||||||
height: 15px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.FCK__PageBreak
|
/* Empty anchors images */
|
||||||
{
|
.FCK__Anchor
|
||||||
background-position: center center;
|
{
|
||||||
background-image: url(images/fck_pagebreak.gif);
|
border: 1px dotted #00F;
|
||||||
background-repeat: no-repeat;
|
background-position: center center;
|
||||||
clear: both;
|
background-image: url(images/fck_anchor.gif);
|
||||||
display: block;
|
background-repeat: no-repeat;
|
||||||
float: none;
|
width: 16px;
|
||||||
width: 100%;
|
height: 15px;
|
||||||
border-top: #999999 1px dotted;
|
vertical-align: middle;
|
||||||
border-bottom: #999999 1px dotted;
|
}
|
||||||
border-right: 0px;
|
|
||||||
border-left: 0px;
|
/* Anchors with content */
|
||||||
height: 5px;
|
.FCK__AnchorC
|
||||||
}
|
{
|
||||||
|
border: 1px dotted #00F;
|
||||||
input[type="hidden"]
|
background-position: 1 center;
|
||||||
{
|
background-image: url(images/fck_anchor.gif);
|
||||||
display: inline;
|
background-repeat: no-repeat;
|
||||||
width:20px;
|
padding-left:18px;
|
||||||
height:20px;
|
}
|
||||||
border:1px dotted #FF0000 ;
|
|
||||||
background-image: url(behaviors/hiddenfield.gif);
|
/* Any anchor for non-IE, if we combine it
|
||||||
background-repeat: no-repeat;
|
with the previous rule IE ignores all. */
|
||||||
}
|
a[name]
|
||||||
|
{
|
||||||
input[type="hidden"]:after
|
border: 1px dotted #00F;
|
||||||
{
|
background-position: 0 center;
|
||||||
padding-left: 20px;
|
background-image: url(images/fck_anchor.gif);
|
||||||
content: "" ;
|
background-repeat: no-repeat;
|
||||||
}
|
padding-left:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FCK__PageBreak
|
||||||
|
{
|
||||||
|
background-position: center center;
|
||||||
|
background-image: url(images/fck_pagebreak.gif);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
float: none;
|
||||||
|
width: 100%;
|
||||||
|
border-top: #999999 1px dotted;
|
||||||
|
border-bottom: #999999 1px dotted;
|
||||||
|
border-right: 0px;
|
||||||
|
border-left: 0px;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="hidden"]
|
||||||
|
{
|
||||||
|
display: inline;
|
||||||
|
width:20px;
|
||||||
|
height:20px;
|
||||||
|
border:1px dotted #FF0000 ;
|
||||||
|
background-image: url(behaviors/hiddenfield.gif);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="hidden"]:after
|
||||||
|
{
|
||||||
|
padding-left: 20px;
|
||||||
|
content: "" ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,38 +1,46 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_showtableborders_gecko.css
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This CSS Style Sheet defines the rules to show table borders on Gecko.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
/* For tables with the "border" attribute set to "0" */
|
*
|
||||||
table[border="0"],
|
* File Name: fck_showtableborders_gecko.css
|
||||||
table[border="0"] > tr > td, table[border="0"] > tr > th,
|
* This CSS Style Sheet defines the rules to show table borders on Gecko.
|
||||||
table[border="0"] > tbody > tr > td, table[border="0"] > tbody > tr > th,
|
*
|
||||||
table[border="0"] > thead > tr > td, table[border="0"] > thead > tr > th,
|
* File Authors:
|
||||||
table[border="0"] > tfoot > tr > td, table[border="0"] > tfoot > tr > th
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
{
|
*/
|
||||||
border: #d3d3d3 1px dotted ;
|
|
||||||
}
|
/* For tables with the "border" attribute set to "0" */
|
||||||
|
table[border="0"],
|
||||||
/* For tables with no "border" attribute set */
|
table[border="0"] > tr > td, table[border="0"] > tr > th,
|
||||||
table:not([border]),
|
table[border="0"] > tbody > tr > td, table[border="0"] > tbody > tr > th,
|
||||||
table:not([border]) > tr > td, table:not([border]) > tr > th,
|
table[border="0"] > thead > tr > td, table[border="0"] > thead > tr > th,
|
||||||
table:not([border]) > tbody > tr > td, table:not([border]) > tbody > tr > th,
|
table[border="0"] > tfoot > tr > td, table[border="0"] > tfoot > tr > th
|
||||||
table:not([border]) > thead > tr > td, table:not([border]) > thead > tr > th,
|
{
|
||||||
table:not([border]) > tfoot > tr > td, table:not([border]) > tfoot > tr > th
|
border: #d3d3d3 1px dotted ;
|
||||||
{
|
}
|
||||||
border: #d3d3d3 1px dotted ;
|
|
||||||
}
|
/* For tables with no "border" attribute set */
|
||||||
|
table:not([border]),
|
||||||
|
table:not([border]) > tr > td, table:not([border]) > tr > th,
|
||||||
|
table:not([border]) > tbody > tr > td, table:not([border]) > tbody > tr > th,
|
||||||
|
table:not([border]) > thead > tr > td, table:not([border]) > thead > tr > th,
|
||||||
|
table:not([border]) > tfoot > tr > td, table:not([border]) > tfoot > tr > th
|
||||||
|
{
|
||||||
|
border: #d3d3d3 1px dotted ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,79 +1,87 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_dialog_common.css
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the CSS file used for interface details in some dialog
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* windows.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
*/
|
* == END LICENSE ==
|
||||||
|
*
|
||||||
.ImagePreviewArea
|
* File Name: fck_dialog_common.css
|
||||||
{
|
* This is the CSS file used for interface details in some dialog
|
||||||
border: #000000 1px solid;
|
* windows.
|
||||||
overflow: auto;
|
*
|
||||||
width: 100%;
|
* File Authors:
|
||||||
height: 170px;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
background-color: #ffffff;
|
*/
|
||||||
}
|
|
||||||
|
.ImagePreviewArea
|
||||||
.FlashPreviewArea
|
{
|
||||||
{
|
border: #000000 1px solid;
|
||||||
border: #000000 1px solid;
|
overflow: auto;
|
||||||
padding: 5px;
|
width: 100%;
|
||||||
overflow: auto;
|
height: 170px;
|
||||||
width: 100%;
|
background-color: #ffffff;
|
||||||
height: 170px;
|
}
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
.FlashPreviewArea
|
||||||
|
{
|
||||||
.BtnReset
|
border: #000000 1px solid;
|
||||||
{
|
padding: 5px;
|
||||||
float: left;
|
overflow: auto;
|
||||||
background-position: center center;
|
width: 100%;
|
||||||
background-image: url(images/reset.gif);
|
height: 170px;
|
||||||
width: 16px;
|
background-color: #ffffff;
|
||||||
height: 16px;
|
}
|
||||||
background-repeat: no-repeat;
|
|
||||||
border: 1px none;
|
.BtnReset
|
||||||
font-size: 1px ;
|
{
|
||||||
}
|
float: left;
|
||||||
|
background-position: center center;
|
||||||
.BtnLocked, .BtnUnlocked
|
background-image: url(images/reset.gif);
|
||||||
{
|
width: 16px;
|
||||||
float: left;
|
height: 16px;
|
||||||
background-position: center center;
|
background-repeat: no-repeat;
|
||||||
background-image: url(images/locked.gif);
|
border: 1px none;
|
||||||
width: 16px;
|
font-size: 1px ;
|
||||||
height: 16px;
|
}
|
||||||
background-repeat: no-repeat;
|
|
||||||
border: none 1px;
|
.BtnLocked, .BtnUnlocked
|
||||||
font-size: 1px ;
|
{
|
||||||
}
|
float: left;
|
||||||
|
background-position: center center;
|
||||||
.BtnUnlocked
|
background-image: url(images/locked.gif);
|
||||||
{
|
width: 16px;
|
||||||
background-image: url(images/unlocked.gif);
|
height: 16px;
|
||||||
}
|
background-repeat: no-repeat;
|
||||||
|
border: none 1px;
|
||||||
.BtnOver
|
font-size: 1px ;
|
||||||
{
|
}
|
||||||
border: outset 1px;
|
|
||||||
cursor: pointer;
|
.BtnUnlocked
|
||||||
cursor: hand;
|
{
|
||||||
}
|
background-image: url(images/unlocked.gif);
|
||||||
|
}
|
||||||
.FCK__FieldNumeric
|
|
||||||
{
|
.BtnOver
|
||||||
behavior: url(common/fcknumericfield.htc) ;
|
{
|
||||||
|
border: outset 1px;
|
||||||
|
cursor: pointer;
|
||||||
|
cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FCK__FieldNumeric
|
||||||
|
{
|
||||||
|
behavior: url(common/fcknumericfield.htc) ;
|
||||||
}
|
}
|
||||||
@@ -1,137 +1,158 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_dialog_common.js
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Useful functions used by almost all dialog window pages.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
// Gets a element by its Id. Used for shorter coding.
|
*
|
||||||
function GetE( elementId )
|
* File Name: fck_dialog_common.js
|
||||||
{
|
* Useful functions used by almost all dialog window pages.
|
||||||
return document.getElementById( elementId ) ;
|
*
|
||||||
}
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
function ShowE( element, isVisible )
|
*/
|
||||||
{
|
|
||||||
if ( typeof( element ) == 'string' )
|
var GECKO_BOGUS = '<br type="_moz">' ;
|
||||||
element = GetE( element ) ;
|
|
||||||
element.style.display = isVisible ? '' : 'none' ;
|
// Gets a element by its Id. Used for shorter coding.
|
||||||
}
|
function GetE( elementId )
|
||||||
|
{
|
||||||
function SetAttribute( element, attName, attValue )
|
return document.getElementById( elementId ) ;
|
||||||
{
|
}
|
||||||
if ( attValue == null || attValue.length == 0 )
|
|
||||||
element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive
|
function ShowE( element, isVisible )
|
||||||
else
|
{
|
||||||
element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive
|
if ( typeof( element ) == 'string' )
|
||||||
}
|
element = GetE( element ) ;
|
||||||
|
element.style.display = isVisible ? '' : 'none' ;
|
||||||
function GetAttribute( element, attName, valueIfNull )
|
}
|
||||||
{
|
|
||||||
var oAtt = element.attributes[attName] ;
|
function SetAttribute( element, attName, attValue )
|
||||||
|
{
|
||||||
if ( oAtt == null || !oAtt.specified )
|
if ( attValue == null || attValue.length == 0 )
|
||||||
return valueIfNull ? valueIfNull : '' ;
|
element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive
|
||||||
|
else
|
||||||
var oValue ;
|
element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive
|
||||||
|
}
|
||||||
if ( !( oValue = element.getAttribute( attName, 2 ) ) )
|
|
||||||
oValue = oAtt.nodeValue ;
|
function GetAttribute( element, attName, valueIfNull )
|
||||||
|
{
|
||||||
return ( oValue == null ? valueIfNull : oValue ) ;
|
var oAtt = element.attributes[attName] ;
|
||||||
}
|
|
||||||
|
if ( oAtt == null || !oAtt.specified )
|
||||||
// Functions used by text fiels to accept numbers only.
|
return valueIfNull ? valueIfNull : '' ;
|
||||||
function IsDigit( e )
|
|
||||||
{
|
var oValue = element.getAttribute( attName, 2 ) ;
|
||||||
e = e || event ;
|
|
||||||
var iCode = ( e.keyCode || e.charCode ) ;
|
if ( oValue == null )
|
||||||
|
oValue = oAtt.nodeValue ;
|
||||||
event.returnValue =
|
|
||||||
(
|
return ( oValue == null ? valueIfNull : oValue ) ;
|
||||||
( iCode >= 48 && iCode <= 57 ) // Numbers
|
}
|
||||||
|| (iCode >= 37 && iCode <= 40) // Arrows
|
|
||||||
|| iCode == 8 // Backspace
|
// Functions used by text fiels to accept numbers only.
|
||||||
|| iCode == 46 // Delete
|
function IsDigit( e )
|
||||||
) ;
|
{
|
||||||
|
if ( !e )
|
||||||
return event.returnValue ;
|
e = event ;
|
||||||
}
|
|
||||||
|
var iCode = ( e.keyCode || e.charCode ) ;
|
||||||
String.prototype.trim = function()
|
|
||||||
{
|
return (
|
||||||
return this.replace( /(^\s*)|(\s*$)/g, '' ) ;
|
( iCode >= 48 && iCode <= 57 ) // Numbers
|
||||||
}
|
|| (iCode >= 37 && iCode <= 40) // Arrows
|
||||||
|
|| iCode == 8 // Backspace
|
||||||
String.prototype.startsWith = function( value )
|
|| iCode == 46 // Delete
|
||||||
{
|
) ;
|
||||||
return ( this.substr( 0, value.length ) == value ) ;
|
}
|
||||||
}
|
|
||||||
|
String.prototype.Trim = function()
|
||||||
String.prototype.remove = function( start, length )
|
{
|
||||||
{
|
return this.replace( /(^\s*)|(\s*$)/g, '' ) ;
|
||||||
var s = '' ;
|
}
|
||||||
|
|
||||||
if ( start > 0 )
|
String.prototype.StartsWith = function( value )
|
||||||
s = this.substring( 0, start ) ;
|
{
|
||||||
|
return ( this.substr( 0, value.length ) == value ) ;
|
||||||
if ( start + length < this.length )
|
}
|
||||||
s += this.substring( start + length , this.length ) ;
|
|
||||||
|
String.prototype.Remove = function( start, length )
|
||||||
return s ;
|
{
|
||||||
}
|
var s = '' ;
|
||||||
|
|
||||||
function OpenFileBrowser( url, width, height )
|
if ( start > 0 )
|
||||||
{
|
s = this.substring( 0, start ) ;
|
||||||
// oEditor must be defined.
|
|
||||||
|
if ( start + length < this.length )
|
||||||
var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ;
|
s += this.substring( start + length , this.length ) ;
|
||||||
var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ;
|
|
||||||
|
return s ;
|
||||||
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
|
}
|
||||||
sOptions += ",width=" + width ;
|
|
||||||
sOptions += ",height=" + height ;
|
String.prototype.ReplaceAll = function( searchArray, replaceArray )
|
||||||
sOptions += ",left=" + iLeft ;
|
{
|
||||||
sOptions += ",top=" + iTop ;
|
var replaced = this ;
|
||||||
|
|
||||||
// The "PreserveSessionOnFileBrowser" because the above code could be
|
for ( var i = 0 ; i < searchArray.length ; i++ )
|
||||||
// blocked by popup blockers.
|
{
|
||||||
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE )
|
replaced = replaced.replace( searchArray[i], replaceArray[i] ) ;
|
||||||
{
|
}
|
||||||
// The following change has been made otherwise IE will open the file
|
|
||||||
// browser on a different server session (on some cases):
|
return replaced ;
|
||||||
// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
|
}
|
||||||
// by Simone Chiaretta.
|
|
||||||
var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ;
|
function OpenFileBrowser( url, width, height )
|
||||||
|
{
|
||||||
if ( oWindow )
|
// oEditor must be defined.
|
||||||
{
|
|
||||||
// Detect Yahoo popup blocker.
|
var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ;
|
||||||
try
|
var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ;
|
||||||
{
|
|
||||||
var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user.
|
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ;
|
||||||
oWindow.opener = window ;
|
sOptions += ",width=" + width ;
|
||||||
}
|
sOptions += ",height=" + height ;
|
||||||
catch(e)
|
sOptions += ",left=" + iLeft ;
|
||||||
{
|
sOptions += ",top=" + iTop ;
|
||||||
alert( oEditor.FCKLang.BrowseServerBlocked ) ;
|
|
||||||
}
|
// The "PreserveSessionOnFileBrowser" because the above code could be
|
||||||
}
|
// blocked by popup blockers.
|
||||||
else
|
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE )
|
||||||
alert( oEditor.FCKLang.BrowseServerBlocked ) ;
|
{
|
||||||
}
|
// The following change has been made otherwise IE will open the file
|
||||||
else
|
// browser on a different server session (on some cases):
|
||||||
window.open( url, 'FCKBrowseWindow', sOptions ) ;
|
// 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 ) ;
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
<public:component lightweight="true">
|
<public:component lightweight="true">
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
|
|
||||||
function CheckIsDigit()
|
function CheckIsDigit()
|
||||||
{
|
{
|
||||||
var iCode = event.keyCode ;
|
var iCode = event.keyCode ;
|
||||||
|
|
||||||
event.returnValue =
|
event.returnValue =
|
||||||
(
|
(
|
||||||
( iCode >= 48 && iCode <= 57 ) // Numbers
|
( iCode >= 48 && iCode <= 57 ) // Numbers
|
||||||
|| (iCode >= 37 && iCode <= 40) // Arrows
|
|| (iCode >= 37 && iCode <= 40) // Arrows
|
||||||
|| iCode == 8 // Backspace
|
|| iCode == 8 // Backspace
|
||||||
|| iCode == 46 // Delete
|
|| iCode == 46 // Delete
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
return event.returnValue ;
|
return event.returnValue ;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onkeypress = CheckIsDigit ;
|
this.onkeypress = CheckIsDigit ;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</public:component>
|
</public:component>
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<bindings xmlns="http://www.mozilla.org/xbl">
|
<bindings xmlns="http://www.mozilla.org/xbl">
|
||||||
<binding id="numericfield">
|
<binding id="numericfield">
|
||||||
<implementation>
|
<implementation>
|
||||||
<constructor>
|
<constructor>
|
||||||
this.keypress = CheckIsDigit ;
|
this.keypress = CheckIsDigit ;
|
||||||
</constructor>
|
</constructor>
|
||||||
<method name="CheckIsDigit">
|
<method name="CheckIsDigit">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var iCode = keyCode ;
|
var iCode = keyCode ;
|
||||||
|
|
||||||
var bAccepted =
|
var bAccepted =
|
||||||
(
|
(
|
||||||
( iCode >= 48 && iCode <= 57 ) // Numbers
|
( iCode >= 48 && iCode <= 57 ) // Numbers
|
||||||
|| (iCode >= 37 && iCode <= 40) // Arrows
|
|| (iCode >= 37 && iCode <= 40) // Arrows
|
||||||
|| iCode == 8 // Backspace
|
|| iCode == 8 // Backspace
|
||||||
|| iCode == 46 // Delete
|
|| iCode == 46 // Delete
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
return bAccepted ;
|
return bAccepted ;
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
</implementation>
|
</implementation>
|
||||||
<events>
|
<events>
|
||||||
<event type="keypress" value="CheckIsDigit()" />
|
<event type="keypress" value="CheckIsDigit()" />
|
||||||
</events>
|
</events>
|
||||||
</binding>
|
</binding>
|
||||||
</bindings>
|
</bindings>
|
||||||
@@ -1,145 +1,159 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_about.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* "About" dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* File Name: fck_about.html
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* "About" dialog window.
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
*
|
||||||
<script language="javascript">
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
-->
|
||||||
var FCKLang = oEditor.FCKLang ;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
window.parent.AddTab( 'About', FCKLang.DlgAboutAboutTab ) ;
|
<title></title>
|
||||||
window.parent.AddTab( 'License', FCKLang.DlgAboutLicenseTab ) ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
window.parent.AddTab( 'BrowserInfo', FCKLang.DlgAboutBrowserInfoTab ) ;
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
// Function called when a dialog tag is selected.
|
<script type="text/javascript">
|
||||||
function OnDialogTabChange( tabCode )
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
ShowE('divAbout', ( tabCode == 'About' ) ) ;
|
var FCKLang = oEditor.FCKLang ;
|
||||||
ShowE('divLicense', ( tabCode == 'License' ) ) ;
|
|
||||||
ShowE('divInfo' , ( tabCode == 'BrowserInfo' ) ) ;
|
window.parent.AddTab( 'About', FCKLang.DlgAboutAboutTab ) ;
|
||||||
}
|
window.parent.AddTab( 'License', FCKLang.DlgAboutLicenseTab ) ;
|
||||||
|
window.parent.AddTab( 'BrowserInfo', FCKLang.DlgAboutBrowserInfoTab ) ;
|
||||||
function SendEMail()
|
|
||||||
{
|
// Function called when a dialog tag is selected.
|
||||||
var eMail = 'mailto:' ;
|
function OnDialogTabChange( tabCode )
|
||||||
eMail += 'fredck' ;
|
{
|
||||||
eMail += '@' ;
|
ShowE('divAbout', ( tabCode == 'About' ) ) ;
|
||||||
eMail += 'fckeditor' ;
|
ShowE('divLicense', ( tabCode == 'License' ) ) ;
|
||||||
eMail += '.' ;
|
ShowE('divInfo' , ( tabCode == 'BrowserInfo' ) ) ;
|
||||||
eMail += 'net' ;
|
}
|
||||||
|
|
||||||
window.location = eMail ;
|
function SendEMail()
|
||||||
}
|
{
|
||||||
|
var eMail = 'mailto:' ;
|
||||||
window.onload = function()
|
eMail += 'fredck' ;
|
||||||
{
|
eMail += '@' ;
|
||||||
// Translate the dialog box texts.
|
eMail += 'fckeditor' ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
eMail += '.' ;
|
||||||
|
eMail += 'net' ;
|
||||||
window.parent.SetAutoSize( true ) ;
|
|
||||||
}
|
window.location = eMail ;
|
||||||
|
}
|
||||||
</script>
|
|
||||||
</head>
|
window.onload = function()
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
{
|
||||||
<div id="divAbout">
|
// Translate the dialog box texts.
|
||||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
<tr>
|
|
||||||
<td>
|
window.parent.SetAutoSize( true ) ;
|
||||||
<img alt="" src="fck_about/logo_fckeditor.gif" width="236" height="41" align="left">
|
}
|
||||||
<table width="80" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffffff" align="right">
|
|
||||||
<tr>
|
</script>
|
||||||
<td align="center" nowrap style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid">
|
</head>
|
||||||
<span fckLang="DlgAboutVersion">version</span>
|
<body style="overflow: hidden">
|
||||||
<br>
|
<div id="divAbout">
|
||||||
<b>2.3.1</b><br />
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="height: 100%">
|
||||||
Build 1062</td>
|
<tr>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<img alt="" src="fck_about/logo_fckeditor.gif" width="236" height="41" align="left" />
|
||||||
</td>
|
<table width="80" border="0" cellspacing="0" cellpadding="5" bgcolor="#ffffff" align="right">
|
||||||
</tr>
|
<tr>
|
||||||
<tr height="100%">
|
<td align="center" nowrap="nowrap" style="border-right: #000000 1px solid; border-top: #000000 1px solid;
|
||||||
<td align="center">
|
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
|
||||||
<br>
|
<span fcklang="DlgAboutVersion">version</span>
|
||||||
<span style="FONT-SIZE: 14px" dir="ltr">Support <b>Open Source</b> software.<br>
|
<br />
|
||||||
<b><a href="http://www.fckeditor.net/donate/?about" target="_blank" title="Click to go to the donation page">
|
<b>2.4</b><br />
|
||||||
What about a donation today?</a></b> </span>
|
Build 1148</td>
|
||||||
<br><br><br>
|
</tr>
|
||||||
<span fckLang="DlgAboutInfo">For further information go to</span> <a href="http://www.fckeditor.net/?About" target="_blank">
|
</table>
|
||||||
http://www.fckeditor.net/</a>.
|
</td>
|
||||||
<br>
|
</tr>
|
||||||
Copyright © 2003-2006 <a href="#" onclick="SendEMail();">Frederico Caldeira
|
<tr style="height: 100%">
|
||||||
Knabben</a>
|
<td align="center">
|
||||||
</td>
|
<br />
|
||||||
</tr>
|
<span style="font-size: 14px" dir="ltr">
|
||||||
<tr>
|
<br />
|
||||||
<td align="center">
|
<b><a href="http://www.fckeditor.net/?about" target="_blank" title="Visit the FCKeditor web site">
|
||||||
<img alt="" src="fck_about/logo_fredck.gif" width="87" height="36">
|
Support <b>Open Source</b> Software</a></b> </span>
|
||||||
</td>
|
<br />
|
||||||
</tr>
|
<br />
|
||||||
</table>
|
<br />
|
||||||
</div>
|
<span fcklang="DlgAboutInfo">For further information go to</span> <a href="http://www.fckeditor.net/?About"
|
||||||
<div id="divLicense" style="DISPLAY: none">
|
target="_blank">http://www.fckeditor.net/</a>.
|
||||||
<table height="100%" width="100%">
|
<br />
|
||||||
<tr>
|
Copyright © 2003-2007 <a href="#" onclick="SendEMail();">Frederico Caldeira Knabben</a>
|
||||||
<td>
|
</td>
|
||||||
<span fckLang="DlgAboutLicense">Licensed under the terms of the GNU Lesser General
|
</tr>
|
||||||
Public License</span>
|
<tr>
|
||||||
<br>
|
<td align="center">
|
||||||
<a href="http://www.opensource.org/licenses/lgpl-license.php" target="_blank">http://www.opensource.org/licenses/lgpl-license.php</a>
|
<img alt="" src="fck_about/logo_fredck.gif" width="87" height="36" />
|
||||||
<br>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
</div>
|
||||||
<td height="100%">
|
<div id="divLicense" style="display: none">
|
||||||
<iframe height="100%" width="100%" src="fck_about/lgpl.html"></iframe>
|
<p>
|
||||||
</td>
|
Licensed under the terms of any of the following licenses at your
|
||||||
</tr>
|
choice:
|
||||||
</table>
|
</p>
|
||||||
</div>
|
<ul>
|
||||||
<div id="divInfo" style="DISPLAY: none" dir="ltr">
|
<li style="margin-bottom:15px">
|
||||||
<table align="center" width="80%" border="0">
|
<b>GNU General Public License</b> Version 2 or later (the "GPL")<br />
|
||||||
<tr>
|
<a href="http://www.gnu.org/licenses/gpl.html" target="_blank">http://www.gnu.org/licenses/gpl.html</a>
|
||||||
<td>
|
</li>
|
||||||
<script language="javascript">
|
<li style="margin-bottom:15px">
|
||||||
<!--
|
<b>GNU Lesser General Public License</b> Version 2.1 or later (the "LGPL")<br />
|
||||||
document.write( '<b>User Agent<\/b><br>' + window.navigator.userAgent + '<br><br>' ) ;
|
<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>
|
||||||
document.write( '<b>Browser<\/b><br>' + window.navigator.appName + ' ' + window.navigator.appVersion + '<br><br>' ) ;
|
</li>
|
||||||
document.write( '<b>Platform<\/b><br>' + window.navigator.platform + '<br><br>' ) ;
|
<li>
|
||||||
|
<b>Mozilla Public License</b> Version 1.1 or later (the "MPL")<br />
|
||||||
var sUserLang = '?' ;
|
<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>
|
||||||
|
</li>
|
||||||
if ( window.navigator.language )
|
</ul>
|
||||||
sUserLang = window.navigator.language.toLowerCase() ;
|
</div>
|
||||||
else if ( window.navigator.userLanguage )
|
<div id="divInfo" style="display: none" dir="ltr">
|
||||||
sUserLang = window.navigator.userLanguage.toLowerCase() ;
|
<table align="center" width="80%" border="0">
|
||||||
|
<tr>
|
||||||
document.write( '<b>User Language<\/b><br>' + sUserLang ) ;
|
<td>
|
||||||
//-->
|
<script type="text/javascript">
|
||||||
</script>
|
<!--
|
||||||
</td>
|
document.write( '<b>User Agent<\/b><br />' + window.navigator.userAgent + '<br /><br />' ) ;
|
||||||
</tr>
|
document.write( '<b>Browser<\/b><br />' + window.navigator.appName + ' ' + window.navigator.appVersion + '<br /><br />' ) ;
|
||||||
</table>
|
document.write( '<b>Platform<\/b><br />' + window.navigator.platform + '<br /><br />' ) ;
|
||||||
</div>
|
|
||||||
</body>
|
var sUserLang = '?' ;
|
||||||
</html>
|
|
||||||
|
if ( window.navigator.language )
|
||||||
|
sUserLang = window.navigator.language.toLowerCase() ;
|
||||||
|
else if ( window.navigator.userLanguage )
|
||||||
|
sUserLang = window.navigator.userLanguage.toLowerCase() ;
|
||||||
|
|
||||||
|
document.write( '<b>User Language<\/b><br />' + sUserLang ) ;
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,434 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>GNU Lesser General Public License</title>
|
|
||||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
|
||||||
<STYLE>
|
|
||||||
BODY { FONT-SIZE: 12px }
|
|
||||||
</STYLE>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<H3>GNU Lesser General Public License</H3>
|
|
||||||
<TT>
|
|
||||||
<P>Version 2.1, February 1999</P>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<P>Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite
|
|
||||||
330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute
|
|
||||||
verbatim copies of this license document, but changing it is not allowed.</P>
|
|
||||||
<P>[This is the first released version of the Lesser GPL. It also counts as the
|
|
||||||
successor of the GNU Library Public License, version 2, hence the version
|
|
||||||
number 2.1.]</P>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<H4>Preamble</H4>
|
|
||||||
<P>The licenses for most software are designed to take away your freedom to share
|
|
||||||
and change it. By contrast, the GNU General Public Licenses are intended to
|
|
||||||
guarantee your freedom to share and change free software--to make sure the
|
|
||||||
software is free for all its users.
|
|
||||||
</P>
|
|
||||||
<P>This license, the Lesser General Public License, applies to some specially
|
|
||||||
designated software packages--typically libraries--of the Free Software
|
|
||||||
Foundation and other authors who decide to use it. You can use it too, but we
|
|
||||||
suggest you first think carefully about whether this license or the ordinary
|
|
||||||
General Public License is the better strategy to use in any particular case,
|
|
||||||
based on the explanations below.
|
|
||||||
</P>
|
|
||||||
<P>When we speak of free software, we are referring to freedom of use, not price.
|
|
||||||
Our General Public Licenses are designed to make sure that you have the freedom
|
|
||||||
to distribute copies of free software (and charge for this service if you
|
|
||||||
wish); that you receive source code or can get it if you want it; that you can
|
|
||||||
change the software and use pieces of it in new free programs; and that you are
|
|
||||||
informed that you can do these things.</P>
|
|
||||||
<P>To protect your rights, we need to make restrictions that forbid distributors to
|
|
||||||
deny you these rights or to ask you to surrender these rights. These
|
|
||||||
restrictions translate to certain responsibilities for you if you distribute
|
|
||||||
copies of the library or if you modify it.
|
|
||||||
</P>
|
|
||||||
<P>For example, if you distribute copies of the library, whether gratis or for a
|
|
||||||
fee, you must give the recipients all the rights that we gave you. You must
|
|
||||||
make sure that they, too, receive or can get the source code. If you link other
|
|
||||||
code with the library, you must provide complete object files to the
|
|
||||||
recipients, so that they can relink them with the library after making changes
|
|
||||||
to the library and recompiling it. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
</P>
|
|
||||||
<P>We protect your rights with a two-step method: (1) we copyright the library, and
|
|
||||||
(2) we offer you this license, which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the library.
|
|
||||||
</P>
|
|
||||||
<P>To protect each distributor, we want to make it very clear that there is no
|
|
||||||
warranty for the free library. Also, if the library is modified by someone else
|
|
||||||
and passed on, the recipients should know that what they have is not the
|
|
||||||
original version, so that the original author's reputation will not be affected
|
|
||||||
by problems that might be introduced by others.
|
|
||||||
</P>
|
|
||||||
<P>Finally, software patents pose a constant threat to the existence of any free
|
|
||||||
program. We wish to make sure that a company cannot effectively restrict the
|
|
||||||
users of a free program by obtaining a restrictive license from a patent
|
|
||||||
holder. Therefore, we insist that any patent license obtained for a version of
|
|
||||||
the library must be consistent with the full freedom of use specified in this
|
|
||||||
license.
|
|
||||||
</P>
|
|
||||||
<P>Most GNU software, including some libraries, is covered by the ordinary GNU
|
|
||||||
General Public License. This license, the GNU Lesser General Public License,
|
|
||||||
applies to certain designated libraries, and is quite different from the
|
|
||||||
ordinary General Public License. We use this license for certain libraries in
|
|
||||||
order to permit linking those libraries into non-free programs.
|
|
||||||
</P>
|
|
||||||
<P>When a program is linked with a library, whether statically or using a shared
|
|
||||||
library, the combination of the two is legally speaking a combined work, a
|
|
||||||
derivative of the original library. The ordinary General Public License
|
|
||||||
therefore permits such linking only if the entire combination fits its criteria
|
|
||||||
of freedom. The Lesser General Public License permits more lax criteria for
|
|
||||||
linking other code with the library.
|
|
||||||
</P>
|
|
||||||
<P>We call this license the "Lesser" General Public License because it does Less to
|
|
||||||
protect the user's freedom than the ordinary General Public License. It also
|
|
||||||
provides other free software developers Less of an advantage over competing
|
|
||||||
non-free programs. These disadvantages are the reason we use the ordinary
|
|
||||||
General Public License for many libraries. However, the Lesser license provides
|
|
||||||
advantages in certain special circumstances.
|
|
||||||
</P>
|
|
||||||
<P>For example, on rare occasions, there may be a special need to encourage the
|
|
||||||
widest possible use of a certain library, so that it becomes a de-facto
|
|
||||||
standard. To achieve this, non-free programs must be allowed to use the
|
|
||||||
library. A more frequent case is that a free library does the same job as
|
|
||||||
widely used non-free libraries. In this case, there is little to gain by
|
|
||||||
limiting the free library to free software only, so we use the Lesser General
|
|
||||||
Public License.
|
|
||||||
</P>
|
|
||||||
<P>In other cases, permission to use a particular library in non-free programs
|
|
||||||
enables a greater number of people to use a large body of free software. For
|
|
||||||
example, permission to use the GNU C Library in non-free programs enables many
|
|
||||||
more people to use the whole GNU operating system, as well as its variant, the
|
|
||||||
GNU/Linux operating system.
|
|
||||||
</P>
|
|
||||||
<P>Although the Lesser General Public License is Less protective of the users'
|
|
||||||
freedom, it does ensure that the user of a program that is linked with the
|
|
||||||
Library has the freedom and the wherewithal to run that program using a
|
|
||||||
modified version of the Library.
|
|
||||||
</P>
|
|
||||||
<P>The precise terms and conditions for copying, distribution and modification
|
|
||||||
follow. Pay close attention to the difference between a "work based on the
|
|
||||||
library" and a "work that uses the library". The former contains code derived
|
|
||||||
from the library, whereas the latter must be combined with the library in order
|
|
||||||
to run.
|
|
||||||
</P>
|
|
||||||
<H4>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</H4>
|
|
||||||
<P><STRONG>0.</STRONG> This License Agreement applies to any software library or
|
|
||||||
other program which contains a notice placed by the copyright holder or other
|
|
||||||
authorized party saying it may be distributed under the terms of this Lesser
|
|
||||||
General Public License (also called "this License"). Each licensee is addressed
|
|
||||||
as "you".</P>
|
|
||||||
<P>A "library" means a collection of software functions and/or data prepared so as
|
|
||||||
to be conveniently linked with application programs (which use some of those
|
|
||||||
functions and data) to form executables.
|
|
||||||
</P>
|
|
||||||
<P>The "Library", below, refers to any such software library or work which has been
|
|
||||||
distributed under these terms. A "work based on the Library" means either the
|
|
||||||
Library or any derivative work under copyright law: that is to say, a work
|
|
||||||
containing the Library or a portion of it, either verbatim or with
|
|
||||||
modifications and/or translated straightforwardly into another language.
|
|
||||||
(Hereinafter, translation is included without limitation in the term
|
|
||||||
"modification".)
|
|
||||||
</P>
|
|
||||||
<P>"Source code" for a work means the preferred form of the work for making
|
|
||||||
modifications to it. For a library, complete source code means all the source
|
|
||||||
code for all modules it contains, plus any associated interface definition
|
|
||||||
files, plus the scripts used to control compilation and installation of the
|
|
||||||
library.</P>
|
|
||||||
<P>Activities other than copying, distribution and modification are not covered by
|
|
||||||
this License; they are outside its scope. The act of running a program using
|
|
||||||
the Library is not restricted, and output from such a program is covered only
|
|
||||||
if its contents constitute a work based on the Library (independent of the use
|
|
||||||
of the Library in a tool for writing it). Whether that is true depends on what
|
|
||||||
the Library does and what the program that uses the Library does.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>1.</STRONG> You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate copyright
|
|
||||||
notice and disclaimer of warranty; keep intact all the notices that refer to
|
|
||||||
this License and to the absence of any warranty; and distribute a copy of this
|
|
||||||
License along with the Library.
|
|
||||||
</P>
|
|
||||||
<P>You may charge a fee for the physical act of transferring a copy, and you may at
|
|
||||||
your option offer warranty protection in exchange for a fee.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>2.</STRONG> You may modify your copy or copies of the Library or any
|
|
||||||
portion of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1 above,
|
|
||||||
provided that you also meet all of these conditions:
|
|
||||||
</P>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<P>a) The modified work must itself be a software library.
|
|
||||||
</P>
|
|
||||||
<P>b) You must cause the files modified to carry prominent notices stating that you
|
|
||||||
changed the files and the date of any change.</P>
|
|
||||||
<P>c) You must cause the whole of the work to be licensed at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
</P>
|
|
||||||
<P>d) If a facility in the modified Library refers to a function or a table of data
|
|
||||||
to be supplied by an application program that uses the facility, other than as
|
|
||||||
an argument passed when the facility is invoked, then you must make a good
|
|
||||||
faith effort to ensure that, in the event an application does not supply such
|
|
||||||
function or table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
</P>
|
|
||||||
<P>(For example, a function in a library to compute square roots has a purpose that
|
|
||||||
is entirely well-defined independent of the application. Therefore, Subsection
|
|
||||||
2d requires that any application-supplied function or table used by this
|
|
||||||
function must be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
</P>
|
|
||||||
<P>These requirements apply to the modified work as a whole. If identifiable
|
|
||||||
sections of that work are not derived from the Library, and can be reasonably
|
|
||||||
considered independent and separate works in themselves, then this License, and
|
|
||||||
its terms, do not apply to those sections when you distribute them as separate
|
|
||||||
works. But when you distribute the same sections as part of a whole which is a
|
|
||||||
work based on the Library, the distribution of the whole must be on the terms
|
|
||||||
of this License, whose permissions for other licensees extend to the entire
|
|
||||||
whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
</P>
|
|
||||||
<P>Thus, it is not the intent of this section to claim rights or contest your
|
|
||||||
rights to work written entirely by you; rather, the intent is to exercise the
|
|
||||||
right to control the distribution of derivative or collective works based on
|
|
||||||
the Library.
|
|
||||||
</P>
|
|
||||||
<P>In addition, mere aggregation of another work not based on the Library with the
|
|
||||||
Library (or with a work based on the Library) on a volume of a storage or
|
|
||||||
distribution medium does not bring the other work under the scope of this
|
|
||||||
License.
|
|
||||||
</P>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P><STRONG>3.</STRONG> You may opt to apply the terms of the ordinary GNU General
|
|
||||||
Public License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so that they
|
|
||||||
refer to the ordinary GNU General Public License, version 2, instead of to this
|
|
||||||
License. (If a newer version than version 2 of the ordinary GNU General Public
|
|
||||||
License has appeared, then you can specify that version instead if you wish.)
|
|
||||||
Do not make any other change in these notices.
|
|
||||||
</P>
|
|
||||||
<P>Once this change is made in a given copy, it is irreversible for that copy, so
|
|
||||||
the ordinary GNU General Public License applies to all subsequent copies and
|
|
||||||
derivative works made from that copy.
|
|
||||||
</P>
|
|
||||||
<P>This option is useful when you wish to copy part of the code of the Library into
|
|
||||||
a program that is not a library.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>4.</STRONG> You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form under the
|
|
||||||
terms of Sections 1 and 2 above provided that you accompany it with the
|
|
||||||
complete corresponding machine-readable source code, which must be distributed
|
|
||||||
under the terms of Sections 1 and 2 above on a medium customarily used for
|
|
||||||
software interchange.
|
|
||||||
</P>
|
|
||||||
<P>If distribution of object code is made by offering access to copy from a
|
|
||||||
designated place, then offering equivalent access to copy the source code from
|
|
||||||
the same place satisfies the requirement to distribute the source code, even
|
|
||||||
though third parties are not compelled to copy the source along with the object
|
|
||||||
code.</P>
|
|
||||||
<P><STRONG>5.</STRONG> A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or linked
|
|
||||||
with it, is called a "work that uses the Library". Such a work, in isolation,
|
|
||||||
is not a derivative work of the Library, and therefore falls outside the scope
|
|
||||||
of this License.
|
|
||||||
</P>
|
|
||||||
<P>However, linking a "work that uses the Library" with the Library creates an
|
|
||||||
executable that is a derivative of the Library (because it contains portions of
|
|
||||||
the Library), rather than a "work that uses the library". The executable is
|
|
||||||
therefore covered by this License. Section 6 states terms for distribution of
|
|
||||||
such executables.
|
|
||||||
</P>
|
|
||||||
<P>When a "work that uses the Library" uses material from a header file that is
|
|
||||||
part of the Library, the object code for the work may be a derivative work of
|
|
||||||
the Library even though the source code is not. Whether this is true is
|
|
||||||
especially significant if the work can be linked without the Library, or if the
|
|
||||||
work is itself a library. The threshold for this to be true is not precisely
|
|
||||||
defined by law.
|
|
||||||
</P>
|
|
||||||
<P>If such an object file uses only numerical parameters, data structure layouts
|
|
||||||
and accessors, and small macros and small inline functions (ten lines or less
|
|
||||||
in length), then the use of the object file is unrestricted, regardless of
|
|
||||||
whether it is legally a derivative work. (Executables containing this object
|
|
||||||
code plus portions of the Library will still fall under Section 6.)
|
|
||||||
</P>
|
|
||||||
<P>Otherwise, if the work is a derivative of the Library, you may distribute the
|
|
||||||
object code for the work under the terms of Section 6. Any executables
|
|
||||||
containing that work also fall under Section 6, whether or not they are linked
|
|
||||||
directly with the Library itself.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>6.</STRONG> As an exception to the Sections above, you may also combine
|
|
||||||
or link a "work that uses the Library" with the Library to produce a work
|
|
||||||
containing portions of the Library, and distribute that work under terms of
|
|
||||||
your choice, provided that the terms permit modification of the work for the
|
|
||||||
customer's own use and reverse engineering for debugging such modifications.
|
|
||||||
</P>
|
|
||||||
<P>You must give prominent notice with each copy of the work that the Library is
|
|
||||||
used in it and that the Library and its use are covered by this License. You
|
|
||||||
must supply a copy of this License. If the work during execution displays
|
|
||||||
copyright notices, you must include the copyright notice for the Library among
|
|
||||||
them, as well as a reference directing the user to the copy of this License.
|
|
||||||
Also, you must do one of these things:
|
|
||||||
</P>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<P>a) Accompany the work with the complete corresponding machine-readable source
|
|
||||||
code for the Library including whatever changes were used in the work (which
|
|
||||||
must be distributed under Sections 1 and 2 above); and, if the work is an
|
|
||||||
executable linked with the Library, with the complete machine-readable "work
|
|
||||||
that uses the Library", as object code and/or source code, so that the user can
|
|
||||||
modify the Library and then relink to produce a modified executable containing
|
|
||||||
the modified Library. (It is understood that the user who changes the contents
|
|
||||||
of definitions files in the Library will not necessarily be able to recompile
|
|
||||||
the application to use the modified definitions.)
|
|
||||||
</P>
|
|
||||||
<P>b) Use a suitable shared library mechanism for linking with the Library. A
|
|
||||||
suitable mechanism is one that (1) uses at run time a copy of the library
|
|
||||||
already present on the user's computer system, rather than copying library
|
|
||||||
functions into the executable, and (2) will operate properly with a modified
|
|
||||||
version of the library, if the user installs one, as long as the modified
|
|
||||||
version is interface-compatible with the version that the work was made with.
|
|
||||||
</P>
|
|
||||||
<P>c) Accompany the work with a written offer, valid for at least three years, to
|
|
||||||
give the same user the materials specified in Subsection 6a, above, for a
|
|
||||||
charge no more than the cost of performing this distribution.
|
|
||||||
</P>
|
|
||||||
<P>d) If distribution of the work is made by offering access to copy from a
|
|
||||||
designated place, offer equivalent access to copy the above specified materials
|
|
||||||
from the same place.
|
|
||||||
</P>
|
|
||||||
<P>e) Verify that the user has already received a copy of these materials or that
|
|
||||||
you have already sent this user a copy.</P>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>For an executable, the required form of the "work that uses the Library" must
|
|
||||||
include any data and utility programs needed for reproducing the executable
|
|
||||||
from it. However, as a special exception, the materials to be distributed need
|
|
||||||
not include anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the operating
|
|
||||||
system on which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
</P>
|
|
||||||
<P>It may happen that this requirement contradicts the license restrictions of
|
|
||||||
other proprietary libraries that do not normally accompany the operating
|
|
||||||
system. Such a contradiction means you cannot use both them and the Library
|
|
||||||
together in an executable that you distribute.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>7.</STRONG> You may place library facilities that are a work based on
|
|
||||||
the Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined library,
|
|
||||||
provided that the separate distribution of the work based on the Library and of
|
|
||||||
the other library facilities is otherwise permitted, and provided that you do
|
|
||||||
these two things:
|
|
||||||
</P>
|
|
||||||
<BLOCKQUOTE>
|
|
||||||
<P>a) Accompany the combined library with a copy of the same work based on the
|
|
||||||
Library, uncombined with any other library facilities. This must be distributed
|
|
||||||
under the terms of the Sections above.
|
|
||||||
</P>
|
|
||||||
<P>b) Give prominent notice with the combined library of the fact that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the accompanying
|
|
||||||
uncombined form of the same work.</P>
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P><STRONG>8.</STRONG> You may not copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or distribute the
|
|
||||||
Library is void, and will automatically terminate your rights under this
|
|
||||||
License. However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such parties
|
|
||||||
remain in full compliance.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>9.</STRONG> You are not required to accept this License, since you have
|
|
||||||
not signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are prohibited by
|
|
||||||
law if you do not accept this License. Therefore, by modifying or distributing
|
|
||||||
the Library (or any work based on the Library), you indicate your acceptance of
|
|
||||||
this License to do so, and all its terms and conditions for copying,
|
|
||||||
distributing or modifying the Library or works based on it.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>10.</STRONG> Each time you redistribute the Library (or any work based
|
|
||||||
on the Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library subject
|
|
||||||
to these terms and conditions. You may not impose any further restrictions on
|
|
||||||
the recipients' exercise of the rights granted herein. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>11.</STRONG> If, as a consequence of a court judgment or allegation of
|
|
||||||
patent infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or otherwise)
|
|
||||||
that contradict the conditions of this License, they do not excuse you from the
|
|
||||||
conditions of this License. If you cannot distribute so as to satisfy
|
|
||||||
simultaneously your obligations under this License and any other pertinent
|
|
||||||
obligations, then as a consequence you may not distribute the Library at all.
|
|
||||||
For example, if a patent license would not permit royalty-free redistribution
|
|
||||||
of the Library by all those who receive copies directly or indirectly through
|
|
||||||
you, then the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
</P>
|
|
||||||
<P>If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply, and
|
|
||||||
the section as a whole is intended to apply in other circumstances.
|
|
||||||
</P>
|
|
||||||
<P>It is not the purpose of this section to induce you to infringe any patents or
|
|
||||||
other property right claims or to contest validity of any such claims; this
|
|
||||||
section has the sole purpose of protecting the integrity of the free software
|
|
||||||
distribution system which is implemented by public license practices. Many
|
|
||||||
people have made generous contributions to the wide range of software
|
|
||||||
distributed through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing to
|
|
||||||
distribute software through any other system and a licensee cannot impose that
|
|
||||||
choice.
|
|
||||||
</P>
|
|
||||||
<P>This section is intended to make thoroughly clear what is believed to be a
|
|
||||||
consequence of the rest of this License.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>12.</STRONG> If the distribution and/or use of the Library is restricted
|
|
||||||
in certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add an
|
|
||||||
explicit geographical distribution limitation excluding those countries, so
|
|
||||||
that distribution is permitted only in or among countries not thus excluded. In
|
|
||||||
such case, this License incorporates the limitation as if written in the body
|
|
||||||
of this License.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>13.</STRONG> The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may differ in
|
|
||||||
detail to address new problems or concerns.</P>
|
|
||||||
<P>Each version is given a distinguishing version number. If the Library specifies
|
|
||||||
a version number of this License which applies to it and "any later version",
|
|
||||||
you have the option of following the terms and conditions either of that
|
|
||||||
version or of any later version published by the Free Software Foundation. If
|
|
||||||
the Library does not specify a license version number, you may choose any
|
|
||||||
version ever published by the Free Software Foundation.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>14.</STRONG> If you wish to incorporate parts of the Library into other
|
|
||||||
free programs whose distribution conditions are incompatible with these, write
|
|
||||||
to the author to ask for permission. For software which is copyrighted by the
|
|
||||||
Free Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals of
|
|
||||||
preserving the free status of all derivatives of our free software and of
|
|
||||||
promoting the sharing and reuse of software generally.
|
|
||||||
</P>
|
|
||||||
<P>NO WARRANTY
|
|
||||||
</P>
|
|
||||||
<P><STRONG>15. </STRONG>BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
|
|
||||||
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
|
|
||||||
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
|
|
||||||
QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE
|
|
||||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
|
||||||
CORRECTION.
|
|
||||||
</P>
|
|
||||||
<P><STRONG>16.</STRONG> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO
|
|
||||||
IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT
|
|
||||||
OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS
|
|
||||||
OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN
|
|
||||||
IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
</P>
|
|
||||||
<H4><STRONG>END OF TERMS AND CONDITIONS</STRONG></H4>
|
|
||||||
</TT>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,98 +1,232 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_anchor.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Anchor dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Anchor Properties</title>
|
* File Name: fck_anchor.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Anchor dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
* Alfonso Martinez de Lizarrondo - Uritec (alfonso at uritec dot net)
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
-->
|
||||||
var FCK = oEditor.FCK ;
|
<html>
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Anchor Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta content="noindex, nofollow" name="robots">
|
||||||
var oFakeImage = FCK.Selection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
var oAnchor ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
if ( oFakeImage )
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
{
|
var FCK = oEditor.FCK ;
|
||||||
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') )
|
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
|
||||||
oAnchor = FCK.GetRealElement( oFakeImage ) ;
|
var FCKTools = oEditor.FCKTools ;
|
||||||
else
|
var FCKRegexLib = oEditor.FCKRegexLib ;
|
||||||
oFakeImage = null ;
|
|
||||||
}
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
window.onload = function()
|
|
||||||
{
|
var oFakeImage = FCK.Selection.GetSelectedElement() ;
|
||||||
// First of all, translate the dialog box texts
|
var oAnchor ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
|
||||||
|
if ( oFakeImage )
|
||||||
if ( oAnchor )
|
{
|
||||||
GetE('txtName').value = oAnchor.name ;
|
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') )
|
||||||
else
|
oAnchor = FCK.GetRealElement( oFakeImage ) ;
|
||||||
oAnchor = null ;
|
else
|
||||||
|
oFakeImage = null ;
|
||||||
window.parent.SetOkButton( true ) ;
|
}
|
||||||
}
|
|
||||||
|
//Search for a real anchor
|
||||||
function Ok()
|
if ( !oFakeImage )
|
||||||
{
|
{
|
||||||
if ( GetE('txtName').value.length == 0 )
|
oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ;
|
||||||
{
|
if ( oAnchor )
|
||||||
alert( oEditor.FCKLang.DlgAnchorErrorName ) ;
|
FCK.Selection.SelectNode( oAnchor ) ;
|
||||||
return false ;
|
}
|
||||||
}
|
|
||||||
|
window.onload = function()
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
{
|
||||||
|
// First of all, translate the dialog box texts
|
||||||
oAnchor = FCK.EditorDocument.createElement( 'DIV' ) ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oAnchor.innerHTML = '<a name="' + GetE('txtName').value + '"><\/a>' ;
|
|
||||||
oAnchor = oAnchor.firstChild ;
|
if ( oAnchor )
|
||||||
|
GetE('txtName').value = oAnchor.name ;
|
||||||
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor ) ;
|
else
|
||||||
oFakeImage.setAttribute( '_fckanchor', 'true', 0 ) ;
|
oAnchor = null ;
|
||||||
oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ;
|
|
||||||
|
window.parent.SetOkButton( true ) ;
|
||||||
// oEditor.FCK.InsertHtml( '<a name="' + GetE('txtName').value + '"><\/a>' ) ;
|
}
|
||||||
return true ;
|
|
||||||
}
|
function Ok()
|
||||||
|
{
|
||||||
</script>
|
var sNewName = GetE('txtName').value ;
|
||||||
</head>
|
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
// Remove any illegal character in a name attribute:
|
||||||
<table height="100%" width="100%">
|
// A name should start with a letter, but the validator passes anyway.
|
||||||
<tr>
|
sNewName = sNewName.replace( /[^\w-_\.:]/g, '_' ) ;
|
||||||
<td align="center">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
if ( sNewName.length == 0 )
|
||||||
<tr>
|
{
|
||||||
<td>
|
// Remove the anchor if the user leaves the name blank
|
||||||
<span fckLang="DlgAnchorName">Anchor Name</span><BR>
|
if ( oAnchor )
|
||||||
<input id="txtName" style="WIDTH: 100%" type="text">
|
{
|
||||||
</td>
|
RemoveAnchor() ;
|
||||||
</tr>
|
return true ;
|
||||||
</table>
|
}
|
||||||
</td>
|
|
||||||
</tr>
|
alert( oEditor.FCKLang.DlgAnchorErrorName ) ;
|
||||||
</table>
|
return false ;
|
||||||
</body>
|
}
|
||||||
</html>
|
|
||||||
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
|
|
||||||
|
if ( oAnchor ) // Modifying an existent anchor.
|
||||||
|
{
|
||||||
|
ReadjustLinksToAnchor( oAnchor.name, sNewName );
|
||||||
|
|
||||||
|
// Buggy explorer, bad bad browser. http://alt-tag.com/blog/archives/2006/02/ie-dom-bugs/
|
||||||
|
// Instead of just replacing the .name for the existing anchor (in order to preserve the content), we must remove the .name
|
||||||
|
// and assign .name, although it won't appear until it's specially processed in fckxhtml.js
|
||||||
|
|
||||||
|
// We remove the previous name
|
||||||
|
oAnchor.removeAttribute( 'name' ) ;
|
||||||
|
// Now we set it, but later we must process it specially
|
||||||
|
oAnchor.name = sNewName ;
|
||||||
|
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new anchor preserving the current selection
|
||||||
|
oAnchor = oEditor.FCK.CreateLink( '#' ) ;
|
||||||
|
if ( !oAnchor )
|
||||||
|
{
|
||||||
|
// Nothing was selected, so now just create a normal A
|
||||||
|
oAnchor = oEditor.FCK.CreateElement( 'a' ) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Remove the fake href
|
||||||
|
oAnchor.removeAttribute( 'href' ) ;
|
||||||
|
}
|
||||||
|
// Set the name
|
||||||
|
oAnchor.name = sNewName ;
|
||||||
|
|
||||||
|
// IE does require special processing to show the Anchor's image
|
||||||
|
// Opera doesn't allow to select empty anchors
|
||||||
|
if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera )
|
||||||
|
{
|
||||||
|
if ( oAnchor.innerHTML != '' )
|
||||||
|
{
|
||||||
|
if ( FCKBrowserInfo.IsIE )
|
||||||
|
oAnchor.className += ' FCK__AnchorC' ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Create a fake image for both IE and Opera
|
||||||
|
var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ;
|
||||||
|
oImg.setAttribute( '_fckanchor', 'true', 0 ) ;
|
||||||
|
|
||||||
|
oAnchor.parentNode.insertBefore( oImg, oAnchor ) ;
|
||||||
|
oAnchor.parentNode.removeChild( oAnchor ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes the current anchor from the document
|
||||||
|
function RemoveAnchor()
|
||||||
|
{
|
||||||
|
// If it's also a link, then just remove the name and exit
|
||||||
|
if ( oAnchor.href.length != 0 )
|
||||||
|
{
|
||||||
|
oAnchor.removeAttribute( 'name' ) ;
|
||||||
|
// Remove temporary class for IE
|
||||||
|
if ( FCKBrowserInfo.IsIE )
|
||||||
|
oAnchor.className = oAnchor.className.replace( FCKRegexLib.FCK_Class, '' ) ;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We need to remove the anchor
|
||||||
|
// If we got a fake image, then just remove it and we're done
|
||||||
|
if ( oFakeImage )
|
||||||
|
{
|
||||||
|
oFakeImage.parentNode.removeChild( oFakeImage ) ;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
// Empty anchor, so just remove it
|
||||||
|
if ( oAnchor.innerHTML.length == 0 )
|
||||||
|
{
|
||||||
|
oAnchor.parentNode.removeChild( oAnchor ) ;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
// Anchor with content, leave the content
|
||||||
|
FCKTools.RemoveOuterTags( oAnchor ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks all the links in the current page pointing to the current name and changes them to the new name
|
||||||
|
function ReadjustLinksToAnchor( sCurrent, sNew )
|
||||||
|
{
|
||||||
|
var oDoc = FCK.EditorDocument ;
|
||||||
|
|
||||||
|
var aLinks = oDoc.getElementsByTagName( 'A' ) ;
|
||||||
|
|
||||||
|
var sReference = '#' + sCurrent ;
|
||||||
|
// The url of the document, so we check absolute and partial references.
|
||||||
|
var sFullReference = oDoc.location.href.replace( /(#.*$)/, '') ;
|
||||||
|
sFullReference += sReference ;
|
||||||
|
|
||||||
|
var oLink ;
|
||||||
|
var i = aLinks.length - 1 ;
|
||||||
|
while ( i >= 0 && ( oLink = aLinks[i--] ) )
|
||||||
|
{
|
||||||
|
var sHRef = oLink.getAttribute( '_fcksavedurl' ) ;
|
||||||
|
if ( sHRef == null )
|
||||||
|
sHRef = oLink.getAttribute( 'href' , 2 ) || '' ;
|
||||||
|
|
||||||
|
if ( sHRef == sReference || sHRef == sFullReference )
|
||||||
|
{
|
||||||
|
oLink.href = '#' + sNew ;
|
||||||
|
SetAttribute( oLink, '_fcksavedurl', '#' + sNew ) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="OVERFLOW: hidden" scroll="no">
|
||||||
|
<table height="100%" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span fckLang="DlgAnchorName">Anchor Name</span><BR>
|
||||||
|
<input id="txtName" style="WIDTH: 100%" type="text">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,103 +1,111 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_button.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Button dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Button Properties</title>
|
* File Name: fck_button.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Button dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Button Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == "INPUT" && ( oActiveEl.type == "button" || oActiveEl.type == "submit" || oActiveEl.type == "reset" ) )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtValue').value = oActiveEl.value ;
|
window.onload = function()
|
||||||
GetE('txtType').value = oActiveEl.type ;
|
{
|
||||||
|
// First of all, translate the dialog box texts
|
||||||
GetE('txtType').disabled = true ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
}
|
|
||||||
else
|
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == "INPUT" && ( oActiveEl.type == "button" || oActiveEl.type == "submit" || oActiveEl.type == "reset" ) )
|
||||||
oActiveEl = null ;
|
{
|
||||||
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
window.parent.SetOkButton( true ) ;
|
GetE('txtValue').value = oActiveEl.value ;
|
||||||
}
|
GetE('txtType').value = oActiveEl.type ;
|
||||||
|
|
||||||
function Ok()
|
GetE('txtType').disabled = true ;
|
||||||
{
|
}
|
||||||
if ( !oActiveEl )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
|
||||||
oActiveEl.type = GetE('txtType').value ;
|
window.parent.SetOkButton( true ) ;
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
{
|
||||||
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
return true ;
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
}
|
oActiveEl.type = GetE('txtType').value ;
|
||||||
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
</script>
|
}
|
||||||
</head>
|
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
<table height="100%" width="100%">
|
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
}
|
||||||
<tr>
|
|
||||||
<td colSpan="">
|
</script>
|
||||||
<span fckLang="DlgCheckboxName">Name</span><br>
|
</head>
|
||||||
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
<body style="overflow: hidden">
|
||||||
</td>
|
<table width="100%" style="height: 100%">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td align="center">
|
||||||
<td>
|
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
||||||
<span fckLang="DlgButtonText">Text (Value)</span><br>
|
<tr>
|
||||||
<input type="text" id="txtValue" style="WIDTH: 100%">
|
<td colspan="">
|
||||||
</td>
|
<span fcklang="DlgCheckboxName">Name</span><br />
|
||||||
</tr>
|
<input type="text" size="20" id="txtName" style="width: 100%" />
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
<span fckLang="DlgButtonType">Type</span><br>
|
<tr>
|
||||||
<select id="txtType">
|
<td>
|
||||||
<option value="button" selected>Button</option>
|
<span fcklang="DlgButtonText">Text (Value)</span><br />
|
||||||
<option value="submit">Submit</option>
|
<input type="text" id="txtValue" style="width: 100%" />
|
||||||
<option value="reset">Reset</option>
|
</td>
|
||||||
</select>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<span fcklang="DlgButtonType">Type</span><br />
|
||||||
</td>
|
<select id="txtType">
|
||||||
</tr>
|
<option fcklang="DlgButtonTypeBtn" value="button" selected="selected">Button</option>
|
||||||
</table>
|
<option fcklang="DlgButtonTypeSbm" value="submit">Submit</option>
|
||||||
</body>
|
<option fcklang="DlgButtonTypeRst" value="reset">Reset</option>
|
||||||
</html>
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,103 +1,111 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_checkbox.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Checkbox dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Checkbox Properties</title>
|
* File Name: fck_checkbox.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Checkbox dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Checkbox Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta content="noindex, nofollow" name="robots">
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
|
window.onload = function()
|
||||||
GetE('txtSelected').checked = oActiveEl.checked ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
else
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oActiveEl = null ;
|
|
||||||
|
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' )
|
||||||
window.parent.SetOkButton( true ) ;
|
{
|
||||||
}
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
|
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
|
||||||
function Ok()
|
GetE('txtSelected').checked = oActiveEl.checked ;
|
||||||
{
|
}
|
||||||
if ( !oActiveEl )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
|
||||||
oActiveEl.type = 'checkbox' ;
|
window.parent.SetOkButton( true ) ;
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
if ( GetE('txtName').value.length > 0 )
|
{
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
oActiveEl.value = GetE('txtValue').value ;
|
oActiveEl.type = 'checkbox' ;
|
||||||
else
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
}
|
||||||
|
|
||||||
var bIsChecked = GetE('txtSelected').checked ;
|
if ( GetE('txtName').value.length > 0 )
|
||||||
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
oActiveEl.checked = bIsChecked ;
|
|
||||||
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
return true ;
|
oActiveEl.value = GetE('txtValue').value ;
|
||||||
}
|
else
|
||||||
|
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
||||||
</script>
|
|
||||||
</head>
|
var bIsChecked = GetE('txtSelected').checked ;
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
|
||||||
<table height="100%" width="100%">
|
oActiveEl.checked = bIsChecked ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgCheckboxName">Name</span><br>
|
</head>
|
||||||
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
<body style="OVERFLOW: hidden" scroll="no">
|
||||||
</td>
|
<table height="100%" width="100%">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td align="center">
|
||||||
<td>
|
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
||||||
<span fckLang="DlgCheckboxValue">Value</span><br>
|
<tr>
|
||||||
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
|
<td>
|
||||||
</td>
|
<span fckLang="DlgCheckboxName">Name</span><br>
|
||||||
</tr>
|
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
||||||
<tr>
|
</td>
|
||||||
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</td>
|
<span fckLang="DlgCheckboxValue">Value</span><br>
|
||||||
</tr>
|
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
|
||||||
</table>
|
</td>
|
||||||
</body>
|
</tr>
|
||||||
</html>
|
<tr>
|
||||||
|
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,167 +1,175 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_colorselector.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Color Selection dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_colorselector.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* Color Selection dialog window.
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
*
|
||||||
<style TYPE="text/css">
|
* File Authors:
|
||||||
#ColorTable { cursor: pointer ; cursor: hand ; }
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
#hicolor { height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; }
|
-->
|
||||||
#hicolortext { width: 75px ; text-align: right ; margin-bottom: 7px ; }
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
#selhicolor { height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; }
|
<html>
|
||||||
#selcolor { width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; }
|
<head>
|
||||||
#btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; }
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
.ColorCell { height: 15px ; width: 15px ; }
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
</style>
|
<style TYPE="text/css">
|
||||||
<script type="text/javascript">
|
#ColorTable { cursor: pointer ; cursor: hand ; }
|
||||||
|
#hicolor { height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; }
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
#hicolortext { width: 75px ; text-align: right ; margin-bottom: 7px ; }
|
||||||
|
#selhicolor { height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; }
|
||||||
function OnLoad()
|
#selcolor { width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; }
|
||||||
{
|
#btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; }
|
||||||
// First of all, translate the dialog box texts
|
.ColorCell { height: 15px ; width: 15px ; }
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
CreateColorTable() ;
|
|
||||||
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
window.parent.SetAutoSize( true ) ;
|
function OnLoad()
|
||||||
}
|
{
|
||||||
|
// First of all, translate the dialog box texts
|
||||||
function CreateColorTable()
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
{
|
|
||||||
// Get the target table.
|
CreateColorTable() ;
|
||||||
var oTable = document.getElementById('ColorTable') ;
|
|
||||||
|
window.parent.SetOkButton( true ) ;
|
||||||
// Create the base colors array.
|
window.parent.SetAutoSize( true ) ;
|
||||||
var aColors = ['00','33','66','99','cc','ff'] ;
|
}
|
||||||
|
|
||||||
// This function combines two ranges of three values from the color array into a row.
|
function CreateColorTable()
|
||||||
function AppendColorRow( rangeA, rangeB )
|
{
|
||||||
{
|
// Get the target table.
|
||||||
for ( var i = rangeA ; i < rangeA + 3 ; i++ )
|
var oTable = document.getElementById('ColorTable') ;
|
||||||
{
|
|
||||||
var oRow = oTable.insertRow(-1) ;
|
// Create the base colors array.
|
||||||
|
var aColors = ['00','33','66','99','cc','ff'] ;
|
||||||
for ( var j = rangeB ; j < rangeB + 3 ; j++ )
|
|
||||||
{
|
// This function combines two ranges of three values from the color array into a row.
|
||||||
for ( var n = 0 ; n < 6 ; n++ )
|
function AppendColorRow( rangeA, rangeB )
|
||||||
{
|
{
|
||||||
AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ;
|
for ( var i = rangeA ; i < rangeA + 3 ; i++ )
|
||||||
}
|
{
|
||||||
}
|
var oRow = oTable.insertRow(-1) ;
|
||||||
}
|
|
||||||
}
|
for ( var j = rangeB ; j < rangeB + 3 ; j++ )
|
||||||
|
{
|
||||||
// This function create a single color cell in the color table.
|
for ( var n = 0 ; n < 6 ; n++ )
|
||||||
function AppendColorCell( targetRow, color )
|
{
|
||||||
{
|
AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ;
|
||||||
var oCell = targetRow.insertCell(-1) ;
|
}
|
||||||
oCell.className = 'ColorCell' ;
|
}
|
||||||
oCell.bgColor = color ;
|
}
|
||||||
|
}
|
||||||
oCell.onmouseover = function()
|
|
||||||
{
|
// This function create a single color cell in the color table.
|
||||||
document.getElementById('hicolor').style.backgroundColor = this.bgColor ;
|
function AppendColorCell( targetRow, color )
|
||||||
document.getElementById('hicolortext').innerHTML = this.bgColor ;
|
{
|
||||||
}
|
var oCell = targetRow.insertCell(-1) ;
|
||||||
|
oCell.className = 'ColorCell' ;
|
||||||
oCell.onclick = function()
|
oCell.bgColor = color ;
|
||||||
{
|
|
||||||
document.getElementById('selhicolor').style.backgroundColor = this.bgColor ;
|
oCell.onmouseover = function()
|
||||||
document.getElementById('selcolor').value = this.bgColor ;
|
{
|
||||||
}
|
document.getElementById('hicolor').style.backgroundColor = this.bgColor ;
|
||||||
}
|
document.getElementById('hicolortext').innerHTML = this.bgColor ;
|
||||||
|
}
|
||||||
AppendColorRow( 0, 0 ) ;
|
|
||||||
AppendColorRow( 3, 0 ) ;
|
oCell.onclick = function()
|
||||||
AppendColorRow( 0, 3 ) ;
|
{
|
||||||
AppendColorRow( 3, 3 ) ;
|
document.getElementById('selhicolor').style.backgroundColor = this.bgColor ;
|
||||||
|
document.getElementById('selcolor').value = this.bgColor ;
|
||||||
// Create the last row.
|
}
|
||||||
var oRow = oTable.insertRow(-1) ;
|
}
|
||||||
|
|
||||||
// Create the gray scale colors cells.
|
AppendColorRow( 0, 0 ) ;
|
||||||
for ( var n = 0 ; n < 6 ; n++ )
|
AppendColorRow( 3, 0 ) ;
|
||||||
{
|
AppendColorRow( 0, 3 ) ;
|
||||||
AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
|
AppendColorRow( 3, 3 ) ;
|
||||||
}
|
|
||||||
|
// Create the last row.
|
||||||
// Fill the row with black cells.
|
var oRow = oTable.insertRow(-1) ;
|
||||||
for ( var i = 0 ; i < 12 ; i++ )
|
|
||||||
{
|
// Create the gray scale colors cells.
|
||||||
AppendColorCell( oRow, '#000000' ) ;
|
for ( var n = 0 ; n < 6 ; n++ )
|
||||||
}
|
{
|
||||||
}
|
AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
|
||||||
|
}
|
||||||
function Clear()
|
|
||||||
{
|
// Fill the row with black cells.
|
||||||
document.getElementById('selhicolor').style.backgroundColor = '' ;
|
for ( var i = 0 ; i < 12 ; i++ )
|
||||||
document.getElementById('selcolor').value = '' ;
|
{
|
||||||
}
|
AppendColorCell( oRow, '#000000' ) ;
|
||||||
|
}
|
||||||
function ClearActual()
|
}
|
||||||
{
|
|
||||||
document.getElementById('hicolor').style.backgroundColor = '' ;
|
function Clear()
|
||||||
document.getElementById('hicolortext').innerHTML = ' ' ;
|
{
|
||||||
}
|
document.getElementById('selhicolor').style.backgroundColor = '' ;
|
||||||
|
document.getElementById('selcolor').value = '' ;
|
||||||
function UpdateColor()
|
}
|
||||||
{
|
|
||||||
try { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; }
|
function ClearActual()
|
||||||
catch (e) { Clear() ; }
|
{
|
||||||
}
|
document.getElementById('hicolor').style.backgroundColor = '' ;
|
||||||
|
document.getElementById('hicolortext').innerHTML = ' ' ;
|
||||||
function Ok()
|
}
|
||||||
{
|
|
||||||
if ( typeof(window.parent.dialogArguments.CustomValue) == 'function' )
|
function UpdateColor()
|
||||||
window.parent.dialogArguments.CustomValue( document.getElementById('selcolor').value ) ;
|
{
|
||||||
|
try { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; }
|
||||||
return true ;
|
catch (e) { Clear() ; }
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
</head>
|
function Ok()
|
||||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
{
|
||||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
|
if ( typeof(window.parent.dialogArguments.CustomValue) == 'function' )
|
||||||
<tr>
|
window.parent.dialogArguments.CustomValue( document.getElementById('selcolor').value ) ;
|
||||||
<td align="center" valign="middle">
|
|
||||||
<table border="0" cellspacing="5" cellpadding="0" width="100%">
|
return true ;
|
||||||
<tr>
|
}
|
||||||
<td valign="top" align="center" nowrap width="100%">
|
</script>
|
||||||
<table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();">
|
</head>
|
||||||
</table>
|
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
||||||
</td>
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
|
||||||
<td valign="top" align="left" nowrap>
|
<tr>
|
||||||
<span fckLang="DlgColorHighlight">Highlight</span>
|
<td align="center" valign="middle">
|
||||||
<div id="hicolor"></div>
|
<table border="0" cellspacing="5" cellpadding="0" width="100%">
|
||||||
<div id="hicolortext"> </div>
|
<tr>
|
||||||
<span fckLang="DlgColorSelected">Selected</span>
|
<td valign="top" align="center" nowrap width="100%">
|
||||||
<div id="selhicolor"></div>
|
<table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();">
|
||||||
<input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();">
|
</table>
|
||||||
<br>
|
</td>
|
||||||
<input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" />
|
<td valign="top" align="left" nowrap>
|
||||||
</td>
|
<span fckLang="DlgColorHighlight">Highlight</span>
|
||||||
</tr>
|
<div id="hicolor"></div>
|
||||||
</table>
|
<div id="hicolortext"> </div>
|
||||||
</td>
|
<span fckLang="DlgColorSelected">Selected</span>
|
||||||
</tr>
|
<div id="selhicolor"></div>
|
||||||
</table>
|
<input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();">
|
||||||
</body>
|
<br>
|
||||||
</html>
|
<input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,109 +1,117 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_document_preview.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Preview shown in the "Document Properties" dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Document Properties - Preview</title>
|
* File Name: fck_document_preview.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Preview shown in the "Document Properties" dialog window.
|
||||||
<meta name="robots" content="noindex, nofollow">
|
*
|
||||||
<script language="javascript">
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var eBase = parent.FCK.EditorDocument.getElementsByTagName( 'BASE' ) ;
|
-->
|
||||||
if ( eBase.length > 0 && eBase[0].href.length > 0 )
|
<html>
|
||||||
{
|
<head>
|
||||||
document.write( '<base href="' + eBase[0].href + '">' ) ;
|
<title>Document Properties - Preview</title>
|
||||||
}
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta name="robots" content="noindex, nofollow">
|
||||||
window.onload = function()
|
<script language="javascript">
|
||||||
{
|
|
||||||
if ( typeof( parent.OnPreviewLoad ) == 'function' )
|
var eBase = parent.FCK.EditorDocument.getElementsByTagName( 'BASE' ) ;
|
||||||
parent.OnPreviewLoad( window, document.body ) ;
|
if ( eBase.length > 0 && eBase[0].href.length > 0 )
|
||||||
}
|
{
|
||||||
|
document.write( '<base href="' + eBase[0].href + '">' ) ;
|
||||||
function SetBaseHRef( baseHref )
|
}
|
||||||
{
|
|
||||||
var eBase = document.createElement( 'BASE' ) ;
|
window.onload = function()
|
||||||
eBase.href = baseHref ;
|
{
|
||||||
|
if ( typeof( parent.OnPreviewLoad ) == 'function' )
|
||||||
var eHead = document.getElementsByTagName( 'HEAD' )[0] ;
|
parent.OnPreviewLoad( window, document.body ) ;
|
||||||
eHead.appendChild( eBase ) ;
|
}
|
||||||
}
|
|
||||||
|
function SetBaseHRef( baseHref )
|
||||||
function SetLinkColor( color )
|
{
|
||||||
{
|
var eBase = document.createElement( 'BASE' ) ;
|
||||||
if ( color && color.length > 0 )
|
eBase.href = baseHref ;
|
||||||
document.getElementById('eLink').style.color = color ;
|
|
||||||
else
|
var eHead = document.getElementsByTagName( 'HEAD' )[0] ;
|
||||||
document.getElementById('eLink').style.color = window.document.linkColor ;
|
eHead.appendChild( eBase ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetVisitedColor( color )
|
function SetLinkColor( color )
|
||||||
{
|
{
|
||||||
if ( color && color.length > 0 )
|
if ( color && color.length > 0 )
|
||||||
document.getElementById('eVisited').style.color = color ;
|
document.getElementById('eLink').style.color = color ;
|
||||||
else
|
else
|
||||||
document.getElementById('eVisited').style.color = window.document.vlinkColor ;
|
document.getElementById('eLink').style.color = window.document.linkColor ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetActiveColor( color )
|
function SetVisitedColor( color )
|
||||||
{
|
{
|
||||||
if ( color && color.length > 0 )
|
if ( color && color.length > 0 )
|
||||||
document.getElementById('eActive').style.color = color ;
|
document.getElementById('eVisited').style.color = color ;
|
||||||
else
|
else
|
||||||
document.getElementById('eActive').style.color = window.document.alinkColor ;
|
document.getElementById('eVisited').style.color = window.document.vlinkColor ;
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
</head>
|
function SetActiveColor( color )
|
||||||
<body>
|
{
|
||||||
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
|
if ( color && color.length > 0 )
|
||||||
<tr>
|
document.getElementById('eActive').style.color = color ;
|
||||||
<td align="center" valign="middle">
|
else
|
||||||
Normal Text
|
document.getElementById('eActive').style.color = window.document.alinkColor ;
|
||||||
</td>
|
}
|
||||||
<td id="eLink" align="center" valign="middle">
|
</script>
|
||||||
<u>Link Text</u>
|
</head>
|
||||||
</td>
|
<body>
|
||||||
</tr>
|
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td id="eVisited" valign="middle" align="center">
|
<td align="center" valign="middle">
|
||||||
<u>Visited Link</u>
|
Normal Text
|
||||||
</td>
|
</td>
|
||||||
<td id="eActive" valign="middle" align="center">
|
<td id="eLink" align="center" valign="middle">
|
||||||
<u>Active Link</u>
|
<u>Link Text</u>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
<br>
|
<td id="eVisited" valign="middle" align="center">
|
||||||
<br>
|
<u>Visited Link</u>
|
||||||
<br>
|
</td>
|
||||||
<br>
|
<td id="eActive" valign="middle" align="center">
|
||||||
<br>
|
<u>Active Link</u>
|
||||||
<br>
|
</td>
|
||||||
<br>
|
</tr>
|
||||||
<br>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
</body>
|
<br>
|
||||||
</html>
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,177 +1,177 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_find.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* "Find" dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title></title>
|
* File Name: fck_find.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* "Find" dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots" />
|
*
|
||||||
<script type="text/javascript">
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
-->
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
function OnLoad()
|
<head>
|
||||||
{
|
<title></title>
|
||||||
// Whole word is available on IE only.
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
document.getElementById('divWord').style.display = '' ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
// First of all, translate the dialog box texts.
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
|
||||||
|
function OnLoad()
|
||||||
window.parent.SetAutoSize( true ) ;
|
{
|
||||||
}
|
// Whole word is available on IE only.
|
||||||
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
function btnStat(frm)
|
document.getElementById('divWord').style.display = '' ;
|
||||||
{
|
|
||||||
document.getElementById('btnFind').disabled =
|
// First of all, translate the dialog box texts.
|
||||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||||
}
|
|
||||||
|
window.parent.SetAutoSize( true ) ;
|
||||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
|
}
|
||||||
{
|
|
||||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
function btnStat(frm)
|
||||||
{
|
{
|
||||||
var oNode = parentNode.childNodes[i] ;
|
document.getElementById('btnFind').disabled =
|
||||||
if ( oNode.nodeType == 3 )
|
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||||
{
|
}
|
||||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
|
||||||
if ( oNode.nodeValue != sReplaced )
|
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
|
||||||
{
|
{
|
||||||
oNode.nodeValue = sReplaced ;
|
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||||
if ( ! replaceAll )
|
{
|
||||||
return true ;
|
var oNode = parentNode.childNodes[i] ;
|
||||||
}
|
if ( oNode.nodeType == 3 )
|
||||||
}
|
{
|
||||||
else
|
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||||
{
|
if ( oNode.nodeValue != sReplaced )
|
||||||
if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
|
{
|
||||||
return true ;
|
oNode.nodeValue = sReplaced ;
|
||||||
}
|
if ( ! replaceAll )
|
||||||
}
|
return true ;
|
||||||
return false ;
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
function GetRegexExpr()
|
{
|
||||||
{
|
if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
|
||||||
if ( document.getElementById('chkWord').checked )
|
return true ;
|
||||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
}
|
||||||
else
|
}
|
||||||
var sExpr = document.getElementById('txtFind').value ;
|
return false ;
|
||||||
|
}
|
||||||
return sExpr ;
|
|
||||||
}
|
function GetRegexExpr()
|
||||||
|
{
|
||||||
function GetCase()
|
var sExpr ;
|
||||||
{
|
|
||||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
if ( document.getElementById('chkWord').checked )
|
||||||
}
|
sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
||||||
|
else
|
||||||
function Ok()
|
sExpr = document.getElementById('txtFind').value ;
|
||||||
{
|
|
||||||
if ( document.getElementById('txtFind').value.length == 0 )
|
return sExpr ;
|
||||||
return ;
|
}
|
||||||
|
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
function GetCase()
|
||||||
FindIE() ;
|
{
|
||||||
else
|
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||||
FindGecko() ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
var oRange ;
|
{
|
||||||
|
if ( document.getElementById('txtFind').value.length == 0 )
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
return ;
|
||||||
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
|
||||||
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
function FindIE()
|
FindIE() ;
|
||||||
{
|
else
|
||||||
var iFlags = 0 ;
|
FindGecko() ;
|
||||||
|
}
|
||||||
if ( chkCase.checked )
|
|
||||||
iFlags = iFlags | 4 ;
|
var oRange ;
|
||||||
|
|
||||||
if ( chkWord.checked )
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
iFlags = iFlags | 2 ;
|
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
||||||
|
|
||||||
var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
|
function FindIE()
|
||||||
|
{
|
||||||
if ( bFound )
|
var iFlags = 0 ;
|
||||||
{
|
|
||||||
oRange.scrollIntoView() ;
|
if ( chkCase.checked )
|
||||||
oRange.select() ;
|
iFlags = iFlags | 4 ;
|
||||||
oRange.collapse(false) ;
|
|
||||||
oLastRangeFound = oRange ;
|
if ( chkWord.checked )
|
||||||
}
|
iFlags = iFlags | 2 ;
|
||||||
else
|
|
||||||
{
|
var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
|
||||||
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
|
||||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
if ( bFound )
|
||||||
}
|
{
|
||||||
}
|
oRange.scrollIntoView() ;
|
||||||
|
oRange.select() ;
|
||||||
function FindGecko()
|
oRange.collapse(false) ;
|
||||||
{
|
oLastRangeFound = oRange ;
|
||||||
var bCase = document.getElementById('chkCase').checked ;
|
}
|
||||||
var bWord = document.getElementById('chkWord').checked ;
|
else
|
||||||
|
{
|
||||||
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
|
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
||||||
oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) ;
|
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function FindGecko()
|
function FindGecko()
|
||||||
{
|
{
|
||||||
var bCase = document.getElementById('chkCase').checked ;
|
var bCase = document.getElementById('chkCase').checked ;
|
||||||
var bWord = document.getElementById('chkWord').checked ;
|
var bWord = document.getElementById('chkWord').checked ;
|
||||||
|
|
||||||
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
|
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
|
||||||
if ( !oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) )
|
if ( !oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) )
|
||||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="OnLoad()" scroll="no" style="overflow: hidden">
|
<body onload="OnLoad()" style="overflow: hidden">
|
||||||
<table cellspacing="3" cellpadding="2" width="100%" border="0">
|
<table cellspacing="3" cellpadding="2" width="100%" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">
|
<td nowrap="nowrap">
|
||||||
<label for="txtFind" fcklang="DlgReplaceFindLbl">
|
<label for="txtFind" fcklang="DlgReplaceFindLbl">
|
||||||
Find what:</label>
|
Find what:</label>
|
||||||
</td>
|
</td>
|
||||||
<td width="100%">
|
<td width="100%">
|
||||||
<input id="txtFind" style="width: 100%" tabindex="1" type="text" />
|
<input id="txtFind" style="width: 100%" tabindex="1" type="text" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="btnFind" style="padding-right: 5px; padding-left: 5px" onclick="Ok();"
|
<input id="btnFind" style="padding-right: 5px; padding-left: 5px" onclick="Ok();"
|
||||||
type="button" value="Find" fcklang="DlgFindFindBtn" />
|
type="button" value="Find" fcklang="DlgFindFindBtn" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="bottom" colspan="3">
|
<td valign="bottom" colspan="3">
|
||||||
<input id="chkCase" tabindex="3" type="checkbox" /><label for="chkCase" fcklang="DlgReplaceCaseChk">Match
|
<input id="chkCase" tabindex="3" type="checkbox" /><label for="chkCase" fcklang="DlgReplaceCaseChk">Match
|
||||||
case</label>
|
case</label>
|
||||||
<br />
|
<br />
|
||||||
<div id="divWord" style="display: none">
|
<div id="divWord" style="display: none">
|
||||||
<input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match
|
<input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match
|
||||||
whole word</label>
|
whole word</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,142 +1,150 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_flash.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Flash Properties dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Flash Properties</title>
|
* File Name: fck_flash.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Flash Properties dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script src="fck_flash/fck_flash.js" type="text/javascript"></script>
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<link href="common/fck_dialog_common.css" type="text/css" rel="stylesheet">
|
-->
|
||||||
</head>
|
<html>
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
<head>
|
||||||
<div id="divInfo">
|
<title>Flash Properties</title>
|
||||||
<table cellSpacing="1" cellPadding="1" width="100%" border="0">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<tr>
|
<meta content="noindex, nofollow" name="robots">
|
||||||
<td>
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
<script src="fck_flash/fck_flash.js" type="text/javascript"></script>
|
||||||
<tr>
|
<link href="common/fck_dialog_common.css" type="text/css" rel="stylesheet">
|
||||||
<td width="100%"><span fckLang="DlgImgURL">URL</span>
|
</head>
|
||||||
</td>
|
<body scroll="no" style="OVERFLOW: hidden">
|
||||||
<td id="tdBrowse" style="DISPLAY: none" noWrap rowSpan="2"> <input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fckLang="DlgBtnBrowseServer">
|
<div id="divInfo">
|
||||||
</td>
|
<table cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td vAlign="top"><input id="txtUrl" onblur="UpdatePreview();" style="WIDTH: 100%" type="text">
|
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td width="100%"><span fckLang="DlgImgURL">URL</span>
|
||||||
</table>
|
</td>
|
||||||
</td>
|
<td id="tdBrowse" style="DISPLAY: none" noWrap rowSpan="2"> <input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fckLang="DlgBtnBrowseServer">
|
||||||
</tr>
|
</td>
|
||||||
<TR>
|
</tr>
|
||||||
<TD>
|
<tr>
|
||||||
<table cellSpacing="0" cellPadding="0" border="0">
|
<td vAlign="top"><input id="txtUrl" onblur="UpdatePreview();" style="WIDTH: 100%" type="text">
|
||||||
<TR>
|
</td>
|
||||||
<TD nowrap>
|
</tr>
|
||||||
<span fckLang="DlgImgWidth">Width</span><br>
|
</table>
|
||||||
<input id="txtWidth" class="FCK__FieldNumeric" type="text" size="3">
|
</td>
|
||||||
</TD>
|
</tr>
|
||||||
<TD> </TD>
|
<TR>
|
||||||
<TD>
|
<TD>
|
||||||
<span fckLang="DlgImgHeight">Height</span><br>
|
<table cellSpacing="0" cellPadding="0" border="0">
|
||||||
<input id="txtHeight" class="FCK__FieldNumeric" type="text" size="3">
|
<TR>
|
||||||
</TD>
|
<TD nowrap>
|
||||||
</TR>
|
<span fckLang="DlgImgWidth">Width</span><br>
|
||||||
</table>
|
<input id="txtWidth" class="FCK__FieldNumeric" type="text" size="3">
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
<TD> </TD>
|
||||||
<tr>
|
<TD>
|
||||||
<td vAlign="top">
|
<span fckLang="DlgImgHeight">Height</span><br>
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
<input id="txtHeight" class="FCK__FieldNumeric" type="text" size="3">
|
||||||
<tr>
|
</TD>
|
||||||
<td valign="top" width="100%">
|
</TR>
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%">
|
</table>
|
||||||
<tr>
|
</TD>
|
||||||
<td><span fckLang="DlgImgPreview">Preview</span></td>
|
</TR>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td vAlign="top">
|
||||||
<td id="ePreviewCell" valign="top" class="FlashPreviewArea"><iframe src="fck_flash/fck_flash_preview.html" frameborder="0" marginheight="0" marginwidth="0"></iframe></td>
|
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td valign="top" width="100%">
|
||||||
</td>
|
<table cellSpacing="0" cellPadding="0" width="100%">
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td><span fckLang="DlgImgPreview">Preview</span></td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td id="ePreviewCell" valign="top" class="FlashPreviewArea"><iframe src="fck_flash/fck_flash_preview.html" frameborder="0" marginheight="0" marginwidth="0"></iframe></td>
|
||||||
</div>
|
</tr>
|
||||||
<div id="divUpload" style="DISPLAY: none">
|
</table>
|
||||||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
|
</td>
|
||||||
<span fckLang="DlgLnkUpload">Upload</span><br />
|
</tr>
|
||||||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
|
</table>
|
||||||
<br />
|
</td>
|
||||||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
</tr>
|
||||||
<iframe name="UploadWindow" style="DISPLAY: none" src="../fckblank.html"></iframe>
|
</table>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<div id="divUpload" style="DISPLAY: none">
|
||||||
<div id="divAdvanced" style="DISPLAY: none">
|
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
|
||||||
<TABLE cellSpacing="0" cellPadding="0" border="0">
|
<span fckLang="DlgLnkUpload">Upload</span><br />
|
||||||
<TR>
|
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
|
||||||
<TD nowrap>
|
<br />
|
||||||
<span fckLang="DlgFlashScale">Scale</span><BR>
|
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
||||||
<select id="cmbScale">
|
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe>
|
||||||
<option value="" selected></option>
|
</form>
|
||||||
<option value="showall" fckLang="DlgFlashScaleAll">Show all</option>
|
</div>
|
||||||
<option value="noborder" fckLang="DlgFlashScaleNoBorder">No Border</option>
|
<div id="divAdvanced" style="DISPLAY: none">
|
||||||
<option value="exactfit" fckLang="DlgFlashScaleFit">Exact Fit</option>
|
<TABLE cellSpacing="0" cellPadding="0" border="0">
|
||||||
</select></TD>
|
<TR>
|
||||||
<TD>
|
<TD nowrap>
|
||||||
</TD>
|
<span fckLang="DlgFlashScale">Scale</span><BR>
|
||||||
<td valign="bottom">
|
<select id="cmbScale">
|
||||||
<table>
|
<option value="" selected></option>
|
||||||
<tr>
|
<option value="showall" fckLang="DlgFlashScaleAll">Show all</option>
|
||||||
<td><input id="chkAutoPlay" type="checkbox" checked></td>
|
<option value="noborder" fckLang="DlgFlashScaleNoBorder">No Border</option>
|
||||||
<td><label for="chkAutoPlay" nowrap fckLang="DlgFlashChkPlay">Auto Play</label> </td>
|
<option value="exactfit" fckLang="DlgFlashScaleFit">Exact Fit</option>
|
||||||
<td><input id="chkLoop" type="checkbox" checked></td>
|
</select></TD>
|
||||||
<td><label for="chkLoop" nowrap fckLang="DlgFlashChkLoop">Loop</label> </td>
|
<TD>
|
||||||
<td><input id="chkMenu" type="checkbox" checked></td>
|
</TD>
|
||||||
<td><label for="chkMenu" nowrap fckLang="DlgFlashChkMenu">Enable Flash Menu</label></td>
|
<td valign="bottom">
|
||||||
</tr>
|
<table>
|
||||||
</table>
|
<tr>
|
||||||
</td>
|
<td><input id="chkAutoPlay" type="checkbox" checked></td>
|
||||||
</TR>
|
<td><label for="chkAutoPlay" nowrap fckLang="DlgFlashChkPlay">Auto Play</label> </td>
|
||||||
</TABLE>
|
<td><input id="chkLoop" type="checkbox" checked></td>
|
||||||
<br>
|
<td><label for="chkLoop" nowrap fckLang="DlgFlashChkLoop">Loop</label> </td>
|
||||||
|
<td><input id="chkMenu" type="checkbox" checked></td>
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
|
<td><label for="chkMenu" nowrap fckLang="DlgFlashChkMenu">Enable Flash Menu</label></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td vAlign="top" width="50%"><span fckLang="DlgGenId">Id</span><br>
|
</table>
|
||||||
<input id="txtAttId" style="WIDTH: 100%" type="text">
|
</td>
|
||||||
</td>
|
</TR>
|
||||||
<td> </td>
|
</TABLE>
|
||||||
<td vAlign="top" nowrap><span fckLang="DlgGenClass">Stylesheet Classes</span><br>
|
<br>
|
||||||
<input id="txtAttClasses" style="WIDTH: 100%" type="text">
|
|
||||||
</td>
|
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
|
||||||
<td> </td>
|
<tr>
|
||||||
<td vAlign="top" nowrap width="50%"> <span fckLang="DlgGenTitle">Advisory Title</span><br>
|
<td vAlign="top" width="50%"><span fckLang="DlgGenId">Id</span><br>
|
||||||
<input id="txtAttTitle" style="WIDTH: 100%" type="text">
|
<input id="txtAttId" style="WIDTH: 100%" type="text">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td> </td>
|
||||||
</table>
|
<td vAlign="top" nowrap><span fckLang="DlgGenClass">Stylesheet Classes</span><br>
|
||||||
<span fckLang="DlgGenStyle">Style</span><br>
|
<input id="txtAttClasses" style="WIDTH: 100%" type="text">
|
||||||
<input id="txtAttStyle" style="WIDTH: 100%" type="text">
|
</td>
|
||||||
</div>
|
<td> </td>
|
||||||
</body>
|
<td vAlign="top" nowrap width="50%"> <span fckLang="DlgGenTitle">Advisory Title</span><br>
|
||||||
</html>
|
<input id="txtAttTitle" style="WIDTH: 100%" type="text">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<span fckLang="DlgGenStyle">Style</span><br>
|
||||||
|
<input id="txtAttStyle" style="WIDTH: 100%" type="text">
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,284 +1,292 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_flash.js
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Scripts related to the Flash dialog window (see fck_flash.html).
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
*
|
||||||
var FCK = oEditor.FCK ;
|
* File Name: fck_flash.js
|
||||||
var FCKLang = oEditor.FCKLang ;
|
* Scripts related to the Flash dialog window (see fck_flash.html).
|
||||||
var FCKConfig = oEditor.FCKConfig ;
|
*
|
||||||
|
* File Authors:
|
||||||
//#### Dialog Tabs
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
*/
|
||||||
// Set the dialog tabs.
|
|
||||||
window.parent.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
var FCK = oEditor.FCK ;
|
||||||
if ( FCKConfig.FlashUpload )
|
var FCKLang = oEditor.FCKLang ;
|
||||||
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
|
|
||||||
if ( !FCKConfig.FlashDlgHideAdvanced )
|
//#### Dialog Tabs
|
||||||
window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;
|
|
||||||
|
// Set the dialog tabs.
|
||||||
// Function called when a dialog tag is selected.
|
window.parent.AddTab( 'Info', oEditor.FCKLang.DlgInfoTab ) ;
|
||||||
function OnDialogTabChange( tabCode )
|
|
||||||
{
|
if ( FCKConfig.FlashUpload )
|
||||||
ShowE('divInfo' , ( tabCode == 'Info' ) ) ;
|
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
|
||||||
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
|
|
||||||
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ;
|
if ( !FCKConfig.FlashDlgHideAdvanced )
|
||||||
}
|
window.parent.AddTab( 'Advanced', oEditor.FCKLang.DlgAdvancedTag ) ;
|
||||||
|
|
||||||
// Get the selected flash embed (if available).
|
// Function called when a dialog tag is selected.
|
||||||
var oFakeImage = FCK.Selection.GetSelectedElement() ;
|
function OnDialogTabChange( tabCode )
|
||||||
var oEmbed ;
|
{
|
||||||
|
ShowE('divInfo' , ( tabCode == 'Info' ) ) ;
|
||||||
if ( oFakeImage )
|
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
|
||||||
{
|
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ;
|
||||||
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') )
|
}
|
||||||
oEmbed = FCK.GetRealElement( oFakeImage ) ;
|
|
||||||
else
|
// Get the selected flash embed (if available).
|
||||||
oFakeImage = null ;
|
var oFakeImage = FCK.Selection.GetSelectedElement() ;
|
||||||
}
|
var oEmbed ;
|
||||||
|
|
||||||
window.onload = function()
|
if ( oFakeImage )
|
||||||
{
|
{
|
||||||
// Translate the dialog box texts.
|
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckflash') )
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
oEmbed = FCK.GetRealElement( oFakeImage ) ;
|
||||||
|
else
|
||||||
// Load the selected element information (if any).
|
oFakeImage = null ;
|
||||||
LoadSelection() ;
|
}
|
||||||
|
|
||||||
// Show/Hide the "Browse Server" button.
|
window.onload = function()
|
||||||
GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ;
|
{
|
||||||
|
// Translate the dialog box texts.
|
||||||
// Set the actual uploader URL.
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
if ( FCKConfig.FlashUpload )
|
|
||||||
GetE('frmUpload').action = FCKConfig.FlashUploadURL ;
|
// Load the selected element information (if any).
|
||||||
|
LoadSelection() ;
|
||||||
window.parent.SetAutoSize( true ) ;
|
|
||||||
|
// Show/Hide the "Browse Server" button.
|
||||||
// Activate the "OK" button.
|
GetE('tdBrowse').style.display = FCKConfig.FlashBrowser ? '' : 'none' ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
}
|
// Set the actual uploader URL.
|
||||||
|
if ( FCKConfig.FlashUpload )
|
||||||
function LoadSelection()
|
GetE('frmUpload').action = FCKConfig.FlashUploadURL ;
|
||||||
{
|
|
||||||
if ( ! oEmbed ) return ;
|
window.parent.SetAutoSize( true ) ;
|
||||||
|
|
||||||
var sUrl = GetAttribute( oEmbed, 'src', '' ) ;
|
// Activate the "OK" button.
|
||||||
|
window.parent.SetOkButton( true ) ;
|
||||||
GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ;
|
}
|
||||||
GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ;
|
|
||||||
GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ;
|
function LoadSelection()
|
||||||
|
{
|
||||||
// Get Advances Attributes
|
if ( ! oEmbed ) return ;
|
||||||
GetE('txtAttId').value = oEmbed.id ;
|
|
||||||
GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ;
|
var sUrl = GetAttribute( oEmbed, 'src', '' ) ;
|
||||||
GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ;
|
|
||||||
GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ;
|
GetE('txtUrl').value = GetAttribute( oEmbed, 'src', '' ) ;
|
||||||
GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ;
|
GetE('txtWidth').value = GetAttribute( oEmbed, 'width', '' ) ;
|
||||||
|
GetE('txtHeight').value = GetAttribute( oEmbed, 'height', '' ) ;
|
||||||
GetE('txtAttTitle').value = oEmbed.title ;
|
|
||||||
|
// Get Advances Attributes
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
GetE('txtAttId').value = oEmbed.id ;
|
||||||
{
|
GetE('chkAutoPlay').checked = GetAttribute( oEmbed, 'play', 'true' ) == 'true' ;
|
||||||
GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ;
|
GetE('chkLoop').checked = GetAttribute( oEmbed, 'loop', 'true' ) == 'true' ;
|
||||||
GetE('txtAttStyle').value = oEmbed.style.cssText ;
|
GetE('chkMenu').checked = GetAttribute( oEmbed, 'menu', 'true' ) == 'true' ;
|
||||||
}
|
GetE('cmbScale').value = GetAttribute( oEmbed, 'scale', '' ).toLowerCase() ;
|
||||||
else
|
|
||||||
{
|
GetE('txtAttTitle').value = oEmbed.title ;
|
||||||
GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ;
|
|
||||||
GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) ;
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
}
|
{
|
||||||
|
GetE('txtAttClasses').value = oEmbed.getAttribute('className') || '' ;
|
||||||
UpdatePreview() ;
|
GetE('txtAttStyle').value = oEmbed.style.cssText ;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
//#### The OK button was hit.
|
{
|
||||||
function Ok()
|
GetE('txtAttClasses').value = oEmbed.getAttribute('class',2) || '' ;
|
||||||
{
|
GetE('txtAttStyle').value = oEmbed.getAttribute('style',2) ;
|
||||||
if ( GetE('txtUrl').value.length == 0 )
|
}
|
||||||
{
|
|
||||||
window.parent.SetSelectedTab( 'Info' ) ;
|
UpdatePreview() ;
|
||||||
GetE('txtUrl').focus() ;
|
}
|
||||||
|
|
||||||
alert( oEditor.FCKLang.DlgAlertUrl ) ;
|
//#### The OK button was hit.
|
||||||
|
function Ok()
|
||||||
return false ;
|
{
|
||||||
}
|
if ( GetE('txtUrl').value.length == 0 )
|
||||||
|
{
|
||||||
if ( !oEmbed )
|
window.parent.SetSelectedTab( 'Info' ) ;
|
||||||
{
|
GetE('txtUrl').focus() ;
|
||||||
oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ;
|
|
||||||
oFakeImage = null ;
|
alert( oEditor.FCKLang.DlgAlertUrl ) ;
|
||||||
}
|
|
||||||
UpdateEmbed( oEmbed ) ;
|
return false ;
|
||||||
|
}
|
||||||
if ( !oFakeImage )
|
|
||||||
{
|
if ( !oEmbed )
|
||||||
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ;
|
{
|
||||||
oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ;
|
oEmbed = FCK.EditorDocument.createElement( 'EMBED' ) ;
|
||||||
oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ;
|
oFakeImage = null ;
|
||||||
}
|
}
|
||||||
else
|
UpdateEmbed( oEmbed ) ;
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
|
||||||
|
if ( !oFakeImage )
|
||||||
oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oEmbed ) ;
|
{
|
||||||
|
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Flash', oEmbed ) ;
|
||||||
return true ;
|
oFakeImage.setAttribute( '_fckflash', 'true', 0 ) ;
|
||||||
}
|
oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ;
|
||||||
|
}
|
||||||
function UpdateEmbed( e )
|
else
|
||||||
{
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ;
|
|
||||||
SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ;
|
oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oEmbed ) ;
|
||||||
|
|
||||||
e.src = GetE('txtUrl').value ;
|
return true ;
|
||||||
SetAttribute( e, "width" , GetE('txtWidth').value ) ;
|
}
|
||||||
SetAttribute( e, "height", GetE('txtHeight').value ) ;
|
|
||||||
|
function UpdateEmbed( e )
|
||||||
// Advances Attributes
|
{
|
||||||
|
SetAttribute( e, 'type' , 'application/x-shockwave-flash' ) ;
|
||||||
SetAttribute( e, 'id' , GetE('txtAttId').value ) ;
|
SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ;
|
||||||
SetAttribute( e, 'scale', GetE('cmbScale').value ) ;
|
|
||||||
|
e.src = GetE('txtUrl').value ;
|
||||||
SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
|
SetAttribute( e, "width" , GetE('txtWidth').value ) ;
|
||||||
SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ;
|
SetAttribute( e, "height", GetE('txtHeight').value ) ;
|
||||||
SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ;
|
|
||||||
|
// Advances Attributes
|
||||||
SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ;
|
|
||||||
|
SetAttribute( e, 'id' , GetE('txtAttId').value ) ;
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
SetAttribute( e, 'scale', GetE('cmbScale').value ) ;
|
||||||
{
|
|
||||||
SetAttribute( e, 'className', GetE('txtAttClasses').value ) ;
|
SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
|
||||||
e.style.cssText = GetE('txtAttStyle').value ;
|
SetAttribute( e, 'loop', GetE('chkLoop').checked ? 'true' : 'false' ) ;
|
||||||
}
|
SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' ) ;
|
||||||
else
|
|
||||||
{
|
SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ;
|
||||||
SetAttribute( e, 'class', GetE('txtAttClasses').value ) ;
|
|
||||||
SetAttribute( e, 'style', GetE('txtAttStyle').value ) ;
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
}
|
{
|
||||||
}
|
SetAttribute( e, 'className', GetE('txtAttClasses').value ) ;
|
||||||
|
e.style.cssText = GetE('txtAttStyle').value ;
|
||||||
var ePreview ;
|
}
|
||||||
|
else
|
||||||
function SetPreviewElement( previewEl )
|
{
|
||||||
{
|
SetAttribute( e, 'class', GetE('txtAttClasses').value ) ;
|
||||||
ePreview = previewEl ;
|
SetAttribute( e, 'style', GetE('txtAttStyle').value ) ;
|
||||||
|
}
|
||||||
if ( GetE('txtUrl').value.length > 0 )
|
}
|
||||||
UpdatePreview() ;
|
|
||||||
}
|
var ePreview ;
|
||||||
|
|
||||||
function UpdatePreview()
|
function SetPreviewElement( previewEl )
|
||||||
{
|
{
|
||||||
if ( !ePreview )
|
ePreview = previewEl ;
|
||||||
return ;
|
|
||||||
|
if ( GetE('txtUrl').value.length > 0 )
|
||||||
while ( ePreview.firstChild )
|
UpdatePreview() ;
|
||||||
ePreview.removeChild( ePreview.firstChild ) ;
|
}
|
||||||
|
|
||||||
if ( GetE('txtUrl').value.length == 0 )
|
function UpdatePreview()
|
||||||
ePreview.innerHTML = ' ' ;
|
{
|
||||||
else
|
if ( !ePreview )
|
||||||
{
|
return ;
|
||||||
var oDoc = ePreview.ownerDocument || ePreview.document ;
|
|
||||||
var e = oDoc.createElement( 'EMBED' ) ;
|
while ( ePreview.firstChild )
|
||||||
|
ePreview.removeChild( ePreview.firstChild ) ;
|
||||||
e.src = GetE('txtUrl').value ;
|
|
||||||
e.type = 'application/x-shockwave-flash' ;
|
if ( GetE('txtUrl').value.length == 0 )
|
||||||
e.width = '100%' ;
|
ePreview.innerHTML = ' ' ;
|
||||||
e.height = '100%' ;
|
else
|
||||||
|
{
|
||||||
ePreview.appendChild( e ) ;
|
var oDoc = ePreview.ownerDocument || ePreview.document ;
|
||||||
}
|
var e = oDoc.createElement( 'EMBED' ) ;
|
||||||
}
|
|
||||||
|
e.src = GetE('txtUrl').value ;
|
||||||
// <embed id="ePreview" src="fck_flash/claims.swf" width="100%" height="100%" style="visibility:hidden" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
|
e.type = 'application/x-shockwave-flash' ;
|
||||||
|
e.width = '100%' ;
|
||||||
function BrowseServer()
|
e.height = '100%' ;
|
||||||
{
|
|
||||||
OpenFileBrowser( FCKConfig.FlashBrowserURL, FCKConfig.FlashBrowserWindowWidth, FCKConfig.FlashBrowserWindowHeight ) ;
|
ePreview.appendChild( e ) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function SetUrl( url, width, height )
|
|
||||||
{
|
// <embed id="ePreview" src="fck_flash/claims.swf" width="100%" height="100%" style="visibility:hidden" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
|
||||||
GetE('txtUrl').value = url ;
|
|
||||||
|
function BrowseServer()
|
||||||
if ( width )
|
{
|
||||||
GetE('txtWidth').value = width ;
|
OpenFileBrowser( FCKConfig.FlashBrowserURL, FCKConfig.FlashBrowserWindowWidth, FCKConfig.FlashBrowserWindowHeight ) ;
|
||||||
|
}
|
||||||
if ( height )
|
|
||||||
GetE('txtHeight').value = height ;
|
function SetUrl( url, width, height )
|
||||||
|
{
|
||||||
UpdatePreview() ;
|
GetE('txtUrl').value = url ;
|
||||||
|
|
||||||
window.parent.SetSelectedTab( 'Info' ) ;
|
if ( width )
|
||||||
}
|
GetE('txtWidth').value = width ;
|
||||||
|
|
||||||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
if ( height )
|
||||||
{
|
GetE('txtHeight').value = height ;
|
||||||
switch ( errorNumber )
|
|
||||||
{
|
UpdatePreview() ;
|
||||||
case 0 : // No errors
|
|
||||||
alert( 'Your file has been successfully uploaded' ) ;
|
window.parent.SetSelectedTab( 'Info' ) ;
|
||||||
break ;
|
}
|
||||||
case 1 : // Custom error
|
|
||||||
alert( customMsg ) ;
|
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
||||||
return ;
|
{
|
||||||
case 101 : // Custom warning
|
switch ( errorNumber )
|
||||||
alert( customMsg ) ;
|
{
|
||||||
break ;
|
case 0 : // No errors
|
||||||
case 201 :
|
alert( 'Your file has been successfully uploaded' ) ;
|
||||||
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
|
break ;
|
||||||
break ;
|
case 1 : // Custom error
|
||||||
case 202 :
|
alert( customMsg ) ;
|
||||||
alert( 'Invalid file type' ) ;
|
return ;
|
||||||
return ;
|
case 101 : // Custom warning
|
||||||
case 203 :
|
alert( customMsg ) ;
|
||||||
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
|
break ;
|
||||||
return ;
|
case 201 :
|
||||||
default :
|
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
|
||||||
alert( 'Error on file upload. Error number: ' + errorNumber ) ;
|
break ;
|
||||||
return ;
|
case 202 :
|
||||||
}
|
alert( 'Invalid file type' ) ;
|
||||||
|
return ;
|
||||||
SetUrl( fileUrl ) ;
|
case 203 :
|
||||||
GetE('frmUpload').reset() ;
|
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
|
||||||
}
|
return ;
|
||||||
|
default :
|
||||||
var oUploadAllowedExtRegex = new RegExp( FCKConfig.FlashUploadAllowedExtensions, 'i' ) ;
|
alert( 'Error on file upload. Error number: ' + errorNumber ) ;
|
||||||
var oUploadDeniedExtRegex = new RegExp( FCKConfig.FlashUploadDeniedExtensions, 'i' ) ;
|
return ;
|
||||||
|
}
|
||||||
function CheckUpload()
|
|
||||||
{
|
SetUrl( fileUrl ) ;
|
||||||
var sFile = GetE('txtUploadFile').value ;
|
GetE('frmUpload').reset() ;
|
||||||
|
}
|
||||||
if ( sFile.length == 0 )
|
|
||||||
{
|
var oUploadAllowedExtRegex = new RegExp( FCKConfig.FlashUploadAllowedExtensions, 'i' ) ;
|
||||||
alert( 'Please select a file to upload' ) ;
|
var oUploadDeniedExtRegex = new RegExp( FCKConfig.FlashUploadDeniedExtensions, 'i' ) ;
|
||||||
return false ;
|
|
||||||
}
|
function CheckUpload()
|
||||||
|
{
|
||||||
if ( ( FCKConfig.FlashUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) ||
|
var sFile = GetE('txtUploadFile').value ;
|
||||||
( FCKConfig.FlashUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) )
|
|
||||||
{
|
if ( sFile.length == 0 )
|
||||||
OnUploadCompleted( 202 ) ;
|
{
|
||||||
return false ;
|
alert( 'Please select a file to upload' ) ;
|
||||||
}
|
return false ;
|
||||||
|
}
|
||||||
return true ;
|
|
||||||
|
if ( ( FCKConfig.FlashUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) ||
|
||||||
|
( FCKConfig.FlashUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) )
|
||||||
|
{
|
||||||
|
OnUploadCompleted( 202 ) ;
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true ;
|
||||||
}
|
}
|
||||||
@@ -1,42 +1,50 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_flash_preview.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Preview page for the Flash dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_flash_preview.html
|
||||||
<title></title>
|
* Preview page for the Flash dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
*
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* File Authors:
|
||||||
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script language="javascript">
|
-->
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
// Sets the Skin CSS
|
<html>
|
||||||
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
<head>
|
||||||
|
<title></title>
|
||||||
if ( window.parent.FCKConfig.BaseHref.length > 0 )
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
|
<meta name="robots" content="noindex, nofollow">
|
||||||
|
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
||||||
window.onload = function()
|
<script language="javascript">
|
||||||
{
|
|
||||||
window.parent.SetPreviewElement( document.body ) ;
|
// Sets the Skin CSS
|
||||||
}
|
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
||||||
|
|
||||||
</script>
|
if ( window.parent.FCKConfig.BaseHref.length > 0 )
|
||||||
</head>
|
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
|
||||||
<body style="COLOR: #000000; BACKGROUND-COLOR: #ffffff"></body>
|
|
||||||
</html>
|
window.onload = function()
|
||||||
|
{
|
||||||
|
window.parent.SetPreviewElement( document.body ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="COLOR: #000000; BACKGROUND-COLOR: #ffffff"></body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,101 +1,109 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_form.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Checkbox dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Checkbox Properties</title>
|
* File Name: fck_form.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Form dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title></title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'FORM' ) ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'FORM' ) ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtAction').value = oActiveEl.action ;
|
window.onload = function()
|
||||||
GetE('txtMethod').value = oActiveEl.method ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
else
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oActiveEl = null ;
|
|
||||||
|
if ( oActiveEl )
|
||||||
window.parent.SetOkButton( true ) ;
|
{
|
||||||
}
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
|
GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ;
|
||||||
function Ok()
|
GetE('txtMethod').value = oActiveEl.method ;
|
||||||
{
|
}
|
||||||
if ( !oActiveEl )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'FORM' ) ;
|
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
window.parent.SetOkButton( true ) ;
|
||||||
oActiveEl.innerHTML = ' ' ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
{
|
||||||
SetAttribute( oActiveEl, 'action' , GetE('txtAction').value ) ;
|
if ( !oActiveEl )
|
||||||
oActiveEl.method = GetE('txtMethod').value ;
|
{
|
||||||
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'FORM' ) ;
|
||||||
return true ;
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
}
|
oActiveEl.innerHTML = ' ' ;
|
||||||
|
}
|
||||||
</script>
|
|
||||||
</head>
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
SetAttribute( oActiveEl, 'action' , GetE('txtAction').value ) ;
|
||||||
<table height="100%" width="100%">
|
oActiveEl.method = GetE('txtMethod').value ;
|
||||||
<tr>
|
|
||||||
<td>
|
return true ;
|
||||||
<table cellspacing="0" cellpadding="0" width="80%" border="0" valign="top" align="center">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgFormName">Name</span><br>
|
</head>
|
||||||
<input style="WIDTH: 100%" type="text" id="txtName">
|
<body style="overflow: hidden">
|
||||||
</td>
|
<table width="100%" style="height: 100%">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td align="center">
|
||||||
<td>
|
<table cellspacing="0" cellpadding="0" width="80%" border="0">
|
||||||
<span fckLang="DlgFormAction">Action</span><br>
|
<tr>
|
||||||
<input style="WIDTH: 100%" type="text" id="txtAction">
|
<td>
|
||||||
</td>
|
<span fcklang="DlgFormName">Name</span><br />
|
||||||
</tr>
|
<input style="width: 100%" type="text" id="txtName" />
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
<span fckLang="DlgFormMethod">Method</span><br>
|
<tr>
|
||||||
<select id="txtMethod">
|
<td>
|
||||||
<option value="get" selected>GET</option>
|
<span fcklang="DlgFormAction">Action</span><br />
|
||||||
<option value="post">POST</option>
|
<input style="width: 100%" type="text" id="txtAction" />
|
||||||
</select>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</td>
|
<span fcklang="DlgFormMethod">Method</span><br />
|
||||||
</tr>
|
<select id="txtMethod">
|
||||||
</table>
|
<option value="get" selected="selected">GET</option>
|
||||||
</body>
|
<option value="post">POST</option>
|
||||||
</html>
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,91 +1,99 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_hiddenfield.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Hidden Field dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Hidden Field Properties</title>
|
* File Name: fck_hiddenfield.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Hidden Field dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Hidden Field Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta content="noindex, nofollow" name="robots">
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'hidden' )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtValue').value = oActiveEl.value ;
|
window.onload = function()
|
||||||
}
|
{
|
||||||
else
|
// First of all, translate the dialog box texts
|
||||||
oActiveEl = null ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
|
|
||||||
window.parent.SetOkButton( true ) ;
|
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'hidden' )
|
||||||
}
|
{
|
||||||
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
|
GetE('txtValue').value = oActiveEl.value ;
|
||||||
function Ok()
|
}
|
||||||
{
|
else
|
||||||
if ( !oActiveEl )
|
oActiveEl = null ;
|
||||||
{
|
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
window.parent.SetOkButton( true ) ;
|
||||||
oActiveEl.type = 'hidden' ;
|
}
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
{
|
||||||
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
return true ;
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
}
|
oActiveEl.type = 'hidden' ;
|
||||||
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
</script>
|
}
|
||||||
</head>
|
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
<table height="100%" width="100%">
|
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgHiddenName">Name</span><br>
|
</head>
|
||||||
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
<body style="OVERFLOW: hidden" scroll="no">
|
||||||
</td>
|
<table height="100%" width="100%">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td align="center">
|
||||||
<td>
|
<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
|
||||||
<span fckLang="DlgHiddenValue">Value</span><br>
|
<tr>
|
||||||
<input type="text" size="30" id="txtValue" style="WIDTH: 100%">
|
<td>
|
||||||
</td>
|
<span fckLang="DlgHiddenName">Name</span><br>
|
||||||
</tr>
|
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
||||||
</table>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</body>
|
<span fckLang="DlgHiddenValue">Value</span><br>
|
||||||
</html>
|
<input type="text" size="30" id="txtValue" style="WIDTH: 100%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,248 +1,256 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_image.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Image Properties dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
*
|
||||||
<head>
|
* File Name: fck_image.html
|
||||||
<title>Image Properties</title>
|
* Image Properties dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* File Authors:
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script src="fck_image/fck_image.js" type="text/javascript"></script>
|
-->
|
||||||
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
</head>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<body scroll="no" style="overflow: hidden">
|
<head>
|
||||||
<div id="divInfo">
|
<title>Image Properties</title>
|
||||||
<table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<tr>
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<td>
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
<script src="fck_image/fck_image.js" type="text/javascript"></script>
|
||||||
<tr>
|
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
||||||
<td width="100%">
|
</head>
|
||||||
<span fcklang="DlgImgURL">URL</span>
|
<body scroll="no" style="overflow: hidden">
|
||||||
</td>
|
<div id="divInfo">
|
||||||
<td id="tdBrowse" style="display: none" nowrap="nowrap" rowspan="2">
|
<table cellspacing="1" cellpadding="1" border="0" width="100%" height="100%">
|
||||||
|
<tr>
|
||||||
<input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server"
|
<td>
|
||||||
fcklang="DlgBtnBrowseServer" />
|
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td width="100%">
|
||||||
<tr>
|
<span fcklang="DlgImgURL">URL</span>
|
||||||
<td valign="top">
|
</td>
|
||||||
<input id="txtUrl" style="width: 100%" type="text" onblur="UpdatePreview();" />
|
<td id="tdBrowse" style="display: none" nowrap="nowrap" rowspan="2">
|
||||||
</td>
|
|
||||||
</tr>
|
<input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server"
|
||||||
</table>
|
fcklang="DlgBtnBrowseServer" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td valign="top">
|
||||||
<span fcklang="DlgImgAlt">Short Description</span><br />
|
<input id="txtUrl" style="width: 100%" type="text" onblur="UpdatePreview();" />
|
||||||
<input id="txtAlt" style="width: 100%" type="text" /><br />
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
<tr height="100%">
|
</td>
|
||||||
<td valign="top">
|
</tr>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td valign="top">
|
<span fcklang="DlgImgAlt">Short Description</span><br />
|
||||||
<br />
|
<input id="txtAlt" style="width: 100%" type="text" /><br />
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td nowrap="nowrap">
|
<tr height="100%">
|
||||||
<span fcklang="DlgImgWidth">Width</span> </td>
|
<td valign="top">
|
||||||
<td>
|
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
|
||||||
<input type="text" size="3" id="txtWidth" onkeyup="OnSizeChanged('Width',this.value);" /></td>
|
<tr>
|
||||||
<td rowspan="2">
|
<td valign="top">
|
||||||
<div id="btnLockSizes" class="BtnLocked" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';"
|
<br />
|
||||||
onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" title="Lock Sizes"
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
onclick="SwitchLock(this);">
|
<tr>
|
||||||
</div>
|
<td nowrap="nowrap">
|
||||||
</td>
|
<span fcklang="DlgImgWidth">Width</span> </td>
|
||||||
<td rowspan="2">
|
<td>
|
||||||
<div id="btnResetSize" class="BtnReset" onmouseover="this.className='BtnReset BtnOver';"
|
<input type="text" size="3" id="txtWidth" onkeyup="OnSizeChanged('Width',this.value);" /></td>
|
||||||
onmouseout="this.className='BtnReset';" title="Reset Size" onclick="ResetSizes();">
|
<td rowspan="2">
|
||||||
</div>
|
<div id="btnLockSizes" class="BtnLocked" onmouseover="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';"
|
||||||
</td>
|
onmouseout="this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );" title="Lock Sizes"
|
||||||
</tr>
|
onclick="SwitchLock(this);">
|
||||||
<tr>
|
</div>
|
||||||
<td nowrap="nowrap">
|
</td>
|
||||||
<span fcklang="DlgImgHeight">Height</span> </td>
|
<td rowspan="2">
|
||||||
<td>
|
<div id="btnResetSize" class="BtnReset" onmouseover="this.className='BtnReset BtnOver';"
|
||||||
<input type="text" size="3" id="txtHeight" onkeyup="OnSizeChanged('Height',this.value);" /></td>
|
onmouseout="this.className='BtnReset';" title="Reset Size" onclick="ResetSizes();">
|
||||||
</tr>
|
</div>
|
||||||
</table>
|
</td>
|
||||||
<br />
|
</tr>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
<tr>
|
||||||
<tr>
|
<td nowrap="nowrap">
|
||||||
<td nowrap="nowrap">
|
<span fcklang="DlgImgHeight">Height</span> </td>
|
||||||
<span fcklang="DlgImgBorder">Border</span> </td>
|
<td>
|
||||||
<td>
|
<input type="text" size="3" id="txtHeight" onkeyup="OnSizeChanged('Height',this.value);" /></td>
|
||||||
<input type="text" size="2" value="" id="txtBorder" onkeyup="UpdatePreview();" /></td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
<br />
|
||||||
<td nowrap="nowrap">
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
<span fcklang="DlgImgHSpace">HSpace</span> </td>
|
<tr>
|
||||||
<td>
|
<td nowrap="nowrap">
|
||||||
<input type="text" size="2" id="txtHSpace" onkeyup="UpdatePreview();" /></td>
|
<span fcklang="DlgImgBorder">Border</span> </td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<input type="text" size="2" value="" id="txtBorder" onkeyup="UpdatePreview();" /></td>
|
||||||
<td nowrap="nowrap">
|
</tr>
|
||||||
<span fcklang="DlgImgVSpace">VSpace</span> </td>
|
<tr>
|
||||||
<td>
|
<td nowrap="nowrap">
|
||||||
<input type="text" size="2" id="txtVSpace" onkeyup="UpdatePreview();" /></td>
|
<span fcklang="DlgImgHSpace">HSpace</span> </td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<input type="text" size="2" id="txtHSpace" onkeyup="UpdatePreview();" /></td>
|
||||||
<td nowrap="nowrap">
|
</tr>
|
||||||
<span fcklang="DlgImgAlign">Align</span> </td>
|
<tr>
|
||||||
<td>
|
<td nowrap="nowrap">
|
||||||
<select id="cmbAlign" onchange="UpdatePreview();">
|
<span fcklang="DlgImgVSpace">VSpace</span> </td>
|
||||||
<option value="" selected="selected"></option>
|
<td>
|
||||||
<option fcklang="DlgImgAlignLeft" value="left">Left</option>
|
<input type="text" size="2" id="txtVSpace" onkeyup="UpdatePreview();" /></td>
|
||||||
<option fcklang="DlgImgAlignAbsBottom" value="absBottom">Abs Bottom</option>
|
</tr>
|
||||||
<option fcklang="DlgImgAlignAbsMiddle" value="absMiddle">Abs Middle</option>
|
<tr>
|
||||||
<option fcklang="DlgImgAlignBaseline" value="baseline">Baseline</option>
|
<td nowrap="nowrap">
|
||||||
<option fcklang="DlgImgAlignBottom" value="bottom">Bottom</option>
|
<span fcklang="DlgImgAlign">Align</span> </td>
|
||||||
<option fcklang="DlgImgAlignMiddle" value="middle">Middle</option>
|
<td>
|
||||||
<option fcklang="DlgImgAlignRight" value="right">Right</option>
|
<select id="cmbAlign" onchange="UpdatePreview();">
|
||||||
<option fcklang="DlgImgAlignTextTop" value="textTop">Text Top</option>
|
<option value="" selected="selected"></option>
|
||||||
<option fcklang="DlgImgAlignTop" value="top">Top</option>
|
<option fcklang="DlgImgAlignLeft" value="left">Left</option>
|
||||||
</select>
|
<option fcklang="DlgImgAlignAbsBottom" value="absBottom">Abs Bottom</option>
|
||||||
</td>
|
<option fcklang="DlgImgAlignAbsMiddle" value="absMiddle">Abs Middle</option>
|
||||||
</tr>
|
<option fcklang="DlgImgAlignBaseline" value="baseline">Baseline</option>
|
||||||
</table>
|
<option fcklang="DlgImgAlignBottom" value="bottom">Bottom</option>
|
||||||
</td>
|
<option fcklang="DlgImgAlignMiddle" value="middle">Middle</option>
|
||||||
<td>
|
<option fcklang="DlgImgAlignRight" value="right">Right</option>
|
||||||
</td>
|
<option fcklang="DlgImgAlignTextTop" value="textTop">Text Top</option>
|
||||||
<td width="100%" valign="top">
|
<option fcklang="DlgImgAlignTop" value="top">Top</option>
|
||||||
<table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed">
|
</select>
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
<span fcklang="DlgImgPreview">Preview</span></td>
|
</table>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
<td>
|
||||||
<td valign="top">
|
</td>
|
||||||
<iframe class="ImagePreviewArea" src="fck_image/fck_image_preview.html" frameborder="0"
|
<td width="100%" valign="top">
|
||||||
marginheight="0" marginwidth="0"></iframe>
|
<table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed">
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<span fcklang="DlgImgPreview">Preview</span></td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td valign="top">
|
||||||
</td>
|
<iframe class="ImagePreviewArea" src="fck_image/fck_image_preview.html" frameborder="0"
|
||||||
</tr>
|
marginheight="0" marginwidth="0"></iframe>
|
||||||
</table>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div id="divUpload" style="display: none">
|
</table>
|
||||||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data"
|
</td>
|
||||||
action="" onsubmit="return CheckUpload();">
|
</tr>
|
||||||
<span fcklang="DlgLnkUpload">Upload</span><br />
|
</table>
|
||||||
<input id="txtUploadFile" style="width: 100%" type="file" size="40" name="NewFile" /><br />
|
</td>
|
||||||
<br />
|
</tr>
|
||||||
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" />
|
</table>
|
||||||
<iframe name="UploadWindow" style="display: none" src="../fckblank.html"></iframe>
|
</div>
|
||||||
</form>
|
<div id="divUpload" style="display: none">
|
||||||
</div>
|
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data"
|
||||||
<div id="divLink" style="display: none">
|
action="" onsubmit="return CheckUpload();">
|
||||||
<table cellspacing="1" cellpadding="1" border="0" width="100%">
|
<span fcklang="DlgLnkUpload">Upload</span><br />
|
||||||
<tr>
|
<input id="txtUploadFile" style="width: 100%" type="file" size="40" name="NewFile" /><br />
|
||||||
<td>
|
<br />
|
||||||
<div>
|
<input id="btnUpload" type="submit" value="Send it to the Server" fcklang="DlgLnkBtnUpload" />
|
||||||
<span fcklang="DlgLnkURL">URL</span><br />
|
<iframe name="UploadWindow" style="display: none" src="javascript:void(0)"></iframe>
|
||||||
<input id="txtLnkUrl" style="width: 100%" type="text" onblur="UpdatePreview();" />
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div id="divLnkBrowseServer" align="right">
|
<div id="divLink" style="display: none">
|
||||||
<input type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" onclick="LnkBrowseServer();" />
|
<table cellspacing="1" cellpadding="1" border="0" width="100%">
|
||||||
</div>
|
<tr>
|
||||||
<div>
|
<td>
|
||||||
<span fcklang="DlgLnkTarget">Target</span><br />
|
<div>
|
||||||
<select id="cmbLnkTarget">
|
<span fcklang="DlgLnkURL">URL</span><br />
|
||||||
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option>
|
<input id="txtLnkUrl" style="width: 100%" type="text" onblur="UpdatePreview();" />
|
||||||
<option value="_blank" fcklang="DlgLnkTargetBlank">New Window (_blank)</option>
|
</div>
|
||||||
<option value="_top" fcklang="DlgLnkTargetTop">Topmost Window (_top)</option>
|
<div id="divLnkBrowseServer" align="right">
|
||||||
<option value="_self" fcklang="DlgLnkTargetSelf">Same Window (_self)</option>
|
<input type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" onclick="LnkBrowseServer();" />
|
||||||
<option value="_parent" fcklang="DlgLnkTargetParent">Parent Window (_parent)</option>
|
</div>
|
||||||
</select>
|
<div>
|
||||||
</div>
|
<span fcklang="DlgLnkTarget">Target</span><br />
|
||||||
</td>
|
<select id="cmbLnkTarget">
|
||||||
</tr>
|
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option>
|
||||||
</table>
|
<option value="_blank" fcklang="DlgLnkTargetBlank">New Window (_blank)</option>
|
||||||
</div>
|
<option value="_top" fcklang="DlgLnkTargetTop">Topmost Window (_top)</option>
|
||||||
<div id="divAdvanced" style="display: none">
|
<option value="_self" fcklang="DlgLnkTargetSelf">Same Window (_self)</option>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
<option value="_parent" fcklang="DlgLnkTargetParent">Parent Window (_parent)</option>
|
||||||
<tr>
|
</select>
|
||||||
<td valign="top" width="50%">
|
</div>
|
||||||
<span fcklang="DlgGenId">Id</span><br />
|
</td>
|
||||||
<input id="txtAttId" style="width: 100%" type="text" />
|
</tr>
|
||||||
</td>
|
</table>
|
||||||
<td width="1">
|
</div>
|
||||||
</td>
|
<div id="divAdvanced" style="display: none">
|
||||||
<td valign="top">
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
<tr>
|
||||||
<tr>
|
<td valign="top" width="50%">
|
||||||
<td width="60%">
|
<span fcklang="DlgGenId">Id</span><br />
|
||||||
<span fcklang="DlgGenLangDir">Language Direction</span><br />
|
<input id="txtAttId" style="width: 100%" type="text" />
|
||||||
<select id="cmbAttLangDir" style="width: 100%">
|
</td>
|
||||||
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option>
|
<td width="1">
|
||||||
<option value="ltr" fcklang="DlgGenLangDirLtr">Left to Right (LTR)</option>
|
</td>
|
||||||
<option value="rtl" fcklang="DlgGenLangDirRtl">Right to Left (RTL)</option>
|
<td valign="top">
|
||||||
</select>
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
</td>
|
<tr>
|
||||||
<td width="1%">
|
<td width="60%">
|
||||||
</td>
|
<span fcklang="DlgGenLangDir">Language Direction</span><br />
|
||||||
<td nowrap="nowrap">
|
<select id="cmbAttLangDir" style="width: 100%">
|
||||||
<span fcklang="DlgGenLangCode">Language Code</span><br />
|
<option value="" fcklang="DlgGenNotSet" selected="selected"><not set></option>
|
||||||
<input id="txtAttLangCode" style="width: 100%" type="text" />
|
<option value="ltr" fcklang="DlgGenLangDirLtr">Left to Right (LTR)</option>
|
||||||
</td>
|
<option value="rtl" fcklang="DlgGenLangDirRtl">Right to Left (RTL)</option>
|
||||||
</tr>
|
</select>
|
||||||
</table>
|
</td>
|
||||||
</td>
|
<td width="1%">
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
<td nowrap="nowrap">
|
||||||
<td colspan="3">
|
<span fcklang="DlgGenLangCode">Language Code</span><br />
|
||||||
</td>
|
<input id="txtAttLangCode" style="width: 100%" type="text" />
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td colspan="3">
|
</table>
|
||||||
<span fcklang="DlgGenLongDescr">Long Description URL</span><br />
|
</td>
|
||||||
<input id="txtLongDesc" style="width: 100%" type="text" />
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td colspan="3">
|
||||||
<tr>
|
</td>
|
||||||
<td colspan="3">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td colspan="3">
|
||||||
<tr>
|
<span fcklang="DlgGenLongDescr">Long Description URL</span><br />
|
||||||
<td valign="top">
|
<input id="txtLongDesc" style="width: 100%" type="text" />
|
||||||
<span fcklang="DlgGenClass">Stylesheet Classes</span><br />
|
</td>
|
||||||
<input id="txtAttClasses" style="width: 100%" type="text" />
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
<td>
|
<td colspan="3">
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
</tr>
|
||||||
<span fcklang="DlgGenTitle">Advisory Title</span><br />
|
<tr>
|
||||||
<input id="txtAttTitle" style="width: 100%" type="text" />
|
<td valign="top">
|
||||||
</td>
|
<span fcklang="DlgGenClass">Stylesheet Classes</span><br />
|
||||||
</tr>
|
<input id="txtAttClasses" style="width: 100%" type="text" />
|
||||||
</table>
|
</td>
|
||||||
<span fcklang="DlgGenStyle">Style</span><br />
|
<td>
|
||||||
<input id="txtAttStyle" style="width: 100%" type="text" />
|
</td>
|
||||||
</div>
|
<td valign="top">
|
||||||
</body>
|
<span fcklang="DlgGenTitle">Advisory Title</span><br />
|
||||||
</html>
|
<input id="txtAttTitle" style="width: 100%" type="text" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<span fcklang="DlgGenStyle">Style</span><br />
|
||||||
|
<input id="txtAttStyle" style="width: 100%" type="text" />
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,481 +1,490 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_image.js
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Scripts related to the Image dialog window (see fck_image.html).
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
*
|
||||||
var FCK = oEditor.FCK ;
|
* File Name: fck_image.js
|
||||||
var FCKLang = oEditor.FCKLang ;
|
* Scripts related to the Image dialog window (see fck_image.html).
|
||||||
var FCKConfig = oEditor.FCKConfig ;
|
*
|
||||||
var FCKDebug = oEditor.FCKDebug ;
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ;
|
*/
|
||||||
|
|
||||||
//#### Dialog Tabs
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
var FCK = oEditor.FCK ;
|
||||||
// Set the dialog tabs.
|
var FCKLang = oEditor.FCKLang ;
|
||||||
window.parent.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ;
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
|
var FCKDebug = oEditor.FCKDebug ;
|
||||||
if ( !bImageButton && !FCKConfig.ImageDlgHideLink )
|
|
||||||
window.parent.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ;
|
var bImageButton = ( document.location.search.length > 0 && document.location.search.substr(1) == 'ImageButton' ) ;
|
||||||
|
|
||||||
if ( FCKConfig.ImageUpload )
|
//#### Dialog Tabs
|
||||||
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
|
|
||||||
|
// Set the dialog tabs.
|
||||||
if ( !FCKConfig.ImageDlgHideAdvanced )
|
window.parent.AddTab( 'Info', FCKLang.DlgImgInfoTab ) ;
|
||||||
window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;
|
|
||||||
|
if ( !bImageButton && !FCKConfig.ImageDlgHideLink )
|
||||||
// Function called when a dialog tag is selected.
|
window.parent.AddTab( 'Link', FCKLang.DlgImgLinkTab ) ;
|
||||||
function OnDialogTabChange( tabCode )
|
|
||||||
{
|
if ( FCKConfig.ImageUpload )
|
||||||
ShowE('divInfo' , ( tabCode == 'Info' ) ) ;
|
window.parent.AddTab( 'Upload', FCKLang.DlgLnkUpload ) ;
|
||||||
ShowE('divLink' , ( tabCode == 'Link' ) ) ;
|
|
||||||
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
|
if ( !FCKConfig.ImageDlgHideAdvanced )
|
||||||
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ;
|
window.parent.AddTab( 'Advanced', FCKLang.DlgAdvancedTag ) ;
|
||||||
}
|
|
||||||
|
// Function called when a dialog tag is selected.
|
||||||
// Get the selected image (if available).
|
function OnDialogTabChange( tabCode )
|
||||||
var oImage = FCK.Selection.GetSelectedElement() ;
|
{
|
||||||
|
ShowE('divInfo' , ( tabCode == 'Info' ) ) ;
|
||||||
if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) )
|
ShowE('divLink' , ( tabCode == 'Link' ) ) ;
|
||||||
oImage = null ;
|
ShowE('divUpload' , ( tabCode == 'Upload' ) ) ;
|
||||||
|
ShowE('divAdvanced' , ( tabCode == 'Advanced' ) ) ;
|
||||||
// Get the active link.
|
}
|
||||||
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;
|
|
||||||
|
// Get the selected image (if available).
|
||||||
var oImageOriginal ;
|
var oImage = FCK.Selection.GetSelectedElement() ;
|
||||||
|
|
||||||
function UpdateOriginal( resetSize )
|
if ( oImage && oImage.tagName != 'IMG' && !( oImage.tagName == 'INPUT' && oImage.type == 'image' ) )
|
||||||
{
|
oImage = null ;
|
||||||
if ( !eImgPreview )
|
|
||||||
return ;
|
// Get the active link.
|
||||||
|
var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ;
|
||||||
if ( GetE('txtUrl').value.length == 0 )
|
|
||||||
{
|
var oImageOriginal ;
|
||||||
oImageOriginal = null ;
|
|
||||||
return ;
|
function UpdateOriginal( resetSize )
|
||||||
}
|
{
|
||||||
|
if ( !eImgPreview )
|
||||||
oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ;
|
return ;
|
||||||
|
|
||||||
if ( resetSize )
|
if ( GetE('txtUrl').value.length == 0 )
|
||||||
{
|
{
|
||||||
oImageOriginal.onload = function()
|
oImageOriginal = null ;
|
||||||
{
|
return ;
|
||||||
this.onload = null ;
|
}
|
||||||
ResetSizes() ;
|
|
||||||
}
|
oImageOriginal = document.createElement( 'IMG' ) ; // new Image() ;
|
||||||
}
|
|
||||||
|
if ( resetSize )
|
||||||
oImageOriginal.src = eImgPreview.src ;
|
{
|
||||||
}
|
oImageOriginal.onload = function()
|
||||||
|
{
|
||||||
var bPreviewInitialized ;
|
this.onload = null ;
|
||||||
|
ResetSizes() ;
|
||||||
window.onload = function()
|
}
|
||||||
{
|
}
|
||||||
// Translate the dialog box texts.
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
oImageOriginal.src = eImgPreview.src ;
|
||||||
|
}
|
||||||
GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ;
|
|
||||||
GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ;
|
var bPreviewInitialized ;
|
||||||
|
|
||||||
// Load the selected element information (if any).
|
window.onload = function()
|
||||||
LoadSelection() ;
|
{
|
||||||
|
// Translate the dialog box texts.
|
||||||
// Show/Hide the "Browse Server" button.
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ;
|
|
||||||
GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ;
|
GetE('btnLockSizes').title = FCKLang.DlgImgLockRatio ;
|
||||||
|
GetE('btnResetSize').title = FCKLang.DlgBtnResetSize ;
|
||||||
UpdateOriginal() ;
|
|
||||||
|
// Load the selected element information (if any).
|
||||||
// Set the actual uploader URL.
|
LoadSelection() ;
|
||||||
if ( FCKConfig.ImageUpload )
|
|
||||||
GetE('frmUpload').action = FCKConfig.ImageUploadURL ;
|
// Show/Hide the "Browse Server" button.
|
||||||
|
GetE('tdBrowse').style.display = FCKConfig.ImageBrowser ? '' : 'none' ;
|
||||||
window.parent.SetAutoSize( true ) ;
|
GetE('divLnkBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ;
|
||||||
|
|
||||||
// Activate the "OK" button.
|
UpdateOriginal() ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
}
|
// Set the actual uploader URL.
|
||||||
|
if ( FCKConfig.ImageUpload )
|
||||||
function LoadSelection()
|
GetE('frmUpload').action = FCKConfig.ImageUploadURL ;
|
||||||
{
|
|
||||||
if ( ! oImage ) return ;
|
window.parent.SetAutoSize( true ) ;
|
||||||
|
|
||||||
var sUrl = GetAttribute( oImage, '_fcksavedurl', '' ) ;
|
// Activate the "OK" button.
|
||||||
if ( sUrl.length == 0 )
|
window.parent.SetOkButton( true ) ;
|
||||||
sUrl = GetAttribute( oImage, 'src', '' ) ;
|
}
|
||||||
|
|
||||||
// TODO: Wait stable version and remove the following commented lines.
|
function LoadSelection()
|
||||||
// if ( sUrl.startsWith( FCK.BaseUrl ) )
|
{
|
||||||
// sUrl = sUrl.remove( 0, FCK.BaseUrl.length ) ;
|
if ( ! oImage ) return ;
|
||||||
|
|
||||||
GetE('txtUrl').value = sUrl ;
|
var sUrl = oImage.getAttribute( '_fcksavedurl' ) ;
|
||||||
GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ;
|
if ( sUrl == null )
|
||||||
GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ;
|
sUrl = GetAttribute( oImage, 'src', '' ) ;
|
||||||
GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ;
|
|
||||||
GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ;
|
GetE('txtUrl').value = sUrl ;
|
||||||
GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ;
|
GetE('txtAlt').value = GetAttribute( oImage, 'alt', '' ) ;
|
||||||
|
GetE('txtVSpace').value = GetAttribute( oImage, 'vspace', '' ) ;
|
||||||
var iWidth, iHeight ;
|
GetE('txtHSpace').value = GetAttribute( oImage, 'hspace', '' ) ;
|
||||||
|
GetE('txtBorder').value = GetAttribute( oImage, 'border', '' ) ;
|
||||||
var regexSize = /^\s*(\d+)px\s*$/i ;
|
GetE('cmbAlign').value = GetAttribute( oImage, 'align', '' ) ;
|
||||||
|
|
||||||
if ( oImage.style.width )
|
var iWidth, iHeight ;
|
||||||
{
|
|
||||||
var aMatch = oImage.style.width.match( regexSize ) ;
|
var regexSize = /^\s*(\d+)px\s*$/i ;
|
||||||
if ( aMatch )
|
|
||||||
{
|
if ( oImage.style.width )
|
||||||
iWidth = aMatch[1] ;
|
{
|
||||||
oImage.style.width = '' ;
|
var aMatchW = oImage.style.width.match( regexSize ) ;
|
||||||
}
|
if ( aMatchW )
|
||||||
}
|
{
|
||||||
|
iWidth = aMatchW[1] ;
|
||||||
if ( oImage.style.height )
|
oImage.style.width = '' ;
|
||||||
{
|
}
|
||||||
var aMatch = oImage.style.height.match( regexSize ) ;
|
}
|
||||||
if ( aMatch )
|
|
||||||
{
|
if ( oImage.style.height )
|
||||||
iHeight = aMatch[1] ;
|
{
|
||||||
oImage.style.height = '' ;
|
var aMatchH = oImage.style.height.match( regexSize ) ;
|
||||||
}
|
if ( aMatchH )
|
||||||
}
|
{
|
||||||
|
iHeight = aMatchH[1] ;
|
||||||
GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ;
|
oImage.style.height = '' ;
|
||||||
GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ;
|
}
|
||||||
|
}
|
||||||
// Get Advances Attributes
|
|
||||||
GetE('txtAttId').value = oImage.id ;
|
GetE('txtWidth').value = iWidth ? iWidth : GetAttribute( oImage, "width", '' ) ;
|
||||||
GetE('cmbAttLangDir').value = oImage.dir ;
|
GetE('txtHeight').value = iHeight ? iHeight : GetAttribute( oImage, "height", '' ) ;
|
||||||
GetE('txtAttLangCode').value = oImage.lang ;
|
|
||||||
GetE('txtAttTitle').value = oImage.title ;
|
// Get Advances Attributes
|
||||||
GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ;
|
GetE('txtAttId').value = oImage.id ;
|
||||||
GetE('txtLongDesc').value = oImage.longDesc ;
|
GetE('cmbAttLangDir').value = oImage.dir ;
|
||||||
|
GetE('txtAttLangCode').value = oImage.lang ;
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
GetE('txtAttTitle').value = oImage.title ;
|
||||||
GetE('txtAttStyle').value = oImage.style.cssText ;
|
GetE('txtLongDesc').value = oImage.longDesc ;
|
||||||
else
|
|
||||||
GetE('txtAttStyle').value = oImage.getAttribute('style',2) ;
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
|
{
|
||||||
if ( oLink )
|
GetE('txtAttClasses').value = oImage.getAttribute('className') || '' ;
|
||||||
{
|
GetE('txtAttStyle').value = oImage.style.cssText ;
|
||||||
var sUrl = GetAttribute( oLink, '_fcksavedurl', '' ) ;
|
}
|
||||||
if ( sUrl.length == 0 )
|
else
|
||||||
sUrl = oLink.getAttribute('href',2) ;
|
{
|
||||||
|
GetE('txtAttClasses').value = oImage.getAttribute('class',2) || '' ;
|
||||||
GetE('txtLnkUrl').value = sUrl ;
|
GetE('txtAttStyle').value = oImage.getAttribute('style',2) ;
|
||||||
GetE('cmbLnkTarget').value = oLink.target ;
|
}
|
||||||
}
|
|
||||||
|
if ( oLink )
|
||||||
UpdatePreview() ;
|
{
|
||||||
}
|
var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ;
|
||||||
|
if ( sLinkUrl == null )
|
||||||
//#### The OK button was hit.
|
sLinkUrl = oLink.getAttribute('href',2) ;
|
||||||
function Ok()
|
|
||||||
{
|
GetE('txtLnkUrl').value = sLinkUrl ;
|
||||||
if ( GetE('txtUrl').value.length == 0 )
|
GetE('cmbLnkTarget').value = oLink.target ;
|
||||||
{
|
}
|
||||||
window.parent.SetSelectedTab( 'Info' ) ;
|
|
||||||
GetE('txtUrl').focus() ;
|
UpdatePreview() ;
|
||||||
|
}
|
||||||
alert( FCKLang.DlgImgAlertUrl ) ;
|
|
||||||
|
//#### The OK button was hit.
|
||||||
return false ;
|
function Ok()
|
||||||
}
|
{
|
||||||
|
if ( GetE('txtUrl').value.length == 0 )
|
||||||
var bHasImage = ( oImage != null ) ;
|
{
|
||||||
|
window.parent.SetSelectedTab( 'Info' ) ;
|
||||||
if ( bHasImage && bImageButton && oImage.tagName == 'IMG' )
|
GetE('txtUrl').focus() ;
|
||||||
{
|
|
||||||
if ( confirm( 'Do you want to transform the selected image on a image button?' ) )
|
alert( FCKLang.DlgImgAlertUrl ) ;
|
||||||
oImage = null ;
|
|
||||||
}
|
return false ;
|
||||||
else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' )
|
}
|
||||||
{
|
|
||||||
if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) )
|
var bHasImage = ( oImage != null ) ;
|
||||||
oImage = null ;
|
|
||||||
}
|
if ( bHasImage && bImageButton && oImage.tagName == 'IMG' )
|
||||||
|
{
|
||||||
if ( !bHasImage )
|
if ( confirm( 'Do you want to transform the selected image on a image button?' ) )
|
||||||
{
|
oImage = null ;
|
||||||
if ( bImageButton )
|
}
|
||||||
{
|
else if ( bHasImage && !bImageButton && oImage.tagName == 'INPUT' )
|
||||||
oImage = FCK.EditorDocument.createElement( 'INPUT' ) ;
|
{
|
||||||
oImage.type = 'image' ;
|
if ( confirm( 'Do you want to transform the selected image button on a simple image?' ) )
|
||||||
oImage = FCK.InsertElementAndGetIt( oImage ) ;
|
oImage = null ;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
oImage = FCK.CreateElement( 'IMG' ) ;
|
if ( !bHasImage )
|
||||||
}
|
{
|
||||||
else
|
if ( bImageButton )
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
{
|
||||||
|
oImage = FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
UpdateImage( oImage ) ;
|
oImage.type = 'image' ;
|
||||||
|
oImage = FCK.InsertElementAndGetIt( oImage ) ;
|
||||||
var sLnkUrl = GetE('txtLnkUrl').value.trim() ;
|
}
|
||||||
|
else
|
||||||
if ( sLnkUrl.length == 0 )
|
oImage = FCK.CreateElement( 'IMG' ) ;
|
||||||
{
|
}
|
||||||
if ( oLink )
|
else
|
||||||
FCK.ExecuteNamedCommand( 'Unlink' ) ;
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
}
|
|
||||||
else
|
UpdateImage( oImage ) ;
|
||||||
{
|
|
||||||
if ( oLink ) // Modifying an existent link.
|
var sLnkUrl = GetE('txtLnkUrl').value.Trim() ;
|
||||||
oLink.href = sLnkUrl ;
|
|
||||||
else // Creating a new link.
|
if ( sLnkUrl.length == 0 )
|
||||||
{
|
{
|
||||||
if ( !bHasImage )
|
if ( oLink )
|
||||||
oEditor.FCKSelection.SelectNode( oImage ) ;
|
FCK.ExecuteNamedCommand( 'Unlink' ) ;
|
||||||
|
}
|
||||||
oLink = oEditor.FCK.CreateLink( sLnkUrl ) ;
|
else
|
||||||
|
{
|
||||||
if ( !bHasImage )
|
if ( oLink ) // Modifying an existent link.
|
||||||
{
|
oLink.href = sLnkUrl ;
|
||||||
oEditor.FCKSelection.SelectNode( oLink ) ;
|
else // Creating a new link.
|
||||||
oEditor.FCKSelection.Collapse( false ) ;
|
{
|
||||||
}
|
if ( !bHasImage )
|
||||||
}
|
oEditor.FCKSelection.SelectNode( oImage ) ;
|
||||||
|
|
||||||
SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ;
|
oLink = oEditor.FCK.CreateLink( sLnkUrl ) ;
|
||||||
SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ;
|
|
||||||
}
|
if ( !bHasImage )
|
||||||
|
{
|
||||||
return true ;
|
oEditor.FCKSelection.SelectNode( oLink ) ;
|
||||||
}
|
oEditor.FCKSelection.Collapse( false ) ;
|
||||||
|
}
|
||||||
function UpdateImage( e, skipId )
|
}
|
||||||
{
|
|
||||||
e.src = GetE('txtUrl').value ;
|
SetAttribute( oLink, '_fcksavedurl', sLnkUrl ) ;
|
||||||
SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ;
|
SetAttribute( oLink, 'target', GetE('cmbLnkTarget').value ) ;
|
||||||
SetAttribute( e, "alt" , GetE('txtAlt').value ) ;
|
}
|
||||||
SetAttribute( e, "width" , GetE('txtWidth').value ) ;
|
|
||||||
SetAttribute( e, "height", GetE('txtHeight').value ) ;
|
return true ;
|
||||||
SetAttribute( e, "vspace", GetE('txtVSpace').value ) ;
|
}
|
||||||
SetAttribute( e, "hspace", GetE('txtHSpace').value ) ;
|
|
||||||
SetAttribute( e, "border", GetE('txtBorder').value ) ;
|
function UpdateImage( e, skipId )
|
||||||
SetAttribute( e, "align" , GetE('cmbAlign').value ) ;
|
{
|
||||||
|
e.src = GetE('txtUrl').value ;
|
||||||
// Advances Attributes
|
SetAttribute( e, "_fcksavedurl", GetE('txtUrl').value ) ;
|
||||||
|
SetAttribute( e, "alt" , GetE('txtAlt').value ) ;
|
||||||
if ( ! skipId )
|
SetAttribute( e, "width" , GetE('txtWidth').value ) ;
|
||||||
SetAttribute( e, 'id', GetE('txtAttId').value ) ;
|
SetAttribute( e, "height", GetE('txtHeight').value ) ;
|
||||||
|
SetAttribute( e, "vspace", GetE('txtVSpace').value ) ;
|
||||||
SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ;
|
SetAttribute( e, "hspace", GetE('txtHSpace').value ) ;
|
||||||
SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ;
|
SetAttribute( e, "border", GetE('txtBorder').value ) ;
|
||||||
SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ;
|
SetAttribute( e, "align" , GetE('cmbAlign').value ) ;
|
||||||
SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ;
|
|
||||||
SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ;
|
// Advances Attributes
|
||||||
|
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
if ( ! skipId )
|
||||||
e.style.cssText = GetE('txtAttStyle').value ;
|
SetAttribute( e, 'id', GetE('txtAttId').value ) ;
|
||||||
else
|
|
||||||
SetAttribute( e, 'style', GetE('txtAttStyle').value ) ;
|
SetAttribute( e, 'dir' , GetE('cmbAttLangDir').value ) ;
|
||||||
}
|
SetAttribute( e, 'lang' , GetE('txtAttLangCode').value ) ;
|
||||||
|
SetAttribute( e, 'title' , GetE('txtAttTitle').value ) ;
|
||||||
var eImgPreview ;
|
SetAttribute( e, 'class' , GetE('txtAttClasses').value ) ;
|
||||||
var eImgPreviewLink ;
|
SetAttribute( e, 'longDesc' , GetE('txtLongDesc').value ) ;
|
||||||
|
|
||||||
function SetPreviewElements( imageElement, linkElement )
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
{
|
e.style.cssText = GetE('txtAttStyle').value ;
|
||||||
eImgPreview = imageElement ;
|
else
|
||||||
eImgPreviewLink = linkElement ;
|
SetAttribute( e, 'style', GetE('txtAttStyle').value ) ;
|
||||||
|
}
|
||||||
UpdatePreview() ;
|
|
||||||
UpdateOriginal() ;
|
var eImgPreview ;
|
||||||
|
var eImgPreviewLink ;
|
||||||
bPreviewInitialized = true ;
|
|
||||||
}
|
function SetPreviewElements( imageElement, linkElement )
|
||||||
|
{
|
||||||
function UpdatePreview()
|
eImgPreview = imageElement ;
|
||||||
{
|
eImgPreviewLink = linkElement ;
|
||||||
if ( !eImgPreview || !eImgPreviewLink )
|
|
||||||
return ;
|
UpdatePreview() ;
|
||||||
|
UpdateOriginal() ;
|
||||||
if ( GetE('txtUrl').value.length == 0 )
|
|
||||||
eImgPreviewLink.style.display = 'none' ;
|
bPreviewInitialized = true ;
|
||||||
else
|
}
|
||||||
{
|
|
||||||
UpdateImage( eImgPreview, true ) ;
|
function UpdatePreview()
|
||||||
|
{
|
||||||
if ( GetE('txtLnkUrl').value.trim().length > 0 )
|
if ( !eImgPreview || !eImgPreviewLink )
|
||||||
eImgPreviewLink.href = 'javascript:void(null);' ;
|
return ;
|
||||||
else
|
|
||||||
SetAttribute( eImgPreviewLink, 'href', '' ) ;
|
if ( GetE('txtUrl').value.length == 0 )
|
||||||
|
eImgPreviewLink.style.display = 'none' ;
|
||||||
eImgPreviewLink.style.display = '' ;
|
else
|
||||||
}
|
{
|
||||||
}
|
UpdateImage( eImgPreview, true ) ;
|
||||||
|
|
||||||
var bLockRatio = true ;
|
if ( GetE('txtLnkUrl').value.Trim().length > 0 )
|
||||||
|
eImgPreviewLink.href = 'javascript:void(null);' ;
|
||||||
function SwitchLock( lockButton )
|
else
|
||||||
{
|
SetAttribute( eImgPreviewLink, 'href', '' ) ;
|
||||||
bLockRatio = !bLockRatio ;
|
|
||||||
lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ;
|
eImgPreviewLink.style.display = '' ;
|
||||||
lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ;
|
}
|
||||||
|
}
|
||||||
if ( bLockRatio )
|
|
||||||
{
|
var bLockRatio = true ;
|
||||||
if ( GetE('txtWidth').value.length > 0 )
|
|
||||||
OnSizeChanged( 'Width', GetE('txtWidth').value ) ;
|
function SwitchLock( lockButton )
|
||||||
else
|
{
|
||||||
OnSizeChanged( 'Height', GetE('txtHeight').value ) ;
|
bLockRatio = !bLockRatio ;
|
||||||
}
|
lockButton.className = bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ;
|
||||||
}
|
lockButton.title = bLockRatio ? 'Lock sizes' : 'Unlock sizes' ;
|
||||||
|
|
||||||
// Fired when the width or height input texts change
|
if ( bLockRatio )
|
||||||
function OnSizeChanged( dimension, value )
|
{
|
||||||
{
|
if ( GetE('txtWidth').value.length > 0 )
|
||||||
// Verifies if the aspect ration has to be mantained
|
OnSizeChanged( 'Width', GetE('txtWidth').value ) ;
|
||||||
if ( oImageOriginal && bLockRatio )
|
else
|
||||||
{
|
OnSizeChanged( 'Height', GetE('txtHeight').value ) ;
|
||||||
var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ;
|
}
|
||||||
|
}
|
||||||
if ( value.length == 0 || isNaN( value ) )
|
|
||||||
{
|
// Fired when the width or height input texts change
|
||||||
e.value = '' ;
|
function OnSizeChanged( dimension, value )
|
||||||
return ;
|
{
|
||||||
}
|
// Verifies if the aspect ration has to be mantained
|
||||||
|
if ( oImageOriginal && bLockRatio )
|
||||||
if ( dimension == 'Width' )
|
{
|
||||||
value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ;
|
var e = dimension == 'Width' ? GetE('txtHeight') : GetE('txtWidth') ;
|
||||||
else
|
|
||||||
value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ;
|
if ( value.length == 0 || isNaN( value ) )
|
||||||
|
{
|
||||||
if ( !isNaN( value ) )
|
e.value = '' ;
|
||||||
e.value = value ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdatePreview() ;
|
if ( dimension == 'Width' )
|
||||||
}
|
value = value == 0 ? 0 : Math.round( oImageOriginal.height * ( value / oImageOriginal.width ) ) ;
|
||||||
|
else
|
||||||
// Fired when the Reset Size button is clicked
|
value = value == 0 ? 0 : Math.round( oImageOriginal.width * ( value / oImageOriginal.height ) ) ;
|
||||||
function ResetSizes()
|
|
||||||
{
|
if ( !isNaN( value ) )
|
||||||
if ( ! oImageOriginal ) return ;
|
e.value = value ;
|
||||||
|
}
|
||||||
GetE('txtWidth').value = oImageOriginal.width ;
|
|
||||||
GetE('txtHeight').value = oImageOriginal.height ;
|
UpdatePreview() ;
|
||||||
|
}
|
||||||
UpdatePreview() ;
|
|
||||||
}
|
// Fired when the Reset Size button is clicked
|
||||||
|
function ResetSizes()
|
||||||
function BrowseServer()
|
{
|
||||||
{
|
if ( ! oImageOriginal ) return ;
|
||||||
OpenServerBrowser(
|
|
||||||
'Image',
|
GetE('txtWidth').value = oImageOriginal.width ;
|
||||||
FCKConfig.ImageBrowserURL,
|
GetE('txtHeight').value = oImageOriginal.height ;
|
||||||
FCKConfig.ImageBrowserWindowWidth,
|
|
||||||
FCKConfig.ImageBrowserWindowHeight ) ;
|
UpdatePreview() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function LnkBrowseServer()
|
function BrowseServer()
|
||||||
{
|
{
|
||||||
OpenServerBrowser(
|
OpenServerBrowser(
|
||||||
'Link',
|
'Image',
|
||||||
FCKConfig.LinkBrowserURL,
|
FCKConfig.ImageBrowserURL,
|
||||||
FCKConfig.LinkBrowserWindowWidth,
|
FCKConfig.ImageBrowserWindowWidth,
|
||||||
FCKConfig.LinkBrowserWindowHeight ) ;
|
FCKConfig.ImageBrowserWindowHeight ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function OpenServerBrowser( type, url, width, height )
|
function LnkBrowseServer()
|
||||||
{
|
{
|
||||||
sActualBrowser = type ;
|
OpenServerBrowser(
|
||||||
OpenFileBrowser( url, width, height ) ;
|
'Link',
|
||||||
}
|
FCKConfig.LinkBrowserURL,
|
||||||
|
FCKConfig.LinkBrowserWindowWidth,
|
||||||
var sActualBrowser ;
|
FCKConfig.LinkBrowserWindowHeight ) ;
|
||||||
|
}
|
||||||
function SetUrl( url, width, height, alt )
|
|
||||||
{
|
function OpenServerBrowser( type, url, width, height )
|
||||||
if ( sActualBrowser == 'Link' )
|
{
|
||||||
{
|
sActualBrowser = type ;
|
||||||
GetE('txtLnkUrl').value = url ;
|
OpenFileBrowser( url, width, height ) ;
|
||||||
UpdatePreview() ;
|
}
|
||||||
}
|
|
||||||
else
|
var sActualBrowser ;
|
||||||
{
|
|
||||||
GetE('txtUrl').value = url ;
|
function SetUrl( url, width, height, alt )
|
||||||
GetE('txtWidth').value = width ? width : '' ;
|
{
|
||||||
GetE('txtHeight').value = height ? height : '' ;
|
if ( sActualBrowser == 'Link' )
|
||||||
|
{
|
||||||
if ( alt )
|
GetE('txtLnkUrl').value = url ;
|
||||||
GetE('txtAlt').value = alt;
|
UpdatePreview() ;
|
||||||
|
}
|
||||||
UpdatePreview() ;
|
else
|
||||||
UpdateOriginal( true ) ;
|
{
|
||||||
}
|
GetE('txtUrl').value = url ;
|
||||||
|
GetE('txtWidth').value = width ? width : '' ;
|
||||||
window.parent.SetSelectedTab( 'Info' ) ;
|
GetE('txtHeight').value = height ? height : '' ;
|
||||||
}
|
|
||||||
|
if ( alt )
|
||||||
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
GetE('txtAlt').value = alt;
|
||||||
{
|
|
||||||
switch ( errorNumber )
|
UpdatePreview() ;
|
||||||
{
|
UpdateOriginal( true ) ;
|
||||||
case 0 : // No errors
|
}
|
||||||
alert( 'Your file has been successfully uploaded' ) ;
|
|
||||||
break ;
|
window.parent.SetSelectedTab( 'Info' ) ;
|
||||||
case 1 : // Custom error
|
}
|
||||||
alert( customMsg ) ;
|
|
||||||
return ;
|
function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg )
|
||||||
case 101 : // Custom warning
|
{
|
||||||
alert( customMsg ) ;
|
switch ( errorNumber )
|
||||||
break ;
|
{
|
||||||
case 201 :
|
case 0 : // No errors
|
||||||
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
|
alert( 'Your file has been successfully uploaded' ) ;
|
||||||
break ;
|
break ;
|
||||||
case 202 :
|
case 1 : // Custom error
|
||||||
alert( 'Invalid file type' ) ;
|
alert( customMsg ) ;
|
||||||
return ;
|
return ;
|
||||||
case 203 :
|
case 101 : // Custom warning
|
||||||
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
|
alert( customMsg ) ;
|
||||||
return ;
|
break ;
|
||||||
default :
|
case 201 :
|
||||||
alert( 'Error on file upload. Error number: ' + errorNumber ) ;
|
alert( 'A file with the same name is already available. The uploaded file has been renamed to "' + fileName + '"' ) ;
|
||||||
return ;
|
break ;
|
||||||
}
|
case 202 :
|
||||||
|
alert( 'Invalid file type' ) ;
|
||||||
sActualBrowser = ''
|
return ;
|
||||||
SetUrl( fileUrl ) ;
|
case 203 :
|
||||||
GetE('frmUpload').reset() ;
|
alert( "Security error. You probably don't have enough permissions to upload. Please check your server." ) ;
|
||||||
}
|
return ;
|
||||||
|
default :
|
||||||
var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ;
|
alert( 'Error on file upload. Error number: ' + errorNumber ) ;
|
||||||
var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ;
|
return ;
|
||||||
|
}
|
||||||
function CheckUpload()
|
|
||||||
{
|
sActualBrowser = '' ;
|
||||||
var sFile = GetE('txtUploadFile').value ;
|
SetUrl( fileUrl ) ;
|
||||||
|
GetE('frmUpload').reset() ;
|
||||||
if ( sFile.length == 0 )
|
}
|
||||||
{
|
|
||||||
alert( 'Please select a file to upload' ) ;
|
var oUploadAllowedExtRegex = new RegExp( FCKConfig.ImageUploadAllowedExtensions, 'i' ) ;
|
||||||
return false ;
|
var oUploadDeniedExtRegex = new RegExp( FCKConfig.ImageUploadDeniedExtensions, 'i' ) ;
|
||||||
}
|
|
||||||
|
function CheckUpload()
|
||||||
if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) ||
|
{
|
||||||
( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) )
|
var sFile = GetE('txtUploadFile').value ;
|
||||||
{
|
|
||||||
OnUploadCompleted( 202 ) ;
|
if ( sFile.length == 0 )
|
||||||
return false ;
|
{
|
||||||
}
|
alert( 'Please select a file to upload' ) ;
|
||||||
|
return false ;
|
||||||
return true ;
|
}
|
||||||
|
|
||||||
|
if ( ( FCKConfig.ImageUploadAllowedExtensions.length > 0 && !oUploadAllowedExtRegex.test( sFile ) ) ||
|
||||||
|
( FCKConfig.ImageUploadDeniedExtensions.length > 0 && oUploadDeniedExtRegex.test( sFile ) ) )
|
||||||
|
{
|
||||||
|
OnUploadCompleted( 202 ) ;
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true ;
|
||||||
}
|
}
|
||||||
@@ -1,61 +1,69 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_image_preview.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Preview page for the Image dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* Curiosity: http://en.wikipedia.org/wiki/Lorem_ipsum
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* File Name: fck_image_preview.html
|
||||||
<head>
|
* Preview page for the Image dialog window.
|
||||||
<title></title>
|
* Curiosity: http://en.wikipedia.org/wiki/Lorem_ipsum
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* File Authors:
|
||||||
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script type="text/javascript">
|
-->
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
// Sets the Skin CSS
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
<head>
|
||||||
|
<title></title>
|
||||||
if ( window.parent.FCKConfig.BaseHref.length > 0 )
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
|
<link href="../common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
||||||
window.onload = function()
|
<script type="text/javascript">
|
||||||
{
|
|
||||||
window.parent.SetPreviewElements(
|
// Sets the Skin CSS
|
||||||
document.getElementById( 'imgPreview' ),
|
document.write( '<link href="' + window.parent.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
||||||
document.getElementById( 'lnkPreview' ) ) ;
|
|
||||||
}
|
if ( window.parent.FCKConfig.BaseHref.length > 0 )
|
||||||
|
document.write( '<base href="' + window.parent.FCKConfig.BaseHref + '">' ) ;
|
||||||
</script>
|
|
||||||
</head>
|
window.onload = function()
|
||||||
<body style="color: #000000; background-color: #ffffff">
|
{
|
||||||
<a id="lnkPreview" onclick="return false;" style="cursor: default">
|
window.parent.SetPreviewElements(
|
||||||
<img id="imgPreview" onload="window.parent.UpdateOriginal();" style="display: none" /></a>Lorem
|
document.getElementById( 'imgPreview' ),
|
||||||
ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam.
|
document.getElementById( 'lnkPreview' ) ) ;
|
||||||
Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla.
|
}
|
||||||
Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis
|
|
||||||
euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce
|
</script>
|
||||||
mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie.
|
</head>
|
||||||
Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque
|
<body style="color: #000000; background-color: #ffffff">
|
||||||
egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem,
|
<a id="lnkPreview" onclick="return false;" style="cursor: default">
|
||||||
in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut
|
<img id="imgPreview" onload="window.parent.UpdateOriginal();" style="display: none" /></a>Lorem
|
||||||
placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy
|
ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam.
|
||||||
metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices,
|
Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla.
|
||||||
ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris
|
Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis
|
||||||
non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas
|
euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce
|
||||||
elementum. Nunc imperdiet gravida mauris.
|
mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie.
|
||||||
</body>
|
Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque
|
||||||
</html>
|
egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem,
|
||||||
|
in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut
|
||||||
|
placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy
|
||||||
|
metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices,
|
||||||
|
ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris
|
||||||
|
non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas
|
||||||
|
elementum. Nunc imperdiet gravida mauris.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,289 +1,297 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_link.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Link dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_link.html
|
||||||
<title>Link Properties</title>
|
* Link dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* File Authors:
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script src="fck_link/fck_link.js" type="text/javascript"></script>
|
-->
|
||||||
</head>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
<html>
|
||||||
<div id="divInfo" style="DISPLAY: none">
|
<head>
|
||||||
<span fckLang="DlgLnkType">Link Type</span><br />
|
<title>Link Properties</title>
|
||||||
<select id="cmbLinkType" onchange="SetLinkType(this.value);">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<option value="url" fckLang="DlgLnkTypeURL" selected="selected">URL</option>
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<option value="anchor" fckLang="DlgLnkTypeAnchor">Anchor in this page</option>
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
<option value="email" fckLang="DlgLnkTypeEMail">E-Mail</option>
|
<script src="fck_link/fck_link.js" type="text/javascript"></script>
|
||||||
</select>
|
</head>
|
||||||
<br />
|
<body scroll="no" style="OVERFLOW: hidden">
|
||||||
<br />
|
<div id="divInfo" style="DISPLAY: none">
|
||||||
<div id="divLinkTypeUrl">
|
<span fckLang="DlgLnkType">Link Type</span><br />
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0" dir="ltr">
|
<select id="cmbLinkType" onchange="SetLinkType(this.value);">
|
||||||
<tr>
|
<option value="url" fckLang="DlgLnkTypeURL" selected="selected">URL</option>
|
||||||
<td nowrap="nowrap">
|
<option value="anchor" fckLang="DlgLnkTypeAnchor">Anchor in this page</option>
|
||||||
<span fckLang="DlgLnkProto">Protocol</span><br />
|
<option value="email" fckLang="DlgLnkTypeEMail">E-Mail</option>
|
||||||
<select id="cmbLinkProtocol">
|
</select>
|
||||||
<option value="http://" selected="selected">http://</option>
|
<br />
|
||||||
<option value="https://">https://</option>
|
<br />
|
||||||
<option value="ftp://">ftp://</option>
|
<div id="divLinkTypeUrl">
|
||||||
<option value="news://">news://</option>
|
<table cellspacing="0" cellpadding="0" width="100%" border="0" dir="ltr">
|
||||||
<option value="" fckLang="DlgLnkProtoOther"><other></option>
|
<tr>
|
||||||
</select>
|
<td nowrap="nowrap">
|
||||||
</td>
|
<span fckLang="DlgLnkProto">Protocol</span><br />
|
||||||
<td nowrap="nowrap"> </td>
|
<select id="cmbLinkProtocol">
|
||||||
<td nowrap="nowrap" width="100%">
|
<option value="http://" selected="selected">http://</option>
|
||||||
<span fckLang="DlgLnkURL">URL</span><br />
|
<option value="https://">https://</option>
|
||||||
<input id="txtUrl" style="WIDTH: 100%" type="text" onkeyup="OnUrlChange();" onchange="OnUrlChange();" />
|
<option value="ftp://">ftp://</option>
|
||||||
</td>
|
<option value="news://">news://</option>
|
||||||
</tr>
|
<option value="" fckLang="DlgLnkProtoOther"><other></option>
|
||||||
</table>
|
</select>
|
||||||
<br />
|
</td>
|
||||||
<div id="divBrowseServer">
|
<td nowrap="nowrap"> </td>
|
||||||
<input type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" onclick="BrowseServer();" />
|
<td nowrap="nowrap" width="100%">
|
||||||
</div>
|
<span fckLang="DlgLnkURL">URL</span><br />
|
||||||
</div>
|
<input id="txtUrl" style="WIDTH: 100%" type="text" onkeyup="OnUrlChange();" onchange="OnUrlChange();" />
|
||||||
<div id="divLinkTypeAnchor" style="DISPLAY: none" align="center">
|
</td>
|
||||||
<div id="divSelAnchor" style="DISPLAY: none">
|
</tr>
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="70%">
|
</table>
|
||||||
<tr>
|
<br />
|
||||||
<td colspan="3">
|
<div id="divBrowseServer">
|
||||||
<span fckLang="DlgLnkAnchorSel">Select an Anchor</span>
|
<input type="button" value="Browse Server" fckLang="DlgBtnBrowseServer" onclick="BrowseServer();" />
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
<div id="divLinkTypeAnchor" style="DISPLAY: none" align="center">
|
||||||
<td width="50%">
|
<div id="divSelAnchor" style="DISPLAY: none">
|
||||||
<span fckLang="DlgLnkAnchorByName">By Anchor Name</span><br />
|
<table cellspacing="0" cellpadding="0" border="0" width="70%">
|
||||||
<select id="cmbAnchorName" onchange="GetE('cmbAnchorId').value='';" style="WIDTH: 100%">
|
<tr>
|
||||||
<option value="" selected="selected"></option>
|
<td colspan="3">
|
||||||
</select>
|
<span fckLang="DlgLnkAnchorSel">Select an Anchor</span>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
</tr>
|
||||||
<td width="50%">
|
<tr>
|
||||||
<span fckLang="DlgLnkAnchorById">By Element Id</span><br />
|
<td width="50%">
|
||||||
<select id="cmbAnchorId" onchange="GetE('cmbAnchorName').value='';" style="WIDTH: 100%">
|
<span fckLang="DlgLnkAnchorByName">By Anchor Name</span><br />
|
||||||
<option value="" selected="selected"></option>
|
<select id="cmbAnchorName" onchange="GetE('cmbAnchorId').value='';" style="WIDTH: 100%">
|
||||||
</select>
|
<option value="" selected="selected"></option>
|
||||||
</td>
|
</select>
|
||||||
</tr>
|
</td>
|
||||||
</table>
|
<td> </td>
|
||||||
</div>
|
<td width="50%">
|
||||||
<div id="divNoAnchor" style="DISPLAY: none">
|
<span fckLang="DlgLnkAnchorById">By Element Id</span><br />
|
||||||
<span fckLang="DlgLnkNoAnchors"><No anchors available in the document></span>
|
<select id="cmbAnchorId" onchange="GetE('cmbAnchorName').value='';" style="WIDTH: 100%">
|
||||||
</div>
|
<option value="" selected="selected"></option>
|
||||||
</div>
|
</select>
|
||||||
<div id="divLinkTypeEMail" style="DISPLAY: none">
|
</td>
|
||||||
<span fckLang="DlgLnkEMail">E-Mail Address</span><br />
|
</tr>
|
||||||
<input id="txtEMailAddress" style="WIDTH: 100%" type="text" /><br />
|
</table>
|
||||||
<span fckLang="DlgLnkEMailSubject">Message Subject</span><br />
|
</div>
|
||||||
<input id="txtEMailSubject" style="WIDTH: 100%" type="text" /><br />
|
<div id="divNoAnchor" style="DISPLAY: none">
|
||||||
<span fckLang="DlgLnkEMailBody">Message Body</span><br />
|
<span fckLang="DlgLnkNoAnchors"><No anchors available in the document></span>
|
||||||
<textarea id="txtEMailBody" style="WIDTH: 100%" rows="3" cols="20"></textarea>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div id="divLinkTypeEMail" style="DISPLAY: none">
|
||||||
<div id="divUpload" style="DISPLAY: none">
|
<span fckLang="DlgLnkEMail">E-Mail Address</span><br />
|
||||||
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
|
<input id="txtEMailAddress" style="WIDTH: 100%" type="text" /><br />
|
||||||
<span fckLang="DlgLnkUpload">Upload</span><br />
|
<span fckLang="DlgLnkEMailSubject">Message Subject</span><br />
|
||||||
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
|
<input id="txtEMailSubject" style="WIDTH: 100%" type="text" /><br />
|
||||||
<br />
|
<span fckLang="DlgLnkEMailBody">Message Body</span><br />
|
||||||
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
<textarea id="txtEMailBody" style="WIDTH: 100%" rows="3" cols="20"></textarea>
|
||||||
<iframe name="UploadWindow" style="DISPLAY: none" src="../fckblank.html"></iframe>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<div id="divUpload" style="DISPLAY: none">
|
||||||
<div id="divTarget" style="DISPLAY: none">
|
<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
<span fckLang="DlgLnkUpload">Upload</span><br />
|
||||||
<tr>
|
<input id="txtUploadFile" style="WIDTH: 100%" type="file" size="40" name="NewFile" /><br />
|
||||||
<td nowrap="nowrap">
|
<br />
|
||||||
<span fckLang="DlgLnkTarget">Target</span><br />
|
<input id="btnUpload" type="submit" value="Send it to the Server" fckLang="DlgLnkBtnUpload" />
|
||||||
<select id="cmbTarget" onchange="SetTarget(this.value);">
|
<iframe name="UploadWindow" style="DISPLAY: none" src="javascript:void(0)"></iframe>
|
||||||
<option value="" fckLang="DlgGenNotSet" selected="selected"><not set></option>
|
</form>
|
||||||
<option value="frame" fckLang="DlgLnkTargetFrame"><frame></option>
|
</div>
|
||||||
<option value="popup" fckLang="DlgLnkTargetPopup"><popup window></option>
|
<div id="divTarget" style="DISPLAY: none">
|
||||||
<option value="_blank" fckLang="DlgLnkTargetBlank">New Window (_blank)</option>
|
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||||
<option value="_top" fckLang="DlgLnkTargetTop">Topmost Window (_top)</option>
|
<tr>
|
||||||
<option value="_self" fckLang="DlgLnkTargetSelf">Same Window (_self)</option>
|
<td nowrap="nowrap">
|
||||||
<option value="_parent" fckLang="DlgLnkTargetParent">Parent Window (_parent)</option>
|
<span fckLang="DlgLnkTarget">Target</span><br />
|
||||||
</select>
|
<select id="cmbTarget" onchange="SetTarget(this.value);">
|
||||||
</td>
|
<option value="" fckLang="DlgGenNotSet" selected="selected"><not set></option>
|
||||||
<td> </td>
|
<option value="frame" fckLang="DlgLnkTargetFrame"><frame></option>
|
||||||
<td id="tdTargetFrame" nowrap="nowrap" width="100%">
|
<option value="popup" fckLang="DlgLnkTargetPopup"><popup window></option>
|
||||||
<span fckLang="DlgLnkTargetFrameName">Target Frame Name</span><br />
|
<option value="_blank" fckLang="DlgLnkTargetBlank">New Window (_blank)</option>
|
||||||
<input id="txtTargetFrame" style="WIDTH: 100%" type="text" onkeyup="OnTargetNameChange();"
|
<option value="_top" fckLang="DlgLnkTargetTop">Topmost Window (_top)</option>
|
||||||
onchange="OnTargetNameChange();" />
|
<option value="_self" fckLang="DlgLnkTargetSelf">Same Window (_self)</option>
|
||||||
</td>
|
<option value="_parent" fckLang="DlgLnkTargetParent">Parent Window (_parent)</option>
|
||||||
<td id="tdPopupName" style="DISPLAY: none" nowrap="nowrap" width="100%">
|
</select>
|
||||||
<span fckLang="DlgLnkPopWinName">Popup Window Name</span><br />
|
</td>
|
||||||
<input id="txtPopupName" style="WIDTH: 100%" type="text" />
|
<td> </td>
|
||||||
</td>
|
<td id="tdTargetFrame" nowrap="nowrap" width="100%">
|
||||||
</tr>
|
<span fckLang="DlgLnkTargetFrameName">Target Frame Name</span><br />
|
||||||
</table>
|
<input id="txtTargetFrame" style="WIDTH: 100%" type="text" onkeyup="OnTargetNameChange();"
|
||||||
<br />
|
onchange="OnTargetNameChange();" />
|
||||||
<table id="tablePopupFeatures" style="DISPLAY: none" cellspacing="0" cellpadding="0" align="center"
|
</td>
|
||||||
border="0">
|
<td id="tdPopupName" style="DISPLAY: none" nowrap="nowrap" width="100%">
|
||||||
<tr>
|
<span fckLang="DlgLnkPopWinName">Popup Window Name</span><br />
|
||||||
<td>
|
<input id="txtPopupName" style="WIDTH: 100%" type="text" />
|
||||||
<span fckLang="DlgLnkPopWinFeat">Popup Window Features</span><br />
|
</td>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
</tr>
|
||||||
<tr>
|
</table>
|
||||||
<td valign="top" nowrap="nowrap" width="50%">
|
<br />
|
||||||
<input id="chkPopupResizable" name="chkFeature" value="resizable" type="checkbox" /><label for="chkPopupResizable" fckLang="DlgLnkPopResize">Resizable</label><br />
|
<table id="tablePopupFeatures" style="DISPLAY: none" cellspacing="0" cellpadding="0" align="center"
|
||||||
<input id="chkPopupLocationBar" name="chkFeature" value="location" type="checkbox" /><label for="chkPopupLocationBar" fckLang="DlgLnkPopLocation">Location
|
border="0">
|
||||||
Bar</label><br />
|
<tr>
|
||||||
<input id="chkPopupManuBar" name="chkFeature" value="menubar" type="checkbox" /><label for="chkPopupManuBar" fckLang="DlgLnkPopMenu">Menu
|
<td>
|
||||||
Bar</label><br />
|
<span fckLang="DlgLnkPopWinFeat">Popup Window Features</span><br />
|
||||||
<input id="chkPopupScrollBars" name="chkFeature" value="scrollbars" type="checkbox" /><label for="chkPopupScrollBars" fckLang="DlgLnkPopScroll">Scroll
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
Bars</label>
|
<tr>
|
||||||
</td>
|
<td valign="top" nowrap="nowrap" width="50%">
|
||||||
<td></td>
|
<input id="chkPopupResizable" name="chkFeature" value="resizable" type="checkbox" /><label for="chkPopupResizable" fckLang="DlgLnkPopResize">Resizable</label><br />
|
||||||
<td valign="top" nowrap="nowrap" width="50%">
|
<input id="chkPopupLocationBar" name="chkFeature" value="location" type="checkbox" /><label for="chkPopupLocationBar" fckLang="DlgLnkPopLocation">Location
|
||||||
<input id="chkPopupStatusBar" name="chkFeature" value="status" type="checkbox" /><label for="chkPopupStatusBar" fckLang="DlgLnkPopStatus">Status
|
Bar</label><br />
|
||||||
Bar</label><br />
|
<input id="chkPopupManuBar" name="chkFeature" value="menubar" type="checkbox" /><label for="chkPopupManuBar" fckLang="DlgLnkPopMenu">Menu
|
||||||
<input id="chkPopupToolbar" name="chkFeature" value="toolbar" type="checkbox" /><label for="chkPopupToolbar" fckLang="DlgLnkPopToolbar">Toolbar</label><br />
|
Bar</label><br />
|
||||||
<input id="chkPopupFullScreen" name="chkFeature" value="fullscreen" type="checkbox" /><label for="chkPopupFullScreen" fckLang="DlgLnkPopFullScrn">Full
|
<input id="chkPopupScrollBars" name="chkFeature" value="scrollbars" type="checkbox" /><label for="chkPopupScrollBars" fckLang="DlgLnkPopScroll">Scroll
|
||||||
Screen (IE)</label><br />
|
Bars</label>
|
||||||
<input id="chkPopupDependent" name="chkFeature" value="dependent" type="checkbox" /><label for="chkPopupDependent" fckLang="DlgLnkPopDependent">Dependent
|
</td>
|
||||||
(Netscape)</label>
|
<td></td>
|
||||||
</td>
|
<td valign="top" nowrap="nowrap" width="50%">
|
||||||
</tr>
|
<input id="chkPopupStatusBar" name="chkFeature" value="status" type="checkbox" /><label for="chkPopupStatusBar" fckLang="DlgLnkPopStatus">Status
|
||||||
<tr>
|
Bar</label><br />
|
||||||
<td valign="top" nowrap="nowrap" width="50%"> </td>
|
<input id="chkPopupToolbar" name="chkFeature" value="toolbar" type="checkbox" /><label for="chkPopupToolbar" fckLang="DlgLnkPopToolbar">Toolbar</label><br />
|
||||||
<td></td>
|
<input id="chkPopupFullScreen" name="chkFeature" value="fullscreen" type="checkbox" /><label for="chkPopupFullScreen" fckLang="DlgLnkPopFullScrn">Full
|
||||||
<td valign="top" nowrap="nowrap" width="50%"></td>
|
Screen (IE)</label><br />
|
||||||
</tr>
|
<input id="chkPopupDependent" name="chkFeature" value="dependent" type="checkbox" /><label for="chkPopupDependent" fckLang="DlgLnkPopDependent">Dependent
|
||||||
<tr>
|
(Netscape)</label>
|
||||||
<td valign="top">
|
</td>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap"><span fckLang="DlgLnkPopWidth">Width</span></td>
|
<td valign="top" nowrap="nowrap" width="50%"> </td>
|
||||||
<td> <input id="txtPopupWidth" type="text" maxlength="4" size="4" /></td>
|
<td></td>
|
||||||
</tr>
|
<td valign="top" nowrap="nowrap" width="50%"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td nowrap="nowrap"><span fckLang="DlgLnkPopHeight">Height</span></td>
|
<tr>
|
||||||
<td> <input id="txtPopupHeight" type="text" maxlength="4" size="4" /></td>
|
<td valign="top">
|
||||||
</tr>
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
</table>
|
<tr>
|
||||||
</td>
|
<td nowrap="nowrap"><span fckLang="DlgLnkPopWidth">Width</span></td>
|
||||||
<td> </td>
|
<td> <input id="txtPopupWidth" type="text" maxlength="4" size="4" /></td>
|
||||||
<td valign="top">
|
</tr>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
<tr>
|
||||||
<tr>
|
<td nowrap="nowrap"><span fckLang="DlgLnkPopHeight">Height</span></td>
|
||||||
<td nowrap="nowrap"><span fckLang="DlgLnkPopLeft">Left Position</span></td>
|
<td> <input id="txtPopupHeight" type="text" maxlength="4" size="4" /></td>
|
||||||
<td> <input id="txtPopupLeft" type="text" maxlength="4" size="4" /></td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
</td>
|
||||||
<td nowrap="nowrap"><span fckLang="DlgLnkPopTop">Top Position</span></td>
|
<td> </td>
|
||||||
<td> <input id="txtPopupTop" type="text" maxlength="4" size="4" /></td>
|
<td valign="top">
|
||||||
</tr>
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
</table>
|
<tr>
|
||||||
</td>
|
<td nowrap="nowrap"><span fckLang="DlgLnkPopLeft">Left Position</span></td>
|
||||||
</tr>
|
<td> <input id="txtPopupLeft" type="text" maxlength="4" size="4" /></td>
|
||||||
</table>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap"><span fckLang="DlgLnkPopTop">Top Position</span></td>
|
||||||
</table>
|
<td> <input id="txtPopupTop" type="text" maxlength="4" size="4" /></td>
|
||||||
</div>
|
</tr>
|
||||||
<div id="divAttribs" style="DISPLAY: none">
|
</table>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td valign="top" width="50%">
|
</table>
|
||||||
<span fckLang="DlgGenId">Id</span><br />
|
</td>
|
||||||
<input id="txtAttId" style="WIDTH: 100%" type="text" />
|
</tr>
|
||||||
</td>
|
</table>
|
||||||
<td width="1"></td>
|
</div>
|
||||||
<td valign="top">
|
<div id="divAttribs" style="DISPLAY: none">
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="60%">
|
<td valign="top" width="50%">
|
||||||
<span fckLang="DlgGenLangDir">Language Direction</span><br />
|
<span fckLang="DlgGenId">Id</span><br />
|
||||||
<select id="cmbAttLangDir" style="WIDTH: 100%">
|
<input id="txtAttId" style="WIDTH: 100%" type="text" />
|
||||||
<option value="" fckLang="DlgGenNotSet" selected><not set></option>
|
</td>
|
||||||
<option value="ltr" fckLang="DlgGenLangDirLtr">Left to Right (LTR)</option>
|
<td width="1"></td>
|
||||||
<option value="rtl" fckLang="DlgGenLangDirRtl">Right to Left (RTL)</option>
|
<td valign="top">
|
||||||
</select>
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
</td>
|
<tr>
|
||||||
<td width="1%"> </td>
|
<td width="60%">
|
||||||
<td nowrap="nowrap"><span fckLang="DlgGenAccessKey">Access Key</span><br />
|
<span fckLang="DlgGenLangDir">Language Direction</span><br />
|
||||||
<input id="txtAttAccessKey" style="WIDTH: 100%" type="text" maxlength="1" size="1" />
|
<select id="cmbAttLangDir" style="WIDTH: 100%">
|
||||||
</td>
|
<option value="" fckLang="DlgGenNotSet" selected><not set></option>
|
||||||
</tr>
|
<option value="ltr" fckLang="DlgGenLangDirLtr">Left to Right (LTR)</option>
|
||||||
</table>
|
<option value="rtl" fckLang="DlgGenLangDirRtl">Right to Left (RTL)</option>
|
||||||
</td>
|
</select>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
<td width="1%"> </td>
|
||||||
<td valign="top" width="50%">
|
<td nowrap="nowrap"><span fckLang="DlgGenAccessKey">Access Key</span><br />
|
||||||
<span fckLang="DlgGenName">Name</span><br />
|
<input id="txtAttAccessKey" style="WIDTH: 100%" type="text" maxlength="1" size="1" />
|
||||||
<input id="txtAttName" style="WIDTH: 100%" type="text" />
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
<td width="1"></td>
|
</table>
|
||||||
<td valign="top">
|
</td>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="60%">
|
<td valign="top" width="50%">
|
||||||
<span fckLang="DlgGenLangCode">Language Code</span><br />
|
<span fckLang="DlgGenName">Name</span><br />
|
||||||
<input id="txtAttLangCode" style="WIDTH: 100%" type="text" />
|
<input id="txtAttName" style="WIDTH: 100%" type="text" />
|
||||||
</td>
|
</td>
|
||||||
<td width="1%"> </td>
|
<td width="1"></td>
|
||||||
<td nowrap="nowrap">
|
<td valign="top">
|
||||||
<span fckLang="DlgGenTabIndex">Tab Index</span><br />
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
<input id="txtAttTabIndex" style="WIDTH: 100%" type="text" maxlength="5" size="5" />
|
<tr>
|
||||||
</td>
|
<td width="60%">
|
||||||
</tr>
|
<span fckLang="DlgGenLangCode">Language Code</span><br />
|
||||||
</table>
|
<input id="txtAttLangCode" style="WIDTH: 100%" type="text" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td width="1%"> </td>
|
||||||
<tr>
|
<td nowrap="nowrap">
|
||||||
<td valign="top" width="50%"> </td>
|
<span fckLang="DlgGenTabIndex">Tab Index</span><br />
|
||||||
<td width="1"></td>
|
<input id="txtAttTabIndex" style="WIDTH: 100%" type="text" maxlength="5" size="5" />
|
||||||
<td valign="top"></td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
</table>
|
||||||
<td valign="top" width="50%">
|
</td>
|
||||||
<span fckLang="DlgGenTitle">Advisory Title</span><br />
|
</tr>
|
||||||
<input id="txtAttTitle" style="WIDTH: 100%" type="text" />
|
<tr>
|
||||||
</td>
|
<td valign="top" width="50%"> </td>
|
||||||
<td width="1"> </td>
|
<td width="1"></td>
|
||||||
<td valign="top">
|
<td valign="top"></td>
|
||||||
<span fckLang="DlgGenContType">Advisory Content Type</span><br />
|
</tr>
|
||||||
<input id="txtAttContentType" style="WIDTH: 100%" type="text" />
|
<tr>
|
||||||
</td>
|
<td valign="top" width="50%">
|
||||||
</tr>
|
<span fckLang="DlgGenTitle">Advisory Title</span><br />
|
||||||
<tr>
|
<input id="txtAttTitle" style="WIDTH: 100%" type="text" />
|
||||||
<td valign="top">
|
</td>
|
||||||
<span fckLang="DlgGenClass">Stylesheet Classes</span><br />
|
<td width="1"> </td>
|
||||||
<input id="txtAttClasses" style="WIDTH: 100%" type="text" />
|
<td valign="top">
|
||||||
</td>
|
<span fckLang="DlgGenContType">Advisory Content Type</span><br />
|
||||||
<td></td>
|
<input id="txtAttContentType" style="WIDTH: 100%" type="text" />
|
||||||
<td valign="top">
|
</td>
|
||||||
<span fckLang="DlgGenLinkCharset">Linked Resource Charset</span><br />
|
</tr>
|
||||||
<input id="txtAttCharSet" style="WIDTH: 100%" type="text" />
|
<tr>
|
||||||
</td>
|
<td valign="top">
|
||||||
</tr>
|
<span fckLang="DlgGenClass">Stylesheet Classes</span><br />
|
||||||
</table>
|
<input id="txtAttClasses" style="WIDTH: 100%" type="text" />
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
</td>
|
||||||
<tr>
|
<td></td>
|
||||||
<td>
|
<td valign="top">
|
||||||
<span fckLang="DlgGenStyle">Style</span><br />
|
<span fckLang="DlgGenLinkCharset">Linked Resource Charset</span><br />
|
||||||
<input id="txtAttStyle" style="WIDTH: 100%" type="text" />
|
<input id="txtAttCharSet" style="WIDTH: 100%" type="text" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
|
||||||
</body>
|
<tr>
|
||||||
</html>
|
<td>
|
||||||
|
<span fckLang="DlgGenStyle">Style</span><br />
|
||||||
|
<input id="txtAttStyle" style="WIDTH: 100%" type="text" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,101 +1,121 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_listprop.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Bulleted List dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Bulleted List Properties</title>
|
* File Name: fck_listprop.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Bulleted List dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
* Marcel J Bennett (start attribute)
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
-->
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
// Gets the document DOM
|
<head>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'UL' ) ;
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
var oActiveSel ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl )
|
var sListType = ( location.search == '?OL' ? 'OL' : 'UL' ) ;
|
||||||
oActiveSel = GetE('selBulleted') ;
|
|
||||||
else
|
var oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( sListType ) ;
|
||||||
{
|
var oActiveSel ;
|
||||||
oActiveEl = oEditor.FCKSelection.MoveToAncestorNode( 'OL' ) ;
|
|
||||||
if ( oActiveEl )
|
window.onload = function()
|
||||||
oActiveSel = GetE('selNumbered') ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oActiveSel.style.display = '' ;
|
|
||||||
|
if ( sListType == 'UL' )
|
||||||
if ( oActiveEl )
|
oActiveSel = GetE('selBulleted') ;
|
||||||
{
|
else
|
||||||
if ( oActiveEl.getAttribute('type') )
|
{
|
||||||
oActiveSel.value = oActiveEl.getAttribute('type').toLowerCase() ;
|
if ( oActiveEl )
|
||||||
}
|
{
|
||||||
|
oActiveSel = GetE('selNumbered') ;
|
||||||
window.parent.SetOkButton( true ) ;
|
GetE('eStart').style.display = '' ;
|
||||||
}
|
GetE('txtStartPosition').value = GetAttribute( oActiveEl, 'start' ) ;
|
||||||
|
}
|
||||||
function Ok()
|
}
|
||||||
{
|
|
||||||
if ( oActiveEl )
|
oActiveSel.style.display = '' ;
|
||||||
SetAttribute( oActiveEl, 'type' , oActiveSel.value ) ;
|
|
||||||
|
if ( oActiveEl )
|
||||||
return true ;
|
{
|
||||||
}
|
if ( oActiveEl.getAttribute('type') )
|
||||||
|
oActiveSel.value = oActiveEl.getAttribute('type').toLowerCase() ;
|
||||||
</script>
|
}
|
||||||
</head>
|
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
window.parent.SetOkButton( true ) ;
|
||||||
<table width="100%" height="100%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
function Ok()
|
||||||
<table cellspacing="0" cellpadding="0" border="0" align="center">
|
{
|
||||||
<tr>
|
if ( oActiveEl ){
|
||||||
<td>
|
SetAttribute( oActiveEl, 'type' , oActiveSel.value ) ;
|
||||||
<span fckLang="DlgLstType">List Type</span><br>
|
if(oActiveEl.tagName == 'OL')
|
||||||
<select id="selBulleted" style="DISPLAY: none">
|
SetAttribute( oActiveEl, 'start', GetE('txtStartPosition').value ) ;
|
||||||
<option value="" selected></option>
|
}
|
||||||
<option value="circle" fckLang="DlgLstTypeCircle">Circle</option>
|
|
||||||
<option value="disc" fckLang="DlgLstTypeDisc">Disc</option>
|
return true ;
|
||||||
<option value="square" fckLang="DlgLstTypeSquare">Square</option>
|
}
|
||||||
</select>
|
|
||||||
<select id="selNumbered" style="DISPLAY: none">
|
</script>
|
||||||
<option value="" selected></option>
|
</head>
|
||||||
<option value="1" fckLang="DlgLstTypeNumbers">Numbers (1, 2, 3)</option>
|
<body style="overflow: hidden">
|
||||||
<option value="a" fckLang="DlgLstTypeLCase">Lowercase Letters (a, b, c)</option>
|
<table width="100%" style="height: 100%">
|
||||||
<option value="A" fckLang="DlgLstTypeUCase">Uppercase Letters (A, B, C)</option>
|
<tr>
|
||||||
<option value="i" fckLang="DlgLstTypeSRoman">Small Roman Numerals (i, ii, iii)</option>
|
<td style="text-align:center">
|
||||||
<option value="I" fckLang="DlgLstTypeLRoman">Large Roman Numerals (I, II, III)</option>
|
<table cellspacing="0" cellpadding="0" border="0" style="margin-left: auto; margin-right: auto;">
|
||||||
</select>
|
<tr>
|
||||||
|
<td id="eStart" style="display: none; padding-right: 5px; padding-left: 5px">
|
||||||
</td>
|
<span fcklang="DlgLstStart">Start</span><br />
|
||||||
</tr>
|
<input type="text" id="txtStartPosition" size="5" />
|
||||||
</table>
|
</td>
|
||||||
</td>
|
<td style="padding-right: 5px; padding-left: 5px">
|
||||||
</tr>
|
<span fcklang="DlgLstType">List Type</span><br />
|
||||||
</table>
|
<select id="selBulleted" style="display: none">
|
||||||
</body>
|
<option value="" selected="selected"></option>
|
||||||
</html>
|
<option value="circle" fcklang="DlgLstTypeCircle">Circle</option>
|
||||||
|
<option value="disc" fcklang="DlgLstTypeDisc">Disc</option>
|
||||||
|
<option value="square" fcklang="DlgLstTypeSquare">Square</option>
|
||||||
|
</select>
|
||||||
|
<select id="selNumbered" style="display: none">
|
||||||
|
<option value="" selected="selected"></option>
|
||||||
|
<option value="1" fcklang="DlgLstTypeNumbers">Numbers (1, 2, 3)</option>
|
||||||
|
<option value="a" fcklang="DlgLstTypeLCase">Lowercase Letters (a, b, c)</option>
|
||||||
|
<option value="A" fcklang="DlgLstTypeUCase">Uppercase Letters (A, B, C)</option>
|
||||||
|
<option value="i" fcklang="DlgLstTypeSRoman">Small Roman Numerals (i, ii, iii)</option>
|
||||||
|
<option value="I" fcklang="DlgLstTypeLRoman">Large Roman Numerals (I, II, III)</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,217 +1,264 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_paste.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This dialog is shown when, for some reason (usually security settings),
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* the user is not able to paste data from the clipboard to the editor using
|
*
|
||||||
* the toolbar buttons or the context menu.
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
*
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* File Authors:
|
*
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* == END LICENSE ==
|
||||||
-->
|
*
|
||||||
<html>
|
* File Name: fck_paste.html
|
||||||
<head>
|
* This dialog is shown when, for some reason (usually security settings),
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* the user is not able to paste data from the clipboard to the editor using
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* the toolbar buttons or the context menu.
|
||||||
<script language="javascript">
|
*
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
window.onload = function ()
|
-->
|
||||||
{
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
// First of all, translate the dialog box texts
|
<head>
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
if ( window.parent.dialogArguments.CustomValue == 'Word' )
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
{
|
<script type="text/javascript">
|
||||||
var oFrame = document.getElementById('frmData')
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
oFrame.style.display = '' ;
|
var FCK = oEditor.FCK;
|
||||||
|
var FCKTools = oEditor.FCKTools ;
|
||||||
if ( oFrame.contentDocument )
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
oFrame.contentDocument.designMode = 'on' ;
|
|
||||||
else
|
window.onload = function ()
|
||||||
oFrame.contentWindow.document.body.contentEditable = true ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
else
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
{
|
|
||||||
document.getElementById('txtData').style.display = '' ;
|
if ( window.parent.dialogArguments.CustomValue == 'Word' )
|
||||||
document.getElementById('oWordCommands').style.display = 'none' ;
|
{
|
||||||
}
|
var oFrame = document.getElementById('frmData') ;
|
||||||
|
oFrame.style.display = '' ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
window.parent.SetAutoSize( true ) ;
|
if ( oFrame.contentDocument )
|
||||||
}
|
oFrame.contentDocument.designMode = 'on' ;
|
||||||
|
else
|
||||||
function Ok()
|
oFrame.contentWindow.document.body.contentEditable = true ;
|
||||||
{
|
}
|
||||||
var sHtml ;
|
else
|
||||||
|
{
|
||||||
if ( window.parent.dialogArguments.CustomValue == 'Word' )
|
document.getElementById('txtData').style.display = '' ;
|
||||||
{
|
document.getElementById('oWordCommands').style.display = 'none' ;
|
||||||
var oFrame = document.getElementById('frmData') ;
|
}
|
||||||
|
|
||||||
if ( oFrame.contentDocument )
|
window.parent.SetOkButton( true ) ;
|
||||||
sHtml = oFrame.contentDocument.body.innerHTML ;
|
window.parent.SetAutoSize( true ) ;
|
||||||
else
|
}
|
||||||
sHtml = oFrame.contentWindow.document.body.innerHTML ;
|
|
||||||
|
function Ok()
|
||||||
sHtml = CleanWord( sHtml ) ;
|
{
|
||||||
}
|
var sHtml ;
|
||||||
else
|
|
||||||
{
|
if ( window.parent.dialogArguments.CustomValue == 'Word' )
|
||||||
var sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value ) ;
|
{
|
||||||
sHtml = sHtml.replace( /\n/g, '<BR>' ) ;
|
var oFrame = document.getElementById('frmData') ;
|
||||||
}
|
var oBody ;
|
||||||
|
|
||||||
oEditor.FCK.InsertHtml( sHtml ) ;
|
if ( oFrame.contentDocument )
|
||||||
|
oBody = oFrame.contentDocument.body ;
|
||||||
return true ;
|
else
|
||||||
}
|
oBody = oFrame.contentWindow.document.body ;
|
||||||
|
|
||||||
function CleanUpBox()
|
// If a plugin creates a FCK.CustomCleanWord function it will be called instead of the default one
|
||||||
{
|
if ( typeof( FCKTools.CustomCleanWord ) == 'function' )
|
||||||
var oFrame = document.getElementById('frmData') ;
|
sHtml = FCK.CustomCleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ;
|
||||||
|
else
|
||||||
if ( oFrame.contentDocument )
|
sHtml = CleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ;
|
||||||
oFrame.contentDocument.body.innerHTML = '' ;
|
|
||||||
else
|
|
||||||
oFrame.contentWindow.document.body.innerHTML = '' ;
|
// Fix relative anchor URLs (IE automatically adds the current page URL).
|
||||||
}
|
var re = new RegExp( window.location + "#", "g" ) ;
|
||||||
|
sHtml = sHtml.replace( re, '#') ;
|
||||||
function CleanWord( html )
|
}
|
||||||
{
|
else
|
||||||
var bIgnoreFont = document.getElementById('chkRemoveFont').checked ;
|
{
|
||||||
var bRemoveStyles = document.getElementById('chkRemoveStyles').checked ;
|
sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value ) ;
|
||||||
|
sHtml = sHtml.replace( /\n/g, '<BR>' ) ;
|
||||||
html = html.replace(/<o:p>\s*<\/o:p>/g, "") ;
|
}
|
||||||
html = html.replace(/<o:p>.*?<\/o:p>/g, " ") ;
|
|
||||||
|
oEditor.FCK.InsertHtml( sHtml ) ;
|
||||||
// Remove mso-xxx styles.
|
|
||||||
html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ;
|
return true ;
|
||||||
|
}
|
||||||
// Remove margin styles.
|
|
||||||
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ;
|
function CleanUpBox()
|
||||||
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
|
{
|
||||||
|
var oFrame = document.getElementById('frmData') ;
|
||||||
html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ;
|
|
||||||
html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
|
if ( oFrame.contentDocument )
|
||||||
|
oFrame.contentDocument.body.innerHTML = '' ;
|
||||||
html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
|
else
|
||||||
|
oFrame.contentWindow.document.body.innerHTML = '' ;
|
||||||
html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;
|
}
|
||||||
|
|
||||||
html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;
|
|
||||||
|
// This function will be called from the PasteFromWord dialog (fck_paste.html)
|
||||||
html = html.replace( /\s*tab-stops:[^;"]*;?/gi, "" ) ;
|
// Input: oNode a DOM node that contains the raw paste from the clipboard
|
||||||
html = html.replace( /\s*tab-stops:[^"]*/gi, "" ) ;
|
// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog
|
||||||
|
// Output: the cleaned string
|
||||||
// Remove FONT face attributes.
|
function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
|
||||||
if ( bIgnoreFont )
|
{
|
||||||
{
|
var html = oNode.innerHTML ;
|
||||||
html = html.replace( /\s*face="[^"]*"/gi, "" ) ;
|
|
||||||
html = html.replace( /\s*face=[^ >]*/gi, "" ) ;
|
html = html.replace(/<o:p>\s*<\/o:p>/g, '') ;
|
||||||
|
html = html.replace(/<o:p>.*?<\/o:p>/g, ' ') ;
|
||||||
html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, "" ) ;
|
|
||||||
}
|
// Remove mso-xxx styles.
|
||||||
|
html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ;
|
||||||
// Remove Class attributes
|
|
||||||
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
// Remove margin styles.
|
||||||
|
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, '' ) ;
|
||||||
// Remove styles.
|
html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
|
||||||
if ( bRemoveStyles )
|
|
||||||
html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
|
html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, '' ) ;
|
||||||
|
html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
|
||||||
// Remove empty styles.
|
|
||||||
html = html.replace( /\s*style="\s*"/gi, '' ) ;
|
html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
|
||||||
|
|
||||||
html = html.replace( /<SPAN\s*[^>]*>\s* \s*<\/SPAN>/gi, ' ' ) ;
|
html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;
|
||||||
|
|
||||||
html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
|
html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;
|
||||||
|
|
||||||
// Remove Lang attributes
|
html = html.replace( /\s*tab-stops:[^;"]*;?/gi, '' ) ;
|
||||||
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
html = html.replace( /\s*tab-stops:[^"]*/gi, '' ) ;
|
||||||
|
|
||||||
html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
|
// Remove FONT face attributes.
|
||||||
|
if ( bIgnoreFont )
|
||||||
html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
|
{
|
||||||
|
html = html.replace( /\s*face="[^"]*"/gi, '' ) ;
|
||||||
// Remove XML elements and declarations
|
html = html.replace( /\s*face=[^ >]*/gi, '' ) ;
|
||||||
html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
|
|
||||||
|
html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, '' ) ;
|
||||||
// Remove Tags with XML namespace declarations: <o:p><\/o:p>
|
}
|
||||||
html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
|
|
||||||
|
// Remove Class attributes
|
||||||
html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;
|
html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
||||||
|
|
||||||
html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ;
|
// Remove styles.
|
||||||
html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ;
|
if ( bRemoveStyles )
|
||||||
html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
|
html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
|
||||||
html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
|
|
||||||
html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
|
// Remove empty styles.
|
||||||
html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
|
html = html.replace( /\s*style="\s*"/gi, '' ) ;
|
||||||
|
|
||||||
html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
|
html = html.replace( /<SPAN\s*[^>]*>\s* \s*<\/SPAN>/gi, ' ' ) ;
|
||||||
|
|
||||||
html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ;
|
html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
|
||||||
|
|
||||||
// Remove empty tags (three times, just to be sure).
|
// Remove Lang attributes
|
||||||
html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
|
html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
|
||||||
html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
|
|
||||||
html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
|
html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
|
||||||
|
|
||||||
// Transform <P> to <DIV>
|
html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
|
||||||
var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ; // Different because of a IE 5.0 error
|
|
||||||
html = html.replace( re, "<div$2<\/div>" ) ;
|
// Remove XML elements and declarations
|
||||||
|
html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ;
|
||||||
return html ;
|
|
||||||
}
|
// Remove Tags with XML namespace declarations: <o:p><\/o:p>
|
||||||
|
html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ;
|
||||||
</script>
|
|
||||||
</head>
|
// Remove comments [SF BUG-1481861].
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
html = html.replace(/<\!--.*-->/g, '' ) ;
|
||||||
<table height="98%" cellspacing="0" cellpadding="0" width="100%" border="0">
|
|
||||||
<tr>
|
html = html.replace( /<(U|I|STRIKE)> <\/\1>/g, ' ' ) ;
|
||||||
<td>
|
|
||||||
<span fckLang="DlgPasteMsg2">Please paste inside the following box using the
|
html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;
|
||||||
keyboard (<STRONG>Ctrl+V</STRONG>) and hit <STRONG>OK</STRONG>.</span>
|
|
||||||
<br>
|
if ( FCKConfig.CleanWordKeepsStructure )
|
||||||
|
{
|
||||||
</td>
|
// The original <Hn> tag send from Word is something like this: <Hn style="margin-top:0px;margin-bottom:0px">
|
||||||
</tr>
|
html = html.replace( /<H(\d)([^>]*)>/gi, '<h$1>' ) ;
|
||||||
<tr>
|
|
||||||
<td valign="top" height="100%" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid">
|
// Word likes to insert extra <font> tags, when using MSIE. (Wierd).
|
||||||
<textarea id="txtData" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; WIDTH: 99%; BORDER-BOTTOM: #000000 1px; HEIGHT: 98%"></textarea>
|
html = html.replace( /<(H\d)><FONT[^>]*>(.*?)<\/FONT><\/\1>/gi, '<$1>$2</$1>' );
|
||||||
<iframe id="frmData" src="../fckblank.html" height="98%" width="99%" frameborder="0" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; BORDER-BOTTOM: #000000 1px; BACKGROUND-COLOR: #ffffff">
|
html = html.replace( /<(H\d)><EM>(.*?)<\/EM><\/\1>/gi, '<$1>$2</$1>' );
|
||||||
</iframe>
|
}
|
||||||
</td>
|
else
|
||||||
</tr>
|
{
|
||||||
<tr id="oWordCommands">
|
html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ;
|
||||||
<td>
|
html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ;
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
|
||||||
<tr>
|
html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
|
||||||
<td nowrap>
|
html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
|
||||||
<input id="chkRemoveFont" type="checkbox" checked="checked"> <label for="chkRemoveFont" fckLang="DlgPasteIgnoreFont">
|
html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
|
||||||
Ignore Font Face definitions</label>
|
|
||||||
<br>
|
html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
|
||||||
<input id="chkRemoveStyles" type="checkbox"> <label for="chkRemoveStyles" fckLang="DlgPasteRemoveStyles">
|
|
||||||
Remove Styles definitions</label>
|
// Transform <P> to <DIV>
|
||||||
</td>
|
var re = new RegExp( '(<P)([^>]*>.*?)(<\/P>)', 'gi' ) ; // Different because of a IE 5.0 error
|
||||||
<td align="right" valign="top">
|
html = html.replace( re, '<div$2<\/div>' ) ;
|
||||||
<input type="button" fckLang="DlgPasteCleanBox" value="Clean Up Box" onclick="CleanUpBox()">
|
|
||||||
</td>
|
// Remove empty tags (three times, just to be sure).
|
||||||
</tr>
|
// This also removes any empty anchor
|
||||||
</table>
|
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
|
||||||
</td>
|
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
|
||||||
</tr>
|
html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
|
||||||
</table>
|
}
|
||||||
</body>
|
|
||||||
</html>
|
return html ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="overflow: hidden">
|
||||||
|
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span fcklang="DlgPasteMsg2">Please paste inside the following box using the keyboard
|
||||||
|
(<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</span>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" height="100%" style="border-right: #000000 1px solid; border-top: #000000 1px solid;
|
||||||
|
border-left: #000000 1px solid; border-bottom: #000000 1px solid">
|
||||||
|
<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none;
|
||||||
|
width: 99%; height: 98%"></textarea>
|
||||||
|
<iframe id="frmData" src="javascript:void(0)" height="98%" width="99%" frameborder="0"
|
||||||
|
style="border-right: #000000 1px; border-top: #000000 1px; display: none; border-left: #000000 1px;
|
||||||
|
border-bottom: #000000 1px; background-color: #ffffff"></iframe>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="oWordCommands">
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td nowrap="nowrap">
|
||||||
|
<input id="chkRemoveFont" type="checkbox" checked="checked" />
|
||||||
|
<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont">
|
||||||
|
Ignore Font Face definitions</label>
|
||||||
|
<br />
|
||||||
|
<input id="chkRemoveStyles" type="checkbox" />
|
||||||
|
<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
|
||||||
|
Remove Styles definitions</label>
|
||||||
|
</td>
|
||||||
|
<td align="right" valign="top">
|
||||||
|
<input type="button" fcklang="DlgPasteCleanBox" value="Clean Up Box" onclick="CleanUpBox()" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,103 +1,111 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_radiobutton.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Radio Button dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Radio Button Properties</title>
|
* File Name: fck_radiobutton.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Radio Button dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Radio Button Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta content="noindex, nofollow" name="robots">
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
|
window.onload = function()
|
||||||
GetE('txtSelected').checked = oActiveEl.checked ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
else
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oActiveEl = null ;
|
|
||||||
|
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
|
||||||
window.parent.SetOkButton( true ) ;
|
{
|
||||||
}
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
|
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
|
||||||
function Ok()
|
GetE('txtSelected').checked = oActiveEl.checked ;
|
||||||
{
|
}
|
||||||
if ( !oActiveEl )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
|
||||||
oActiveEl.type = 'radio' ;
|
window.parent.SetOkButton( true ) ;
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
if ( GetE('txtName').value.length > 0 )
|
{
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
oActiveEl.value = GetE('txtValue').value ;
|
oActiveEl.type = 'radio' ;
|
||||||
else
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
}
|
||||||
|
|
||||||
var bIsChecked = GetE('txtSelected').checked ;
|
if ( GetE('txtName').value.length > 0 )
|
||||||
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
oActiveEl.checked = bIsChecked ;
|
|
||||||
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
return true ;
|
oActiveEl.value = GetE('txtValue').value ;
|
||||||
}
|
else
|
||||||
|
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
|
||||||
</script>
|
|
||||||
</head>
|
var bIsChecked = GetE('txtSelected').checked ;
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
|
||||||
<table height="100%" width="100%">
|
oActiveEl.checked = bIsChecked ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgCheckboxName">Name</span><br>
|
</head>
|
||||||
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
<body style="OVERFLOW: hidden" scroll="no">
|
||||||
</td>
|
<table height="100%" width="100%">
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td align="center">
|
||||||
<td>
|
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
||||||
<span fckLang="DlgCheckboxValue">Value</span><br>
|
<tr>
|
||||||
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
|
<td>
|
||||||
</td>
|
<span fckLang="DlgCheckboxName">Name</span><br>
|
||||||
</tr>
|
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
|
||||||
<tr>
|
</td>
|
||||||
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</td>
|
<span fckLang="DlgCheckboxValue">Value</span><br>
|
||||||
</tr>
|
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
|
||||||
</table>
|
</td>
|
||||||
</body>
|
</tr>
|
||||||
</html>
|
<tr>
|
||||||
|
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,133 +1,161 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_replace.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* "Replace" dialog box window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Abdul-Aziz A. Al-Oraij (aziz.oraij.com)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_replace.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* "Replace" dialog box window.
|
||||||
<meta content="noindex, nofollow" name="robots" />
|
*
|
||||||
<script type="text/javascript">
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
* Abdul-Aziz A. Al-Oraij (aziz.oraij.com)
|
||||||
|
-->
|
||||||
function OnLoad()
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
{
|
<head>
|
||||||
// First of all, translate the dialog box texts
|
<title></title>
|
||||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
window.parent.SetAutoSize( true ) ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
}
|
|
||||||
|
function OnLoad()
|
||||||
function btnStat(frm)
|
{
|
||||||
{
|
// First of all, translate the dialog box texts
|
||||||
document.getElementById('btnReplace').disabled =
|
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||||
document.getElementById('btnReplaceAll').disabled =
|
|
||||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
window.parent.SetAutoSize( true ) ;
|
||||||
}
|
|
||||||
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound )
|
}
|
||||||
{
|
|
||||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
function btnStat(frm)
|
||||||
{
|
{
|
||||||
var oNode = parentNode.childNodes[i] ;
|
document.getElementById('btnReplace').disabled =
|
||||||
if ( oNode.nodeType == 3 )
|
document.getElementById('btnReplaceAll').disabled =
|
||||||
{
|
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
}
|
||||||
if ( oNode.nodeValue != sReplaced )
|
|
||||||
{
|
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound )
|
||||||
oNode.nodeValue = sReplaced ;
|
{
|
||||||
if ( ! replaceAll )
|
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||||
return true ;
|
{
|
||||||
hasFound = true ;
|
var oNode = parentNode.childNodes[i] ;
|
||||||
}
|
if ( oNode.nodeType == 3 )
|
||||||
}
|
{
|
||||||
|
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||||
hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ;
|
if ( oNode.nodeValue != sReplaced )
|
||||||
if ( ! replaceAll && hasFound )
|
{
|
||||||
return true ;
|
oNode.nodeValue = sReplaced ;
|
||||||
}
|
if ( ! replaceAll )
|
||||||
|
return true ;
|
||||||
return hasFound ;
|
hasFound = true ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function GetRegexExpr()
|
|
||||||
{
|
hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ;
|
||||||
if ( document.getElementById('chkWord').checked )
|
if ( ! replaceAll && hasFound )
|
||||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
return true ;
|
||||||
else
|
}
|
||||||
var sExpr = document.getElementById('txtFind').value ;
|
|
||||||
|
return hasFound ;
|
||||||
return sExpr ;
|
}
|
||||||
}
|
|
||||||
|
function GetRegexExpr()
|
||||||
function GetCase()
|
{
|
||||||
{
|
var sExpr = EscapeRegexString( document.getElementById('txtFind').value ) ;
|
||||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
|
||||||
}
|
if ( document.getElementById('chkWord').checked )
|
||||||
|
sExpr = '\\b' + sExpr + '\\b' ;
|
||||||
function Replace()
|
|
||||||
{
|
return sExpr ;
|
||||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ;
|
}
|
||||||
if ( !ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, false, false ) )
|
|
||||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
function GetCase()
|
||||||
}
|
{
|
||||||
|
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||||
function ReplaceAll()
|
}
|
||||||
{
|
|
||||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ;
|
function GetReplacement()
|
||||||
if ( !ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, true, false ) )
|
{
|
||||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
return document.getElementById('txtReplace').value.replace( /\$/g, '$$$$' ) ;
|
||||||
window.parent.Cancel() ;
|
}
|
||||||
}
|
|
||||||
</script>
|
function EscapeRegexString( str )
|
||||||
</head>
|
{
|
||||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
return str.replace( /[\\\^\$\*\+\?\{\}\.\(\)\!\|\[\]\-]/g, '\\$&' ) ;
|
||||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
}
|
||||||
<tr>
|
|
||||||
<td noWrap><label for="txtFind" fckLang="DlgReplaceFindLbl">Find what:</label>
|
function Replace()
|
||||||
</td>
|
{
|
||||||
<td width="100%"><input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ;
|
||||||
</td>
|
if ( !ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, GetReplacement(), false, false ) )
|
||||||
<td><input id="btnReplace" style="WIDTH: 100%" disabled onclick="Replace();" type="button"
|
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||||
value="Replace" fckLang="DlgReplaceReplaceBtn">
|
}
|
||||||
</td>
|
|
||||||
</tr>
|
function ReplaceAll()
|
||||||
<tr>
|
{
|
||||||
<td vAlign="top" noWrap><label for="txtReplace" fckLang="DlgReplaceReplaceLbl">Replace
|
var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ;
|
||||||
with:</label>
|
if ( !ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, GetReplacement(), true, false ) )
|
||||||
</td>
|
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||||
<td vAlign="top"><input id="txtReplace" style="WIDTH: 100%" tabIndex="2" type="text">
|
window.parent.Cancel() ;
|
||||||
</td>
|
}
|
||||||
<td><input id="btnReplaceAll" disabled onclick="ReplaceAll()" type="button" value="Replace All"
|
</script>
|
||||||
fckLang="DlgReplaceReplAllBtn">
|
</head>
|
||||||
</td>
|
<body onload="OnLoad()" style="overflow: hidden">
|
||||||
</tr>
|
<table cellspacing="3" cellpadding="2" width="100%" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td vAlign="bottom" colSpan="3"> <input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgReplaceCaseChk">Match
|
<td nowrap="nowrap">
|
||||||
case</label>
|
<label for="txtFind" fcklang="DlgReplaceFindLbl">
|
||||||
<br>
|
Find what:</label>
|
||||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgReplaceWordChk">Match
|
</td>
|
||||||
whole word</label>
|
<td width="100%">
|
||||||
</td>
|
<input id="txtFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1"
|
||||||
</tr>
|
type="text" />
|
||||||
</table>
|
</td>
|
||||||
</body>
|
<td>
|
||||||
</html>
|
<input id="btnReplace" style="width: 100%" disabled="disabled" onclick="Replace();"
|
||||||
|
type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" nowrap="nowrap">
|
||||||
|
<label for="txtReplace" fcklang="DlgReplaceReplaceLbl">
|
||||||
|
Replace with:</label>
|
||||||
|
</td>
|
||||||
|
<td valign="top">
|
||||||
|
<input id="txtReplace" style="width: 100%" tabindex="2" type="text" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input id="btnReplaceAll" disabled="disabled" onclick="ReplaceAll()" type="button"
|
||||||
|
value="Replace All" fcklang="DlgReplaceReplAllBtn" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" colspan="3">
|
||||||
|
<input id="chkCase" tabindex="3" type="checkbox" /><label for="chkCase" fcklang="DlgReplaceCaseChk">Match
|
||||||
|
case</label>
|
||||||
|
<br />
|
||||||
|
<input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match
|
||||||
|
whole word</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,172 +1,180 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_select.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Select dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Select Properties</title>
|
* File Name: fck_select.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Select dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript" src="fck_select/fck_select.js"></script>
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script type="text/javascript">
|
-->
|
||||||
|
<html>
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<head>
|
||||||
|
<title>Select Properties</title>
|
||||||
// Gets the document DOM
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta content="noindex, nofollow" name="robots">
|
||||||
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script type="text/javascript" src="fck_select/fck_select.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
var oListText ;
|
|
||||||
var oListValue ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
|
||||||
window.onload = function()
|
// Gets the document DOM
|
||||||
{
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
|
|
||||||
oListText = document.getElementById( 'cmbText' ) ;
|
var oListText ;
|
||||||
oListValue = document.getElementById( 'cmbValue' ) ;
|
var oListValue ;
|
||||||
|
|
||||||
if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
|
window.onload = function()
|
||||||
{
|
{
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
// First of all, translate the dialog box texts
|
||||||
GetE('txtSelValue').value = oActiveEl.value ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
GetE('txtLines').value = GetAttribute( oActiveEl, 'size' ) ;
|
|
||||||
GetE('chkMultiple').checked = oActiveEl.multiple ;
|
oListText = document.getElementById( 'cmbText' ) ;
|
||||||
|
oListValue = document.getElementById( 'cmbValue' ) ;
|
||||||
// Load the actual options
|
|
||||||
for ( var i = 0 ; i < oActiveEl.options.length ; i++ )
|
if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
|
||||||
{
|
{
|
||||||
var sText = oActiveEl.options[i].innerHTML ;
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
var sValue = oActiveEl.options[i].value ;
|
GetE('txtSelValue').value = oActiveEl.value ;
|
||||||
|
GetE('txtLines').value = GetAttribute( oActiveEl, 'size' ) ;
|
||||||
AddComboOption( oListText, sText, sText ) ;
|
GetE('chkMultiple').checked = oActiveEl.multiple ;
|
||||||
AddComboOption( oListValue, sValue, sValue ) ;
|
|
||||||
}
|
// Load the actual options
|
||||||
}
|
for ( var i = 0 ; i < oActiveEl.options.length ; i++ )
|
||||||
else
|
{
|
||||||
oActiveEl = null ;
|
var sText = oActiveEl.options[i].innerHTML ;
|
||||||
|
var sValue = oActiveEl.options[i].value ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
}
|
AddComboOption( oListText, sText, sText ) ;
|
||||||
|
AddComboOption( oListValue, sValue, sValue ) ;
|
||||||
function Ok()
|
}
|
||||||
{
|
}
|
||||||
var sSize = GetE('txtLines').value ;
|
else
|
||||||
if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
|
oActiveEl = null ;
|
||||||
sSize = '' ;
|
|
||||||
|
window.parent.SetOkButton( true ) ;
|
||||||
if ( !oActiveEl )
|
}
|
||||||
{
|
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'SELECT' ) ;
|
function Ok()
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
{
|
||||||
}
|
var sSize = GetE('txtLines').value ;
|
||||||
|
if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
|
||||||
SetAttribute( oActiveEl, 'name' , GetE('txtName').value ) ;
|
sSize = '' ;
|
||||||
SetAttribute( oActiveEl, 'size' , sSize ) ;
|
|
||||||
oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
// Remove all options.
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'SELECT' ) ;
|
||||||
while ( oActiveEl.options.length > 0 )
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
oActiveEl.remove(0) ;
|
}
|
||||||
|
|
||||||
// Add all available options.
|
SetAttribute( oActiveEl, 'name' , GetE('txtName').value ) ;
|
||||||
for ( var i = 0 ; i < oListText.options.length ; i++ )
|
SetAttribute( oActiveEl, 'size' , sSize ) ;
|
||||||
{
|
oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
|
||||||
var sText = oListText.options[i].value ;
|
|
||||||
var sValue = oListValue.options[i].value ;
|
// Remove all options.
|
||||||
if ( sValue.length == 0 ) sValue = sText ;
|
while ( oActiveEl.options.length > 0 )
|
||||||
|
oActiveEl.remove(0) ;
|
||||||
var oOption = AddComboOption( oActiveEl, sText, sValue, oDOM ) ;
|
|
||||||
|
// Add all available options.
|
||||||
if ( sValue == GetE('txtSelValue').value )
|
for ( var i = 0 ; i < oListText.options.length ; i++ )
|
||||||
{
|
{
|
||||||
SetAttribute( oOption, 'selected', 'selected' ) ;
|
var sText = oListText.options[i].value ;
|
||||||
oOption.selected = true ;
|
var sValue = oListValue.options[i].value ;
|
||||||
}
|
if ( sValue.length == 0 ) sValue = sText ;
|
||||||
}
|
|
||||||
|
var oOption = AddComboOption( oActiveEl, sText, sValue, oDOM ) ;
|
||||||
return true ;
|
|
||||||
}
|
if ( sValue == GetE('txtSelValue').value )
|
||||||
|
{
|
||||||
</script>
|
SetAttribute( oOption, 'selected', 'selected' ) ;
|
||||||
</head>
|
oOption.selected = true ;
|
||||||
<body style='OVERFLOW: hidden' scroll='no'>
|
}
|
||||||
<table width="100%" height="100%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
return true ;
|
||||||
<table width="100%">
|
}
|
||||||
<tr>
|
|
||||||
<td nowrap><span fckLang="DlgSelectName">Name</span> </td>
|
</script>
|
||||||
<td width="100%" colSpan="2"><input id="txtName" style="WIDTH: 100%" type="text"></td>
|
</head>
|
||||||
</tr>
|
<body style='OVERFLOW: hidden' scroll='no'>
|
||||||
<tr>
|
<table width="100%" height="100%">
|
||||||
<td nowrap><span fckLang="DlgSelectValue">Value</span> </td>
|
<tr>
|
||||||
<td width="100%" colSpan="2"><input id="txtSelValue" style="WIDTH: 100%; BACKGROUND-COLOR: buttonface" type="text" readonly></td>
|
<td>
|
||||||
</tr>
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap><span fckLang="DlgSelectSize">Size</span> </td>
|
<td nowrap><span fckLang="DlgSelectName">Name</span> </td>
|
||||||
<td nowrap><input id="txtLines" type="text" size="2" value=""> <span fckLang="DlgSelectLines">lines</span></td>
|
<td width="100%" colSpan="2"><input id="txtName" style="WIDTH: 100%" type="text"></td>
|
||||||
<td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
|
</tr>
|
||||||
multiple selections</label></td>
|
<tr>
|
||||||
</tr>
|
<td nowrap><span fckLang="DlgSelectValue">Value</span> </td>
|
||||||
</table>
|
<td width="100%" colSpan="2"><input id="txtSelValue" style="WIDTH: 100%; BACKGROUND-COLOR: buttonface" type="text" readonly></td>
|
||||||
<br>
|
</tr>
|
||||||
<hr style="POSITION: absolute">
|
<tr>
|
||||||
<span style="LEFT: 10px; POSITION: relative; TOP: -7px" class="BackColor"> <span fckLang="DlgSelectOpAvail">Available
|
<td nowrap><span fckLang="DlgSelectSize">Size</span> </td>
|
||||||
Options</span> </span>
|
<td nowrap><input id="txtLines" type="text" size="2" value=""> <span fckLang="DlgSelectLines">lines</span></td>
|
||||||
<table width="100%">
|
<td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
|
||||||
<tr>
|
multiple selections</label></td>
|
||||||
<td width="50%"><span fckLang="DlgSelectOpText">Text</span><br>
|
</tr>
|
||||||
<input id="txtText" style="WIDTH: 100%" type="text" name="txtText">
|
</table>
|
||||||
</td>
|
<br>
|
||||||
<td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br>
|
<hr style="POSITION: absolute">
|
||||||
<input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue">
|
<span style="LEFT: 10px; POSITION: relative; TOP: -7px" class="BackColor"> <span fckLang="DlgSelectOpAvail">Available
|
||||||
</td>
|
Options</span> </span>
|
||||||
<td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td>
|
<table width="100%">
|
||||||
<td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td>
|
<tr>
|
||||||
</tr>
|
<td width="50%"><span fckLang="DlgSelectOpText">Text</span><br>
|
||||||
<tr>
|
<input id="txtText" style="WIDTH: 100%" type="text" name="txtText">
|
||||||
<td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);"
|
</td>
|
||||||
size="5" name="cmbText"></select>
|
<td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br>
|
||||||
</td>
|
<input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue">
|
||||||
<td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);"
|
</td>
|
||||||
size="5" name="cmbValue"></select>
|
<td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td>
|
||||||
</td>
|
<td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td>
|
||||||
<td vAlign="top" colSpan="2">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);"
|
||||||
<tr>
|
size="5" name="cmbText"></select>
|
||||||
<td vAlign="bottom" colSpan="2"><input style="WIDTH: 100%" onclick="Move(-1);" type="button" fckLang="DlgSelectBtnUp" value="Up">
|
</td>
|
||||||
<br>
|
<td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);"
|
||||||
<input style="WIDTH: 100%" onclick="Move(1);" type="button" fckLang="DlgSelectBtnDown"
|
size="5" name="cmbValue"></select>
|
||||||
value="Down">
|
</td>
|
||||||
</td>
|
<td vAlign="top" colSpan="2">
|
||||||
</tr>
|
</td>
|
||||||
<TR>
|
</tr>
|
||||||
<TD vAlign="bottom" colSpan="4"><INPUT onclick="SetSelectedValue();" type="button" fckLang="DlgSelectBtnSetValue" value="Set as selected value">
|
<tr>
|
||||||
<input onclick="Delete();" type="button" fckLang="DlgSelectBtnDelete" value="Delete"></TD>
|
<td vAlign="bottom" colSpan="2"><input style="WIDTH: 100%" onclick="Move(-1);" type="button" fckLang="DlgSelectBtnUp" value="Up">
|
||||||
</TR>
|
<br>
|
||||||
</table>
|
<input style="WIDTH: 100%" onclick="Move(1);" type="button" fckLang="DlgSelectBtnDown"
|
||||||
</td>
|
value="Down">
|
||||||
</tr>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
</body>
|
<TR>
|
||||||
</html>
|
<TD vAlign="bottom" colSpan="4"><INPUT onclick="SetSelectedValue();" type="button" fckLang="DlgSelectBtnSetValue" value="Set as selected value">
|
||||||
|
<input onclick="Delete();" type="button" fckLang="DlgSelectBtnDelete" value="Delete"></TD>
|
||||||
|
</TR>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,165 +1,173 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_select.js
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Scripts for the fck_select.html page.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
function Select( combo )
|
*
|
||||||
{
|
* File Name: fck_select.js
|
||||||
var iIndex = combo.selectedIndex ;
|
* Scripts for the fck_select.html page.
|
||||||
|
*
|
||||||
oListText.selectedIndex = iIndex ;
|
* File Authors:
|
||||||
oListValue.selectedIndex = iIndex ;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
*/
|
||||||
var oTxtText = document.getElementById( "txtText" ) ;
|
|
||||||
var oTxtValue = document.getElementById( "txtValue" ) ;
|
function Select( combo )
|
||||||
|
{
|
||||||
oTxtText.value = oListText.value ;
|
var iIndex = combo.selectedIndex ;
|
||||||
oTxtValue.value = oListValue.value ;
|
|
||||||
}
|
oListText.selectedIndex = iIndex ;
|
||||||
|
oListValue.selectedIndex = iIndex ;
|
||||||
function Add()
|
|
||||||
{
|
var oTxtText = document.getElementById( "txtText" ) ;
|
||||||
var oTxtText = document.getElementById( "txtText" ) ;
|
var oTxtValue = document.getElementById( "txtValue" ) ;
|
||||||
var oTxtValue = document.getElementById( "txtValue" ) ;
|
|
||||||
|
oTxtText.value = oListText.value ;
|
||||||
AddComboOption( oListText, oTxtText.value, oTxtText.value ) ;
|
oTxtValue.value = oListValue.value ;
|
||||||
AddComboOption( oListValue, oTxtValue.value, oTxtValue.value ) ;
|
}
|
||||||
|
|
||||||
oListText.selectedIndex = oListText.options.length - 1 ;
|
function Add()
|
||||||
oListValue.selectedIndex = oListValue.options.length - 1 ;
|
{
|
||||||
|
var oTxtText = document.getElementById( "txtText" ) ;
|
||||||
oTxtText.value = '' ;
|
var oTxtValue = document.getElementById( "txtValue" ) ;
|
||||||
oTxtValue.value = '' ;
|
|
||||||
|
AddComboOption( oListText, oTxtText.value, oTxtText.value ) ;
|
||||||
oTxtText.focus() ;
|
AddComboOption( oListValue, oTxtValue.value, oTxtValue.value ) ;
|
||||||
}
|
|
||||||
|
oListText.selectedIndex = oListText.options.length - 1 ;
|
||||||
function Modify()
|
oListValue.selectedIndex = oListValue.options.length - 1 ;
|
||||||
{
|
|
||||||
var iIndex = oListText.selectedIndex ;
|
oTxtText.value = '' ;
|
||||||
|
oTxtValue.value = '' ;
|
||||||
if ( iIndex < 0 ) return ;
|
|
||||||
|
oTxtText.focus() ;
|
||||||
var oTxtText = document.getElementById( "txtText" ) ;
|
}
|
||||||
var oTxtValue = document.getElementById( "txtValue" ) ;
|
|
||||||
|
function Modify()
|
||||||
oListText.options[ iIndex ].innerHTML = oTxtText.value ;
|
{
|
||||||
oListText.options[ iIndex ].value = oTxtText.value ;
|
var iIndex = oListText.selectedIndex ;
|
||||||
|
|
||||||
oListValue.options[ iIndex ].innerHTML = oTxtValue.value ;
|
if ( iIndex < 0 ) return ;
|
||||||
oListValue.options[ iIndex ].value = oTxtValue.value ;
|
|
||||||
|
var oTxtText = document.getElementById( "txtText" ) ;
|
||||||
oTxtText.value = '' ;
|
var oTxtValue = document.getElementById( "txtValue" ) ;
|
||||||
oTxtValue.value = '' ;
|
|
||||||
|
oListText.options[ iIndex ].innerHTML = oTxtText.value ;
|
||||||
oTxtText.focus() ;
|
oListText.options[ iIndex ].value = oTxtText.value ;
|
||||||
}
|
|
||||||
|
oListValue.options[ iIndex ].innerHTML = oTxtValue.value ;
|
||||||
function Move( steps )
|
oListValue.options[ iIndex ].value = oTxtValue.value ;
|
||||||
{
|
|
||||||
ChangeOptionPosition( oListText, steps ) ;
|
oTxtText.value = '' ;
|
||||||
ChangeOptionPosition( oListValue, steps ) ;
|
oTxtValue.value = '' ;
|
||||||
}
|
|
||||||
|
oTxtText.focus() ;
|
||||||
function Delete()
|
}
|
||||||
{
|
|
||||||
RemoveSelectedOptions( oListText ) ;
|
function Move( steps )
|
||||||
RemoveSelectedOptions( oListValue ) ;
|
{
|
||||||
}
|
ChangeOptionPosition( oListText, steps ) ;
|
||||||
|
ChangeOptionPosition( oListValue, steps ) ;
|
||||||
function SetSelectedValue()
|
}
|
||||||
{
|
|
||||||
var iIndex = oListValue.selectedIndex ;
|
function Delete()
|
||||||
if ( iIndex < 0 ) return ;
|
{
|
||||||
|
RemoveSelectedOptions( oListText ) ;
|
||||||
var oTxtValue = document.getElementById( "txtSelValue" ) ;
|
RemoveSelectedOptions( oListValue ) ;
|
||||||
|
}
|
||||||
oTxtValue.value = oListValue.options[ iIndex ].value ;
|
|
||||||
}
|
function SetSelectedValue()
|
||||||
|
{
|
||||||
// Moves the selected option by a number of steps (also negative)
|
var iIndex = oListValue.selectedIndex ;
|
||||||
function ChangeOptionPosition( combo, steps )
|
if ( iIndex < 0 ) return ;
|
||||||
{
|
|
||||||
var iActualIndex = combo.selectedIndex ;
|
var oTxtValue = document.getElementById( "txtSelValue" ) ;
|
||||||
|
|
||||||
if ( iActualIndex < 0 )
|
oTxtValue.value = oListValue.options[ iIndex ].value ;
|
||||||
return ;
|
}
|
||||||
|
|
||||||
var iFinalIndex = iActualIndex + steps ;
|
// Moves the selected option by a number of steps (also negative)
|
||||||
|
function ChangeOptionPosition( combo, steps )
|
||||||
if ( iFinalIndex < 0 )
|
{
|
||||||
iFinalIndex = 0 ;
|
var iActualIndex = combo.selectedIndex ;
|
||||||
|
|
||||||
if ( iFinalIndex > ( combo.options.length - 1 ) )
|
if ( iActualIndex < 0 )
|
||||||
iFinalIndex = combo.options.length - 1 ;
|
return ;
|
||||||
|
|
||||||
if ( iActualIndex == iFinalIndex )
|
var iFinalIndex = iActualIndex + steps ;
|
||||||
return ;
|
|
||||||
|
if ( iFinalIndex < 0 )
|
||||||
var oOption = combo.options[ iActualIndex ] ;
|
iFinalIndex = 0 ;
|
||||||
var sText = oOption.innerHTML ;
|
|
||||||
var sValue = oOption.value ;
|
if ( iFinalIndex > ( combo.options.length - 1 ) )
|
||||||
|
iFinalIndex = combo.options.length - 1 ;
|
||||||
combo.remove( iActualIndex ) ;
|
|
||||||
|
if ( iActualIndex == iFinalIndex )
|
||||||
oOption = AddComboOption( combo, sText, sValue, null, iFinalIndex ) ;
|
return ;
|
||||||
|
|
||||||
oOption.selected = true ;
|
var oOption = combo.options[ iActualIndex ] ;
|
||||||
}
|
var sText = oOption.innerHTML ;
|
||||||
|
var sValue = oOption.value ;
|
||||||
// Remove all selected options from a SELECT object
|
|
||||||
function RemoveSelectedOptions(combo)
|
combo.remove( iActualIndex ) ;
|
||||||
{
|
|
||||||
// Save the selected index
|
oOption = AddComboOption( combo, sText, sValue, null, iFinalIndex ) ;
|
||||||
var iSelectedIndex = combo.selectedIndex ;
|
|
||||||
|
oOption.selected = true ;
|
||||||
var oOptions = combo.options ;
|
}
|
||||||
|
|
||||||
// Remove all selected options
|
// Remove all selected options from a SELECT object
|
||||||
for ( var i = oOptions.length - 1 ; i >= 0 ; i-- )
|
function RemoveSelectedOptions(combo)
|
||||||
{
|
{
|
||||||
if (oOptions[i].selected) combo.remove(i) ;
|
// Save the selected index
|
||||||
}
|
var iSelectedIndex = combo.selectedIndex ;
|
||||||
|
|
||||||
// Reset the selection based on the original selected index
|
var oOptions = combo.options ;
|
||||||
if ( combo.options.length > 0 )
|
|
||||||
{
|
// Remove all selected options
|
||||||
if ( iSelectedIndex >= combo.options.length ) iSelectedIndex = combo.options.length - 1 ;
|
for ( var i = oOptions.length - 1 ; i >= 0 ; i-- )
|
||||||
combo.selectedIndex = iSelectedIndex ;
|
{
|
||||||
}
|
if (oOptions[i].selected) combo.remove(i) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a new option to a SELECT object (combo or list)
|
// Reset the selection based on the original selected index
|
||||||
function AddComboOption( combo, optionText, optionValue, documentObject, index )
|
if ( combo.options.length > 0 )
|
||||||
{
|
{
|
||||||
var oOption ;
|
if ( iSelectedIndex >= combo.options.length ) iSelectedIndex = combo.options.length - 1 ;
|
||||||
|
combo.selectedIndex = iSelectedIndex ;
|
||||||
if ( documentObject )
|
}
|
||||||
oOption = documentObject.createElement("OPTION") ;
|
}
|
||||||
else
|
|
||||||
oOption = document.createElement("OPTION") ;
|
// Add a new option to a SELECT object (combo or list)
|
||||||
|
function AddComboOption( combo, optionText, optionValue, documentObject, index )
|
||||||
if ( index != null )
|
{
|
||||||
combo.options.add( oOption, index ) ;
|
var oOption ;
|
||||||
else
|
|
||||||
combo.options.add( oOption ) ;
|
if ( documentObject )
|
||||||
|
oOption = documentObject.createElement("OPTION") ;
|
||||||
oOption.innerHTML = optionText.length > 0 ? optionText : ' ' ;
|
else
|
||||||
oOption.value = optionValue ;
|
oOption = document.createElement("OPTION") ;
|
||||||
|
|
||||||
return oOption ;
|
if ( index != null )
|
||||||
|
combo.options.add( oOption, index ) ;
|
||||||
|
else
|
||||||
|
combo.options.add( oOption ) ;
|
||||||
|
|
||||||
|
oOption.innerHTML = optionText.length > 0 ? optionText : ' ' ;
|
||||||
|
oOption.value = optionValue ;
|
||||||
|
|
||||||
|
return oOption ;
|
||||||
}
|
}
|
||||||
@@ -1,91 +1,109 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_smiley.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Smileys (emoticons) dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_smiley.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* Smileys (emoticons) dialog window.
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
*
|
||||||
<style type="text/css">
|
* File Authors:
|
||||||
.HandIE { cursor: hand ; }
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
.HandMozilla { cursor: pointer ; }
|
-->
|
||||||
</style>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<script type="text/javascript">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
window.onload = function ()
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
{
|
<style type="text/css">
|
||||||
// First of all, translate the dialog box texts
|
.Hand
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
{
|
||||||
}
|
cursor: pointer;
|
||||||
|
cursor: hand;
|
||||||
function InsertSmiley( url )
|
}
|
||||||
{
|
</style>
|
||||||
var oImg = oEditor.FCK.CreateElement( 'IMG' ) ;
|
<script type="text/javascript">
|
||||||
oImg.src = url ;
|
|
||||||
oImg.setAttribute( '_fcksavedurl', url ) ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
|
||||||
window.parent.Cancel() ;
|
window.onload = function ()
|
||||||
}
|
{
|
||||||
|
// First of all, translate the dialog box texts
|
||||||
function over(td)
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
{
|
}
|
||||||
td.className = 'LightBackground HandIE HandMozilla' ;
|
|
||||||
}
|
function InsertSmiley( url )
|
||||||
|
{
|
||||||
function out(td)
|
var oImg = oEditor.FCK.CreateElement( 'IMG' ) ;
|
||||||
{
|
oImg.src = url ;
|
||||||
td.className = 'DarkBackground HandIE HandMozilla' ;
|
oImg.setAttribute( '_fcksavedurl', url ) ;
|
||||||
}
|
|
||||||
</script>
|
// For long smileys list, it seams that IE continues loading the images in
|
||||||
</head>
|
// the background when you quickly select one image. so, let's clear
|
||||||
<body scroll="no">
|
// everything before closing.
|
||||||
<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">
|
document.body.innerHTML = '' ;
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
window.parent.Cancel() ;
|
||||||
var FCKConfig = oEditor.FCKConfig ;
|
}
|
||||||
|
|
||||||
var sBasePath = FCKConfig.SmileyPath ;
|
function over(td)
|
||||||
var aImages = FCKConfig.SmileyImages ;
|
{
|
||||||
var cols = FCKConfig.SmileyColumns ;
|
td.className = 'LightBackground Hand' ;
|
||||||
|
}
|
||||||
var i = 0 ;
|
|
||||||
while (i < aImages.length)
|
function out(td)
|
||||||
{
|
{
|
||||||
document.write("<TR>") ;
|
td.className = 'DarkBackground Hand' ;
|
||||||
for(var j = 0 ; j < cols ; j++)
|
}
|
||||||
{
|
</script>
|
||||||
if (aImages[i])
|
</head>
|
||||||
{
|
<body scroll="no">
|
||||||
var sUrl = sBasePath + aImages[i] ;
|
<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">
|
||||||
document.write("<TD width='1%' align='center' class='DarkBackground HandIE HandMozilla' onclick='InsertSmiley(\"" + sUrl.replace(/"/g, '\\"' ) + "\")' onmouseover='over(this)' onmouseout='out(this)'>") ;
|
<script type="text/javascript">
|
||||||
document.write("<img src='" + sUrl + "' border='0'>") ;
|
|
||||||
}
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
else
|
|
||||||
document.write("<TD width='1%' class='DarkBackground'> ") ;
|
var sBasePath = FCKConfig.SmileyPath ;
|
||||||
document.write("<\/TD>") ;
|
var aImages = FCKConfig.SmileyImages ;
|
||||||
i++ ;
|
var iCols = FCKConfig.SmileyColumns ;
|
||||||
}
|
var iColWidth = parseInt( 100 / iCols, 10 ) ;
|
||||||
document.write("<\/TR>") ;
|
|
||||||
}
|
var i = 0 ;
|
||||||
//-->
|
while (i < aImages.length)
|
||||||
</script>
|
{
|
||||||
</table>
|
document.write( '<tr>' ) ;
|
||||||
</body>
|
for(var j = 0 ; j < iCols ; j++)
|
||||||
</html>
|
{
|
||||||
|
if (aImages[i])
|
||||||
|
{
|
||||||
|
var sUrl = sBasePath + aImages[i] ;
|
||||||
|
document.write( '<td width="' + iColWidth + '%" align="center" class="DarkBackground Hand" onclick="InsertSmiley(\'' + sUrl.replace(/'/g, "\\'" ) + '\')" onmouseover="over(this)" onmouseout="out(this)">' ) ;
|
||||||
|
document.write( '<img src="' + sUrl + '" border="0" />' ) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
document.write( '<td width="' + iColWidth + '%" class="DarkBackground"> ' ) ;
|
||||||
|
document.write( '<\/td>' ) ;
|
||||||
|
i++ ;
|
||||||
|
}
|
||||||
|
document.write('<\/tr>') ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,61 +1,69 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_source.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Source editor dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_source.html
|
||||||
<title>Source</title>
|
* Source editor dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
*
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* File Authors:
|
||||||
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
<script language="javascript">
|
-->
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
var FCK = oEditor.FCK ;
|
<head>
|
||||||
var FCKConfig = oEditor.FCKConfig ;
|
<title>Source</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
window.onload = function()
|
<meta name="robots" content="noindex, nofollow">
|
||||||
{
|
<link href="common/fck_dialog_common.css" rel="stylesheet" type="text/css" />
|
||||||
// EnableXHTML and EnableSourceXHTML has been deprecated
|
<script language="javascript">
|
||||||
// document.getElementById('txtSource').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML( FCKConfig.FormatSource ) : FCK.GetHTML( FCKConfig.FormatSource ) ) ;
|
|
||||||
document.getElementById('txtSource').value = FCK.GetXHTML( FCKConfig.FormatSource ) ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
var FCK = oEditor.FCK ;
|
||||||
// Activate the "OK" button.
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
}
|
window.onload = function()
|
||||||
|
{
|
||||||
//#### The OK button was hit.
|
// EnableXHTML and EnableSourceXHTML has been deprecated
|
||||||
function Ok()
|
// document.getElementById('txtSource').value = ( FCKConfig.EnableXHTML && FCKConfig.EnableSourceXHTML ? FCK.GetXHTML( FCKConfig.FormatSource ) : FCK.GetHTML( FCKConfig.FormatSource ) ) ;
|
||||||
{
|
document.getElementById('txtSource').value = FCK.GetXHTML( FCKConfig.FormatSource ) ;
|
||||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
// Activate the "OK" button.
|
||||||
|
window.parent.SetOkButton( true ) ;
|
||||||
FCK.SetHTML( document.getElementById('txtSource').value, false ) ;
|
}
|
||||||
|
|
||||||
return true ;
|
//#### The OK button was hit.
|
||||||
}
|
function Ok()
|
||||||
</script>
|
{
|
||||||
</head>
|
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
<table width="100%" height="100%">
|
|
||||||
<tr>
|
FCK.SetHTML( document.getElementById('txtSource').value, false ) ;
|
||||||
<td height="100%"><textarea id="txtSource" dir="ltr" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 14px; PADDING-BOTTOM: 5px; WIDTH: 100%; PADDING-TOP: 5px; FONT-FAMILY: Monospace; HEIGHT: 100%">Loading. Please wait...</textarea></td>
|
|
||||||
</tr>
|
return true ;
|
||||||
</table>
|
}
|
||||||
</body>
|
</script>
|
||||||
</html>
|
</head>
|
||||||
|
<body scroll="no" style="OVERFLOW: hidden">
|
||||||
|
<table width="100%" height="100%">
|
||||||
|
<tr>
|
||||||
|
<td height="100%"><textarea id="txtSource" dir="ltr" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-SIZE: 14px; PADDING-BOTTOM: 5px; WIDTH: 100%; PADDING-TOP: 5px; FONT-FAMILY: Monospace; HEIGHT: 100%">Loading. Please wait...</textarea></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,109 +1,117 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_specialchar.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Special Chars Selector dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_specialchar.html
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* Special Chars Selector dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
*
|
||||||
<style type="text/css">
|
* File Authors:
|
||||||
.Hand
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
{
|
-->
|
||||||
cursor: pointer ;
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
cursor: hand ;
|
<html>
|
||||||
}
|
<head>
|
||||||
.Sample { font-size: 24px; }
|
<meta name="robots" content="noindex, nofollow">
|
||||||
</style>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<script type="text/javascript">
|
<style type="text/css">
|
||||||
|
.Hand
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
{
|
||||||
|
cursor: pointer ;
|
||||||
var oSample ;
|
cursor: hand ;
|
||||||
|
}
|
||||||
function insertChar(charValue)
|
.Sample { font-size: 24px; }
|
||||||
{
|
</style>
|
||||||
oEditor.FCK.InsertHtml( charValue || "" ) ;
|
<script type="text/javascript">
|
||||||
window.parent.Cancel() ;
|
|
||||||
}
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
|
|
||||||
function over(td)
|
var oSample ;
|
||||||
{
|
|
||||||
oSample.innerHTML = td.innerHTML ;
|
function insertChar(charValue)
|
||||||
td.className = 'LightBackground SpecialCharsOver Hand' ;
|
{
|
||||||
}
|
oEditor.FCK.InsertHtml( charValue || "" ) ;
|
||||||
|
window.parent.Cancel() ;
|
||||||
function out(td)
|
}
|
||||||
{
|
|
||||||
oSample.innerHTML = " " ;
|
function over(td)
|
||||||
td.className = 'DarkBackground SpecialCharsOut Hand' ;
|
{
|
||||||
}
|
oSample.innerHTML = td.innerHTML ;
|
||||||
|
td.className = 'LightBackground SpecialCharsOver Hand' ;
|
||||||
function setDefaults()
|
}
|
||||||
{
|
|
||||||
// Gets the sample placeholder.
|
function out(td)
|
||||||
oSample = document.getElementById("SampleTD") ;
|
{
|
||||||
|
oSample.innerHTML = " " ;
|
||||||
// First of all, translates the dialog box texts.
|
td.className = 'DarkBackground SpecialCharsOut Hand' ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
}
|
||||||
}
|
|
||||||
|
function setDefaults()
|
||||||
</script>
|
{
|
||||||
</HEAD>
|
// Gets the sample placeholder.
|
||||||
<BODY onload="setDefaults()" scroll="no">
|
oSample = document.getElementById("SampleTD") ;
|
||||||
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
|
|
||||||
<tr>
|
// First of all, translates the dialog box texts.
|
||||||
<td width="100%">
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
<table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%">
|
}
|
||||||
<script type="text/javascript">
|
|
||||||
var aChars = ["!",""","#","$","%","&","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ","Œ","œ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"] ;
|
</script>
|
||||||
|
</HEAD>
|
||||||
var cols = 20 ;
|
<BODY onload="setDefaults()" scroll="no">
|
||||||
|
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||||
var i = 0 ;
|
<tr>
|
||||||
while (i < aChars.length)
|
<td width="100%">
|
||||||
{
|
<table cellpadding="1" cellspacing="1" align="center" border="0" width="100%" height="100%">
|
||||||
document.write("<TR>") ;
|
<script type="text/javascript">
|
||||||
for(var j = 0 ; j < cols ; j++)
|
var aChars = ["!",""","#","$","%","&","\\'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ","Œ","œ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"] ;
|
||||||
{
|
|
||||||
if (aChars[i])
|
var cols = 20 ;
|
||||||
{
|
|
||||||
document.write('<TD width="1%" class="DarkBackground SpecialCharsOut Hand" align="center" onclick="insertChar(\'' + aChars[i].replace(/&/g, "&") + '\')" onmouseover="over(this)" onmouseout="out(this)">') ;
|
var i = 0 ;
|
||||||
document.write(aChars[i]) ;
|
while (i < aChars.length)
|
||||||
}
|
{
|
||||||
else
|
document.write("<TR>") ;
|
||||||
document.write("<TD class='DarkBackground SpecialCharsOut'> ") ;
|
for(var j = 0 ; j < cols ; j++)
|
||||||
document.write("<\/TD>") ;
|
{
|
||||||
i++ ;
|
if (aChars[i])
|
||||||
}
|
{
|
||||||
document.write("<\/TR>") ;
|
document.write('<TD width="1%" class="DarkBackground SpecialCharsOut Hand" align="center" onclick="insertChar(\'' + aChars[i].replace(/&/g, "&") + '\')" onmouseover="over(this)" onmouseout="out(this)">') ;
|
||||||
}
|
document.write(aChars[i]) ;
|
||||||
</script>
|
}
|
||||||
</table>
|
else
|
||||||
</td>
|
document.write("<TD class='DarkBackground SpecialCharsOut'> ") ;
|
||||||
<td nowrap> </td>
|
document.write("<\/TD>") ;
|
||||||
<td valign="top">
|
i++ ;
|
||||||
<table width="40" cellpadding="0" cellspacing="0" border="0">
|
}
|
||||||
<tr>
|
document.write("<\/TR>") ;
|
||||||
<td id="SampleTD" width="40" height="40" align="center" class="DarkBackground SpecialCharsOut Sample"> </td>
|
}
|
||||||
</tr>
|
</script>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td nowrap> </td>
|
||||||
</table>
|
<td valign="top">
|
||||||
</BODY>
|
<table width="40" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td id="SampleTD" width="40" height="40" align="center" class="DarkBackground SpecialCharsOut Sample"> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
@@ -1,59 +1,68 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_spellerpages.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Spell Check dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Spell Check</title>
|
* File Name: fck_spellerpages.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Spell Check dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="fck_spellerpages/spellerpages/spellChecker.js"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
var FCKLang = oEditor.FCKLang ;
|
<head>
|
||||||
|
<title>Spell Check</title>
|
||||||
window.onload = function()
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
{
|
<meta content="noindex, nofollow" name="robots">
|
||||||
document.getElementById('txtHtml').value = oEditor.FCK.EditorDocument.body.innerHTML ;
|
<script src="fck_spellerpages/spellerpages/spellChecker.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
var oSpeller = new spellChecker( document.getElementById('txtHtml') ) ;
|
|
||||||
oSpeller.OnFinished = oSpeller_OnFinished ;
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
oSpeller.openChecker() ;
|
var FCKLang = oEditor.FCKLang ;
|
||||||
}
|
|
||||||
|
window.onload = function()
|
||||||
function OnSpellerControlsLoad( controlsWindow )
|
{
|
||||||
{
|
document.getElementById('txtHtml').value = oEditor.FCK.EditorDocument.body.innerHTML ;
|
||||||
// Translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage( controlsWindow.document ) ;
|
var oSpeller = new spellChecker( document.getElementById('txtHtml') ) ;
|
||||||
}
|
oSpeller.spellCheckScript = oEditor.FCKConfig.SpellerPagesServerScript || 'server-scripts/spellchecker.php' ;
|
||||||
|
oSpeller.OnFinished = oSpeller_OnFinished ;
|
||||||
function oSpeller_OnFinished( numberOCorrections )
|
oSpeller.openChecker() ;
|
||||||
{
|
}
|
||||||
if ( numberOCorrections > 0 )
|
|
||||||
oEditor.FCK.SetHTML( document.getElementById('txtHtml').value ) ;
|
function OnSpellerControlsLoad( controlsWindow )
|
||||||
window.parent.Cancel() ;
|
{
|
||||||
}
|
// Translate the dialog box texts
|
||||||
|
oEditor.FCKLanguageManager.TranslatePage( controlsWindow.document ) ;
|
||||||
</script>
|
}
|
||||||
</head>
|
|
||||||
<body style="OVERFLOW: hidden" scroll="no" style="padding:0px;">
|
function oSpeller_OnFinished( numberOCorrections )
|
||||||
<input type="hidden" id="txtHtml" value="">
|
{
|
||||||
<iframe id="frmSpell" src="../fckblank.html" name="spellchecker" width="100%" height="100%" frameborder="0"></iframe>
|
if ( numberOCorrections > 0 )
|
||||||
</body>
|
oEditor.FCK.SetHTML( document.getElementById('txtHtml').value ) ;
|
||||||
</html>
|
window.parent.Cancel() ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="OVERFLOW: hidden" scroll="no" style="padding:0px;">
|
||||||
|
<input type="hidden" id="txtHtml" value="">
|
||||||
|
<iframe id="frmSpell" src="javascript:void(0)" name="spellchecker" width="100%" height="100%" frameborder="0"></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,87 +1,87 @@
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// controlWindow object
|
// controlWindow object
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
function controlWindow( controlForm ) {
|
function controlWindow( controlForm ) {
|
||||||
// private properties
|
// private properties
|
||||||
this._form = controlForm;
|
this._form = controlForm;
|
||||||
|
|
||||||
// public properties
|
// public properties
|
||||||
this.windowType = "controlWindow";
|
this.windowType = "controlWindow";
|
||||||
// this.noSuggestionSelection = "- No suggestions -"; // by FredCK
|
// this.noSuggestionSelection = "- No suggestions -"; // by FredCK
|
||||||
this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ;
|
this.noSuggestionSelection = FCKLang.DlgSpellNoSuggestions ;
|
||||||
// set up the properties for elements of the given control form
|
// set up the properties for elements of the given control form
|
||||||
this.suggestionList = this._form.sugg;
|
this.suggestionList = this._form.sugg;
|
||||||
this.evaluatedText = this._form.misword;
|
this.evaluatedText = this._form.misword;
|
||||||
this.replacementText = this._form.txtsugg;
|
this.replacementText = this._form.txtsugg;
|
||||||
this.undoButton = this._form.btnUndo;
|
this.undoButton = this._form.btnUndo;
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
this.addSuggestion = addSuggestion;
|
this.addSuggestion = addSuggestion;
|
||||||
this.clearSuggestions = clearSuggestions;
|
this.clearSuggestions = clearSuggestions;
|
||||||
this.selectDefaultSuggestion = selectDefaultSuggestion;
|
this.selectDefaultSuggestion = selectDefaultSuggestion;
|
||||||
this.resetForm = resetForm;
|
this.resetForm = resetForm;
|
||||||
this.setSuggestedText = setSuggestedText;
|
this.setSuggestedText = setSuggestedText;
|
||||||
this.enableUndo = enableUndo;
|
this.enableUndo = enableUndo;
|
||||||
this.disableUndo = disableUndo;
|
this.disableUndo = disableUndo;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
if( this._form ) {
|
if( this._form ) {
|
||||||
this._form.reset();
|
this._form.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSuggestedText() {
|
function setSuggestedText() {
|
||||||
var slct = this.suggestionList;
|
var slct = this.suggestionList;
|
||||||
var txt = this.replacementText;
|
var txt = this.replacementText;
|
||||||
var str = "";
|
var str = "";
|
||||||
if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) {
|
if( (slct.options[0].text) && slct.options[0].text != this.noSuggestionSelection ) {
|
||||||
str = slct.options[slct.selectedIndex].text;
|
str = slct.options[slct.selectedIndex].text;
|
||||||
}
|
}
|
||||||
txt.value = str;
|
txt.value = str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectDefaultSuggestion() {
|
function selectDefaultSuggestion() {
|
||||||
var slct = this.suggestionList;
|
var slct = this.suggestionList;
|
||||||
var txt = this.replacementText;
|
var txt = this.replacementText;
|
||||||
if( slct.options.length == 0 ) {
|
if( slct.options.length == 0 ) {
|
||||||
this.addSuggestion( this.noSuggestionSelection );
|
this.addSuggestion( this.noSuggestionSelection );
|
||||||
} else {
|
} else {
|
||||||
slct.options[0].selected = true;
|
slct.options[0].selected = true;
|
||||||
}
|
}
|
||||||
this.setSuggestedText();
|
this.setSuggestedText();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSuggestion( sugg_text ) {
|
function addSuggestion( sugg_text ) {
|
||||||
var slct = this.suggestionList;
|
var slct = this.suggestionList;
|
||||||
if( sugg_text ) {
|
if( sugg_text ) {
|
||||||
var i = slct.options.length;
|
var i = slct.options.length;
|
||||||
var newOption = new Option( sugg_text, 'sugg_text'+i );
|
var newOption = new Option( sugg_text, 'sugg_text'+i );
|
||||||
slct.options[i] = newOption;
|
slct.options[i] = newOption;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearSuggestions() {
|
function clearSuggestions() {
|
||||||
var slct = this.suggestionList;
|
var slct = this.suggestionList;
|
||||||
for( var j = slct.length - 1; j > -1; j-- ) {
|
for( var j = slct.length - 1; j > -1; j-- ) {
|
||||||
if( slct.options[j] ) {
|
if( slct.options[j] ) {
|
||||||
slct.options[j] = null;
|
slct.options[j] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableUndo() {
|
function enableUndo() {
|
||||||
if( this.undoButton ) {
|
if( this.undoButton ) {
|
||||||
if( this.undoButton.disabled == true ) {
|
if( this.undoButton.disabled == true ) {
|
||||||
this.undoButton.disabled = false;
|
this.undoButton.disabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableUndo() {
|
function disableUndo() {
|
||||||
if( this.undoButton ) {
|
if( this.undoButton ) {
|
||||||
if( this.undoButton.disabled == false ) {
|
if( this.undoButton.disabled == false ) {
|
||||||
this.undoButton.disabled = true;
|
this.undoButton.disabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,153 +1,153 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" type="text/css" href="spellerStyle.css" />
|
<link rel="stylesheet" type="text/css" href="spellerStyle.css" />
|
||||||
<script src="controlWindow.js"></script>
|
<script type="text/javascript" src="controlWindow.js"></script>
|
||||||
<script>
|
<script type="text/javascript">
|
||||||
var spellerObject;
|
var spellerObject;
|
||||||
var controlWindowObj;
|
var controlWindowObj;
|
||||||
|
|
||||||
if( parent.opener ) {
|
if( parent.opener ) {
|
||||||
spellerObject = parent.opener.speller;
|
spellerObject = parent.opener.speller;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ignore_word() {
|
function ignore_word() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.ignoreWord();
|
spellerObject.ignoreWord();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ignore_all() {
|
function ignore_all() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.ignoreAll();
|
spellerObject.ignoreAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace_word() {
|
function replace_word() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.replaceWord();
|
spellerObject.replaceWord();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace_all() {
|
function replace_all() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.replaceAll();
|
spellerObject.replaceAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function end_spell() {
|
function end_spell() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.terminateSpell();
|
spellerObject.terminateSpell();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function undo() {
|
function undo() {
|
||||||
if( spellerObject ) {
|
if( spellerObject ) {
|
||||||
spellerObject.undo();
|
spellerObject.undo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function suggText() {
|
function suggText() {
|
||||||
if( controlWindowObj ) {
|
if( controlWindowObj ) {
|
||||||
controlWindowObj.setSuggestedText();
|
controlWindowObj.setSuggestedText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var FCKLang = window.parent.parent.FCKLang ; // by FredCK
|
var FCKLang = window.parent.parent.FCKLang ; // by FredCK
|
||||||
|
|
||||||
function init_spell() {
|
function init_spell() {
|
||||||
// By FredCK (fckLang attributes have been added to the HTML source of this page)
|
// By FredCK (fckLang attributes have been added to the HTML source of this page)
|
||||||
window.parent.parent.OnSpellerControlsLoad( this ) ;
|
window.parent.parent.OnSpellerControlsLoad( this ) ;
|
||||||
|
|
||||||
var controlForm = document.spellcheck;
|
var controlForm = document.spellcheck;
|
||||||
|
|
||||||
// create a new controlWindow object
|
// create a new controlWindow object
|
||||||
controlWindowObj = new controlWindow( controlForm );
|
controlWindowObj = new controlWindow( controlForm );
|
||||||
|
|
||||||
// call the init_spell() function in the parent frameset
|
// call the init_spell() function in the parent frameset
|
||||||
if( parent.frames.length ) {
|
if( parent.frames.length ) {
|
||||||
parent.init_spell( controlWindowObj );
|
parent.init_spell( controlWindowObj );
|
||||||
} else {
|
} else {
|
||||||
alert( 'This page was loaded outside of a frameset. It might not display properly' );
|
alert( 'This page was loaded outside of a frameset. It might not display properly' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="controlWindowBody" onLoad="init_spell();" style="OVERFLOW: hidden" scroll="no"> <!-- by FredCK -->
|
<body class="controlWindowBody" onLoad="init_spell();" style="OVERFLOW: hidden" scroll="no"> <!-- by FredCK -->
|
||||||
<form name="spellcheck">
|
<form name="spellcheck">
|
||||||
<table border="0" cellpadding="0" cellspacing="0" border="0" align="center">
|
<table border="0" cellpadding="0" cellspacing="0" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="normalLabel"><span fckLang="DlgSpellNotInDic">Not in dictionary:</span></td>
|
<td colspan="3" class="normalLabel"><span fckLang="DlgSpellNotInDic">Not in dictionary:</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"><input class="readonlyInput" type="text" name="misword" readonly /></td>
|
<td colspan="3"><input class="readonlyInput" type="text" name="misword" readonly /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" height="5"></td>
|
<td colspan="3" height="5"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="normalLabel"><span fckLang="DlgSpellChangeTo">Change to:</span></td>
|
<td class="normalLabel"><span fckLang="DlgSpellChangeTo">Change to:</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" border="0">
|
<table border="0" cellpadding="0" cellspacing="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="normalLabel">
|
<td class="normalLabel">
|
||||||
<input class="textDefault" type="text" name="txtsugg" />
|
<input class="textDefault" type="text" name="txtsugg" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select class="suggSlct" name="sugg" size="7" onChange="suggText();" onDblClick="replace_word();">
|
<select class="suggSlct" name="sugg" size="7" onChange="suggText();" onDblClick="replace_word();">
|
||||||
<option></option>
|
<option></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" border="0">
|
<table border="0" cellpadding="0" cellspacing="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnore" value="Ignore" onClick="ignore_word();">
|
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnore" value="Ignore" onClick="ignore_word();">
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnoreAll" value="Ignore All" onClick="ignore_all();">
|
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnoreAll" value="Ignore All" onClick="ignore_all();">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" height="5"></td>
|
<td colspan="3" height="5"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplace" value="Replace" onClick="replace_word();">
|
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplace" value="Replace" onClick="replace_word();">
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplaceAll" value="Replace All" onClick="replace_all();">
|
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplaceAll" value="Replace All" onClick="replace_all();">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" height="5"></td>
|
<td colspan="3" height="5"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input class="buttonDefault" type="button" name="btnUndo" fckLang="DlgSpellBtnUndo" value="Undo" onClick="undo();"
|
<input class="buttonDefault" type="button" name="btnUndo" fckLang="DlgSpellBtnUndo" value="Undo" onClick="undo();"
|
||||||
disabled>
|
disabled>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<!-- by FredCK
|
<!-- by FredCK
|
||||||
<input class="buttonDefault" type="button" value="Close" onClick="end_spell();">
|
<input class="buttonDefault" type="button" value="Close" onClick="end_spell();">
|
||||||
-->
|
-->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,132 +1,174 @@
|
|||||||
<!--- Coldfusion MX uses java on the server to process tags. So it is save to use most java attributes. For example below
|
<cfsilent>
|
||||||
I use list.lastindexOf(), lastindexOf() is a java string attribute. If you plan on using this tag with earlier versions
|
<!---
|
||||||
of Coldfusion, you will have to replace the lastindexOf with a pure coldfusion function. By replacing the lastindexOf, spellchecker.cfm
|
This code uses a CF User Defined Function and should work in CF version 5.0
|
||||||
script should be compatible with all cf version 4.5 and up.
|
and up without alteration.
|
||||||
|
|
||||||
Also if you are hosting your site at an ISP, you will have to check with them to see if the use of <CFEXECUTE> is allowed.
|
Also if you are hosting your site at an ISP, you will have to check with them
|
||||||
In most cases ISP will not allow the use of that tag for security reasons. Clients would be able to access each others files in certain cases.
|
to see if the use of <CFEXECUTE> is allowed. In most cases ISP will not allow
|
||||||
--->
|
the use of that tag for security reasons. Clients would be able to access each
|
||||||
|
others files in certain cases.
|
||||||
|
--->
|
||||||
<!--- Set up variables --->
|
|
||||||
<cfset tempFolder = "c:\test">
|
<!---
|
||||||
<cfset tempfile = "spell_#randrange(1,1000)#">
|
The following variables values must reflect your installation needs.
|
||||||
<cfset apsell_dir = "c:\aspell\bin">
|
--->
|
||||||
<!--- <cfset spellercss = "/speller/spellerStyle.css"> by FredCK --->
|
<cfset apsell_dir = "c:\aspell\bin">
|
||||||
<cfset spellercss = "../spellerStyle.css">
|
|
||||||
<!--- <cfset word_win_src = "/speller/wordWindow.js"> by FredCK --->
|
<cfset lang = "en_US">
|
||||||
<cfset word_win_src = "../wordWindow.js">
|
<cfset aspell_opts = "-a --lang=#lang# --encoding=utf-8 -H">
|
||||||
|
|
||||||
|
<!--- Be sure the temporary folder exists --->
|
||||||
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
|
<cfset tempFolder = "c:\aspell\temp">
|
||||||
<cfset submitted_text = replacelist(form.checktext,"%u201C,%u201D","%22,%22")>
|
<cfset tempfile = "spell_#randrange(1,10000)#">
|
||||||
<cfset submitted_text = urlDecode(submitted_text)>
|
|
||||||
|
<cfset spellercss = "../spellerStyle.css">
|
||||||
|
<cfset word_win_src = "../wordWindow.js">
|
||||||
|
|
||||||
|
<cfset form.checktext = form["textinputs[]"]>
|
||||||
<!--- need to escape special javascript characters such as ' --->
|
|
||||||
<cfset unaltered_text = submitted_text>
|
<cfscript>
|
||||||
<cfset submitted_text = replace(submitted_text,"'","\'","All")>
|
function LastIndexOf(subs, str)
|
||||||
<cfset submitted_text = replace(submitted_text,"""","\""","All")>
|
{
|
||||||
|
return Len(str) - Find(subs, Reverse(str)) + 1;
|
||||||
<!--- use carat on each line to escape possible aspell commands --->
|
}
|
||||||
<cfset text = "">
|
</cfscript>
|
||||||
<cfloop list="#submitted_text#" index="idx" delimiters="#chr(10)##chr(13)#">
|
|
||||||
<cfset text =text&"^"&idx&"#chr(10)##chr(13)#">
|
<!--- Takes care of those pesky smart quotes from MS apps, replaces them with regular quotes --->
|
||||||
</cfloop>
|
<cfparam name="url.checktext" default="">
|
||||||
|
<cfparam name="form.checktext" default="#url.checktext#">
|
||||||
|
<cfset submitted_text = replacelist(form.checktext,"%u201C,%u201D","%22,%22")>
|
||||||
|
|
||||||
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
|
<!--- submitted_text now is ready for processing --->
|
||||||
<cffile action="write" file="#tempFolder#\#tempfile#.txt" output="#text#" charset="utf-8">
|
|
||||||
|
<!--- use carat on each line to escape possible aspell commands --->
|
||||||
|
<cfset text = "">
|
||||||
<!--- cfsavecontent is used to set the variable that will be returned with the results from aspell.
|
<cfset crlf = Chr(13) & Chr(10)>
|
||||||
If your using the new version of mx 6.1 you can use the following cfexecute tag instead:
|
|
||||||
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type c:\test\#tempfile#.txt | c:\aspell\bin\aspell -a" timeout="100" variable="results"></cfexecute> --->
|
<cfloop list="#submitted_text#" index="field" delimiters=",">
|
||||||
|
<cfset text = text & "%" & crlf
|
||||||
<cfsavecontent variable="food">
|
& "^A" & crlf
|
||||||
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type #tempFolder#\#tempfile#.txt | #apsell_dir#\aspell -a" timeout="100"></cfexecute>
|
& "!" & crlf>
|
||||||
</cfsavecontent>
|
<cfset field = URLDecode(field)>
|
||||||
|
<cfloop list="#field#" index="line" delimiters="#crlf#">
|
||||||
<!--- remove temp file --->
|
<!--- <cfset submitted_text = replace(submitted_text,"'","\'","All")>
|
||||||
<cffile action="delete" file="#tempFolder#\#tempfile#.txt">
|
<cfset submitted_text = replace(submitted_text,"""","\""","All")> --->
|
||||||
|
<cfset text = text & "^" & Trim(JSStringFormat(line)) & "#crlf#">
|
||||||
|
</cfloop>
|
||||||
|
</cfloop>
|
||||||
|
|
||||||
<cfoutput>
|
|
||||||
<html>
|
<!--- need to escape special javascript characters such as ' --->
|
||||||
<head>
|
<cfset unaltered_text = submitted_text>
|
||||||
<link rel="stylesheet" type="text/css" href="speller/spellerStyle.css">
|
|
||||||
<script src="/speller/wordWindow.js"></script>
|
<!--- create temp file from the submitted text, this will be passed to aspell to be check for misspelled words --->
|
||||||
<script language="javascript">
|
<cffile action="write" file="#tempFolder#\#tempfile#.txt" output="#text#" charset="utf-8">
|
||||||
var suggs = new Array();
|
|
||||||
var words = new Array();
|
<!--- cfsavecontent is used to set the variable that will be returned with the results from aspell.
|
||||||
var error;
|
If your using the new version of mx 6.1 you can use the following cfexecute tag instead:
|
||||||
var wordtext = unescape('#urlencodedFormat(unaltered_text)#');
|
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type c:\test\#tempfile#.txt | c:\aspell\bin\aspell #aspell_opts#" timeout="100" variable="results"></cfexecute> --->
|
||||||
|
|
||||||
<cfset cnt = 1>
|
|
||||||
<cfset word_cnt = 0>
|
|
||||||
<cfloop list="#food#" index="list" delimiters="#chr(10)##chr(13)#">
|
<cfsavecontent variable="food">
|
||||||
<!--- removes the first line of the aspell output "@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)" --->
|
<cfexecute name="C:\WINDOWS\SYSTEM32\cmd.exe" arguments="/c type #tempFolder#\#tempfile#.txt | #apsell_dir#\aspell #aspell_opts#" timeout="100"></cfexecute>
|
||||||
<cfif NOT cnt EQ 1>
|
</cfsavecontent>
|
||||||
<cfif find("&",list) OR find("##",list)>
|
|
||||||
<!--- word that misspelled --->
|
|
||||||
<cfset bad_word = listGetAt(list,"2"," ")>
|
|
||||||
<!--- sugestions --->
|
<!--- remove temp file --->
|
||||||
<cfset wrdList = mid(list,(list.lastindexOf(':') + 2),(len(list) - (list.lastindexOf(':') + 2)))>
|
<cffile action="delete" file="#tempFolder#\#tempfile#.txt">
|
||||||
<cfset wrdsList = "">
|
|
||||||
<cfloop list=#wrdList# index="idx">
|
<cfset texts = StructNew()>
|
||||||
<cfset wrdsList =wrdsList&"'"&trim(replace(idx,"'","\'","All"))&"',">
|
<cfset texts.textinputs = "">
|
||||||
</cfloop>
|
<cfset texts.words = "">
|
||||||
<!--- javascript --->
|
<cfset texts.abort = "">
|
||||||
words[#word_cnt#] = '#trim(replace(bad_word,"'","\'","All"))#';
|
|
||||||
suggs[#word_cnt#] = [#trim(wrdsList)#];
|
<!--- Generate Text Inputs --->
|
||||||
<cfset word_cnt = word_cnt + 1>
|
|
||||||
<cfelseif find("*",list)>
|
<cfset i = "0">
|
||||||
</cfif>
|
<cfloop index="text" list="#form.checktext#">
|
||||||
</cfif>
|
<cfset texts.textinputs = ListAppend(texts.textinputs, 'textinputs[#i#] = decodeURIComponent("#text#");', '#Chr(13)##Chr(10)#')>
|
||||||
<cfset cnt = cnt + 1>
|
<cfset i = i + "1">
|
||||||
</cfloop>
|
</cfloop>
|
||||||
|
|
||||||
|
<!--- Generate Words Lists --->
|
||||||
|
|
||||||
|
<cfset cnt = "1">
|
||||||
|
<cfset word_cnt = "0">
|
||||||
|
<cfset input_cnt = "-1">
|
||||||
var wordWindowObj = new wordWindow();
|
<cfloop list="#food#" index="list" delimiters="#chr(10)##chr(13)#">
|
||||||
wordWindowObj.originalSpellings = words;
|
<!--- removes the first line of the aspell output "@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)" --->
|
||||||
wordWindowObj.suggestions = suggs;
|
<cfif NOT cnt IS "1">
|
||||||
wordWindowObj.text = wordtext;
|
<cfif Find("&", list) OR Find("##", list)>
|
||||||
|
<!--- word that misspelled --->
|
||||||
|
<cfset bad_word = listGetAt(list, "2", " ")>
|
||||||
function init_spell() {
|
<!--- sugestions --->
|
||||||
// check if any error occured during server-side processing
|
<cfset wrdList = mid(list,(LastIndexOf(':', list) + 2),(len(list) - (LastIndexOf(':', list) + 2)))>
|
||||||
if( error ) {
|
<cfset wrdsList = "">
|
||||||
alert( error );
|
<cfloop list="#wrdList#" index="idx">
|
||||||
} else {
|
<cfset wrdsList = ListAppend(wrdsList, " '" & trim(replace(idx,"'","\'","All")) & "'", ", ")>
|
||||||
// call the init_spell() function in the parent frameset
|
</cfloop>
|
||||||
if (parent.frames.length) {
|
<cfset wrdsList = Right(wrdsList, Len(wrdsList) - 1)>
|
||||||
parent.init_spell( wordWindowObj );
|
<!--- javascript --->
|
||||||
} else {
|
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#][#word_cnt#] = '#trim(replace(bad_word,"'","\'","All"))#';", "#Chr(13)##Chr(10)#")>
|
||||||
alert('This page was loaded outside of a frameset. It might not display properly');
|
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#][#word_cnt#] = [#trim(wrdsList)#];", "#Chr(13)##Chr(10)#")>
|
||||||
}
|
<cfset word_cnt = word_cnt + 1>
|
||||||
}
|
<cfelseif find("*", list)>
|
||||||
}
|
<cfset input_cnt = input_cnt + "1">
|
||||||
|
<cfset word_cnt = "0">
|
||||||
|
<cfset texts.words = ListAppend(texts.words, "words[#input_cnt#] = [];", "#crlf#")>
|
||||||
|
<cfset texts.words = ListAppend(texts.words, "suggs[#input_cnt#] = [];", "#crlf#")>
|
||||||
</script>
|
</cfif>
|
||||||
|
</cfif>
|
||||||
</head>
|
<cfset cnt = cnt + 1>
|
||||||
<body onLoad="init_spell();">
|
</cfloop>
|
||||||
|
|
||||||
<script>
|
<cfif texts.words IS "">
|
||||||
wordWindowObj.writeBody();
|
<cfset texts.abort = "alert('Spell check complete.\n\nNo misspellings found.');#chrlf#top.window.close();">
|
||||||
</script>
|
</cfif>
|
||||||
|
|
||||||
</body>
|
</cfsilent><cfoutput><cfcontent type="text/html"><html>
|
||||||
</html>
|
<head>
|
||||||
</cfoutput>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<link rel="stylesheet" type="text/css" href="#spellercss#" />
|
||||||
|
<script language="javascript" src="#word_win_src#"></script>
|
||||||
|
<script language="javascript">
|
||||||
|
var suggs = new Array();
|
||||||
|
var words = new Array();
|
||||||
|
var textinputs = new Array();
|
||||||
|
var error;
|
||||||
|
|
||||||
|
#texts.textinputs##Chr(13)##Chr(10)#
|
||||||
|
#texts.words#
|
||||||
|
#texts.abort#
|
||||||
|
|
||||||
|
var wordWindowObj = new wordWindow();
|
||||||
|
wordWindowObj.originalSpellings = words;
|
||||||
|
wordWindowObj.suggestions = suggs;
|
||||||
|
wordWindowObj.textInputs = textinputs;
|
||||||
|
|
||||||
|
function init_spell() {
|
||||||
|
// check if any error occured during server-side processing
|
||||||
|
if( error ) {
|
||||||
|
alert( error );
|
||||||
|
} else {
|
||||||
|
// call the init_spell() function in the parent frameset
|
||||||
|
if (parent.frames.length) {
|
||||||
|
parent.init_spell( wordWindowObj );
|
||||||
|
} else {
|
||||||
|
alert('This page was loaded outside of a frameset. It might not display properly');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body onLoad="init_spell();">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
wordWindowObj.writeBody();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html></cfoutput>
|
||||||
|
|||||||
@@ -1,193 +1,196 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Content-type: text/html; charset=utf-8');
|
header('Content-type: text/html; charset=utf-8');
|
||||||
|
|
||||||
//$spellercss = '/speller/spellerStyle.css'; // by FredCK
|
// The following variables values must reflect your installation needs.
|
||||||
$spellercss = '../spellerStyle.css'; // by FredCK
|
|
||||||
//$word_win_src = '/speller/wordWindow.js'; // by FredCK
|
$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
|
||||||
$word_win_src = '../wordWindow.js'; // by FredCK
|
//$aspell_prog = 'aspell'; // by FredCK (for Linux)
|
||||||
$textinputs = $_POST['textinputs']; # array
|
|
||||||
//$aspell_prog = 'aspell'; // by FredCK (for Linux)
|
$lang = 'en_US';
|
||||||
$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"'; // by FredCK (for Windows)
|
$aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; // by FredCK
|
||||||
$lang = 'en_US';
|
|
||||||
//$aspell_opts = "-a --lang=$lang --encoding=utf-8"; // by FredCK
|
$tempfiledir = "./";
|
||||||
$aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; // by FredCK
|
|
||||||
$tempfiledir = "./";
|
$spellercss = '../spellerStyle.css'; // by FredCK
|
||||||
$input_separator = "A";
|
$word_win_src = '../wordWindow.js'; // by FredCK
|
||||||
|
|
||||||
# set the JavaScript variable to the submitted text.
|
$textinputs = $_POST['textinputs']; # array
|
||||||
# textinputs is an array, each element corresponding to the (url-encoded)
|
$input_separator = "A";
|
||||||
# value of the text control submitted for spell-checking
|
|
||||||
function print_textinputs_var() {
|
# set the JavaScript variable to the submitted text.
|
||||||
global $textinputs;
|
# textinputs is an array, each element corresponding to the (url-encoded)
|
||||||
foreach( $textinputs as $key=>$val ) {
|
# value of the text control submitted for spell-checking
|
||||||
# $val = str_replace( "'", "%27", $val );
|
function print_textinputs_var() {
|
||||||
echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
|
global $textinputs;
|
||||||
}
|
foreach( $textinputs as $key=>$val ) {
|
||||||
}
|
# $val = str_replace( "'", "%27", $val );
|
||||||
|
echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n";
|
||||||
# make declarations for the text input index
|
}
|
||||||
function print_textindex_decl( $text_input_idx ) {
|
}
|
||||||
echo "words[$text_input_idx] = [];\n";
|
|
||||||
echo "suggs[$text_input_idx] = [];\n";
|
# make declarations for the text input index
|
||||||
}
|
function print_textindex_decl( $text_input_idx ) {
|
||||||
|
echo "words[$text_input_idx] = [];\n";
|
||||||
# set an element of the JavaScript 'words' array to a misspelled word
|
echo "suggs[$text_input_idx] = [];\n";
|
||||||
function print_words_elem( $word, $index, $text_input_idx ) {
|
}
|
||||||
echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n";
|
|
||||||
}
|
# set an element of the JavaScript 'words' array to a misspelled word
|
||||||
|
function print_words_elem( $word, $index, $text_input_idx ) {
|
||||||
|
echo "words[$text_input_idx][$index] = '" . escape_quote( $word ) . "';\n";
|
||||||
# set an element of the JavaScript 'suggs' array to a list of suggestions
|
}
|
||||||
function print_suggs_elem( $suggs, $index, $text_input_idx ) {
|
|
||||||
echo "suggs[$text_input_idx][$index] = [";
|
|
||||||
foreach( $suggs as $key=>$val ) {
|
# set an element of the JavaScript 'suggs' array to a list of suggestions
|
||||||
if( $val ) {
|
function print_suggs_elem( $suggs, $index, $text_input_idx ) {
|
||||||
echo "'" . escape_quote( $val ) . "'";
|
echo "suggs[$text_input_idx][$index] = [";
|
||||||
if ( $key+1 < count( $suggs )) {
|
foreach( $suggs as $key=>$val ) {
|
||||||
echo ", ";
|
if( $val ) {
|
||||||
}
|
echo "'" . escape_quote( $val ) . "'";
|
||||||
}
|
if ( $key+1 < count( $suggs )) {
|
||||||
}
|
echo ", ";
|
||||||
echo "];\n";
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# escape single quote
|
echo "];\n";
|
||||||
function escape_quote( $str ) {
|
}
|
||||||
return preg_replace ( "/'/", "\\'", $str );
|
|
||||||
}
|
# escape single quote
|
||||||
|
function escape_quote( $str ) {
|
||||||
|
return preg_replace ( "/'/", "\\'", $str );
|
||||||
# handle a server-side error.
|
}
|
||||||
function error_handler( $err ) {
|
|
||||||
echo "error = '" . escape_quote( $err ) . "';\n";
|
|
||||||
}
|
# handle a server-side error.
|
||||||
|
function error_handler( $err ) {
|
||||||
## get the list of misspelled words. Put the results in the javascript words array
|
echo "error = '" . escape_quote( $err ) . "';\n";
|
||||||
## for each misspelled word, get suggestions and put in the javascript suggs array
|
}
|
||||||
function print_checker_results() {
|
|
||||||
|
## get the list of misspelled words. Put the results in the javascript words array
|
||||||
global $aspell_prog;
|
## for each misspelled word, get suggestions and put in the javascript suggs array
|
||||||
global $aspell_opts;
|
function print_checker_results() {
|
||||||
global $tempfiledir;
|
|
||||||
global $textinputs;
|
global $aspell_prog;
|
||||||
global $input_separator;
|
global $aspell_opts;
|
||||||
$aspell_err = "";
|
global $tempfiledir;
|
||||||
# create temp file
|
global $textinputs;
|
||||||
$tempfile = tempnam( $tempfiledir, 'aspell_data_' );
|
global $input_separator;
|
||||||
|
$aspell_err = "";
|
||||||
# open temp file, add the submitted text.
|
# create temp file
|
||||||
if( $fh = fopen( $tempfile, 'w' )) {
|
$tempfile = tempnam( $tempfiledir, 'aspell_data_' );
|
||||||
for( $i = 0; $i < count( $textinputs ); $i++ ) {
|
|
||||||
$text = urldecode( $textinputs[$i] );
|
# open temp file, add the submitted text.
|
||||||
$lines = explode( "\n", $text );
|
if( $fh = fopen( $tempfile, 'w' )) {
|
||||||
fwrite ( $fh, "%\n" ); # exit terse mode
|
for( $i = 0; $i < count( $textinputs ); $i++ ) {
|
||||||
fwrite ( $fh, "^$input_separator\n" );
|
$text = urldecode( $textinputs[$i] );
|
||||||
fwrite ( $fh, "!\n" ); # enter terse mode
|
$lines = explode( "\n", $text );
|
||||||
foreach( $lines as $key=>$value ) {
|
fwrite ( $fh, "%\n" ); # exit terse mode
|
||||||
# use carat on each line to escape possible aspell commands
|
fwrite ( $fh, "^$input_separator\n" );
|
||||||
fwrite( $fh, "^$value\n" );
|
fwrite ( $fh, "!\n" ); # enter terse mode
|
||||||
}
|
foreach( $lines as $key=>$value ) {
|
||||||
}
|
# use carat on each line to escape possible aspell commands
|
||||||
fclose( $fh );
|
fwrite( $fh, "^$value\n" );
|
||||||
|
}
|
||||||
# exec aspell command - redirect STDERR to STDOUT
|
}
|
||||||
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
|
fclose( $fh );
|
||||||
if( $aspellret = shell_exec( $cmd )) {
|
|
||||||
$linesout = explode( "\n", $aspellret );
|
# exec aspell command - redirect STDERR to STDOUT
|
||||||
$index = 0;
|
$cmd = "$aspell_prog $aspell_opts < $tempfile 2>&1";
|
||||||
$text_input_index = -1;
|
if( $aspellret = shell_exec( $cmd )) {
|
||||||
# parse each line of aspell return
|
$linesout = explode( "\n", $aspellret );
|
||||||
foreach( $linesout as $key=>$val ) {
|
$index = 0;
|
||||||
$chardesc = substr( $val, 0, 1 );
|
$text_input_index = -1;
|
||||||
# if '&', then not in dictionary but has suggestions
|
# parse each line of aspell return
|
||||||
# if '#', then not in dictionary and no suggestions
|
foreach( $linesout as $key=>$val ) {
|
||||||
# if '*', then it is a delimiter between text inputs
|
$chardesc = substr( $val, 0, 1 );
|
||||||
# if '@' then version info
|
# if '&', then not in dictionary but has suggestions
|
||||||
if( $chardesc == '&' || $chardesc == '#' ) {
|
# if '#', then not in dictionary and no suggestions
|
||||||
$line = explode( " ", $val, 5 );
|
# if '*', then it is a delimiter between text inputs
|
||||||
print_words_elem( $line[1], $index, $text_input_index );
|
# if '@' then version info
|
||||||
if( isset( $line[4] )) {
|
if( $chardesc == '&' || $chardesc == '#' ) {
|
||||||
$suggs = explode( ", ", $line[4] );
|
$line = explode( " ", $val, 5 );
|
||||||
} else {
|
print_words_elem( $line[1], $index, $text_input_index );
|
||||||
$suggs = array();
|
if( isset( $line[4] )) {
|
||||||
}
|
$suggs = explode( ", ", $line[4] );
|
||||||
print_suggs_elem( $suggs, $index, $text_input_index );
|
} else {
|
||||||
$index++;
|
$suggs = array();
|
||||||
} elseif( $chardesc == '*' ) {
|
}
|
||||||
$text_input_index++;
|
print_suggs_elem( $suggs, $index, $text_input_index );
|
||||||
print_textindex_decl( $text_input_index );
|
$index++;
|
||||||
$index = 0;
|
} elseif( $chardesc == '*' ) {
|
||||||
} elseif( $chardesc != '@' && $chardesc != "" ) {
|
$text_input_index++;
|
||||||
# assume this is error output
|
print_textindex_decl( $text_input_index );
|
||||||
$aspell_err .= $val;
|
$index = 0;
|
||||||
}
|
} elseif( $chardesc != '@' && $chardesc != "" ) {
|
||||||
}
|
# assume this is error output
|
||||||
if( $aspell_err ) {
|
$aspell_err .= $val;
|
||||||
$aspell_err = "Error executing `$cmd`\\n$aspell_err";
|
}
|
||||||
error_handler( $aspell_err );
|
}
|
||||||
}
|
if( $aspell_err ) {
|
||||||
} else {
|
$aspell_err = "Error executing `$cmd`\\n$aspell_err";
|
||||||
error_handler( "System error: Aspell program execution failed (`$cmd`)" );
|
error_handler( $aspell_err );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
error_handler( "System error: Could not open file '$tempfile' for writing" );
|
error_handler( "System error: Aspell program execution failed (`$cmd`)" );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
# close temp file, delete file
|
error_handler( "System error: Could not open file '$tempfile' for writing" );
|
||||||
unlink( $tempfile );
|
}
|
||||||
}
|
|
||||||
|
# close temp file, delete file
|
||||||
|
unlink( $tempfile );
|
||||||
?>
|
}
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo $spellercss ?>" />
|
<html>
|
||||||
<script language="javascript" src="<?php echo $word_win_src ?>"></script>
|
<head>
|
||||||
<script language="javascript">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
var suggs = new Array();
|
<link rel="stylesheet" type="text/css" href="<?php echo $spellercss ?>" />
|
||||||
var words = new Array();
|
<script language="javascript" src="<?php echo $word_win_src ?>"></script>
|
||||||
var textinputs = new Array();
|
<script language="javascript">
|
||||||
var error;
|
var suggs = new Array();
|
||||||
<?php
|
var words = new Array();
|
||||||
|
var textinputs = new Array();
|
||||||
print_textinputs_var();
|
var error;
|
||||||
|
<?php
|
||||||
print_checker_results();
|
|
||||||
|
print_textinputs_var();
|
||||||
?>
|
|
||||||
|
print_checker_results();
|
||||||
var wordWindowObj = new wordWindow();
|
|
||||||
wordWindowObj.originalSpellings = words;
|
?>
|
||||||
wordWindowObj.suggestions = suggs;
|
|
||||||
wordWindowObj.textInputs = textinputs;
|
var wordWindowObj = new wordWindow();
|
||||||
|
wordWindowObj.originalSpellings = words;
|
||||||
function init_spell() {
|
wordWindowObj.suggestions = suggs;
|
||||||
// check if any error occured during server-side processing
|
wordWindowObj.textInputs = textinputs;
|
||||||
if( error ) {
|
|
||||||
alert( error );
|
function init_spell() {
|
||||||
} else {
|
// check if any error occured during server-side processing
|
||||||
// call the init_spell() function in the parent frameset
|
if( error ) {
|
||||||
if (parent.frames.length) {
|
alert( error );
|
||||||
parent.init_spell( wordWindowObj );
|
} else {
|
||||||
} else {
|
// call the init_spell() function in the parent frameset
|
||||||
alert('This page was loaded outside of a frameset. It might not display properly');
|
if (parent.frames.length) {
|
||||||
}
|
parent.init_spell( wordWindowObj );
|
||||||
}
|
} else {
|
||||||
}
|
alert('This page was loaded outside of a frameset. It might not display properly');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<!-- <body onLoad="init_spell();"> by FredCK -->
|
</script>
|
||||||
<body onLoad="init_spell();" bgcolor="#ffffff">
|
|
||||||
|
</head>
|
||||||
<script type="text/javascript">
|
<!-- <body onLoad="init_spell();"> by FredCK -->
|
||||||
wordWindowObj.writeBody();
|
<body onLoad="init_spell();" bgcolor="#ffffff">
|
||||||
</script>
|
|
||||||
|
<script type="text/javascript">
|
||||||
</body>
|
wordWindowObj.writeBody();
|
||||||
</html>
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -1,180 +1,180 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use CGI qw/ :standard /;
|
use CGI qw/ :standard /;
|
||||||
use File::Temp qw/ tempfile tempdir /;
|
use File::Temp qw/ tempfile tempdir /;
|
||||||
|
|
||||||
# my $spellercss = '/speller/spellerStyle.css'; # by FredCK
|
# my $spellercss = '/speller/spellerStyle.css'; # by FredCK
|
||||||
my $spellercss = '../spellerStyle.css'; # by FredCK
|
my $spellercss = '../spellerStyle.css'; # by FredCK
|
||||||
# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
|
# my $wordWindowSrc = '/speller/wordWindow.js'; # by FredCK
|
||||||
my $wordWindowSrc = '../wordWindow.js'; # by FredCK
|
my $wordWindowSrc = '../wordWindow.js'; # by FredCK
|
||||||
my @textinputs = param( 'textinputs[]' ); # array
|
my @textinputs = param( 'textinputs[]' ); # array
|
||||||
# my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
|
# my $aspell_cmd = 'aspell'; # by FredCK (for Linux)
|
||||||
my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
|
my $aspell_cmd = '"C:\Program Files\Aspell\bin\aspell.exe"'; # by FredCK (for Windows)
|
||||||
my $lang = 'en_US';
|
my $lang = 'en_US';
|
||||||
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
|
# my $aspell_opts = "-a --lang=$lang --encoding=utf-8"; # by FredCK
|
||||||
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; # by FredCK
|
my $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H"; # by FredCK
|
||||||
my $input_separator = "A";
|
my $input_separator = "A";
|
||||||
|
|
||||||
# set the 'wordtext' JavaScript variable to the submitted text.
|
# set the 'wordtext' JavaScript variable to the submitted text.
|
||||||
sub printTextVar {
|
sub printTextVar {
|
||||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||||
print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
|
print "textinputs[$i] = decodeURIComponent('" . escapeQuote( $textinputs[$i] ) . "')\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub printTextIdxDecl {
|
sub printTextIdxDecl {
|
||||||
my $idx = shift;
|
my $idx = shift;
|
||||||
print "words[$idx] = [];\n";
|
print "words[$idx] = [];\n";
|
||||||
print "suggs[$idx] = [];\n";
|
print "suggs[$idx] = [];\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub printWordsElem {
|
sub printWordsElem {
|
||||||
my( $textIdx, $wordIdx, $word ) = @_;
|
my( $textIdx, $wordIdx, $word ) = @_;
|
||||||
print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
|
print "words[$textIdx][$wordIdx] = '" . escapeQuote( $word ) . "';\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub printSuggsElem {
|
sub printSuggsElem {
|
||||||
my( $textIdx, $wordIdx, @suggs ) = @_;
|
my( $textIdx, $wordIdx, @suggs ) = @_;
|
||||||
print "suggs[$textIdx][$wordIdx] = [";
|
print "suggs[$textIdx][$wordIdx] = [";
|
||||||
for my $i ( 0..$#suggs ) {
|
for my $i ( 0..$#suggs ) {
|
||||||
print "'" . escapeQuote( $suggs[$i] ) . "'";
|
print "'" . escapeQuote( $suggs[$i] ) . "'";
|
||||||
if( $i < $#suggs ) {
|
if( $i < $#suggs ) {
|
||||||
print ", ";
|
print ", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "];\n";
|
print "];\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub printCheckerResults {
|
sub printCheckerResults {
|
||||||
my $textInputIdx = -1;
|
my $textInputIdx = -1;
|
||||||
my $wordIdx = 0;
|
my $wordIdx = 0;
|
||||||
my $unhandledText;
|
my $unhandledText;
|
||||||
# create temp file
|
# create temp file
|
||||||
my $dir = tempdir( CLEANUP => 1 );
|
my $dir = tempdir( CLEANUP => 1 );
|
||||||
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
|
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
|
||||||
|
|
||||||
# temp file was created properly?
|
# temp file was created properly?
|
||||||
|
|
||||||
# open temp file, add the submitted text.
|
# open temp file, add the submitted text.
|
||||||
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
for( my $i = 0; $i <= $#textinputs; $i++ ) {
|
||||||
$text = url_decode( $textinputs[$i] );
|
$text = url_decode( $textinputs[$i] );
|
||||||
@lines = split( /\n/, $text );
|
@lines = split( /\n/, $text );
|
||||||
print $fh "\%\n"; # exit terse mode
|
print $fh "\%\n"; # exit terse mode
|
||||||
print $fh "^$input_separator\n";
|
print $fh "^$input_separator\n";
|
||||||
print $fh "!\n"; # enter terse mode
|
print $fh "!\n"; # enter terse mode
|
||||||
for my $line ( @lines ) {
|
for my $line ( @lines ) {
|
||||||
# use carat on each line to escape possible aspell commands
|
# use carat on each line to escape possible aspell commands
|
||||||
print $fh "^$line\n";
|
print $fh "^$line\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
# exec aspell command
|
# exec aspell command
|
||||||
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
|
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
|
||||||
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
|
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" ) and return;
|
||||||
# parse each line of aspell return
|
# parse each line of aspell return
|
||||||
for my $ret ( <ASPELL> ) {
|
for my $ret ( <ASPELL> ) {
|
||||||
chomp( $ret );
|
chomp( $ret );
|
||||||
# if '&', then not in dictionary but has suggestions
|
# if '&', then not in dictionary but has suggestions
|
||||||
# if '#', then not in dictionary and no suggestions
|
# if '#', then not in dictionary and no suggestions
|
||||||
# if '*', then it is a delimiter between text inputs
|
# if '*', then it is a delimiter between text inputs
|
||||||
if( $ret =~ /^\*/ ) {
|
if( $ret =~ /^\*/ ) {
|
||||||
$textInputIdx++;
|
$textInputIdx++;
|
||||||
printTextIdxDecl( $textInputIdx );
|
printTextIdxDecl( $textInputIdx );
|
||||||
$wordIdx = 0;
|
$wordIdx = 0;
|
||||||
|
|
||||||
} elsif( $ret =~ /^(&|#)/ ) {
|
} elsif( $ret =~ /^(&|#)/ ) {
|
||||||
my @tokens = split( " ", $ret, 5 );
|
my @tokens = split( " ", $ret, 5 );
|
||||||
printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
|
printWordsElem( $textInputIdx, $wordIdx, $tokens[1] );
|
||||||
my @suggs = ();
|
my @suggs = ();
|
||||||
if( $tokens[4] ) {
|
if( $tokens[4] ) {
|
||||||
@suggs = split( ", ", $tokens[4] );
|
@suggs = split( ", ", $tokens[4] );
|
||||||
}
|
}
|
||||||
printSuggsElem( $textInputIdx, $wordIdx, @suggs );
|
printSuggsElem( $textInputIdx, $wordIdx, @suggs );
|
||||||
$wordIdx++;
|
$wordIdx++;
|
||||||
} else {
|
} else {
|
||||||
$unhandledText .= $ret;
|
$unhandledText .= $ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
|
close ASPELL or handleError( "Error executing `$cmd`\\n$unhandledText" ) and return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub escapeQuote {
|
sub escapeQuote {
|
||||||
my $str = shift;
|
my $str = shift;
|
||||||
$str =~ s/'/\\'/g;
|
$str =~ s/'/\\'/g;
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub handleError {
|
sub handleError {
|
||||||
my $err = shift;
|
my $err = shift;
|
||||||
print "error = '" . escapeQuote( $err ) . "';\n";
|
print "error = '" . escapeQuote( $err ) . "';\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub url_decode {
|
sub url_decode {
|
||||||
local $_ = @_ ? shift : $_;
|
local $_ = @_ ? shift : $_;
|
||||||
defined or return;
|
defined or return;
|
||||||
# change + signs to spaces
|
# change + signs to spaces
|
||||||
tr/+/ /;
|
tr/+/ /;
|
||||||
# change hex escapes to the proper characters
|
# change hex escapes to the proper characters
|
||||||
s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
|
s/%([a-fA-F0-9]{2})/pack "H2", $1/eg;
|
||||||
return $_;
|
return $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
# Display HTML
|
# Display HTML
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
Content-type: text/html; charset=utf-8
|
Content-type: text/html; charset=utf-8
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<link rel="stylesheet" type="text/css" href="$spellercss"/>
|
<link rel="stylesheet" type="text/css" href="$spellercss"/>
|
||||||
<script src="$wordWindowSrc"></script>
|
<script src="$wordWindowSrc"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var suggs = new Array();
|
var suggs = new Array();
|
||||||
var words = new Array();
|
var words = new Array();
|
||||||
var textinputs = new Array();
|
var textinputs = new Array();
|
||||||
var error;
|
var error;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
printTextVar();
|
printTextVar();
|
||||||
|
|
||||||
printCheckerResults();
|
printCheckerResults();
|
||||||
|
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
var wordWindowObj = new wordWindow();
|
var wordWindowObj = new wordWindow();
|
||||||
wordWindowObj.originalSpellings = words;
|
wordWindowObj.originalSpellings = words;
|
||||||
wordWindowObj.suggestions = suggs;
|
wordWindowObj.suggestions = suggs;
|
||||||
wordWindowObj.textInputs = textinputs;
|
wordWindowObj.textInputs = textinputs;
|
||||||
|
|
||||||
|
|
||||||
function init_spell() {
|
function init_spell() {
|
||||||
// check if any error occured during server-side processing
|
// check if any error occured during server-side processing
|
||||||
if( error ) {
|
if( error ) {
|
||||||
alert( error );
|
alert( error );
|
||||||
} else {
|
} else {
|
||||||
// call the init_spell() function in the parent frameset
|
// call the init_spell() function in the parent frameset
|
||||||
if (parent.frames.length) {
|
if (parent.frames.length) {
|
||||||
parent.init_spell( wordWindowObj );
|
parent.init_spell( wordWindowObj );
|
||||||
} else {
|
} else {
|
||||||
error = "This page was loaded outside of a frameset. ";
|
error = "This page was loaded outside of a frameset. ";
|
||||||
error += "It might not display properly";
|
error += "It might not display properly";
|
||||||
alert( error );
|
alert( error );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body onLoad="init_spell();">
|
<body onLoad="init_spell();">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
wordWindowObj.writeBody();
|
wordWindowObj.writeBody();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
@@ -1,458 +1,462 @@
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// spellChecker.js
|
// spellChecker.js
|
||||||
//
|
//
|
||||||
// spellChecker object
|
// spellChecker object
|
||||||
//
|
//
|
||||||
// This file is sourced on web pages that have a textarea object to evaluate
|
// This file is sourced on web pages that have a textarea object to evaluate
|
||||||
// for spelling. It includes the implementation for the spellCheckObject.
|
// for spelling. It includes the implementation for the spellCheckObject.
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
function spellChecker( textObject ) {
|
function spellChecker( textObject ) {
|
||||||
|
|
||||||
// public properties - configurable
|
// public properties - configurable
|
||||||
// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK
|
// this.popUpUrl = '/speller/spellchecker.html'; // by FredCK
|
||||||
this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK
|
this.popUpUrl = 'fck_spellerpages/spellerpages/spellchecker.html'; // by FredCK
|
||||||
this.popUpName = 'spellchecker';
|
this.popUpName = 'spellchecker';
|
||||||
// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK
|
// this.popUpProps = "menu=no,width=440,height=350,top=70,left=120,resizable=yes,status=yes"; // by FredCK
|
||||||
this.popUpProps = null ; // by FredCK
|
this.popUpProps = null ; // by FredCK
|
||||||
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK
|
// this.spellCheckScript = '/speller/server-scripts/spellchecker.php'; // by FredCK
|
||||||
this.spellCheckScript = 'server-scripts/spellchecker.php'; // by FredCK
|
//this.spellCheckScript = '/cgi-bin/spellchecker.pl';
|
||||||
//this.spellCheckScript = '/cgi-bin/spellchecker.pl';
|
|
||||||
|
// values used to keep track of what happened to a word
|
||||||
// values used to keep track of what happened to a word
|
this.replWordFlag = "R"; // single replace
|
||||||
this.replWordFlag = "R"; // single replace
|
this.ignrWordFlag = "I"; // single ignore
|
||||||
this.ignrWordFlag = "I"; // single ignore
|
this.replAllFlag = "RA"; // replace all occurances
|
||||||
this.replAllFlag = "RA"; // replace all occurances
|
this.ignrAllFlag = "IA"; // ignore all occurances
|
||||||
this.ignrAllFlag = "IA"; // ignore all occurances
|
this.fromReplAll = "~RA"; // an occurance of a "replace all" word
|
||||||
this.fromReplAll = "~RA"; // an occurance of a "replace all" word
|
this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word
|
||||||
this.fromIgnrAll = "~IA"; // an occurance of a "ignore all" word
|
// properties set at run time
|
||||||
// properties set at run time
|
this.wordFlags = new Array();
|
||||||
this.wordFlags = new Array();
|
this.currentTextIndex = 0;
|
||||||
this.currentTextIndex = 0;
|
this.currentWordIndex = 0;
|
||||||
this.currentWordIndex = 0;
|
this.spellCheckerWin = null;
|
||||||
this.spellCheckerWin = null;
|
this.controlWin = null;
|
||||||
this.controlWin = null;
|
this.wordWin = null;
|
||||||
this.wordWin = null;
|
this.textArea = textObject; // deprecated
|
||||||
this.textArea = textObject; // deprecated
|
this.textInputs = arguments;
|
||||||
this.textInputs = arguments;
|
|
||||||
|
// private methods
|
||||||
// private methods
|
this._spellcheck = _spellcheck;
|
||||||
this._spellcheck = _spellcheck;
|
this._getSuggestions = _getSuggestions;
|
||||||
this._getSuggestions = _getSuggestions;
|
this._setAsIgnored = _setAsIgnored;
|
||||||
this._setAsIgnored = _setAsIgnored;
|
this._getTotalReplaced = _getTotalReplaced;
|
||||||
this._getTotalReplaced = _getTotalReplaced;
|
this._setWordText = _setWordText;
|
||||||
this._setWordText = _setWordText;
|
this._getFormInputs = _getFormInputs;
|
||||||
this._getFormInputs = _getFormInputs;
|
|
||||||
|
// public methods
|
||||||
// public methods
|
this.openChecker = openChecker;
|
||||||
this.openChecker = openChecker;
|
this.startCheck = startCheck;
|
||||||
this.startCheck = startCheck;
|
this.checkTextBoxes = checkTextBoxes;
|
||||||
this.checkTextBoxes = checkTextBoxes;
|
this.checkTextAreas = checkTextAreas;
|
||||||
this.checkTextAreas = checkTextAreas;
|
this.spellCheckAll = spellCheckAll;
|
||||||
this.spellCheckAll = spellCheckAll;
|
this.ignoreWord = ignoreWord;
|
||||||
this.ignoreWord = ignoreWord;
|
this.ignoreAll = ignoreAll;
|
||||||
this.ignoreAll = ignoreAll;
|
this.replaceWord = replaceWord;
|
||||||
this.replaceWord = replaceWord;
|
this.replaceAll = replaceAll;
|
||||||
this.replaceAll = replaceAll;
|
this.terminateSpell = terminateSpell;
|
||||||
this.terminateSpell = terminateSpell;
|
this.undo = undo;
|
||||||
this.undo = undo;
|
|
||||||
|
// set the current window's "speller" property to the instance of this class.
|
||||||
// set the current window's "speller" property to the instance of this class.
|
// this object can now be referenced by child windows/frames.
|
||||||
// this object can now be referenced by child windows/frames.
|
window.speller = this;
|
||||||
window.speller = this;
|
}
|
||||||
}
|
|
||||||
|
// call this method to check all text boxes (and only text boxes) in the HTML document
|
||||||
// call this method to check all text boxes (and only text boxes) in the HTML document
|
function checkTextBoxes() {
|
||||||
function checkTextBoxes() {
|
this.textInputs = this._getFormInputs( "^text$" );
|
||||||
this.textInputs = this._getFormInputs( "^text$" );
|
this.openChecker();
|
||||||
this.openChecker();
|
}
|
||||||
}
|
|
||||||
|
// call this method to check all textareas (and only textareas ) in the HTML document
|
||||||
// call this method to check all textareas (and only textareas ) in the HTML document
|
function checkTextAreas() {
|
||||||
function checkTextAreas() {
|
this.textInputs = this._getFormInputs( "^textarea$" );
|
||||||
this.textInputs = this._getFormInputs( "^textarea$" );
|
this.openChecker();
|
||||||
this.openChecker();
|
}
|
||||||
}
|
|
||||||
|
// call this method to check all text boxes and textareas in the HTML document
|
||||||
// call this method to check all text boxes and textareas in the HTML document
|
function spellCheckAll() {
|
||||||
function spellCheckAll() {
|
this.textInputs = this._getFormInputs( "^text(area)?$" );
|
||||||
this.textInputs = this._getFormInputs( "^text(area)?$" );
|
this.openChecker();
|
||||||
this.openChecker();
|
}
|
||||||
}
|
|
||||||
|
// call this method to check text boxe(s) and/or textarea(s) that were passed in to the
|
||||||
// call this method to check text boxe(s) and/or textarea(s) that were passed in to the
|
// object's constructor or to the textInputs property
|
||||||
// object's constructor or to the textInputs property
|
function openChecker() {
|
||||||
function openChecker() {
|
this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps );
|
||||||
this.spellCheckerWin = window.open( this.popUpUrl, this.popUpName, this.popUpProps );
|
if( !this.spellCheckerWin.opener ) {
|
||||||
if( !this.spellCheckerWin.opener ) {
|
this.spellCheckerWin.opener = window;
|
||||||
this.spellCheckerWin.opener = window;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
function startCheck( wordWindowObj, controlWindowObj ) {
|
||||||
function startCheck( wordWindowObj, controlWindowObj ) {
|
|
||||||
|
// set properties from args
|
||||||
// set properties from args
|
this.wordWin = wordWindowObj;
|
||||||
this.wordWin = wordWindowObj;
|
this.controlWin = controlWindowObj;
|
||||||
this.controlWin = controlWindowObj;
|
|
||||||
|
// reset properties
|
||||||
// reset properties
|
this.wordWin.resetForm();
|
||||||
this.wordWin.resetForm();
|
this.controlWin.resetForm();
|
||||||
this.controlWin.resetForm();
|
this.currentTextIndex = 0;
|
||||||
this.currentTextIndex = 0;
|
this.currentWordIndex = 0;
|
||||||
this.currentWordIndex = 0;
|
// initialize the flags to an array - one element for each text input
|
||||||
// initialize the flags to an array - one element for each text input
|
this.wordFlags = new Array( this.wordWin.textInputs.length );
|
||||||
this.wordFlags = new Array( this.wordWin.textInputs.length );
|
// each element will be an array that keeps track of each word in the text
|
||||||
// each element will be an array that keeps track of each word in the text
|
for( var i=0; i<this.wordFlags.length; i++ ) {
|
||||||
for( var i=0; i<this.wordFlags.length; i++ ) {
|
this.wordFlags[i] = [];
|
||||||
this.wordFlags[i] = [];
|
}
|
||||||
}
|
|
||||||
|
// start
|
||||||
// start
|
this._spellcheck();
|
||||||
this._spellcheck();
|
|
||||||
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
function ignoreWord() {
|
||||||
function ignoreWord() {
|
var wi = this.currentWordIndex;
|
||||||
var wi = this.currentWordIndex;
|
var ti = this.currentTextIndex;
|
||||||
var ti = this.currentTextIndex;
|
if( !this.wordWin ) {
|
||||||
if( !this.wordWin ) {
|
alert( 'Error: Word frame not available.' );
|
||||||
alert( 'Error: Word frame not available.' );
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
alert( 'Error: "Not in dictionary" text is missing.' );
|
||||||
alert( 'Error: "Not in dictionary" text is missing.' );
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
// set as ignored
|
||||||
// set as ignored
|
if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) {
|
||||||
if( this._setAsIgnored( ti, wi, this.ignrWordFlag )) {
|
this.currentWordIndex++;
|
||||||
this.currentWordIndex++;
|
this._spellcheck();
|
||||||
this._spellcheck();
|
}
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ignoreAll() {
|
function ignoreAll() {
|
||||||
var wi = this.currentWordIndex;
|
var wi = this.currentWordIndex;
|
||||||
var ti = this.currentTextIndex;
|
var ti = this.currentTextIndex;
|
||||||
if( !this.wordWin ) {
|
if( !this.wordWin ) {
|
||||||
alert( 'Error: Word frame not available.' );
|
alert( 'Error: Word frame not available.' );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// get the word that is currently being evaluated.
|
// get the word that is currently being evaluated.
|
||||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||||
if( !s_word_to_repl ) {
|
if( !s_word_to_repl ) {
|
||||||
alert( 'Error: "Not in dictionary" text is missing' );
|
alert( 'Error: "Not in dictionary" text is missing' );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set this word as an "ignore all" word.
|
// set this word as an "ignore all" word.
|
||||||
this._setAsIgnored( ti, wi, this.ignrAllFlag );
|
this._setAsIgnored( ti, wi, this.ignrAllFlag );
|
||||||
|
|
||||||
// loop through all the words after this word
|
// loop through all the words after this word
|
||||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||||
if(( i == ti && j > wi ) || i > ti ) {
|
if(( i == ti && j > wi ) || i > ti ) {
|
||||||
// future word: set as "from ignore all" if
|
// future word: set as "from ignore all" if
|
||||||
// 1) do not already have a flag and
|
// 1) do not already have a flag and
|
||||||
// 2) have the same value as current word
|
// 2) have the same value as current word
|
||||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||||
&& ( !this.wordFlags[i][j] )) {
|
&& ( !this.wordFlags[i][j] )) {
|
||||||
this._setAsIgnored( i, j, this.fromIgnrAll );
|
this._setAsIgnored( i, j, this.fromIgnrAll );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally, move on
|
// finally, move on
|
||||||
this.currentWordIndex++;
|
this.currentWordIndex++;
|
||||||
this._spellcheck();
|
this._spellcheck();
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
function replaceWord() {
|
|
||||||
var wi = this.currentWordIndex;
|
function replaceWord() {
|
||||||
var ti = this.currentTextIndex;
|
var wi = this.currentWordIndex;
|
||||||
if( !this.wordWin ) {
|
var ti = this.currentTextIndex;
|
||||||
alert( 'Error: Word frame not available.' );
|
if( !this.wordWin ) {
|
||||||
return false;
|
alert( 'Error: Word frame not available.' );
|
||||||
}
|
return false;
|
||||||
if( !this.wordWin.getTextVal( ti, wi )) {
|
}
|
||||||
alert( 'Error: "Not in dictionary" text is missing' );
|
if( !this.wordWin.getTextVal( ti, wi )) {
|
||||||
return false;
|
alert( 'Error: "Not in dictionary" text is missing' );
|
||||||
}
|
return false;
|
||||||
if( !this.controlWin.replacementText ) {
|
}
|
||||||
return;
|
if( !this.controlWin.replacementText ) {
|
||||||
}
|
return false ;
|
||||||
var txt = this.controlWin.replacementText;
|
}
|
||||||
if( txt.value ) {
|
var txt = this.controlWin.replacementText;
|
||||||
var newspell = new String( txt.value );
|
if( txt.value ) {
|
||||||
if( this._setWordText( ti, wi, newspell, this.replWordFlag )) {
|
var newspell = new String( txt.value );
|
||||||
this.currentWordIndex++;
|
if( this._setWordText( ti, wi, newspell, this.replWordFlag )) {
|
||||||
this._spellcheck();
|
this.currentWordIndex++;
|
||||||
}
|
this._spellcheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
function replaceAll() {
|
}
|
||||||
var ti = this.currentTextIndex;
|
|
||||||
var wi = this.currentWordIndex;
|
function replaceAll() {
|
||||||
if( !this.wordWin ) {
|
var ti = this.currentTextIndex;
|
||||||
alert( 'Error: Word frame not available.' );
|
var wi = this.currentWordIndex;
|
||||||
return false;
|
if( !this.wordWin ) {
|
||||||
}
|
alert( 'Error: Word frame not available.' );
|
||||||
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
return false;
|
||||||
if( !s_word_to_repl ) {
|
}
|
||||||
alert( 'Error: "Not in dictionary" text is missing' );
|
var s_word_to_repl = this.wordWin.getTextVal( ti, wi );
|
||||||
return false;
|
if( !s_word_to_repl ) {
|
||||||
}
|
alert( 'Error: "Not in dictionary" text is missing' );
|
||||||
var txt = this.controlWin.replacementText;
|
return false;
|
||||||
if( !txt.value ) return;
|
}
|
||||||
var newspell = new String( txt.value );
|
var txt = this.controlWin.replacementText;
|
||||||
|
if( !txt.value ) return false;
|
||||||
// set this word as a "replace all" word.
|
var newspell = new String( txt.value );
|
||||||
this._setWordText( ti, wi, newspell, this.replAllFlag );
|
|
||||||
|
// set this word as a "replace all" word.
|
||||||
// loop through all the words after this word
|
this._setWordText( ti, wi, newspell, this.replAllFlag );
|
||||||
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
|
||||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
// loop through all the words after this word
|
||||||
if(( i == ti && j > wi ) || i > ti ) {
|
for( var i = ti; i < this.wordWin.textInputs.length; i++ ) {
|
||||||
// future word: set word text to s_word_to_repl if
|
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||||
// 1) do not already have a flag and
|
if(( i == ti && j > wi ) || i > ti ) {
|
||||||
// 2) have the same value as s_word_to_repl
|
// future word: set word text to s_word_to_repl if
|
||||||
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
// 1) do not already have a flag and
|
||||||
&& ( !this.wordFlags[i][j] )) {
|
// 2) have the same value as s_word_to_repl
|
||||||
this._setWordText( i, j, newspell, this.fromReplAll );
|
if(( this.wordWin.getTextVal( i, j ) == s_word_to_repl )
|
||||||
}
|
&& ( !this.wordFlags[i][j] )) {
|
||||||
}
|
this._setWordText( i, j, newspell, this.fromReplAll );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// finally, move on
|
}
|
||||||
this.currentWordIndex++;
|
|
||||||
this._spellcheck();
|
// finally, move on
|
||||||
}
|
this.currentWordIndex++;
|
||||||
|
this._spellcheck();
|
||||||
function terminateSpell() {
|
return true;
|
||||||
// called when we have reached the end of the spell checking.
|
}
|
||||||
var msg = ""; // by FredCK
|
|
||||||
var numrepl = this._getTotalReplaced();
|
function terminateSpell() {
|
||||||
if( numrepl == 0 ) {
|
// called when we have reached the end of the spell checking.
|
||||||
// see if there were no misspellings to begin with
|
var msg = ""; // by FredCK
|
||||||
if( !this.wordWin ) {
|
var numrepl = this._getTotalReplaced();
|
||||||
msg = "";
|
if( numrepl == 0 ) {
|
||||||
} else {
|
// see if there were no misspellings to begin with
|
||||||
if( this.wordWin.totalMisspellings() ) {
|
if( !this.wordWin ) {
|
||||||
// msg += "No words changed."; // by FredCK
|
msg = "";
|
||||||
msg += FCKLang.DlgSpellNoChanges ; // by FredCK
|
} else {
|
||||||
} else {
|
if( this.wordWin.totalMisspellings() ) {
|
||||||
// msg += "No misspellings found."; // by FredCK
|
// msg += "No words changed."; // by FredCK
|
||||||
msg += FCKLang.DlgSpellNoMispell ; // by FredCK
|
msg += FCKLang.DlgSpellNoChanges ; // by FredCK
|
||||||
}
|
} else {
|
||||||
}
|
// msg += "No misspellings found."; // by FredCK
|
||||||
} else if( numrepl == 1 ) {
|
msg += FCKLang.DlgSpellNoMispell ; // by FredCK
|
||||||
// msg += "One word changed."; // by FredCK
|
}
|
||||||
msg += FCKLang.DlgSpellOneChange ; // by FredCK
|
}
|
||||||
} else {
|
} else if( numrepl == 1 ) {
|
||||||
// msg += numrepl + " words changed."; // by FredCK
|
// msg += "One word changed."; // by FredCK
|
||||||
msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ;
|
msg += FCKLang.DlgSpellOneChange ; // by FredCK
|
||||||
}
|
} else {
|
||||||
if( msg ) {
|
// msg += numrepl + " words changed."; // by FredCK
|
||||||
// msg += "\n"; // by FredCK
|
msg += FCKLang.DlgSpellManyChanges.replace( /%1/g, numrepl ) ;
|
||||||
alert( msg );
|
}
|
||||||
}
|
if( msg ) {
|
||||||
|
// msg += "\n"; // by FredCK
|
||||||
if( numrepl > 0 ) {
|
alert( msg );
|
||||||
// update the text field(s) on the opener window
|
}
|
||||||
for( var i = 0; i < this.textInputs.length; i++ ) {
|
|
||||||
// this.textArea.value = this.wordWin.text;
|
if( numrepl > 0 ) {
|
||||||
if( this.wordWin ) {
|
// update the text field(s) on the opener window
|
||||||
if( this.wordWin.textInputs[i] ) {
|
for( var i = 0; i < this.textInputs.length; i++ ) {
|
||||||
this.textInputs[i].value = this.wordWin.textInputs[i];
|
// this.textArea.value = this.wordWin.text;
|
||||||
}
|
if( this.wordWin ) {
|
||||||
}
|
if( this.wordWin.textInputs[i] ) {
|
||||||
}
|
this.textInputs[i].value = this.wordWin.textInputs[i];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// return back to the calling window
|
}
|
||||||
// this.spellCheckerWin.close(); // by FredCK
|
}
|
||||||
if ( typeof( this.OnFinished ) == 'function' ) // by FredCK
|
|
||||||
this.OnFinished(numrepl) ; // by FredCK
|
// return back to the calling window
|
||||||
|
// this.spellCheckerWin.close(); // by FredCK
|
||||||
return true;
|
if ( typeof( this.OnFinished ) == 'function' ) // by FredCK
|
||||||
}
|
this.OnFinished(numrepl) ; // by FredCK
|
||||||
|
|
||||||
function undo() {
|
return true;
|
||||||
// skip if this is the first word!
|
}
|
||||||
var ti = this.currentTextIndex;
|
|
||||||
var wi = this.currentWordIndex
|
function undo() {
|
||||||
|
// skip if this is the first word!
|
||||||
if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {
|
var ti = this.currentTextIndex;
|
||||||
this.wordWin.removeFocus( ti, wi );
|
var wi = this.currentWordIndex;
|
||||||
|
|
||||||
// go back to the last word index that was acted upon
|
if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {
|
||||||
do {
|
this.wordWin.removeFocus( ti, wi );
|
||||||
// if the current word index is zero then reset the seed
|
|
||||||
if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {
|
// go back to the last word index that was acted upon
|
||||||
this.currentTextIndex--;
|
do {
|
||||||
this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;
|
// if the current word index is zero then reset the seed
|
||||||
if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;
|
if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {
|
||||||
} else {
|
this.currentTextIndex--;
|
||||||
if( this.currentWordIndex > 0 ) {
|
this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;
|
||||||
this.currentWordIndex--;
|
if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;
|
||||||
}
|
} else {
|
||||||
}
|
if( this.currentWordIndex > 0 ) {
|
||||||
} while (
|
this.currentWordIndex--;
|
||||||
this.wordWin.totalWords( this.currentTextIndex ) == 0
|
}
|
||||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll
|
}
|
||||||
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll
|
} while (
|
||||||
);
|
this.wordWin.totalWords( this.currentTextIndex ) == 0
|
||||||
|
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll
|
||||||
var text_idx = this.currentTextIndex;
|
|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll
|
||||||
var idx = this.currentWordIndex;
|
);
|
||||||
var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];
|
|
||||||
|
var text_idx = this.currentTextIndex;
|
||||||
// if we got back to the first word then set the Undo button back to disabled
|
var idx = this.currentWordIndex;
|
||||||
if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {
|
var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];
|
||||||
this.controlWin.disableUndo();
|
|
||||||
}
|
// if we got back to the first word then set the Undo button back to disabled
|
||||||
|
if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {
|
||||||
// examine what happened to this current word.
|
this.controlWin.disableUndo();
|
||||||
switch( this.wordFlags[text_idx][idx] ) {
|
}
|
||||||
// replace all: go through this and all the future occurances of the word
|
|
||||||
// and revert them all to the original spelling and clear their flags
|
var i, j, origSpell ;
|
||||||
case this.replAllFlag :
|
// examine what happened to this current word.
|
||||||
for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
switch( this.wordFlags[text_idx][idx] ) {
|
||||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
// replace all: go through this and all the future occurances of the word
|
||||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
// and revert them all to the original spelling and clear their flags
|
||||||
var origSpell = this.wordWin.originalSpellings[i][j];
|
case this.replAllFlag :
|
||||||
if( origSpell == preReplSpell ) {
|
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||||
this._setWordText ( i, j, origSpell, undefined );
|
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||||
}
|
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||||
}
|
origSpell = this.wordWin.originalSpellings[i][j];
|
||||||
}
|
if( origSpell == preReplSpell ) {
|
||||||
}
|
this._setWordText ( i, j, origSpell, undefined );
|
||||||
break;
|
}
|
||||||
|
}
|
||||||
// ignore all: go through all the future occurances of the word
|
}
|
||||||
// and clear their flags
|
}
|
||||||
case this.ignrAllFlag :
|
break;
|
||||||
for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
|
||||||
for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
// ignore all: go through all the future occurances of the word
|
||||||
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
// and clear their flags
|
||||||
var origSpell = this.wordWin.originalSpellings[i][j];
|
case this.ignrAllFlag :
|
||||||
if( origSpell == preReplSpell ) {
|
for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
|
||||||
this.wordFlags[i][j] = undefined;
|
for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
|
||||||
}
|
if(( i == text_idx && j >= idx ) || i > text_idx ) {
|
||||||
}
|
origSpell = this.wordWin.originalSpellings[i][j];
|
||||||
}
|
if( origSpell == preReplSpell ) {
|
||||||
}
|
this.wordFlags[i][j] = undefined;
|
||||||
break;
|
}
|
||||||
|
}
|
||||||
// replace: revert the word to its original spelling
|
}
|
||||||
case this.replWordFlag :
|
}
|
||||||
this._setWordText ( text_idx, idx, preReplSpell, undefined );
|
break;
|
||||||
break;
|
|
||||||
}
|
// replace: revert the word to its original spelling
|
||||||
|
case this.replWordFlag :
|
||||||
// For all four cases, clear the wordFlag of this word. re-start the process
|
this._setWordText ( text_idx, idx, preReplSpell, undefined );
|
||||||
this.wordFlags[text_idx][idx] = undefined;
|
break;
|
||||||
this._spellcheck();
|
}
|
||||||
}
|
|
||||||
}
|
// For all four cases, clear the wordFlag of this word. re-start the process
|
||||||
|
this.wordFlags[text_idx][idx] = undefined;
|
||||||
function _spellcheck() {
|
this._spellcheck();
|
||||||
var ww = this.wordWin;
|
}
|
||||||
|
}
|
||||||
// check if this is the last word in the current text element
|
|
||||||
if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) {
|
function _spellcheck() {
|
||||||
this.currentTextIndex++;
|
var ww = this.wordWin;
|
||||||
this.currentWordIndex = 0;
|
|
||||||
// keep going if we're not yet past the last text element
|
// check if this is the last word in the current text element
|
||||||
if( this.currentTextIndex < this.wordWin.textInputs.length ) {
|
if( this.currentWordIndex == ww.totalWords( this.currentTextIndex) ) {
|
||||||
this._spellcheck();
|
this.currentTextIndex++;
|
||||||
return;
|
this.currentWordIndex = 0;
|
||||||
} else {
|
// keep going if we're not yet past the last text element
|
||||||
this.terminateSpell();
|
if( this.currentTextIndex < this.wordWin.textInputs.length ) {
|
||||||
return;
|
this._spellcheck();
|
||||||
}
|
return;
|
||||||
}
|
} else {
|
||||||
|
this.terminateSpell();
|
||||||
// if this is after the first one make sure the Undo button is enabled
|
return;
|
||||||
if( this.currentWordIndex > 0 ) {
|
}
|
||||||
this.controlWin.enableUndo();
|
}
|
||||||
}
|
|
||||||
|
// if this is after the first one make sure the Undo button is enabled
|
||||||
// skip the current word if it has already been worked on
|
if( this.currentWordIndex > 0 ) {
|
||||||
if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) {
|
this.controlWin.enableUndo();
|
||||||
// increment the global current word index and move on.
|
}
|
||||||
this.currentWordIndex++;
|
|
||||||
this._spellcheck();
|
// skip the current word if it has already been worked on
|
||||||
} else {
|
if( this.wordFlags[this.currentTextIndex][this.currentWordIndex] ) {
|
||||||
var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex );
|
// increment the global current word index and move on.
|
||||||
if( evalText ) {
|
this.currentWordIndex++;
|
||||||
this.controlWin.evaluatedText.value = evalText;
|
this._spellcheck();
|
||||||
ww.setFocus( this.currentTextIndex, this.currentWordIndex );
|
} else {
|
||||||
this._getSuggestions( this.currentTextIndex, this.currentWordIndex );
|
var evalText = ww.getTextVal( this.currentTextIndex, this.currentWordIndex );
|
||||||
}
|
if( evalText ) {
|
||||||
}
|
this.controlWin.evaluatedText.value = evalText;
|
||||||
}
|
ww.setFocus( this.currentTextIndex, this.currentWordIndex );
|
||||||
|
this._getSuggestions( this.currentTextIndex, this.currentWordIndex );
|
||||||
function _getSuggestions( text_num, word_num ) {
|
}
|
||||||
this.controlWin.clearSuggestions();
|
}
|
||||||
// add suggestion in list for each suggested word.
|
}
|
||||||
// get the array of suggested words out of the
|
|
||||||
// three-dimensional array containing all suggestions.
|
function _getSuggestions( text_num, word_num ) {
|
||||||
var a_suggests = this.wordWin.suggestions[text_num][word_num];
|
this.controlWin.clearSuggestions();
|
||||||
if( a_suggests ) {
|
// add suggestion in list for each suggested word.
|
||||||
// got an array of suggestions.
|
// get the array of suggested words out of the
|
||||||
for( var ii = 0; ii < a_suggests.length; ii++ ) {
|
// three-dimensional array containing all suggestions.
|
||||||
this.controlWin.addSuggestion( a_suggests[ii] );
|
var a_suggests = this.wordWin.suggestions[text_num][word_num];
|
||||||
}
|
if( a_suggests ) {
|
||||||
}
|
// got an array of suggestions.
|
||||||
this.controlWin.selectDefaultSuggestion();
|
for( var ii = 0; ii < a_suggests.length; ii++ ) {
|
||||||
}
|
this.controlWin.addSuggestion( a_suggests[ii] );
|
||||||
|
}
|
||||||
function _setAsIgnored( text_num, word_num, flag ) {
|
}
|
||||||
// set the UI
|
this.controlWin.selectDefaultSuggestion();
|
||||||
this.wordWin.removeFocus( text_num, word_num );
|
}
|
||||||
// do the bookkeeping
|
|
||||||
this.wordFlags[text_num][word_num] = flag;
|
function _setAsIgnored( text_num, word_num, flag ) {
|
||||||
return true;
|
// set the UI
|
||||||
}
|
this.wordWin.removeFocus( text_num, word_num );
|
||||||
|
// do the bookkeeping
|
||||||
function _getTotalReplaced() {
|
this.wordFlags[text_num][word_num] = flag;
|
||||||
var i_replaced = 0;
|
return true;
|
||||||
for( var i = 0; i < this.wordFlags.length; i++ ) {
|
}
|
||||||
for( var j = 0; j < this.wordFlags[i].length; j++ ) {
|
|
||||||
if(( this.wordFlags[i][j] == this.replWordFlag )
|
function _getTotalReplaced() {
|
||||||
|| ( this.wordFlags[i][j] == this.replAllFlag )
|
var i_replaced = 0;
|
||||||
|| ( this.wordFlags[i][j] == this.fromReplAll )) {
|
for( var i = 0; i < this.wordFlags.length; i++ ) {
|
||||||
i_replaced++;
|
for( var j = 0; j < this.wordFlags[i].length; j++ ) {
|
||||||
}
|
if(( this.wordFlags[i][j] == this.replWordFlag )
|
||||||
}
|
|| ( this.wordFlags[i][j] == this.replAllFlag )
|
||||||
}
|
|| ( this.wordFlags[i][j] == this.fromReplAll )) {
|
||||||
return i_replaced;
|
i_replaced++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function _setWordText( text_num, word_num, newText, flag ) {
|
}
|
||||||
// set the UI and form inputs
|
return i_replaced;
|
||||||
this.wordWin.setText( text_num, word_num, newText );
|
}
|
||||||
// keep track of what happened to this word:
|
|
||||||
this.wordFlags[text_num][word_num] = flag;
|
function _setWordText( text_num, word_num, newText, flag ) {
|
||||||
return true;
|
// set the UI and form inputs
|
||||||
}
|
this.wordWin.setText( text_num, word_num, newText );
|
||||||
|
// keep track of what happened to this word:
|
||||||
function _getFormInputs( inputPattern ) {
|
this.wordFlags[text_num][word_num] = flag;
|
||||||
var inputs = new Array();
|
return true;
|
||||||
for( var i = 0; i < document.forms.length; i++ ) {
|
}
|
||||||
for( var j = 0; j < document.forms[i].elements.length; j++ ) {
|
|
||||||
if( document.forms[i].elements[j].type.match( inputPattern )) {
|
function _getFormInputs( inputPattern ) {
|
||||||
inputs[inputs.length] = document.forms[i].elements[j];
|
var inputs = new Array();
|
||||||
}
|
for( var i = 0; i < document.forms.length; i++ ) {
|
||||||
}
|
for( var j = 0; j < document.forms[i].elements.length; j++ ) {
|
||||||
}
|
if( document.forms[i].elements[j].type.match( inputPattern )) {
|
||||||
return inputs;
|
inputs[inputs.length] = document.forms[i].elements[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return inputs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,71 +1,71 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var wordWindow = null;
|
var wordWindow = null;
|
||||||
var controlWindow = null;
|
var controlWindow = null;
|
||||||
|
|
||||||
function init_spell( spellerWindow ) {
|
function init_spell( spellerWindow ) {
|
||||||
|
|
||||||
if( spellerWindow ) {
|
if( spellerWindow ) {
|
||||||
if( spellerWindow.windowType == "wordWindow" ) {
|
if( spellerWindow.windowType == "wordWindow" ) {
|
||||||
wordWindow = spellerWindow;
|
wordWindow = spellerWindow;
|
||||||
} else if ( spellerWindow.windowType == "controlWindow" ) {
|
} else if ( spellerWindow.windowType == "controlWindow" ) {
|
||||||
controlWindow = spellerWindow;
|
controlWindow = spellerWindow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( controlWindow && wordWindow ) {
|
if( controlWindow && wordWindow ) {
|
||||||
// populate the speller object and start it off!
|
// populate the speller object and start it off!
|
||||||
var speller = opener.speller;
|
var speller = opener.speller;
|
||||||
wordWindow.speller = speller;
|
wordWindow.speller = speller;
|
||||||
speller.startCheck( wordWindow, controlWindow );
|
speller.startCheck( wordWindow, controlWindow );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// encodeForPost
|
// encodeForPost
|
||||||
function encodeForPost( str ) {
|
function encodeForPost( str ) {
|
||||||
var s = new String( str );
|
var s = new String( str );
|
||||||
s = encodeURIComponent( s );
|
s = encodeURIComponent( s );
|
||||||
// additionally encode single quotes to evade any PHP
|
// additionally encode single quotes to evade any PHP
|
||||||
// magic_quotes_gpc setting (it inserts escape characters and
|
// magic_quotes_gpc setting (it inserts escape characters and
|
||||||
// therefore skews the btye positions of misspelled words)
|
// therefore skews the btye positions of misspelled words)
|
||||||
return s.replace( /\'/g, '%27' );
|
return s.replace( /\'/g, '%27' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// post the text area data to the script that populates the speller
|
// post the text area data to the script that populates the speller
|
||||||
function postWords() {
|
function postWords() {
|
||||||
var bodyDoc = window.frames[0].document;
|
var bodyDoc = window.frames[0].document;
|
||||||
bodyDoc.open();
|
bodyDoc.open();
|
||||||
bodyDoc.write('<html>');
|
bodyDoc.write('<html>');
|
||||||
bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
|
bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
|
||||||
bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>');
|
bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>');
|
||||||
if (opener) {
|
if (opener) {
|
||||||
var speller = opener.speller;
|
var speller = opener.speller;
|
||||||
bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">');
|
bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">');
|
||||||
bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '<\/p>'); // by FredCK
|
bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '<\/p>'); // by FredCK
|
||||||
bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">');
|
bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">');
|
||||||
for( var i = 0; i < speller.textInputs.length; i++ ) {
|
for( var i = 0; i < speller.textInputs.length; i++ ) {
|
||||||
bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">');
|
bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">');
|
||||||
}
|
}
|
||||||
bodyDoc.write('<\/form>');
|
bodyDoc.write('<\/form>');
|
||||||
bodyDoc.write('<\/body>');
|
bodyDoc.write('<\/body>');
|
||||||
} else {
|
} else {
|
||||||
bodyDoc.write('<body class="normalText">');
|
bodyDoc.write('<body class="normalText">');
|
||||||
bodyDoc.write('<p><b>This page cannot be displayed<\/b><\/p><p>The window was not opened from another window.<\/p>');
|
bodyDoc.write('<p><b>This page cannot be displayed<\/b><\/p><p>The window was not opened from another window.<\/p>');
|
||||||
bodyDoc.write('<\/body>');
|
bodyDoc.write('<\/body>');
|
||||||
}
|
}
|
||||||
bodyDoc.write('<\/html>');
|
bodyDoc.write('<\/html>');
|
||||||
bodyDoc.close();
|
bodyDoc.close();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<head>
|
<head>
|
||||||
<title>Speller Pages</title>
|
<title>Speller Pages</title>
|
||||||
</head>
|
</head>
|
||||||
<frameset rows="*,201" onLoad="postWords();">
|
<frameset rows="*,201" onLoad="postWords();">
|
||||||
<frame src="blank.html">
|
<frame src="blank.html">
|
||||||
<frame src="controls.html">
|
<frame src="controls.html">
|
||||||
</frameset>
|
</frameset>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,49 +1,49 @@
|
|||||||
.blend {
|
.blend {
|
||||||
font-family: courier new;
|
font-family: courier new;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin-bottom:-1;
|
margin-bottom:-1;
|
||||||
}
|
}
|
||||||
.normalLabel {
|
.normalLabel {
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
}
|
}
|
||||||
.normalText {
|
.normalText {
|
||||||
font-family:arial, helvetica, sans-serif;
|
font-family:arial, helvetica, sans-serif;
|
||||||
font-size:10pt;
|
font-size:10pt;
|
||||||
color:000000;
|
color:000000;
|
||||||
background-color:FFFFFF;
|
background-color:FFFFFF;
|
||||||
}
|
}
|
||||||
.plainText {
|
.plainText {
|
||||||
font-family: courier new, courier, monospace;
|
font-family: courier new, courier, monospace;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
color:000000;
|
color:000000;
|
||||||
background-color:FFFFFF;
|
background-color:FFFFFF;
|
||||||
}
|
}
|
||||||
.controlWindowBody {
|
.controlWindowBody {
|
||||||
font-family:arial, helvetica, sans-serif;
|
font-family:arial, helvetica, sans-serif;
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
padding: 7px ; /* by FredCK */
|
padding: 7px ; /* by FredCK */
|
||||||
margin: 0px ; /* by FredCK */
|
margin: 0px ; /* by FredCK */
|
||||||
/* color:000000; by FredCK */
|
/* color:000000; by FredCK */
|
||||||
/* background-color:DADADA; by FredCK */
|
/* background-color:DADADA; by FredCK */
|
||||||
}
|
}
|
||||||
.readonlyInput {
|
.readonlyInput {
|
||||||
background-color:DADADA;
|
background-color:DADADA;
|
||||||
color:000000;
|
color:000000;
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
width:392px;
|
width:392px;
|
||||||
}
|
}
|
||||||
.textDefault {
|
.textDefault {
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
.buttonDefault {
|
.buttonDefault {
|
||||||
width:90px;
|
width:90px;
|
||||||
height:22px;
|
height:22px;
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
}
|
}
|
||||||
.suggSlct {
|
.suggSlct {
|
||||||
width:200px;
|
width:200px;
|
||||||
margin-top:2;
|
margin-top:2;
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
}
|
}
|
||||||
@@ -1,271 +1,272 @@
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
// wordWindow object
|
// wordWindow object
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
function wordWindow() {
|
function wordWindow() {
|
||||||
// private properties
|
// private properties
|
||||||
this._forms = [];
|
this._forms = [];
|
||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
this._getWordObject = _getWordObject;
|
this._getWordObject = _getWordObject;
|
||||||
//this._getSpellerObject = _getSpellerObject;
|
//this._getSpellerObject = _getSpellerObject;
|
||||||
this._wordInputStr = _wordInputStr;
|
this._wordInputStr = _wordInputStr;
|
||||||
this._adjustIndexes = _adjustIndexes;
|
this._adjustIndexes = _adjustIndexes;
|
||||||
this._isWordChar = _isWordChar;
|
this._isWordChar = _isWordChar;
|
||||||
this._lastPos = _lastPos;
|
this._lastPos = _lastPos;
|
||||||
|
|
||||||
// public properties
|
// public properties
|
||||||
this.wordChar = /[a-zA-Z]/;
|
this.wordChar = /[a-zA-Z]/;
|
||||||
this.windowType = "wordWindow";
|
this.windowType = "wordWindow";
|
||||||
this.originalSpellings = new Array();
|
this.originalSpellings = new Array();
|
||||||
this.suggestions = new Array();
|
this.suggestions = new Array();
|
||||||
this.checkWordBgColor = "pink";
|
this.checkWordBgColor = "pink";
|
||||||
this.normWordBgColor = "white";
|
this.normWordBgColor = "white";
|
||||||
this.text = "";
|
this.text = "";
|
||||||
this.textInputs = new Array();
|
this.textInputs = new Array();
|
||||||
this.indexes = new Array();
|
this.indexes = new Array();
|
||||||
//this.speller = this._getSpellerObject();
|
//this.speller = this._getSpellerObject();
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
this.resetForm = resetForm;
|
this.resetForm = resetForm;
|
||||||
this.totalMisspellings = totalMisspellings;
|
this.totalMisspellings = totalMisspellings;
|
||||||
this.totalWords = totalWords;
|
this.totalWords = totalWords;
|
||||||
this.totalPreviousWords = totalPreviousWords;
|
this.totalPreviousWords = totalPreviousWords;
|
||||||
//this.getTextObjectArray = getTextObjectArray;
|
//this.getTextObjectArray = getTextObjectArray;
|
||||||
this.getTextVal = getTextVal;
|
this.getTextVal = getTextVal;
|
||||||
this.setFocus = setFocus;
|
this.setFocus = setFocus;
|
||||||
this.removeFocus = removeFocus;
|
this.removeFocus = removeFocus;
|
||||||
this.setText = setText;
|
this.setText = setText;
|
||||||
//this.getTotalWords = getTotalWords;
|
//this.getTotalWords = getTotalWords;
|
||||||
this.writeBody = writeBody;
|
this.writeBody = writeBody;
|
||||||
this.printForHtml = printForHtml;
|
this.printForHtml = printForHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
if( this._forms ) {
|
if( this._forms ) {
|
||||||
for( var i = 0; i < this._forms.length; i++ ) {
|
for( var i = 0; i < this._forms.length; i++ ) {
|
||||||
this._forms[i].reset();
|
this._forms[i].reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function totalMisspellings() {
|
function totalMisspellings() {
|
||||||
var total_words = 0;
|
var total_words = 0;
|
||||||
for( var i = 0; i < this.textInputs.length; i++ ) {
|
for( var i = 0; i < this.textInputs.length; i++ ) {
|
||||||
total_words += this.totalWords( i );
|
total_words += this.totalWords( i );
|
||||||
}
|
}
|
||||||
return total_words;
|
return total_words;
|
||||||
}
|
}
|
||||||
|
|
||||||
function totalWords( textIndex ) {
|
function totalWords( textIndex ) {
|
||||||
return this.originalSpellings[textIndex].length;
|
return this.originalSpellings[textIndex].length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function totalPreviousWords( textIndex, wordIndex ) {
|
function totalPreviousWords( textIndex, wordIndex ) {
|
||||||
var total_words = 0;
|
var total_words = 0;
|
||||||
for( var i = 0; i <= textIndex; i++ ) {
|
for( var i = 0; i <= textIndex; i++ ) {
|
||||||
for( var j = 0; j < this.totalWords( i ); j++ ) {
|
for( var j = 0; j < this.totalWords( i ); j++ ) {
|
||||||
if( i == textIndex && j == wordIndex ) {
|
if( i == textIndex && j == wordIndex ) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
total_words++;
|
total_words++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return total_words;
|
return total_words;
|
||||||
}
|
}
|
||||||
|
|
||||||
//function getTextObjectArray() {
|
//function getTextObjectArray() {
|
||||||
// return this._form.elements;
|
// return this._form.elements;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
function getTextVal( textIndex, wordIndex ) {
|
function getTextVal( textIndex, wordIndex ) {
|
||||||
var word = this._getWordObject( textIndex, wordIndex );
|
var word = this._getWordObject( textIndex, wordIndex );
|
||||||
if( word ) {
|
if( word ) {
|
||||||
return word.value;
|
return word.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setFocus( textIndex, wordIndex ) {
|
function setFocus( textIndex, wordIndex ) {
|
||||||
var word = this._getWordObject( textIndex, wordIndex );
|
var word = this._getWordObject( textIndex, wordIndex );
|
||||||
if( word ) {
|
if( word ) {
|
||||||
if( word.type == "text" ) {
|
if( word.type == "text" ) {
|
||||||
word.focus();
|
word.focus();
|
||||||
word.style.backgroundColor = this.checkWordBgColor;
|
word.style.backgroundColor = this.checkWordBgColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFocus( textIndex, wordIndex ) {
|
function removeFocus( textIndex, wordIndex ) {
|
||||||
var word = this._getWordObject( textIndex, wordIndex );
|
var word = this._getWordObject( textIndex, wordIndex );
|
||||||
if( word ) {
|
if( word ) {
|
||||||
if( word.type == "text" ) {
|
if( word.type == "text" ) {
|
||||||
word.blur();
|
word.blur();
|
||||||
word.style.backgroundColor = this.normWordBgColor;
|
word.style.backgroundColor = this.normWordBgColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setText( textIndex, wordIndex, newText ) {
|
function setText( textIndex, wordIndex, newText ) {
|
||||||
var word = this._getWordObject( textIndex, wordIndex );
|
var word = this._getWordObject( textIndex, wordIndex );
|
||||||
var beginStr;
|
var beginStr;
|
||||||
var endStr;
|
var endStr;
|
||||||
if( word ) {
|
if( word ) {
|
||||||
var pos = this.indexes[textIndex][wordIndex];
|
var pos = this.indexes[textIndex][wordIndex];
|
||||||
var oldText = word.value;
|
var oldText = word.value;
|
||||||
// update the text given the index of the string
|
// update the text given the index of the string
|
||||||
beginStr = this.textInputs[textIndex].substring( 0, pos );
|
beginStr = this.textInputs[textIndex].substring( 0, pos );
|
||||||
endStr = this.textInputs[textIndex].substring(
|
endStr = this.textInputs[textIndex].substring(
|
||||||
pos + oldText.length,
|
pos + oldText.length,
|
||||||
this.textInputs[textIndex].length
|
this.textInputs[textIndex].length
|
||||||
);
|
);
|
||||||
this.textInputs[textIndex] = beginStr + newText + endStr;
|
this.textInputs[textIndex] = beginStr + newText + endStr;
|
||||||
|
|
||||||
// adjust the indexes on the stack given the differences in
|
// adjust the indexes on the stack given the differences in
|
||||||
// length between the new word and old word.
|
// length between the new word and old word.
|
||||||
var lengthDiff = newText.length - oldText.length;
|
var lengthDiff = newText.length - oldText.length;
|
||||||
this._adjustIndexes( textIndex, wordIndex, lengthDiff );
|
this._adjustIndexes( textIndex, wordIndex, lengthDiff );
|
||||||
|
|
||||||
word.size = newText.length;
|
word.size = newText.length;
|
||||||
word.value = newText;
|
word.value = newText;
|
||||||
this.removeFocus( textIndex, wordIndex );
|
this.removeFocus( textIndex, wordIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function writeBody() {
|
function writeBody() {
|
||||||
var d = window.document;
|
var d = window.document;
|
||||||
var is_html = false;
|
var is_html = false;
|
||||||
|
|
||||||
d.open();
|
d.open();
|
||||||
|
|
||||||
// iterate through each text input.
|
// iterate through each text input.
|
||||||
for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) {
|
for( var txtid = 0; txtid < this.textInputs.length; txtid++ ) {
|
||||||
var end_idx = 0;
|
var end_idx = 0;
|
||||||
var begin_idx = 0;
|
var begin_idx = 0;
|
||||||
d.writeln( '<form name="textInput'+txtid+'">' );
|
d.writeln( '<form name="textInput'+txtid+'">' );
|
||||||
var wordtxt = this.textInputs[txtid];
|
var wordtxt = this.textInputs[txtid];
|
||||||
this.indexes[txtid] = [];
|
this.indexes[txtid] = [];
|
||||||
|
|
||||||
if( wordtxt ) {
|
if( wordtxt ) {
|
||||||
var orig = this.originalSpellings[txtid];
|
var orig = this.originalSpellings[txtid];
|
||||||
if( !orig ) break;
|
if( !orig ) break;
|
||||||
|
|
||||||
//!!! plain text, or HTML mode?
|
//!!! plain text, or HTML mode?
|
||||||
d.writeln( '<div class="plainText">' );
|
d.writeln( '<div class="plainText">' );
|
||||||
// iterate through each occurrence of a misspelled word.
|
// iterate through each occurrence of a misspelled word.
|
||||||
for( var i = 0; i < orig.length; i++ ) {
|
for( var i = 0; i < orig.length; i++ ) {
|
||||||
// find the position of the current misspelled word,
|
// find the position of the current misspelled word,
|
||||||
// starting at the last misspelled word.
|
// starting at the last misspelled word.
|
||||||
// and keep looking if it's a substring of another word
|
// and keep looking if it's a substring of another word
|
||||||
do {
|
do {
|
||||||
begin_idx = wordtxt.indexOf( orig[i], end_idx );
|
begin_idx = wordtxt.indexOf( orig[i], end_idx );
|
||||||
end_idx = begin_idx + orig[i].length;
|
end_idx = begin_idx + orig[i].length;
|
||||||
// word not found? messed up!
|
// word not found? messed up!
|
||||||
if( begin_idx == -1 ) break;
|
if( begin_idx == -1 ) break;
|
||||||
// look at the characters immediately before and after
|
// look at the characters immediately before and after
|
||||||
// the word. If they are word characters we'll keep looking.
|
// the word. If they are word characters we'll keep looking.
|
||||||
var before_char = wordtxt.charAt( begin_idx - 1 );
|
var before_char = wordtxt.charAt( begin_idx - 1 );
|
||||||
var after_char = wordtxt.charAt( end_idx );
|
var after_char = wordtxt.charAt( end_idx );
|
||||||
} while (
|
} while (
|
||||||
this._isWordChar( before_char )
|
this._isWordChar( before_char )
|
||||||
|| this._isWordChar( after_char )
|
|| this._isWordChar( after_char )
|
||||||
);
|
);
|
||||||
|
|
||||||
// keep track of its position in the original text.
|
// keep track of its position in the original text.
|
||||||
this.indexes[txtid][i] = begin_idx;
|
this.indexes[txtid][i] = begin_idx;
|
||||||
|
|
||||||
// write out the characters before the current misspelled word
|
// write out the characters before the current misspelled word
|
||||||
for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) {
|
for( var j = this._lastPos( txtid, i ); j < begin_idx; j++ ) {
|
||||||
// !!! html mode? make it html compatible
|
// !!! html mode? make it html compatible
|
||||||
d.write( this.printForHtml( wordtxt.charAt( j )));
|
d.write( this.printForHtml( wordtxt.charAt( j )));
|
||||||
}
|
}
|
||||||
|
|
||||||
// write out the misspelled word.
|
// write out the misspelled word.
|
||||||
d.write( this._wordInputStr( orig[i] ));
|
d.write( this._wordInputStr( orig[i] ));
|
||||||
|
|
||||||
// if it's the last word, write out the rest of the text
|
// if it's the last word, write out the rest of the text
|
||||||
if( i == orig.length-1 ){
|
if( i == orig.length-1 ){
|
||||||
d.write( printForHtml( wordtxt.substr( end_idx )));
|
d.write( printForHtml( wordtxt.substr( end_idx )));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d.writeln( '</div>' );
|
d.writeln( '</div>' );
|
||||||
|
|
||||||
}
|
}
|
||||||
d.writeln( '</form>' );
|
d.writeln( '</form>' );
|
||||||
}
|
}
|
||||||
//for ( var j = 0; j < d.forms.length; j++ ) {
|
//for ( var j = 0; j < d.forms.length; j++ ) {
|
||||||
// alert( d.forms[j].name );
|
// alert( d.forms[j].name );
|
||||||
// for( var k = 0; k < d.forms[j].elements.length; k++ ) {
|
// for( var k = 0; k < d.forms[j].elements.length; k++ ) {
|
||||||
// alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value );
|
// alert( d.forms[j].elements[k].name + ": " + d.forms[j].elements[k].value );
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// set the _forms property
|
// set the _forms property
|
||||||
this._forms = d.forms;
|
this._forms = d.forms;
|
||||||
d.close();
|
d.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the character index in the full text after the last word we evaluated
|
// return the character index in the full text after the last word we evaluated
|
||||||
function _lastPos( txtid, idx ) {
|
function _lastPos( txtid, idx ) {
|
||||||
if( idx > 0 )
|
if( idx > 0 )
|
||||||
return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length;
|
return this.indexes[txtid][idx-1] + this.originalSpellings[txtid][idx-1].length;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function printForHtml( n ) {
|
function printForHtml( n ) {
|
||||||
return n ; // by FredCK
|
return n ; // by FredCK
|
||||||
|
/*
|
||||||
var htmlstr = n;
|
var htmlstr = n;
|
||||||
if( htmlstr.length == 1 ) {
|
if( htmlstr.length == 1 ) {
|
||||||
// do simple case statement if it's just one character
|
// do simple case statement if it's just one character
|
||||||
switch ( n ) {
|
switch ( n ) {
|
||||||
case "\n":
|
case "\n":
|
||||||
htmlstr = '<br/>';
|
htmlstr = '<br/>';
|
||||||
break;
|
break;
|
||||||
case "<":
|
case "<":
|
||||||
htmlstr = '<';
|
htmlstr = '<';
|
||||||
break;
|
break;
|
||||||
case ">":
|
case ">":
|
||||||
htmlstr = '>';
|
htmlstr = '>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return htmlstr;
|
return htmlstr;
|
||||||
} else {
|
} else {
|
||||||
htmlstr = htmlstr.replace( /</g, '<' );
|
htmlstr = htmlstr.replace( /</g, '<' );
|
||||||
htmlstr = htmlstr.replace( />/g, '>' );
|
htmlstr = htmlstr.replace( />/g, '>' );
|
||||||
htmlstr = htmlstr.replace( /\n/g, '<br/>' );
|
htmlstr = htmlstr.replace( /\n/g, '<br/>' );
|
||||||
return htmlstr;
|
return htmlstr;
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
}
|
||||||
function _isWordChar( letter ) {
|
|
||||||
if( letter.search( this.wordChar ) == -1 ) {
|
function _isWordChar( letter ) {
|
||||||
return false;
|
if( letter.search( this.wordChar ) == -1 ) {
|
||||||
} else {
|
return false;
|
||||||
return true;
|
} else {
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function _getWordObject( textIndex, wordIndex ) {
|
|
||||||
if( this._forms[textIndex] ) {
|
function _getWordObject( textIndex, wordIndex ) {
|
||||||
if( this._forms[textIndex].elements[wordIndex] ) {
|
if( this._forms[textIndex] ) {
|
||||||
return this._forms[textIndex].elements[wordIndex];
|
if( this._forms[textIndex].elements[wordIndex] ) {
|
||||||
}
|
return this._forms[textIndex].elements[wordIndex];
|
||||||
}
|
}
|
||||||
return null;
|
}
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
function _wordInputStr( word ) {
|
|
||||||
var str = '<input readonly ';
|
function _wordInputStr( word ) {
|
||||||
str += 'class="blend" type="text" value="' + word + '" size="' + word.length + '">';
|
var str = '<input readonly ';
|
||||||
return str;
|
str += 'class="blend" type="text" value="' + word + '" size="' + word.length + '">';
|
||||||
}
|
return str;
|
||||||
|
}
|
||||||
function _adjustIndexes( textIndex, wordIndex, lengthDiff ) {
|
|
||||||
for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) {
|
function _adjustIndexes( textIndex, wordIndex, lengthDiff ) {
|
||||||
this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff;
|
for( var i = wordIndex + 1; i < this.originalSpellings[textIndex].length; i++ ) {
|
||||||
}
|
this.indexes[textIndex][i] = this.indexes[textIndex][i] + lengthDiff;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,282 +1,290 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_table.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Table dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: fck_table.html
|
||||||
<title>Table Properties</title>
|
* Table dialog window.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
// Gets the document DOM
|
<head>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<title>Table Properties</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
// Gets the table if there is one selected.
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
var table ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
var e = oEditor.FCKSelection.GetSelectedElement() ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) )
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ;
|
|
||||||
|
// Gets the document DOM
|
||||||
if ( e && e.tagName == "TABLE" )
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
table = e ;
|
|
||||||
|
// Gets the table if there is one selected.
|
||||||
// Fired when the window loading process is finished. It sets the fields with the
|
var table ;
|
||||||
// actual values if a table is selected in the editor.
|
var e = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
window.onload = function()
|
|
||||||
{
|
if ( ( !e && document.location.search.substr(1) == 'Parent' ) || ( e && e.tagName != 'TABLE' ) )
|
||||||
// First of all, translate the dialog box texts
|
e = oEditor.FCKSelection.MoveToAncestorNode( 'TABLE' ) ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
|
||||||
|
if ( e && e.tagName == "TABLE" )
|
||||||
if (table)
|
table = e ;
|
||||||
{
|
|
||||||
document.getElementById('txtRows').value = table.rows.length ;
|
// Fired when the window loading process is finished. It sets the fields with the
|
||||||
document.getElementById('txtColumns').value = table.rows[0].cells.length ;
|
// actual values if a table is selected in the editor.
|
||||||
|
window.onload = function()
|
||||||
// Gets the value from the Width or the Style attribute
|
{
|
||||||
var iWidth = (table.style.width ? table.style.width : table.width ) ;
|
// First of all, translate the dialog box texts
|
||||||
var iHeight = (table.style.height ? table.style.height : table.height ) ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
|
|
||||||
if (iWidth.indexOf('%') >= 0) // Percentual = %
|
if (table)
|
||||||
{
|
{
|
||||||
iWidth = parseInt( iWidth.substr(0,iWidth.length - 1) ) ;
|
document.getElementById('txtRows').value = table.rows.length ;
|
||||||
document.getElementById('selWidthType').value = "percent" ;
|
document.getElementById('txtColumns').value = table.rows[0].cells.length ;
|
||||||
}
|
|
||||||
else if (iWidth.indexOf('px') >= 0) // Style Pixel = px
|
// Gets the value from the Width or the Style attribute
|
||||||
{ //
|
var iWidth = (table.style.width ? table.style.width : table.width ) ;
|
||||||
iWidth = iWidth.substr(0,iWidth.length - 2);
|
var iHeight = (table.style.height ? table.style.height : table.height ) ;
|
||||||
document.getElementById('selWidthType').value = "pixels" ;
|
|
||||||
}
|
if (iWidth.indexOf('%') >= 0) // Percentual = %
|
||||||
|
{
|
||||||
if (iHeight && iHeight.indexOf('px') >= 0) // Style Pixel = px
|
iWidth = parseInt( iWidth.substr(0,iWidth.length - 1), 10 ) ;
|
||||||
iHeight = iHeight.substr(0,iHeight.length - 2);
|
document.getElementById('selWidthType').value = "percent" ;
|
||||||
|
}
|
||||||
document.getElementById('txtWidth').value = iWidth ;
|
else if (iWidth.indexOf('px') >= 0) // Style Pixel = px
|
||||||
document.getElementById('txtHeight').value = iHeight ;
|
{ //
|
||||||
document.getElementById('txtBorder').value = table.border ;
|
iWidth = iWidth.substr(0,iWidth.length - 2);
|
||||||
document.getElementById('selAlignment').value = table.align ;
|
document.getElementById('selWidthType').value = "pixels" ;
|
||||||
document.getElementById('txtCellPadding').value = table.cellPadding ;
|
}
|
||||||
document.getElementById('txtCellSpacing').value = table.cellSpacing ;
|
|
||||||
document.getElementById('txtSummary').value = table.summary;
|
if (iHeight && iHeight.indexOf('px') >= 0) // Style Pixel = px
|
||||||
// document.getElementById('cmbFontStyle').value = table.className ;
|
iHeight = iHeight.substr(0,iHeight.length - 2);
|
||||||
|
|
||||||
if (table.caption) document.getElementById('txtCaption').value = table.caption.innerHTML ;
|
document.getElementById('txtWidth').value = iWidth || '' ;
|
||||||
|
document.getElementById('txtHeight').value = iHeight || '' ;
|
||||||
document.getElementById('txtRows').disabled = true ;
|
document.getElementById('txtBorder').value = GetAttribute( table, 'border', '' ) ;
|
||||||
document.getElementById('txtColumns').disabled = true ;
|
document.getElementById('selAlignment').value = GetAttribute( table, 'align', '' ) ;
|
||||||
}
|
document.getElementById('txtCellPadding').value = GetAttribute( table, 'cellPadding', '' ) ;
|
||||||
|
document.getElementById('txtCellSpacing').value = GetAttribute( table, 'cellSpacing', '' ) ;
|
||||||
window.parent.SetOkButton( true ) ;
|
document.getElementById('txtSummary').value = GetAttribute( table, 'summary', '' ) ;
|
||||||
window.parent.SetAutoSize( true ) ;
|
// document.getElementById('cmbFontStyle').value = table.className ;
|
||||||
}
|
|
||||||
|
if (table.caption) document.getElementById('txtCaption').value = table.caption.innerHTML ;
|
||||||
// Fired when the user press the OK button
|
|
||||||
function Ok()
|
document.getElementById('txtRows').disabled = true ;
|
||||||
{
|
document.getElementById('txtColumns').disabled = true ;
|
||||||
var bExists = ( table != null ) ;
|
}
|
||||||
|
|
||||||
if ( ! bExists )
|
window.parent.SetOkButton( true ) ;
|
||||||
{
|
window.parent.SetAutoSize( true ) ;
|
||||||
table = oEditor.FCK.EditorDocument.createElement( "TABLE" ) ;
|
}
|
||||||
}
|
|
||||||
|
// Fired when the user press the OK button
|
||||||
// Removes the Width and Height styles
|
function Ok()
|
||||||
if ( bExists && table.style.width ) table.style.width = null ; //.removeAttribute("width") ;
|
{
|
||||||
if ( bExists && table.style.height ) table.style.height = null ; //.removeAttribute("height") ;
|
var bExists = ( table != null ) ;
|
||||||
|
|
||||||
table.width = document.getElementById('txtWidth').value + ( document.getElementById('selWidthType').value == "percent" ? "%" : "") ;
|
if ( ! bExists )
|
||||||
table.height = document.getElementById('txtHeight').value ;
|
table = oEditor.FCK.EditorDocument.createElement( "TABLE" ) ;
|
||||||
table.border = document.getElementById('txtBorder').value ;
|
|
||||||
table.align = document.getElementById('selAlignment').value ;
|
// Removes the Width and Height styles
|
||||||
table.cellPadding = document.getElementById('txtCellPadding').value ;
|
if ( bExists && table.style.width ) table.style.width = null ; //.removeAttribute("width") ;
|
||||||
table.cellSpacing = document.getElementById('txtCellSpacing').value ;
|
if ( bExists && table.style.height ) table.style.height = null ; //.removeAttribute("height") ;
|
||||||
table.summary = document.getElementById('txtSummary').value ;
|
|
||||||
// table.className = cmbFontStyle.value ;
|
var sWidth = GetE('txtWidth').value ;
|
||||||
|
if ( sWidth.length > 0 && GetE('selWidthType').value == 'percent' )
|
||||||
if ( document.getElementById('txtCaption').value != '')
|
sWidth += '%' ;
|
||||||
{
|
|
||||||
if (! table.caption) table.createCaption() ;
|
SetAttribute( table, 'width' , sWidth ) ;
|
||||||
table.caption.innerHTML = document.getElementById('txtCaption').value ;
|
SetAttribute( table, 'height' , GetE('txtHeight').value ) ;
|
||||||
}
|
SetAttribute( table, 'border' , GetE('txtBorder').value ) ;
|
||||||
else if ( bExists && table.caption )
|
SetAttribute( table, 'align' , GetE('selAlignment').value ) ;
|
||||||
{
|
SetAttribute( table, 'cellPadding' , GetE('txtCellPadding').value ) ;
|
||||||
if ( document.all )
|
SetAttribute( table, 'cellSpacing' , GetE('txtCellSpacing').value ) ;
|
||||||
table.caption.innerHTML = '' ; // TODO: It causes an IE internal error if using removeChild.
|
SetAttribute( table, 'summary' , GetE('txtSummary').value ) ;
|
||||||
else
|
|
||||||
table.caption.parentNode.removeChild( table.caption ) ;
|
var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ;
|
||||||
}
|
|
||||||
|
if ( document.getElementById('txtCaption').value != '')
|
||||||
if (! bExists)
|
{
|
||||||
{
|
if ( !eCaption )
|
||||||
var iRows = document.getElementById('txtRows').value ;
|
{
|
||||||
var iCols = document.getElementById('txtColumns').value ;
|
eCaption = oEditor.FCK.EditorDocument.createElement( 'CAPTION' ) ;
|
||||||
|
table.insertBefore( eCaption, table.firstChild ) ;
|
||||||
for ( var r = 0 ; r < iRows ; r++ )
|
}
|
||||||
{
|
|
||||||
var oRow = table.insertRow(-1) ;
|
eCaption.innerHTML = document.getElementById('txtCaption').value ;
|
||||||
for ( var c = 0 ; c < iCols ; c++ )
|
}
|
||||||
{
|
else if ( bExists && eCaption )
|
||||||
var oCell = oRow.insertCell(-1) ;
|
eCaption.parentNode.removeChild( eCaption ) ;
|
||||||
if ( oEditor.FCKBrowserInfo.IsGecko )
|
|
||||||
oCell.innerHTML = '<br _moz_editor_bogus_node="TRUE">' ;
|
if (! bExists)
|
||||||
//oCell.innerHTML = " " ;
|
{
|
||||||
}
|
var iRows = document.getElementById('txtRows').value ;
|
||||||
}
|
var iCols = document.getElementById('txtColumns').value ;
|
||||||
|
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
for ( var r = 0 ; r < iRows ; r++ )
|
||||||
|
{
|
||||||
// START iCM MODIFICATIONS
|
var oRow = table.insertRow(-1) ;
|
||||||
// Amended to ensure that newly inserted tables are not incorrectly nested in P tags, etc
|
for ( var c = 0 ; c < iCols ; c++ )
|
||||||
// We insert the table first and then rectify any nestings afterwards so we can re-use the
|
{
|
||||||
// FCKTablesProcessor function that corrects tables on SetHTML()
|
var oCell = oRow.insertCell(-1) ;
|
||||||
/*
|
if ( oEditor.FCKBrowserInfo.IsGeckoLike )
|
||||||
table = oEditor.FCK.InsertElementAndGetIt( table ) ;
|
oCell.innerHTML = GECKO_BOGUS ;
|
||||||
if ( !oEditor.FCKConfig.UseBROnCarriageReturn )
|
//oCell.innerHTML = " " ;
|
||||||
{
|
}
|
||||||
oEditor.FCKTablesProcessor.CheckTableNesting( table ) ;
|
}
|
||||||
}
|
|
||||||
*/
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
// END iCM MODIFICATIONS
|
|
||||||
|
oEditor.FCK.InsertElement( table ) ;
|
||||||
oEditor.FCK.InsertElement( table ) ;
|
}
|
||||||
}
|
|
||||||
|
return true ;
|
||||||
return true ;
|
}
|
||||||
}
|
|
||||||
|
</script>
|
||||||
function IsDigit( e )
|
</head>
|
||||||
{
|
<body style="overflow: hidden">
|
||||||
e = e || event ;
|
<table id="otable" cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 100%">
|
||||||
var iCode = ( e.keyCode || e.charCode ) ;
|
<tr>
|
||||||
return
|
<td>
|
||||||
(
|
<table cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||||
( iCode >= 48 && iCode <= 57 ) // Numbers
|
<tr>
|
||||||
|| (iCode >= 37 && iCode <= 40) // Arrows
|
<td valign="top">
|
||||||
|| iCode == 8 // Backspace
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
|| iCode == 46 // Delete
|
<tr>
|
||||||
) ;
|
<td>
|
||||||
}
|
<span fcklang="DlgTableRows">Rows</span>:</td>
|
||||||
|
<td>
|
||||||
</script>
|
<input id="txtRows" type="text" maxlength="3" size="2" value="3" name="txtRows"
|
||||||
</head>
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
<body bottommargin="5" leftmargin="5" topmargin="5" rightmargin="5" scroll="no" style="OVERFLOW: hidden">
|
</tr>
|
||||||
<table id="otable" cellSpacing="0" cellPadding="0" width="100%" border="0" height="100%">
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td>
|
<span fcklang="DlgTableColumns">Columns</span>:</td>
|
||||||
<table cellSpacing="1" cellPadding="1" width="100%" border="0">
|
<td>
|
||||||
<tr>
|
<input id="txtColumns" type="text" maxlength="2" size="2" value="2" name="txtColumns"
|
||||||
<td valign="top">
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
<table cellSpacing="0" cellPadding="0" border="0">
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span fckLang="DlgTableRows">Rows</span>:</td>
|
<td>
|
||||||
<td> <input id="txtRows" type="text" maxLength="3" size="2" value="3" name="txtRows" onkeypress="return IsDigit(event);"></td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
</td>
|
||||||
<td><span fckLang="DlgTableColumns">Columns</span>:</td>
|
</tr>
|
||||||
<td> <input id="txtColumns" type="text" maxLength="2" size="2" value="2" name="txtColumns" onkeypress="return IsDigit(event);"></td>
|
<tr>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<span fcklang="DlgTableBorder">Border size</span>:</td>
|
||||||
<td> </td>
|
<td>
|
||||||
<td> </td>
|
<input id="txtBorder" type="text" maxlength="2" size="2" value="1" name="txtBorder"
|
||||||
</tr>
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td><span fckLang="DlgTableBorder">Border size</span>:</td>
|
<tr>
|
||||||
<td> <INPUT id="txtBorder" type="text" maxLength="2" size="2" value="1" name="txtBorder" onkeypress="return IsDigit(event);"></td>
|
<td>
|
||||||
</tr>
|
<span fcklang="DlgTableAlign">Alignment</span>:</td>
|
||||||
<tr>
|
<td>
|
||||||
<td><span fckLang="DlgTableAlign">Alignment</span>:</td>
|
<select id="selAlignment" name="selAlignment">
|
||||||
<td> <select id="selAlignment" name="selAlignment">
|
<option fcklang="DlgTableAlignNotSet" value="" selected="selected"><Not set></option>
|
||||||
<option fckLang="DlgTableAlignNotSet" value="" selected><Not set></option>
|
<option fcklang="DlgTableAlignLeft" value="left">Left</option>
|
||||||
<option fckLang="DlgTableAlignLeft" value="left">Left</option>
|
<option fcklang="DlgTableAlignCenter" value="center">Center</option>
|
||||||
<option fckLang="DlgTableAlignCenter" value="center">Center</option>
|
<option fcklang="DlgTableAlignRight" value="right">Right</option>
|
||||||
<option fckLang="DlgTableAlignRight" value="right">Right</option>
|
</select></td>
|
||||||
</select></td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
</table>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td> </td>
|
</td>
|
||||||
<td align="right" valign="top">
|
<td align="right" valign="top">
|
||||||
<table cellSpacing="0" cellPadding="0" border="0">
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><span fckLang="DlgTableWidth">Width</span>:</td>
|
<td>
|
||||||
<td> <input id="txtWidth" type="text" maxLength="4" size="3" value="200" name="txtWidth" onkeypress="return IsDigit(event);"></td>
|
<span fcklang="DlgTableWidth">Width</span>:</td>
|
||||||
<td> <select id="selWidthType" name="selWidthType">
|
<td>
|
||||||
<option fckLang="DlgTableWidthPx" value="pixels" selected>pixels</option>
|
<input id="txtWidth" type="text" maxlength="4" size="3" value="200" name="txtWidth"
|
||||||
<option fckLang="DlgTableWidthPc" value="percent">percent</option>
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
</select></td>
|
<td>
|
||||||
</tr>
|
<select id="selWidthType" name="selWidthType">
|
||||||
<tr>
|
<option fcklang="DlgTableWidthPx" value="pixels" selected="selected">pixels</option>
|
||||||
<td><span fckLang="DlgTableHeight">Height</span>:</td>
|
<option fcklang="DlgTableWidthPc" value="percent">percent</option>
|
||||||
<td> <INPUT id="txtHeight" type="text" maxLength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);"></td>
|
</select></td>
|
||||||
<td> <span fckLang="DlgTableWidthPx">pixels</span></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td>
|
||||||
<td> </td>
|
<span fcklang="DlgTableHeight">Height</span>:</td>
|
||||||
<td> </td>
|
<td>
|
||||||
<td> </td>
|
<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" /></td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<span fcklang="DlgTableWidthPx">pixels</span></td>
|
||||||
<td nowrap><span fckLang="DlgTableCellSpace">Cell spacing</span>:</td>
|
</tr>
|
||||||
<td> <input id="txtCellSpacing" type="text" maxLength="2" size="2" value="1" name="txtCellSpacing"
|
<tr>
|
||||||
onkeypress="return IsDigit(event);"></td>
|
<td>
|
||||||
<td> </td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
</td>
|
||||||
<td nowrap><span fckLang="DlgTableCellPad">Cell padding</span>:</td>
|
<td>
|
||||||
<td> <input id="txtCellPadding" type="text" maxLength="2" size="2" value="1" name="txtCellPadding"
|
</td>
|
||||||
onkeypress="return IsDigit(event);"></td>
|
</tr>
|
||||||
<td> </td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap">
|
||||||
</table>
|
<span fcklang="DlgTableCellSpace">Cell spacing</span>:</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<input id="txtCellSpacing" type="text" maxlength="2" size="2" value="1" name="txtCellSpacing"
|
||||||
</table>
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
<td>
|
||||||
<!--
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td nowrap>
|
<tr>
|
||||||
<span fcklang="DlgClassName">Class Name</span>:</td>
|
<td nowrap="nowrap">
|
||||||
<td> </td>
|
<span fcklang="DlgTableCellPad">Cell padding</span>:</td>
|
||||||
<td>
|
<td>
|
||||||
<script type="text/javascript">
|
<input id="txtCellPadding" type="text" maxlength="2" size="2" value="1" name="txtCellPadding"
|
||||||
// var tbstyles = new TBCombo( "FontStyle" , "null" , "", oEditor.config.StyleNames, oEditor.config.StyleValues, 'CheckStyle("cmbFontStyle")');
|
onkeypress="return IsDigit(event);" /></td>
|
||||||
// document.write(tbstyles.GetHTML());
|
<td>
|
||||||
</script></td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
</table>
|
||||||
<tr>
|
</td>
|
||||||
<td nowrap><span fckLang="DlgTableCaption">Caption</span>:</td>
|
</tr>
|
||||||
<td> </td>
|
</table>
|
||||||
<td width="100%" nowrap>
|
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||||
<input id="txtCaption" type="text" style="WIDTH: 100%"></td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap">
|
||||||
<tr>
|
<span fcklang="DlgTableCaption">Caption</span>: </td>
|
||||||
<td nowrap><span fckLang="DlgTableSummary">Summary</span>:</td>
|
<td>
|
||||||
<td> </td>
|
</td>
|
||||||
<td width="100%" nowrap>
|
<td width="100%" nowrap="nowrap">
|
||||||
<input id="txtSummary" type="text" style="WIDTH: 100%"></td>
|
<input id="txtCaption" type="text" style="width: 100%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
</td>
|
<td nowrap="nowrap">
|
||||||
</tr>
|
<span fcklang="DlgTableSummary">Summary</span>: </td>
|
||||||
</table>
|
<td>
|
||||||
</body>
|
</td>
|
||||||
</html>
|
<td width="100%" nowrap="nowrap">
|
||||||
|
<input id="txtSummary" type="text" style="width: 100%" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,251 +1,259 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_tablecell.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Cell properties dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Table Cell Properties</title>
|
* File Name: fck_tablecell.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* Cell properties dialog window.
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Table Cell Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
// Array of selected Cells
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
var aCells = oEditor.FCKTableHandler.GetSelectedCells() ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
window.onload = function()
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
{
|
|
||||||
// First of all, translate the dialog box texts
|
// Gets the document DOM
|
||||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
|
|
||||||
SetStartupValue() ;
|
// Array of selected Cells
|
||||||
|
var aCells = oEditor.FCKTableHandler.GetSelectedCells() ;
|
||||||
window.parent.SetOkButton( true ) ;
|
|
||||||
window.parent.SetAutoSize( true ) ;
|
window.onload = function()
|
||||||
}
|
{
|
||||||
|
// First of all, translate the dialog box texts
|
||||||
function SetStartupValue()
|
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||||
{
|
|
||||||
if ( aCells.length > 0 )
|
SetStartupValue() ;
|
||||||
{
|
|
||||||
var oCell = aCells[0] ;
|
window.parent.SetOkButton( true ) ;
|
||||||
var iWidth = GetAttribute( oCell, 'width' ) ;
|
window.parent.SetAutoSize( true ) ;
|
||||||
|
}
|
||||||
if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 )
|
|
||||||
{
|
function SetStartupValue()
|
||||||
iWidth = iWidth.substr( 0, iWidth.length - 1 ) ;
|
{
|
||||||
GetE('selWidthType').value = 'percent' ;
|
if ( aCells.length > 0 )
|
||||||
}
|
{
|
||||||
|
var oCell = aCells[0] ;
|
||||||
if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )
|
var iWidth = GetAttribute( oCell, 'width' ) ;
|
||||||
GetE('selWordWrap').value = !oCell.noWrap ;
|
|
||||||
|
if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 )
|
||||||
GetE('txtWidth').value = iWidth ;
|
{
|
||||||
GetE('txtHeight').value = GetAttribute( oCell, 'height' ) ;
|
iWidth = iWidth.substr( 0, iWidth.length - 1 ) ;
|
||||||
GetE('selHAlign').value = GetAttribute( oCell, 'align' ) ;
|
GetE('selWidthType').value = 'percent' ;
|
||||||
GetE('selVAlign').value = GetAttribute( oCell, 'vAlign' ) ;
|
}
|
||||||
GetE('txtRowSpan').value = GetAttribute( oCell, 'rowSpan' ) ;
|
|
||||||
GetE('txtCollSpan').value = GetAttribute( oCell, 'colSpan' ) ;
|
if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )
|
||||||
GetE('txtBackColor').value = GetAttribute( oCell, 'bgColor' ) ;
|
GetE('selWordWrap').value = !oCell.noWrap ;
|
||||||
GetE('txtBorderColor').value = GetAttribute( oCell, 'borderColor' ) ;
|
|
||||||
// GetE('cmbFontStyle').value = oCell.className ;
|
GetE('txtWidth').value = iWidth ;
|
||||||
}
|
GetE('txtHeight').value = GetAttribute( oCell, 'height' ) ;
|
||||||
}
|
GetE('selHAlign').value = GetAttribute( oCell, 'align' ) ;
|
||||||
|
GetE('selVAlign').value = GetAttribute( oCell, 'vAlign' ) ;
|
||||||
// Fired when the user press the OK button
|
GetE('txtRowSpan').value = GetAttribute( oCell, 'rowSpan' ) ;
|
||||||
function Ok()
|
GetE('txtCollSpan').value = GetAttribute( oCell, 'colSpan' ) ;
|
||||||
{
|
GetE('txtBackColor').value = GetAttribute( oCell, 'bgColor' ) ;
|
||||||
for( i = 0 ; i < aCells.length ; i++ )
|
GetE('txtBorderColor').value = GetAttribute( oCell, 'borderColor' ) ;
|
||||||
{
|
// GetE('cmbFontStyle').value = oCell.className ;
|
||||||
if ( GetE('txtWidth').value.length > 0 )
|
}
|
||||||
aCells[i].width = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ;
|
}
|
||||||
else
|
|
||||||
aCells[i].removeAttribute( 'width', 0 ) ;
|
// Fired when the user press the OK button
|
||||||
|
function Ok()
|
||||||
if ( GetE('selWordWrap').value == 'false' )
|
{
|
||||||
aCells[i].noWrap = true ;
|
for( i = 0 ; i < aCells.length ; i++ )
|
||||||
else
|
{
|
||||||
aCells[i].removeAttribute( 'noWrap' ) ;
|
if ( GetE('txtWidth').value.length > 0 )
|
||||||
|
aCells[i].width = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ;
|
||||||
SetAttribute( aCells[i], 'height' , GetE('txtHeight').value ) ;
|
else
|
||||||
SetAttribute( aCells[i], 'align' , GetE('selHAlign').value ) ;
|
aCells[i].removeAttribute( 'width', 0 ) ;
|
||||||
SetAttribute( aCells[i], 'vAlign' , GetE('selVAlign').value ) ;
|
|
||||||
SetAttribute( aCells[i], 'rowSpan' , GetE('txtRowSpan').value ) ;
|
if ( GetE('selWordWrap').value == 'false' )
|
||||||
SetAttribute( aCells[i], 'colSpan' , GetE('txtCollSpan').value ) ;
|
aCells[i].noWrap = true ;
|
||||||
SetAttribute( aCells[i], 'bgColor' , GetE('txtBackColor').value ) ;
|
else
|
||||||
SetAttribute( aCells[i], 'borderColor' , GetE('txtBorderColor').value ) ;
|
aCells[i].removeAttribute( 'noWrap' ) ;
|
||||||
// SetAttribute( aCells[i], 'className' , GetE('cmbFontStyle').value ) ;
|
|
||||||
}
|
SetAttribute( aCells[i], 'height' , GetE('txtHeight').value ) ;
|
||||||
|
SetAttribute( aCells[i], 'align' , GetE('selHAlign').value ) ;
|
||||||
return true ;
|
SetAttribute( aCells[i], 'vAlign' , GetE('selVAlign').value ) ;
|
||||||
}
|
SetAttribute( aCells[i], 'rowSpan' , GetE('txtRowSpan').value ) ;
|
||||||
|
SetAttribute( aCells[i], 'colSpan' , GetE('txtCollSpan').value ) ;
|
||||||
function SelectBackColor( color )
|
SetAttribute( aCells[i], 'bgColor' , GetE('txtBackColor').value ) ;
|
||||||
{
|
SetAttribute( aCells[i], 'borderColor' , GetE('txtBorderColor').value ) ;
|
||||||
if ( color && color.length > 0 )
|
// SetAttribute( aCells[i], 'className' , GetE('cmbFontStyle').value ) ;
|
||||||
GetE('txtBackColor').value = color ;
|
}
|
||||||
}
|
|
||||||
|
return true ;
|
||||||
function SelectBorderColor( color )
|
}
|
||||||
{
|
|
||||||
if ( color && color.length > 0 )
|
function SelectBackColor( color )
|
||||||
GetE('txtBorderColor').value = color ;
|
{
|
||||||
}
|
if ( color && color.length > 0 )
|
||||||
|
GetE('txtBackColor').value = color ;
|
||||||
function SelectColor( wich )
|
}
|
||||||
{
|
|
||||||
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
|
function SelectBorderColor( color )
|
||||||
}
|
{
|
||||||
|
if ( color && color.length > 0 )
|
||||||
</script>
|
GetE('txtBorderColor').value = color ;
|
||||||
</head>
|
}
|
||||||
<body scroll="no" style="overflow: hidden">
|
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
|
function SelectColor( wich )
|
||||||
<tr>
|
{
|
||||||
<td>
|
oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
|
||||||
<table cellspacing="1" cellpadding="1" width="100%" border="0">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
</head>
|
||||||
<tr>
|
<body scroll="no" style="overflow: hidden">
|
||||||
<td nowrap="nowrap">
|
<table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
|
||||||
<span fcklang="DlgCellWidth">Width</span>:</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input onkeypress="return IsDigit();" id="txtWidth" type="text" maxlength="4"
|
<table cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||||
size="3" name="txtWidth" /> <select id="selWidthType" name="selWidthType">
|
<tr>
|
||||||
<option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option>
|
<td>
|
||||||
<option fcklang="DlgCellWidthPc" value="percent">percent</option>
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
</select></td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap">
|
||||||
<tr>
|
<span fcklang="DlgCellWidth">Width</span>:</td>
|
||||||
<td nowrap="nowrap">
|
<td>
|
||||||
<span fcklang="DlgCellHeight">Height</span>:</td>
|
<input onkeypress="return IsDigit(event);" id="txtWidth" type="text" maxlength="4"
|
||||||
<td>
|
size="3" name="txtWidth" /> <select id="selWidthType" name="selWidthType">
|
||||||
<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit();" /> <span
|
<option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option>
|
||||||
fcklang="DlgCellWidthPx">pixels</span></td>
|
<option fcklang="DlgCellWidthPc" value="percent">percent</option>
|
||||||
</tr>
|
</select></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
</td>
|
<td nowrap="nowrap">
|
||||||
<td>
|
<span fcklang="DlgCellHeight">Height</span>:</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" /> <span
|
||||||
<tr>
|
fcklang="DlgCellWidthPx">pixels</span></td>
|
||||||
<td nowrap="nowrap">
|
</tr>
|
||||||
<span fcklang="DlgCellWordWrap">Word Wrap</span>:</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select id="selWordWrap" name="selAlignment">
|
</td>
|
||||||
<option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option>
|
<td>
|
||||||
<option fcklang="DlgCellWordWrapNo" value="false">No</option>
|
</td>
|
||||||
</select></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td nowrap="nowrap">
|
||||||
<td>
|
<span fcklang="DlgCellWordWrap">Word Wrap</span>:</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<select id="selWordWrap" name="selAlignment">
|
||||||
</td>
|
<option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option>
|
||||||
</tr>
|
<option fcklang="DlgCellWordWrapNo" value="false">No</option>
|
||||||
<tr>
|
</select></td>
|
||||||
<td nowrap="nowrap">
|
</tr>
|
||||||
<span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select id="selHAlign" name="selAlignment">
|
</td>
|
||||||
<option fcklang="DlgCellHorAlignNotSet" value="" selected><Not set></option>
|
<td>
|
||||||
<option fcklang="DlgCellHorAlignLeft" value="left">Left</option>
|
</td>
|
||||||
<option fcklang="DlgCellHorAlignCenter" value="center">Center</option>
|
</tr>
|
||||||
<option fcklang="DlgCellHorAlignRight" value="right">Right</option>
|
<tr>
|
||||||
</select></td>
|
<td nowrap="nowrap">
|
||||||
</tr>
|
<span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td>
|
||||||
<tr>
|
<td>
|
||||||
<td nowrap="nowrap">
|
<select id="selHAlign" name="selAlignment">
|
||||||
<span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td>
|
<option fcklang="DlgCellHorAlignNotSet" value="" selected><Not set></option>
|
||||||
<td>
|
<option fcklang="DlgCellHorAlignLeft" value="left">Left</option>
|
||||||
<select id="selVAlign" name="selAlignment">
|
<option fcklang="DlgCellHorAlignCenter" value="center">Center</option>
|
||||||
<option fcklang="DlgCellVerAlignNotSet" value="" selected><Not set></option>
|
<option fcklang="DlgCellHorAlignRight" value="right">Right</option>
|
||||||
<option fcklang="DlgCellVerAlignTop" value="top">Top</option>
|
</select></td>
|
||||||
<option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option>
|
</tr>
|
||||||
<option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option>
|
<tr>
|
||||||
<option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option>
|
<td nowrap="nowrap">
|
||||||
</select></td>
|
<span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<select id="selVAlign" name="selAlignment">
|
||||||
</td>
|
<option fcklang="DlgCellVerAlignNotSet" value="" selected><Not set></option>
|
||||||
<td>
|
<option fcklang="DlgCellVerAlignTop" value="top">Top</option>
|
||||||
</td>
|
<option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option>
|
||||||
<td align="right">
|
<option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option>
|
||||||
<table cellspacing="0" cellpadding="0" border="0">
|
<option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option>
|
||||||
<tr>
|
</select></td>
|
||||||
<td nowrap="nowrap">
|
</tr>
|
||||||
<span fcklang="DlgCellRowSpan">Rows Span</span>:</td>
|
</table>
|
||||||
<td>
|
</td>
|
||||||
|
<td>
|
||||||
<input onkeypress="return IsDigit();" id="txtRowSpan" type="text" maxlength="3" size="2"
|
</td>
|
||||||
name="txtRows"></td>
|
<td align="right">
|
||||||
<td>
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap">
|
||||||
<tr>
|
<span fcklang="DlgCellRowSpan">Rows Span</span>:</td>
|
||||||
<td nowrap="nowrap">
|
<td>
|
||||||
<span fcklang="DlgCellCollSpan">Columns Span</span>:</td>
|
|
||||||
<td>
|
<input onkeypress="return IsDigit(event);" id="txtRowSpan" type="text" maxlength="3" size="2"
|
||||||
|
name="txtRows"></td>
|
||||||
<input onkeypress="return IsDigit();" id="txtCollSpan" type="text" maxlength="2"
|
<td>
|
||||||
size="2" name="txtColumns"></td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td nowrap="nowrap">
|
||||||
<tr>
|
<span fcklang="DlgCellCollSpan">Columns Span</span>:</td>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
|
||||||
<td>
|
<input onkeypress="return IsDigit(event);" id="txtCollSpan" type="text" maxlength="2"
|
||||||
</td>
|
size="2" name="txtColumns"></td>
|
||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td nowrap="nowrap">
|
<td>
|
||||||
<span fcklang="DlgCellBackColor">Background Color</span>:</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
</td>
|
||||||
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<td nowrap="nowrap">
|
||||||
<td nowrap="nowrap">
|
<span fcklang="DlgCellBackColor">Background Color</span>:</td>
|
||||||
<span fcklang="DlgCellBorderColor">Border Color</span>:</td>
|
<td>
|
||||||
<td>
|
<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>
|
||||||
<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>
|
<td>
|
||||||
<td>
|
|
||||||
|
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>
|
||||||
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td nowrap="nowrap">
|
||||||
</td>
|
<span fcklang="DlgCellBorderColor">Border Color</span>:</td>
|
||||||
</tr>
|
<td>
|
||||||
</table>
|
<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
|
||||||
</table>
|
<input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>
|
||||||
</body>
|
</tr>
|
||||||
</html>
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,210 +1,246 @@
|
|||||||
<!--
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
* FCKeditor - The text editor for internet
|
<!--
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
*
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
*
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
* == BEGIN LICENSE ==
|
||||||
*
|
*
|
||||||
* For further information visit:
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* http://www.fckeditor.net/
|
* choice:
|
||||||
*
|
*
|
||||||
* "Support Open Source software. What about a donation today?"
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
*
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
* File Name: fck_template.html
|
*
|
||||||
* Template selection dialog window.
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
*
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* File Authors:
|
*
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
-->
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* File Name: fck_template.html
|
||||||
<meta name="robots" content="noindex, nofollow">
|
* Template selection dialog window.
|
||||||
<style>
|
*
|
||||||
.TplList
|
* File Authors:
|
||||||
{
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
border: #dcdcdc 2px solid;
|
-->
|
||||||
background-color: #ffffff;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
overflow: auto;
|
<head>
|
||||||
width: 90%;
|
<title></title>
|
||||||
}
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
.TplItem
|
<style type="text/css">
|
||||||
{
|
.TplList
|
||||||
margin: 5px;
|
{
|
||||||
padding: 7px;
|
border: #dcdcdc 2px solid;
|
||||||
border: #eeeeee 1px solid;
|
background-color: #ffffff;
|
||||||
}
|
overflow: auto;
|
||||||
|
width: 90%;
|
||||||
.TplItem TABLE
|
}
|
||||||
{
|
|
||||||
display: inline;
|
.TplItem
|
||||||
}
|
{
|
||||||
|
margin: 5px;
|
||||||
.TplTitle
|
padding: 7px;
|
||||||
{
|
border: #eeeeee 1px solid;
|
||||||
font-weight: bold;
|
}
|
||||||
}
|
|
||||||
</style>
|
.TplItem TABLE
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
{
|
||||||
<script language="javascript">
|
display: inline;
|
||||||
|
}
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
|
||||||
var FCK = oEditor.FCK ;
|
.TplTitle
|
||||||
var FCKLang = oEditor.FCKLang ;
|
{
|
||||||
var FCKConfig = oEditor.FCKConfig ;
|
font-weight: bold;
|
||||||
|
}
|
||||||
window.onload = function()
|
</style>
|
||||||
{
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
// Set the right box height (browser dependent).
|
<script type="text/javascript">
|
||||||
GetE('eList').style.height = document.all ? '100%' : '295px' ;
|
|
||||||
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// Translate the dialog box texts.
|
var FCK = oEditor.FCK ;
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
var FCKLang = oEditor.FCKLang ;
|
||||||
|
var FCKConfig = oEditor.FCKConfig ;
|
||||||
window.parent.SetAutoSize( true ) ;
|
|
||||||
|
window.onload = function()
|
||||||
LoadTemplatesXml() ;
|
{
|
||||||
}
|
// Set the right box height (browser dependent).
|
||||||
|
GetE('eList').style.height = document.all ? '100%' : '295px' ;
|
||||||
function LoadTemplatesXml()
|
|
||||||
{
|
// Translate the dialog box texts.
|
||||||
if ( !FCK._Templates )
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
{
|
|
||||||
GetE('eLoading').style.display = '' ;
|
GetE('xChkReplaceAll').checked = ( FCKConfig.TemplateReplaceAll !== false ) ;
|
||||||
|
|
||||||
// Create the Templates array.
|
if ( FCKConfig.TemplateReplaceCheckbox !== false )
|
||||||
FCK._Templates = new Array() ;
|
GetE('xReplaceBlock').style.display = '' ;
|
||||||
|
|
||||||
// Load the XML file.
|
window.parent.SetAutoSize( true ) ;
|
||||||
var oXml = new oEditor.FCKXml() ;
|
|
||||||
oXml.LoadUrl( FCKConfig.TemplatesXmlPath ) ;
|
LoadTemplatesXml() ;
|
||||||
|
}
|
||||||
// Get the Images Base Path.
|
|
||||||
var oAtt = oXml.SelectSingleNode( 'Templates/@imagesBasePath' ) ;
|
function LoadTemplatesXml()
|
||||||
var sImagesBasePath = oAtt ? oAtt.value : '' ;
|
{
|
||||||
|
var oTemplate ;
|
||||||
// Get the "Template" nodes defined in the XML file.
|
|
||||||
var aTplNodes = oXml.SelectNodes( 'Templates/Template' ) ;
|
if ( !FCK._Templates )
|
||||||
|
{
|
||||||
for ( var i = 0 ; i < aTplNodes.length ; i++ )
|
GetE('eLoading').style.display = '' ;
|
||||||
{
|
|
||||||
var oNode = aTplNodes[i]
|
// Create the Templates array.
|
||||||
|
FCK._Templates = new Array() ;
|
||||||
var oTemplate = new Object() ;
|
|
||||||
|
// Load the XML file.
|
||||||
var oPart ;
|
var oXml = new oEditor.FCKXml() ;
|
||||||
|
oXml.LoadUrl( FCKConfig.TemplatesXmlPath ) ;
|
||||||
// Get the Template Title.
|
|
||||||
if ( oPart = oNode.attributes.getNamedItem('title') )
|
// Get the Images Base Path.
|
||||||
oTemplate.Title = oPart.value ;
|
var oAtt = oXml.SelectSingleNode( 'Templates/@imagesBasePath' ) ;
|
||||||
else
|
var sImagesBasePath = oAtt ? oAtt.value : '' ;
|
||||||
oTemplate.Title = 'Template ' + ( i + 1 ) ;
|
|
||||||
|
// Get the "Template" nodes defined in the XML file.
|
||||||
// Get the Template Description.
|
var aTplNodes = oXml.SelectNodes( 'Templates/Template' ) ;
|
||||||
if ( oPart = oXml.SelectSingleNode( 'Description', oNode ) )
|
|
||||||
oTemplate.Description = oPart.text ? oPart.text : oPart.textContent ;
|
for ( var i = 0 ; i < aTplNodes.length ; i++ )
|
||||||
|
{
|
||||||
// Get the Template Image.
|
var oNode = aTplNodes[i] ;
|
||||||
if ( oPart = oNode.attributes.getNamedItem('image') )
|
|
||||||
oTemplate.Image = sImagesBasePath + oPart.value ;
|
oTemplate = new Object() ;
|
||||||
|
|
||||||
// Get the Template HTML.
|
var oPart ;
|
||||||
if ( oPart = oXml.SelectSingleNode( 'Html', oNode ) )
|
|
||||||
oTemplate.Html = oPart.text ? oPart.text : oPart.textContent ;
|
// Get the Template Title.
|
||||||
else
|
if ( (oPart = oNode.attributes.getNamedItem('title')) )
|
||||||
{
|
oTemplate.Title = oPart.value ;
|
||||||
alert( 'No HTML defined for template index ' + i + '. Please review the "' + FCKConfig.TemplatesXmlPath + '" file.' ) ;
|
else
|
||||||
continue ;
|
oTemplate.Title = 'Template ' + ( i + 1 ) ;
|
||||||
}
|
|
||||||
|
// Get the Template Description.
|
||||||
FCK._Templates[ FCK._Templates.length ] = oTemplate ;
|
if ( (oPart = oXml.SelectSingleNode( 'Description', oNode )) )
|
||||||
}
|
oTemplate.Description = oPart.text ? oPart.text : oPart.textContent ;
|
||||||
|
|
||||||
GetE('eLoading').style.display = 'none' ;
|
// Get the Template Image.
|
||||||
}
|
if ( (oPart = oNode.attributes.getNamedItem('image')) )
|
||||||
|
oTemplate.Image = sImagesBasePath + oPart.value ;
|
||||||
if ( FCK._Templates.length == 0 )
|
|
||||||
GetE('eEmpty').style.display = '' ;
|
// Get the Template HTML.
|
||||||
else
|
if ( (oPart = oXml.SelectSingleNode( 'Html', oNode )) )
|
||||||
{
|
oTemplate.Html = oPart.text ? oPart.text : oPart.textContent ;
|
||||||
for ( var i = 0 ; i < FCK._Templates.length ; i++ )
|
else
|
||||||
{
|
{
|
||||||
var oTemplate = FCK._Templates[i] ;
|
alert( 'No HTML defined for template index ' + i + '. Please review the "' + FCKConfig.TemplatesXmlPath + '" file.' ) ;
|
||||||
|
continue ;
|
||||||
var oItemDiv = GetE('eList').appendChild( document.createElement( 'DIV' ) ) ;
|
}
|
||||||
oItemDiv.TplIndex = i ;
|
|
||||||
oItemDiv.className = 'TplItem' ;
|
FCK._Templates[ FCK._Templates.length ] = oTemplate ;
|
||||||
|
}
|
||||||
// Build the inner HTML of our new item DIV.
|
|
||||||
var sInner = '<table><tr>' ;
|
GetE('eLoading').style.display = 'none' ;
|
||||||
|
}
|
||||||
if ( oTemplate.Image )
|
|
||||||
sInner += '<td valign="top"><img src="' + oTemplate.Image + '"><\/td>' ;
|
if ( FCK._Templates.length == 0 )
|
||||||
|
GetE('eEmpty').style.display = '' ;
|
||||||
sInner += '<td valign="top"><div class="TplTitle">' + oTemplate.Title + '<\/div>' ;
|
else
|
||||||
|
{
|
||||||
if ( oTemplate.Description )
|
for ( var j = 0 ; j < FCK._Templates.length ; j++ )
|
||||||
sInner += '<div>' + oTemplate.Description + '<\/div>' ;
|
{
|
||||||
|
oTemplate = FCK._Templates[j] ;
|
||||||
sInner += '<\/td><\/tr><\/table>' ;
|
|
||||||
|
var oItemDiv = GetE('eList').appendChild( document.createElement( 'DIV' ) ) ;
|
||||||
oItemDiv.innerHTML = sInner ;
|
oItemDiv.TplIndex = j ;
|
||||||
|
oItemDiv.className = 'TplItem' ;
|
||||||
oItemDiv.onmouseover = ItemDiv_OnMouseOver ;
|
|
||||||
oItemDiv.onmouseout = ItemDiv_OnMouseOut ;
|
// Build the inner HTML of our new item DIV.
|
||||||
oItemDiv.onclick = ItemDiv_OnClick ;
|
var sInner = '<table><tr>' ;
|
||||||
}
|
|
||||||
}
|
if ( oTemplate.Image )
|
||||||
}
|
sInner += '<td valign="top"><img src="' + oTemplate.Image + '"><\/td>' ;
|
||||||
|
|
||||||
function ItemDiv_OnMouseOver()
|
sInner += '<td valign="top"><div class="TplTitle">' + oTemplate.Title + '<\/div>' ;
|
||||||
{
|
|
||||||
this.className += ' PopupSelectionBox' ;
|
if ( oTemplate.Description )
|
||||||
}
|
sInner += '<div>' + oTemplate.Description + '<\/div>' ;
|
||||||
|
|
||||||
function ItemDiv_OnMouseOut()
|
sInner += '<\/td><\/tr><\/table>' ;
|
||||||
{
|
|
||||||
this.className = this.className.replace( /\s*PopupSelectionBox\s*/, '' ) ;
|
oItemDiv.innerHTML = sInner ;
|
||||||
}
|
|
||||||
|
oItemDiv.onmouseover = ItemDiv_OnMouseOver ;
|
||||||
function ItemDiv_OnClick()
|
oItemDiv.onmouseout = ItemDiv_OnMouseOut ;
|
||||||
{
|
oItemDiv.onclick = ItemDiv_OnClick ;
|
||||||
SelectTemplate( this.TplIndex ) ;
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function SelectTemplate( index )
|
|
||||||
{
|
function ItemDiv_OnMouseOver()
|
||||||
oEditor.FCKUndo.SaveUndoStep() ;
|
{
|
||||||
FCK.SetHTML( FCK._Templates[index].Html ) ;
|
this.className += ' PopupSelectionBox' ;
|
||||||
window.parent.Cancel() ;
|
}
|
||||||
}
|
|
||||||
|
function ItemDiv_OnMouseOut()
|
||||||
</script>
|
{
|
||||||
</head>
|
this.className = this.className.replace( /\s*PopupSelectionBox\s*/, '' ) ;
|
||||||
<body scroll="no" style="OVERFLOW: hidden">
|
}
|
||||||
<table width="100%" height="100%">
|
|
||||||
<tr>
|
function ItemDiv_OnClick()
|
||||||
<td align="center">
|
{
|
||||||
<span fckLang="DlgTemplatesSelMsg">Please select the template to open in the editor<br>
|
SelectTemplate( this.TplIndex ) ;
|
||||||
(the actual contents will be lost):</span>
|
}
|
||||||
</td>
|
|
||||||
</tr>
|
function SelectTemplate( index )
|
||||||
<tr>
|
{
|
||||||
<td height="100%" align="center">
|
oEditor.FCKUndo.SaveUndoStep() ;
|
||||||
<div id="eList" align="left" class="TplList">
|
|
||||||
<div id="eLoading" align="center" style="DISPLAY: none">
|
if ( GetE('xChkReplaceAll').checked )
|
||||||
<br>
|
FCK.SetHTML( FCK._Templates[index].Html ) ;
|
||||||
<span fckLang="DlgTemplatesLoading">Loading templates list. Please wait...</span>
|
else
|
||||||
</div>
|
FCK.InsertHtml( FCK._Templates[index].Html ) ;
|
||||||
<div id="eEmpty" align="center" style="DISPLAY: none">
|
|
||||||
<br>
|
window.parent.Cancel( true ) ;
|
||||||
<span fckLang="DlgTemplatesNoTpl">(No templates defined)</span>
|
}
|
||||||
</div>
|
|
||||||
</div>
|
</script>
|
||||||
</td>
|
</head>
|
||||||
</tr>
|
<body style="overflow: hidden">
|
||||||
</table>
|
<table width="100%" style="height: 100%">
|
||||||
</body>
|
<tr>
|
||||||
</html>
|
<td align="center">
|
||||||
|
<span fcklang="DlgTemplatesSelMsg">Please select the template to open in the editor<br />
|
||||||
|
(the actual contents will be lost):</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="100%" align="center">
|
||||||
|
<div id="eList" align="left" class="TplList">
|
||||||
|
<div id="eLoading" align="center" style="display: none">
|
||||||
|
<br />
|
||||||
|
<span fcklang="DlgTemplatesLoading">Loading templates list. Please wait...</span>
|
||||||
|
</div>
|
||||||
|
<div id="eEmpty" align="center" style="display: none">
|
||||||
|
<br />
|
||||||
|
<span fcklang="DlgTemplatesNoTpl">(No templates defined)</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="xReplaceBlock" style="display: none">
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input id="xChkReplaceAll" type="checkbox" /></td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<label for="xChkReplaceAll" fcklang="DlgTemplatesReplace">
|
||||||
|
Replace actual contents</label></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,90 +1,98 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_textarea.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Text Area dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Text Area Properties</title>
|
* File Name: fck_textarea.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Text Area dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html>
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title>Text Area Properties</title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta content="noindex, nofollow" name="robots">
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName == 'TEXTAREA' )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtCols').value = GetAttribute( oActiveEl, 'cols' ) ;
|
window.onload = function()
|
||||||
GetE('txtRows').value = GetAttribute( oActiveEl, 'rows' ) ;
|
{
|
||||||
}
|
// First of all, translate the dialog box texts
|
||||||
else
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
oActiveEl = null ;
|
|
||||||
|
if ( oActiveEl && oActiveEl.tagName == 'TEXTAREA' )
|
||||||
window.parent.SetOkButton( true ) ;
|
{
|
||||||
}
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
|
GetE('txtCols').value = GetAttribute( oActiveEl, 'cols' ) ;
|
||||||
function Ok()
|
GetE('txtRows').value = GetAttribute( oActiveEl, 'rows' ) ;
|
||||||
{
|
}
|
||||||
if ( !oActiveEl )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'TEXTAREA' ) ;
|
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
window.parent.SetOkButton( true ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
function Ok()
|
||||||
SetAttribute( oActiveEl, 'cols', GetE('txtCols').value ) ;
|
{
|
||||||
SetAttribute( oActiveEl, 'rows', GetE('txtRows').value ) ;
|
if ( !oActiveEl )
|
||||||
|
{
|
||||||
return true ;
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'TEXTAREA' ) ;
|
||||||
}
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
|
}
|
||||||
</script>
|
|
||||||
</head>
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
<body style='OVERFLOW: hidden' scroll='no'>
|
SetAttribute( oActiveEl, 'cols', GetE('txtCols').value ) ;
|
||||||
<table height="100%" width="100%">
|
SetAttribute( oActiveEl, 'rows', GetE('txtRows').value ) ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgTextareaName">Name</span><br>
|
</head>
|
||||||
<input type="text" id="txtName" style="WIDTH: 100%">
|
<body style='OVERFLOW: hidden' scroll='no'>
|
||||||
<span fckLang="DlgTextareaCols">Collumns</span><br>
|
<table height="100%" width="100%">
|
||||||
<input id="txtCols" type="text" size="5">
|
<tr>
|
||||||
<br>
|
<td align="center">
|
||||||
<span fckLang="DlgTextareaRows">Rows</span><br>
|
<table border="0" cellpadding="0" cellspacing="0" width="80%">
|
||||||
<input id="txtRows" type="text" size="5">
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<span fckLang="DlgTextareaName">Name</span><br>
|
||||||
</table>
|
<input type="text" id="txtName" style="WIDTH: 100%">
|
||||||
</td>
|
<span fckLang="DlgTextareaCols">Collumns</span><br>
|
||||||
</tr>
|
<input id="txtCols" type="text" size="5">
|
||||||
</table>
|
<br>
|
||||||
</body>
|
<span fckLang="DlgTextareaRows">Rows</span><br>
|
||||||
</html>
|
<input id="txtRows" type="text" size="5">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,131 +1,143 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fck_textfield.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Text field dialog window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html>
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>Text Field Properties</title>
|
* File Name: fck_textfield.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Text field dialog window.
|
||||||
<meta content="noindex, nofollow" name="robots">
|
*
|
||||||
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
// Gets the document DOM
|
<title></title>
|
||||||
var oDOM = oEditor.FCK.EditorDocument ;
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta content="noindex, nofollow" name="robots" />
|
||||||
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||||
// First of all, translate the dialog box texts
|
|
||||||
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
// Gets the document DOM
|
||||||
|
var oDOM = oEditor.FCK.EditorDocument ;
|
||||||
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && ( oActiveEl.type == 'text' || oActiveEl.type == 'password' ) )
|
|
||||||
{
|
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
|
||||||
GetE('txtName').value = oActiveEl.name ;
|
|
||||||
GetE('txtValue').value = oActiveEl.value ;
|
window.onload = function()
|
||||||
GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
|
{
|
||||||
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
|
// First of all, translate the dialog box texts
|
||||||
GetE('txtType').value = oActiveEl.type ;
|
oEditor.FCKLanguageManager.TranslatePage(document) ;
|
||||||
|
|
||||||
GetE('txtType').disabled = true ;
|
if ( oActiveEl && oActiveEl.tagName == 'INPUT' && ( oActiveEl.type == 'text' || oActiveEl.type == 'password' ) )
|
||||||
}
|
{
|
||||||
else
|
GetE('txtName').value = oActiveEl.name ;
|
||||||
oActiveEl = null ;
|
GetE('txtValue').value = oActiveEl.value ;
|
||||||
|
GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
|
||||||
window.parent.SetOkButton( true ) ;
|
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
|
||||||
}
|
GetE('txtType').value = oActiveEl.type ;
|
||||||
|
|
||||||
function Ok()
|
GetE('txtType').disabled = true ;
|
||||||
{
|
}
|
||||||
if ( isNaN( GetE('txtMax').value ) || GetE('txtMax').value < 0 )
|
else
|
||||||
{
|
oActiveEl = null ;
|
||||||
alert( "Maximum characters must be a positive number." ) ;
|
|
||||||
GetE('txtMax').focus() ;
|
window.parent.SetOkButton( true ) ;
|
||||||
return false ;
|
}
|
||||||
}
|
|
||||||
else if( isNaN( GetE('txtSize').value ) || GetE('txtSize').value < 0 )
|
function Ok()
|
||||||
{
|
{
|
||||||
alert( "Width must be a positive number." ) ;
|
if ( isNaN( GetE('txtMax').value ) || GetE('txtMax').value < 0 )
|
||||||
GetE('txtSize').focus() ;
|
{
|
||||||
return false ;
|
alert( "Maximum characters must be a positive number." ) ;
|
||||||
}
|
GetE('txtMax').focus() ;
|
||||||
|
return false ;
|
||||||
if ( !oActiveEl )
|
}
|
||||||
{
|
else if( isNaN( GetE('txtSize').value ) || GetE('txtSize').value < 0 )
|
||||||
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
{
|
||||||
oActiveEl.type = GetE('txtType').value ;
|
alert( "Width must be a positive number." ) ;
|
||||||
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
GetE('txtSize').focus() ;
|
||||||
}
|
return false ;
|
||||||
|
}
|
||||||
oActiveEl.name = GetE('txtName').value ;
|
|
||||||
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
|
if ( !oActiveEl )
|
||||||
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
|
{
|
||||||
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
|
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
|
||||||
|
oActiveEl.type = GetE('txtType').value ;
|
||||||
return true ;
|
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
oActiveEl.name = GetE('txtName').value ;
|
||||||
</head>
|
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
|
||||||
<body style="OVERFLOW: hidden" scroll="no">
|
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
|
||||||
<table height="100%" width="100%">
|
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
|
||||||
<tr>
|
|
||||||
<td align="center">
|
return true ;
|
||||||
<table cellSpacing="0" cellPadding="0" border="0">
|
}
|
||||||
<tr>
|
|
||||||
<td>
|
</script>
|
||||||
<span fckLang="DlgTextName">Name</span><br>
|
</head>
|
||||||
<input id="txtName" type="text" size="20">
|
<body style="overflow: hidden">
|
||||||
</td>
|
<table width="100%" style="height: 100%">
|
||||||
<td></td>
|
<tr>
|
||||||
<td>
|
<td align="center">
|
||||||
<span fckLang="DlgTextValue">Value</span><br>
|
<table cellspacing="0" cellpadding="0" border="0">
|
||||||
<input id="txtValue" type="text" size="25">
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<span fcklang="DlgTextName">Name</span><br />
|
||||||
<tr>
|
<input id="txtName" type="text" size="20" />
|
||||||
<td>
|
</td>
|
||||||
<span fckLang="DlgTextCharWidth">Character Width</span><br>
|
<td>
|
||||||
<input id="txtSize" type="text" size="5">
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td></td>
|
<span fcklang="DlgTextValue">Value</span><br />
|
||||||
<td>
|
<input id="txtValue" type="text" size="25" />
|
||||||
<span fckLang="DlgTextMaxChars">Maximum Characters</span><br>
|
</td>
|
||||||
<input id="txtMax" type="text" size="5">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td>
|
||||||
<tr>
|
<span fcklang="DlgTextCharWidth">Character Width</span><br />
|
||||||
<td>
|
<input id="txtSize" type="text" size="5" />
|
||||||
<span fckLang="DlgTextType">Type</span><br>
|
</td>
|
||||||
<select id="txtType">
|
<td>
|
||||||
<option value="text" selected fckLang="DlgTextTypeText">Text</option>
|
</td>
|
||||||
<option value="password" fckLang="DlgTextTypePass">Password</option>
|
<td>
|
||||||
</select>
|
<span fcklang="DlgTextMaxChars">Maximum Characters</span><br />
|
||||||
</td>
|
<input id="txtMax" type="text" size="5" />
|
||||||
<td> </td>
|
</td>
|
||||||
<td></td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</td>
|
<span fcklang="DlgTextType">Type</span><br />
|
||||||
</tr>
|
<select id="txtType">
|
||||||
</table>
|
<option value="text" selected="selected" fcklang="DlgTextTypeText">Text</option>
|
||||||
</body>
|
<option value="password" fcklang="DlgTextTypePass">Password</option>
|
||||||
</html>
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 43 B |
@@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for internet
|
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
|
||||||
* For further information visit:
|
|
||||||
* http://www.fckeditor.net/
|
|
||||||
*
|
|
||||||
* "Support Open Source software. What about a donation today?"
|
|
||||||
*
|
|
||||||
* File Name: data.js
|
|
||||||
* Scripts for the fck_universalkey.html page.
|
|
||||||
* Definition des 104 caracteres en hexa unicode.
|
|
||||||
*
|
|
||||||
* File Authors:
|
|
||||||
* Michel Staelens (michel.staelens@wanadoo.fr)
|
|
||||||
* Abdul-Aziz Al-Oraij (top7up@hotmail.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
var Maj = new Array() ;
|
|
||||||
var Min = new Array() ;
|
|
||||||
|
|
||||||
Maj["Arabic"] ="0651|0021|0040|0023|0024|0025|005E|0026|002A|0029|0028|005F|002B|064E|064B|064F|064C|0625|0625|2018|00F7|00D7|061B|003C|003E|0650|064D|005D|005B|0623|0623|0640|060C|002F|003A|0022|007E|0652|007D|007B|0622|0622|2019|002C|002E|061F|007C|0020|0020|0020|0020|0020" ;
|
|
||||||
Min["Arabic"] ="0630|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0636|0635|062B|0642|0641|063A|0639|0647|062E|062D|062C|062F|0634|0633|064A|0628|0644|0627|062A|0646|0645|0643|0637|0626|0621|0624|0631|0644|0627|0649|0629|0648|0632|0638|005C|0020|0020|0020|0020" ;
|
|
||||||
Maj["Belarusian (C)"] ="0401|0021|0022|2116|003B|0025|003A|003F|002A|0028|0029|005F|002B|0419|0426|0423|041A|0415|041D|0413|0428|040E|0417|0425|0027|0424|042B|0412|0410|041F|0420|041E|041B|0414|0416|042D|042F|0427|0421|041C|0406|0422|042C|0411|042E|002C|0020|0020|0020|0020|0020|0020" ;
|
|
||||||
Min["Belarusian (C)"] ="0451|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0439|0446|0443|043A|0435|043D|0433|0448|045E|0437|0445|0027|0444|044B|0432|0430|043F|0440|043E|043B|0434|0436|044D|044F|0447|0441|043C|0456|0442|044C|0431|044E|002E|0020|0020|0020|0020|0020|0020" ;
|
|
||||||
Maj["Bulgarian (C)"] ="007E|0021|003F|002B|0022|0025|003D|003A|002F|005F|2116|0406|0056|044B|0423|0415|0418|0428|0429|041A|0421|0414|0417|0426|00A7|042C|042F|0410|041E|0416|0413|0422|041D|0412|041C|0427|042E|0419|042A|042D|0424|0425|041F|0420|041B|0411|0029|0020|0020|0020|0020|0020" ;
|
|
||||||
Min["Bulgarian (C)"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|002E|002C|0443|0435|0438|0448|0449|043A|0441|0434|0437|0446|003B|044C|044F|0430|043E|0436|0433|0442|043D|0432|043C|0447|044E|0439|044A|044D|0444|0445|043F|0440|043B|0431|0028|0020|0020|0020|0020|0020" ;
|
|
||||||
Maj["Croatian (L)"] ="00B8|0021|0022|0023|0024|0025|0026|002F|0028|0029|003D|003F|00A8|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0160|0110|0041|0053|0044|0046|0047|0048|004A|004B|004C|010C|0106|0059|0058|0043|0056|0042|004E|004D|017D|003B|003A|003C|003E|005F|002D|002A|002B" ;
|
|
||||||
Min["Croatian (L)"] ="00B8|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|00A8|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|0161|0111|0061|0073|0064|0066|0067|0068|006A|006B|006C|010D|0107|0079|0078|0063|0076|0062|006E|006D|017E|002C|002E|003C|003E|005F|002D|002A|002B" ;
|
|
||||||
Maj["Czech (L)"] ="00B0|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0025|02C7|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|002F|0028|0041|0053|0044|0046|0047|0048|004A|004B|004C|0022|0027|0059|0058|0043|0056|0042|004E|004D|003F|003A|005F|005B|007B|0021|0020|0148|010F" ;
|
|
||||||
Min["Czech (L)"] ="003B|002B|011B|0161|010D|0159|017E|00FD|00E1|00ED|00E9|003D|00B4|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00FA|0029|0061|0073|0064|0066|0067|0068|006A|006B|006C|016F|00A7|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|005D|007D|00A8|0040|00F3|0165" ;
|
|
||||||
Maj["Danish (L)"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00C6|00D8|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E" ;
|
|
||||||
Min["Danish (L)"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00E6|00F8|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040" ;
|
|
||||||
Maj["Farsi"] ="0020|0021|0040|0023|0024|0025|005E|0026|002A|0029|0028|005F|002B|0020|0020|0020|0020|0020|0020|0020|00F7|00D7|0020|007D|007B|0020|0020|005D|005B|0623|0622|0640|060C|061B|003A|0022|007E|0020|0020|0020|0020|0020|2019|003E|003C|061F|007C|0020|0020|0020|0020|0020"
|
|
||||||
Min["Farsi"] ="067E|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0636|0635|062B|0642|0641|063A|0639|0647|062E|062D|062C|0686|0634|0633|064A|0628|0644|0627|062A|0646|0645|0643|06AF|0638|0637|0632|0631|0630|062F|0621|0648|002E|002F|005C|0020|0020|0020|0020|0020"
|
|
||||||
Maj["Finnish (L)"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|004C|00D6|00C4|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E" ;
|
|
||||||
Min["Finnish (L)"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F6|00E4|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040" ;
|
|
||||||
Maj["French (L)"] ="0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|00B0|002B|0023|0041|005A|0045|0052|0054|0059|0055|0049|004F|0050|00A8|0025|0051|0053|0044|0046|0047|0048|004A|004B|004C|004D|00B5|0057|0058|0043|0056|0042|004E|003F|002E|002F|00A7|003C|005B|007B|00A3|007E|0020" ;
|
|
||||||
Min["French (L)"] ="0026|00E9|0022|0027|0028|002D|00E8|005F|00E7|00E0|0029|003D|0040|0061|007A|0065|0072|0074|0079|0075|0069|006F|0070|005E|00F9|0071|0073|0064|0066|0067|0068|006A|006B|006C|006D|002A|0077|0078|0063|0076|0062|006E|002C|003B|003A|0021|003E|005D|007D|0024|007E|0020" ;
|
|
||||||
Maj["Greek"] ="007E|0021|0040|0023|0024|0025|0390|0026|03B0|0028|0029|005F|002B|003A|03A3|0395|03A1|03A4|03A5|0398|0399|039F|03A0|0386|038F|0391|03A3|0394|03A6|0393|0397|039E|039A|039B|038C|0022|0396|03A7|03A8|03A9|0392|039D|039C|003C|003E|003F|0388|0389|038A|03AA|03AB|038E" ;
|
|
||||||
Min["Greek"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|003B|03C2|03B5|03C1|03C4|03C5|03B8|03B9|03BF|03C0|03AC|03CE|03B1|03C3|03B4|03C6|03B3|03B7|03BE|03BA|03BB|03CC|0027|03B6|03C7|03C8|03C9|03B2|03BD|03BC|002C|002E|002F|03AD|03AE|03AF|03CA|03CB|03CD" ;
|
|
||||||
Maj["Hebrew"] ="007E|0021|0040|0023|0024|0025|005E|0026|002A|0028|0029|005F|002B|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|007B|007D|0041|0053|0044|0046|0047|0048|004A|004B|004C|003A|0022|005A|0058|0043|0056|0042|004E|004D|003C|003E|003F|0020|0020|0020|0020|0020|0020" ;
|
|
||||||
Min["Hebrew"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|002F|0027|05E7|05E8|05D0|05D8|05D5|05DF|05DD|05E4|005B|005D|05E9|05D3|05D2|05DB|05E2|05D9|05D7|05DC|05DA|05E3|002C|05D6|05E1|05D1|05D4|05E0|05DE|05E6|05EA|05E5|002E|0020|0020|0020|0020|0020|0020" ;
|
|
||||||
Maj["Hungarian (L)"] ="00A7|0027|0022|002B|0021|0025|002F|003D|0028|0029|00ED|00DC|00D3|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0150|00DA|0041|0053|0044|0046|0047|0048|004A|004B|004C|00C9|00C1|0170|00CD|0059|0058|0043|0056|0042|004E|004D|003F|002E|003A|002D|005F|007B|007D" ;
|
|
||||||
Min["Hungarian (L)"] ="0030|0031|0032|0033|0034|0035|0036|0037|0038|0039|00F6|00FC|00F3|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|0151|00FA|0061|0073|0064|0066|0067|0068|006A|006B|006C|00E9|00E1|0171|00ED|0079|0078|0063|0076|0062|006E|006D|002C|002E|003A|002D|005F|007B|007D" ;
|
|
||||||
Maj["Diacritical (L)"] ="0060|00B4|005E|00A8|007E|00B0|00B7|00B8|00AF|02D9|02DB|02C7|02D8|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|00C6|02DD|0041|0053|0044|0046|0047|0048|004A|004B|004C|0141|0152|0059|0058|0043|0056|0042|004E|004D|01A0|01AF|00D8|0126|0110|0132|00DE|00D0|00DF" ;
|
|
||||||
Min["Diacritical (L)"] ="0060|00B4|005E|00A8|007E|00B0|00B7|00B8|00AF|02D9|02DB|02C7|02D8|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00E6|02DD|0061|0073|0064|0066|0067|0068|006A|006B|006C|0142|0153|0079|0078|0063|0076|0062|006E|006D|01A1|01B0|00F8|0127|0111|0133|00FE|00F0|00DF" ;
|
|
||||||
Maj["Macedonian (C)"] ="007E|0021|201E|201C|2019|0025|2018|0026|002A|0028|0029|005F|002B|0409|040A|0415|0420|0422|0405|0423|0418|041E|041F|0428|0403|0410|0421|0414|0424|0413|0425|0408|041A|041B|0427|040C|0401|0417|040F|0426|0412|0411|041D|041C|0416|003B|003A|003F|002A|005F|007B|007D" ;
|
|
||||||
Min["Macedonian (C)"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0459|045A|0435|0440|0442|0455|0443|0438|043E|043F|0448|0453|0430|0441|0434|0444|0433|0445|0458|043A|043B|0447|045C|0451|0437|045F|0446|0432|0431|043D|043C|0436|002C|002E|002F|0027|002D|005B|005D" ;
|
|
||||||
Maj["Norwegian (L)"] ="00A7|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|0060|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|00C5|005E|0041|0053|0044|0046|0047|0048|004A|004B|00D8|00C6|00C4|003E|005A|0058|0043|0056|0042|004E|004D|003B|003A|002A|005F|007B|007D|005C|007E" ;
|
|
||||||
Min["Norwegian (L)"] ="00BD|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00B4|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|00E5|00A8|0061|0073|0064|0066|0067|0068|006A|006B|00F8|00E6|00E4|003C|007A|0078|0063|0076|0062|006E|006D|002C|002E|0027|002D|005B|005D|007C|0040" ;
|
|
||||||
Maj["Polish (L)"] ="002A|0021|0022|0023|00A4|0025|0026|002F|0028|0029|003D|003F|017A|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0144|0107|0041|0053|0044|0046|0047|0048|004A|004B|004C|0141|0119|0059|0058|0043|0056|0042|004E|004D|003B|003A|005F|003C|005B|007B|02D9|00B4|02DB" ;
|
|
||||||
Min["Polish (L)"] ="0027|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002B|00F3|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|017C|015B|0061|0073|0064|0066|0067|0068|006A|006B|006C|0142|0105|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|003E|005D|007D|02D9|00B4|02DB" ;
|
|
||||||
Maj["Russian (C)"] ="0401|0021|0040|0023|2116|0025|005E|0026|002A|0028|0029|005F|002B|0419|0426|0423|041A|0415|041D|0413|0428|0429|0417|0425|042A|0424|042B|0412|0410|041F|0420|041E|041B|0414|0416|042D|042F|0427|0421|041C|0418|0422|042C|0411|042E|003E|002E|003A|0022|005B|005D|003F" ;
|
|
||||||
Min["Russian (C)"] ="0451|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0439|0446|0443|043A|0435|043D|0433|0448|0449|0437|0445|044A|0444|044B|0432|0430|043F|0440|043E|043B|0434|0436|044D|044F|0447|0441|043C|0438|0442|044C|0431|044E|003C|002C|003B|0027|007B|007D|002F" ;
|
|
||||||
Maj["Serbian (C)"] ="007E|0021|0022|0023|0024|0025|0026|002F|0028|0029|003D|003F|002A|0409|040A|0415|0420|0422|0417|0423|0418|041E|041F|0428|0402|0410|0421|0414|0424|0413|0425|0408|041A|041B|0427|040B|003E|0405|040F|0426|0412|0411|041D|041C|0416|003A|005F|002E|003A|0022|005B|005D" ;
|
|
||||||
Min["Serbian (C)"] ="0060|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|002B|0459|045A|0435|0440|0442|0437|0443|0438|043E|043F|0448|0452|0430|0441|0434|0444|0433|0445|0458|043A|043B|0447|045B|003C|0455|045F|0446|0432|0431|043D|043C|0436|002E|002D|002C|003B|0027|007B|007D" ;
|
|
||||||
Maj["Serbian (L)"] ="007E|0021|0022|0023|0024|0025|0026|002F|0028|0029|003D|003F|002A|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|0160|0110|0041|0053|0044|0046|0047|0048|004A|004B|004C|010C|0106|003E|0059|0058|0043|0056|0042|004E|004D|017D|003A|005F|002E|003A|0022|005B|005D" ;
|
|
||||||
Min["Serbian (L)"] ="201A|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|002B|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|0161|0111|0061|0073|0064|0066|0067|0068|006A|006B|006C|010D|0107|003C|0079|0078|0063|0076|0062|006E|006D|017E|002E|002D|002C|003B|0027|007B|007D" ;
|
|
||||||
Maj["Slovak (L)"] ="00B0|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0025|02C7|0051|0057|0045|0052|0054|005A|0055|0049|004F|0050|002F|0028|0041|0053|0044|0046|0047|0048|004A|004B|004C|0022|0021|0059|0058|0043|0056|0042|004E|004D|003F|003A|005F|003C|005B|010F|0029|002A|0020" ;
|
|
||||||
Min["Slovak (L)"] ="003B|002B|013E|0161|010D|0165|017E|00FD|00E1|00ED|00E9|003D|00B4|0071|0077|0065|0072|0074|007A|0075|0069|006F|0070|00FA|00E4|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F4|00A7|0079|0078|0063|0076|0062|006E|006D|002C|002E|002D|003E|005D|00F3|0148|0026|0020" ;
|
|
||||||
Maj["Spanish (L)"] ="00AA|0021|0022|00B7|0024|0025|0026|002F|0028|0029|003D|003F|00BF|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|005E|00A8|0041|0053|0044|0046|0047|0048|004A|004B|004C|00D1|00C7|005A|0058|0043|0056|0042|004E|004D|003B|003A|005F|003E|007C|0040|0023|007E|002A" ;
|
|
||||||
Min["Spanish (L)"] ="00BA|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|0027|00A1|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|0060|00B4|0061|0073|0064|0066|0067|0068|006A|006B|006C|00F1|00E7|007A|0078|0063|0076|0062|006E|006D|002C|002E|002D|003C|005C|0040|0023|007E|002B" ;
|
|
||||||
Maj["Ukrainian (C)"] ="0401|0021|0040|0023|2116|0025|005E|0026|002A|0028|0029|005F|002B|0419|0426|0423|041A|0415|041D|0413|0428|0429|0417|0425|0407|0424|0406|0412|0410|041F|0420|041E|041B|0414|0416|0404|0490|042F|0427|0421|041C|0418|0422|042C|0411|042E|002E|003A|0022|003C|003E|003F" ;
|
|
||||||
Min["Ukrainian (C)"] ="0451|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0439|0446|0443|043A|0435|043D|0433|0448|0449|0437|0445|0457|0444|0456|0432|0430|043F|0440|043E|043B|0434|0436|0454|0491|044F|0447|0441|043C|0438|0442|044C|0431|044E|002C|003B|0027|007B|007D|002F" ;
|
|
||||||
Maj["Vietnamese (L)"] ="007E|0021|0040|0023|0024|0025|005E|0026|002A|0028|0029|005F|002B|0051|0057|0045|0052|0054|0059|0055|0049|004F|0050|01AF|01A0|0041|0053|0044|0046|0047|0048|004A|004B|004C|0102|00C2|005A|0058|0043|0056|0042|004E|004D|00CA|00D4|0110|003C|003E|003F|007D|003A|0022" ;
|
|
||||||
Min["Vietnamese (L)"] ="20AB|0031|0032|0033|0034|0035|0036|0037|0038|0039|0030|002D|003D|0071|0077|0065|0072|0074|0079|0075|0069|006F|0070|01B0|01A1|0061|0073|0064|0066|0067|0068|006A|006B|006C|0103|00E2|007A|0078|0063|0076|0062|006E|006D|00EA|00F4|0111|002C|002E|002F|007B|003B|0027" ;
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for internet
|
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
|
||||||
* For further information visit:
|
|
||||||
* http://www.fckeditor.net/
|
|
||||||
*
|
|
||||||
* "Support Open Source software. What about a donation today?"
|
|
||||||
*
|
|
||||||
* File Name: diacritic.js
|
|
||||||
* Scripts for the fck_universalkey.html page.
|
|
||||||
*
|
|
||||||
* File Authors:
|
|
||||||
* Michel Staelens (michel.staelens@wanadoo.fr)
|
|
||||||
* Abdul-Aziz Al-Oraij (top7up@hotmail.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
var dia = new Array()
|
|
||||||
|
|
||||||
dia["0060"]=new Array();dia["00B4"]=new Array();dia["005E"]=new Array();dia["00A8"]=new Array();dia["007E"]=new Array();dia["00B0"]=new Array();dia["00B7"]=new Array();dia["00B8"]=new Array();dia["00AF"]=new Array();dia["02D9"]=new Array();dia["02DB"]=new Array();dia["02C7"]=new Array();dia["02D8"]=new Array();dia["02DD"]=new Array();dia["031B"]=new Array();
|
|
||||||
dia["0060"]["0061"]="00E0";dia["00B4"]["0061"]="00E1";dia["005E"]["0061"]="00E2";dia["00A8"]["0061"]="00E4";dia["007E"]["0061"]="00E3";dia["00B0"]["0061"]="00E5";dia["00AF"]["0061"]="0101";dia["02DB"]["0061"]="0105";dia["02D8"]["0061"]="0103";
|
|
||||||
dia["00B4"]["0063"]="0107";dia["005E"]["0063"]="0109";dia["00B8"]["0063"]="00E7";dia["02D9"]["0063"]="010B";dia["02C7"]["0063"]="010D";
|
|
||||||
dia["02C7"]["0064"]="010F";
|
|
||||||
dia["0060"]["0065"]="00E8";dia["00B4"]["0065"]="00E9";dia["005E"]["0065"]="00EA";dia["00A8"]["0065"]="00EB";dia["00AF"]["0065"]="0113";dia["02D9"]["0065"]="0117";dia["02DB"]["0065"]="0119";dia["02C7"]["0065"]="011B";dia["02D8"]["0065"]="0115";
|
|
||||||
dia["005E"]["0067"]="011D";dia["00B8"]["0067"]="0123";dia["02D9"]["0067"]="0121";dia["02D8"]["0067"]="011F";
|
|
||||||
dia["005E"]["0068"]="0125";
|
|
||||||
dia["0060"]["0069"]="00EC";dia["00B4"]["0069"]="00ED";dia["005E"]["0069"]="00EE";dia["00A8"]["0069"]="00EF";dia["007E"]["0069"]="0129";dia["00AF"]["0069"]="012B";dia["02DB"]["0069"]="012F";dia["02D8"]["0069"]="012D";
|
|
||||||
dia["005E"]["006A"]="0135";
|
|
||||||
dia["00B8"]["006B"]="0137";
|
|
||||||
dia["00B4"]["006C"]="013A";dia["00B7"]["006C"]="0140";dia["00B8"]["006C"]="013C";dia["02C7"]["006C"]="013E";
|
|
||||||
dia["00B4"]["006E"]="0144";dia["007E"]["006E"]="00F1";dia["00B8"]["006E"]="0146";dia["02D8"]["006E"]="0148";
|
|
||||||
dia["0060"]["006F"]="00F2";dia["00B4"]["006F"]="00F3";dia["005E"]["006F"]="00F4";dia["00A8"]["006F"]="00F6";dia["007E"]["006F"]="00F5";dia["00AF"]["006F"]="014D";dia["02D8"]["006F"]="014F";dia["02DD"]["006F"]="0151";dia["031B"]["006F"]="01A1";
|
|
||||||
dia["00B4"]["0072"]="0155";dia["00B8"]["0072"]="0157";dia["02C7"]["0072"]="0159";
|
|
||||||
dia["00B4"]["0073"]="015B";dia["005E"]["0073"]="015D";dia["00B8"]["0073"]="015F";dia["02C7"]["0073"]="0161";
|
|
||||||
dia["00B8"]["0074"]="0163";dia["02C7"]["0074"]="0165";
|
|
||||||
dia["0060"]["0075"]="00F9";dia["00B4"]["0075"]="00FA";dia["005E"]["0075"]="00FB";dia["00A8"]["0075"]="00FC";dia["007E"]["0075"]="0169";dia["00B0"]["0075"]="016F";dia["00AF"]["0075"]="016B";dia["02DB"]["0075"]="0173";dia["02D8"]["0075"]="016D";dia["02DD"]["0075"]="0171";dia["031B"]["0075"]="01B0";
|
|
||||||
dia["005E"]["0077"]="0175";
|
|
||||||
dia["00B4"]["0079"]="00FD";dia["005E"]["0079"]="0177";dia["00A8"]["0079"]="00FF";
|
|
||||||
dia["00B4"]["007A"]="017A";dia["02D9"]["007A"]="017C";dia["02C7"]["007A"]="017E";
|
|
||||||
dia["00B4"]["00E6"]="01FD";
|
|
||||||
dia["00B4"]["00F8"]="01FF";
|
|
||||||
dia["0060"]["0041"]="00C0";dia["00B4"]["0041"]="00C1";dia["005E"]["0041"]="00C2";dia["00A8"]["0041"]="00C4";dia["007E"]["0041"]="00C3";dia["00B0"]["0041"]="00C5";dia["00AF"]["0041"]="0100";dia["02DB"]["0041"]="0104";dia["02D8"]["0041"]="0102";
|
|
||||||
dia["00B4"]["0043"]="0106";dia["005E"]["0043"]="0108";dia["00B8"]["0043"]="00C7";dia["02D9"]["0043"]="010A";dia["02C7"]["0043"]="010C";
|
|
||||||
dia["02C7"]["0044"]="010E";
|
|
||||||
dia["0060"]["0045"]="00C8";dia["00B4"]["0045"]="00C9";dia["005E"]["0045"]="00CA";dia["00A8"]["0045"]="00CB";dia["00AF"]["0045"]="0112";dia["02D9"]["0045"]="0116";dia["02DB"]["0045"]="0118";dia["02C7"]["0045"]="011A";dia["02D8"]["0045"]="0114";
|
|
||||||
dia["005E"]["0047"]="011C";dia["00B8"]["0047"]="0122";dia["02D9"]["0047"]="0120";dia["02D8"]["0047"]="011E";
|
|
||||||
dia["005E"]["0048"]="0124";
|
|
||||||
dia["0060"]["0049"]="00CC";dia["00B4"]["0049"]="00CD";dia["005E"]["0049"]="00CE";dia["00A8"]["0049"]="00CF";dia["007E"]["0049"]="0128";dia["00AF"]["0049"]="012A";dia["02D9"]["0049"]="0130";dia["02DB"]["0049"]="012E";dia["02D8"]["0049"]="012C";
|
|
||||||
dia["005E"]["004A"]="0134";
|
|
||||||
dia["00B8"]["004B"]="0136";
|
|
||||||
dia["00B4"]["004C"]="0139";dia["00B7"]["004C"]="013F";dia["00B8"]["004C"]="013B";dia["02C7"]["004C"]="013D";
|
|
||||||
dia["00B4"]["004E"]="0143";dia["007E"]["004E"]="00D1";dia["00B8"]["004E"]="0145";dia["02D8"]["004E"]="0147";
|
|
||||||
dia["0060"]["004F"]="00D2";dia["00B4"]["004F"]="00D3";dia["005E"]["004F"]="00D4";dia["00A8"]["004F"]="00D6";dia["007E"]["004F"]="00D5";dia["00AF"]["004F"]="014C";dia["02D8"]["004F"]="014E";dia["02DD"]["004F"]="0150";dia["031B"]["004F"]="01A0";
|
|
||||||
dia["00B4"]["0052"]="0154";dia["00B8"]["0052"]="0156";dia["02C7"]["0052"]="0158";
|
|
||||||
dia["00B4"]["0053"]="015A";dia["005E"]["0053"]="015C";dia["00B8"]["0053"]="015E";dia["02C7"]["0053"]="0160";
|
|
||||||
dia["00B8"]["0054"]="0162";dia["02C7"]["0054"]="0164";
|
|
||||||
dia["0060"]["0055"]="00D9";dia["00B4"]["0055"]="00DA";dia["005E"]["0055"]="00DB";dia["00A8"]["0055"]="00DC";dia["007E"]["0055"]="0168";dia["00B0"]["0055"]="016E";dia["00AF"]["0055"]="016A";dia["02DB"]["0055"]="0172";dia["02D8"]["0055"]="016C";dia["02DD"]["0055"]="0170";dia["031B"]["0055"]="01AF";
|
|
||||||
dia["005E"]["0057"]="0174";
|
|
||||||
dia["00B4"]["0059"]="00DD";dia["005E"]["0059"]="0176";dia["00A8"]["0059"]="0178";
|
|
||||||
dia["00B4"]["005A"]="0179";dia["02D9"]["005A"]="017B";dia["02C7"]["005A"]="017D";
|
|
||||||
dia["00B4"]["00C6"]="01FC";
|
|
||||||
dia["00B4"]["00D8"]="01FE";
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for internet
|
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
|
||||||
* For further information visit:
|
|
||||||
* http://www.fckeditor.net/
|
|
||||||
*
|
|
||||||
* "Support Open Source software. What about a donation today?"
|
|
||||||
*
|
|
||||||
* File Name: dialogue.js
|
|
||||||
* Scripts for the fck_universalkey.html page.
|
|
||||||
*
|
|
||||||
* File Authors:
|
|
||||||
* Michel Staelens (michel.staelens@wanadoo.fr)
|
|
||||||
* Bernadette Cierzniak
|
|
||||||
* Abdul-Aziz Al-Oraij (top7up@hotmail.com)
|
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
||||||
*/
|
|
||||||
|
|
||||||
function afficher(txt)
|
|
||||||
{
|
|
||||||
document.getElementById( 'uni_area' ).value = txt ;
|
|
||||||
}
|
|
||||||
|
|
||||||
function rechercher()
|
|
||||||
{
|
|
||||||
return document.getElementById( 'uni_area' ).value ;
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for internet
|
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
|
||||||
* For further information visit:
|
|
||||||
* http://www.fckeditor.net/
|
|
||||||
*
|
|
||||||
* "Support Open Source software. What about a donation today?"
|
|
||||||
*
|
|
||||||
* File Name: fck_universalkey.css
|
|
||||||
* CSS styles for the Universal Keyboard.
|
|
||||||
*
|
|
||||||
* File Authors:
|
|
||||||
* Michel Staelens (michel.staelens@wanadoo.fr)
|
|
||||||
* Bernadette Cierzniak
|
|
||||||
* Abdul-Aziz Al-Oraij (top7up@hotmail.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
BODY, TEXTAREA, INPUT, TD, SELECT
|
|
||||||
{
|
|
||||||
font-family: Tahoma,verdana,arial,sans-serif;
|
|
||||||
}
|
|
||||||
DIV
|
|
||||||
{
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
.simple
|
|
||||||
{
|
|
||||||
font-size: 11pt;
|
|
||||||
}
|
|
||||||
.double
|
|
||||||
{
|
|
||||||
font-size: 9pt;
|
|
||||||
}
|
|
||||||
.simpledia
|
|
||||||
{
|
|
||||||
color: red;
|
|
||||||
font-size: 11pt;
|
|
||||||
}
|
|
||||||
.doubledia
|
|
||||||
{
|
|
||||||
color: red;
|
|
||||||
font-size: 9pt;
|
|
||||||
}
|
|
||||||
.action
|
|
||||||
{
|
|
||||||
color: white;
|
|
||||||
font-size: 7pt;
|
|
||||||
}
|
|
||||||
.clavier
|
|
||||||
{
|
|
||||||
color: blue;
|
|
||||||
font-size: 7pt;
|
|
||||||
}
|
|
||||||
.sign
|
|
||||||
{
|
|
||||||
color: gray;
|
|
||||||
font-size: 7pt;
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,309 +0,0 @@
|
|||||||
/*
|
|
||||||
* FCKeditor - The text editor for internet
|
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
|
||||||
*
|
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
|
||||||
* For further information visit:
|
|
||||||
* http://www.fckeditor.net/
|
|
||||||
*
|
|
||||||
* "Support Open Source software. What about a donation today?"
|
|
||||||
*
|
|
||||||
* File Name: multihexa.js
|
|
||||||
* Scripts for the fck_universalkey.html page.
|
|
||||||
* Definition des 104 caracteres en hexa unicode.
|
|
||||||
*
|
|
||||||
* File Authors:
|
|
||||||
* Michel Staelens (michel.staelens@wanadoo.fr)
|
|
||||||
* Bernadette Cierzniak
|
|
||||||
* Abdul-Aziz Al-Oraij (top7up@hotmail.com)
|
|
||||||
*/
|
|
||||||
|
|
||||||
var caps=0, lock=0, hexchars="0123456789ABCDEF", accent="0000", keydeb=0
|
|
||||||
var key=new Array();j=0;for (i in Maj){key[j]=i;j++}
|
|
||||||
var ns6=((!document.all)&&(document.getElementById))
|
|
||||||
var ie=document.all
|
|
||||||
|
|
||||||
var langue=getCk();
|
|
||||||
if (langue==""){
|
|
||||||
langue=key[keydeb]
|
|
||||||
}
|
|
||||||
CarMaj=Maj[langue].split("|");CarMin=Min[langue].split("|")
|
|
||||||
|
|
||||||
/*unikey*/
|
|
||||||
var posUniKeyLeft=0, posUniKeyTop=0
|
|
||||||
if (ns6){posUniKeyLeft=0;posUniKeyTop=60}
|
|
||||||
else if (ie){posUniKeyLeft=0;posUniKeyTop=60}
|
|
||||||
tracer("fond",posUniKeyLeft,posUniKeyTop,'<img src="fck_universalkey/keyboard_layout.gif" width=404 height=152 border="0"><br />',"sign")
|
|
||||||
/*touches*/
|
|
||||||
var posX=new Array(0,28,56,84,112,140,168,196,224,252,280,308,336,42,70,98,126,154,182,210,238,266,294,322,350,50,78,106,134,162,190,218,246,274,302,330,64,92,120,148,176,204,232,260,288,316,28,56,84,294,322,350)
|
|
||||||
var posY=new Array(14,14,14,14,14,14,14,14,14,14,14,14,14,42,42,42,42,42,42,42,42,42,42,42,42,70,70,70,70,70,70,70,70,70,70,70,98,98,98,98,98,98,98,98,98,98,126,126,126,126,126,126)
|
|
||||||
var nbTouches=52
|
|
||||||
for (i=0;i<nbTouches;i++){
|
|
||||||
CarMaj[i]=((CarMaj[i]!="0000")?(fromhexby4tocar(CarMaj[i])):"")
|
|
||||||
CarMin[i]=((CarMin[i]!="0000")?(fromhexby4tocar(CarMin[i])):"")
|
|
||||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
|
||||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
|
||||||
tracer("car"+i,posUniKeyLeft+6+posX[i],posUniKeyTop+3+posY[i],cecar,((dia[hexa(cecar)]!=null)?"simpledia":"simple"))
|
|
||||||
tracer("majus"+i,posUniKeyLeft+15+posX[i],posUniKeyTop+1+posY[i]," ","double")
|
|
||||||
tracer("minus"+i,posUniKeyLeft+3+posX[i],posUniKeyTop+9+posY[i]," ","double")
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
tracer("car"+i,posUniKeyLeft+6+posX[i],posUniKeyTop+3+posY[i]," ","simple")
|
|
||||||
cecar=CarMin[i]
|
|
||||||
tracer("minus"+i,posUniKeyLeft+3+posX[i],posUniKeyTop+9+posY[i],cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
|
||||||
cecar=CarMaj[i]
|
|
||||||
tracer("majus"+i,posUniKeyLeft+15+posX[i],posUniKeyTop+1+posY[i],cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*touches de fonctions*/
|
|
||||||
var actC1=new Array(0,371,364,0,378,0,358,0,344,0,112,378)
|
|
||||||
var actC2=new Array(0,0,14,42,42,70,70,98,98,126,126,126)
|
|
||||||
var actC3=new Array(32,403,403,39,403,47,403,61,403,25,291,403)
|
|
||||||
var actC4=new Array(11,11,39,67,67,95,95,123,123,151,151,151)
|
|
||||||
var act =new Array(" « KB"," KB » ","Delete","Clear","Back","Caps<br> Lock","Enter","Shift","Shift","<|<","Space",">|>")
|
|
||||||
var effet=new Array("keyscroll(-3)","keyscroll(3)","faire(\"del\")","RAZ()","faire(\"bck\")","bloq()","faire(\"\\n\")","haut()","haut()","faire(\"ar\")","faire(\" \")","faire(\"av\")")
|
|
||||||
var nbActions=12
|
|
||||||
for (i=0;i<nbActions;i++){
|
|
||||||
tracer("act"+i,posUniKeyLeft+1+actC1[i],posUniKeyTop-1+actC2[i],act[i],"action")
|
|
||||||
}
|
|
||||||
/*navigation*/
|
|
||||||
var keyC1=new Array(35,119,203,287)
|
|
||||||
var keyC2=new Array(0,0,0,0)
|
|
||||||
var keyC3=new Array(116,200,284,368)
|
|
||||||
var keyC4=new Array(11,11,11,11)
|
|
||||||
for (i=0;i<4;i++){
|
|
||||||
tracer("key"+i,posUniKeyLeft+5+keyC1[i],posUniKeyTop-1+keyC2[i],key[i],"unikey")
|
|
||||||
}
|
|
||||||
/*zones reactives*/
|
|
||||||
tracer("masque",posUniKeyLeft,posUniKeyTop,'<img src="fck_universalkey/00.gif" width=404 height=152 border="0" usemap="#unikey">')
|
|
||||||
document.write('<map name="unikey">')
|
|
||||||
for (i=0;i<nbTouches;i++){
|
|
||||||
document.write('<area coords="'+posX[i]+','+posY[i]+','+(posX[i]+25)+','+(posY[i]+25)+'" href=# onClick=\'javascript:ecrire('+i+')\'>')
|
|
||||||
}
|
|
||||||
for (i=0;i<nbActions;i++){
|
|
||||||
document.write('<area coords="'+actC1[i]+','+actC2[i]+','+actC3[i]+','+actC4[i]+'" href=# onClick=\'javascript:'+effet[i]+'\'>')
|
|
||||||
}
|
|
||||||
for (i=0;i<4;i++){
|
|
||||||
document.write('<area coords="'+keyC1[i]+','+keyC2[i]+','+keyC3[i]+','+keyC4[i]+'" onclick=\'javascript:charger('+i+')\'>')
|
|
||||||
}
|
|
||||||
document.write('</map>')
|
|
||||||
|
|
||||||
/*fonctions*/
|
|
||||||
function ecrire(i){
|
|
||||||
txt=rechercher()+"|";subtxt=txt.split("|")
|
|
||||||
ceci=(lock==1)?CarMaj[i]:((caps==1)?CarMaj[i]:CarMin[i])
|
|
||||||
if (test(ceci)){subtxt[0]+=cardia(ceci);distinguer(false)}
|
|
||||||
else if(dia[accent]!=null&&dia[hexa(ceci)]!=null){distinguer(false);accent=hexa(ceci);distinguer(true)}
|
|
||||||
else if(dia[accent]!=null){subtxt[0]+=fromhexby4tocar(accent)+ceci;distinguer(false)}
|
|
||||||
else if(dia[hexa(ceci)]!=null){accent=hexa(ceci);distinguer(true)}
|
|
||||||
else {subtxt[0]+=ceci}
|
|
||||||
txt=subtxt[0]+"|"+subtxt[1]
|
|
||||||
afficher(txt)
|
|
||||||
if (caps==1){caps=0;MinusMajus()}
|
|
||||||
}
|
|
||||||
function faire(ceci){
|
|
||||||
txt=rechercher()+"|";subtxt=txt.split("|")
|
|
||||||
l0=subtxt[0].length
|
|
||||||
l1=subtxt[1].length
|
|
||||||
c1=subtxt[0].substring(0,(l0-2))
|
|
||||||
c2=subtxt[0].substring(0,(l0-1))
|
|
||||||
c3=subtxt[1].substring(0,1)
|
|
||||||
c4=subtxt[1].substring(0,2)
|
|
||||||
c5=subtxt[0].substring((l0-2),l0)
|
|
||||||
c6=subtxt[0].substring((l0-1),l0)
|
|
||||||
c7=subtxt[1].substring(1,l1)
|
|
||||||
c8=subtxt[1].substring(2,l1)
|
|
||||||
if(dia[accent]!=null){if(ceci==" "){ceci=fromhexby4tocar(accent)}distinguer(false)}
|
|
||||||
switch (ceci){
|
|
||||||
case("av") :if(escape(c4)!="%0D%0A"){txt=subtxt[0]+c3+"|"+c7}else{txt=subtxt[0]+c4+"|"+c8}break
|
|
||||||
case("ar") :if(escape(c5)!="%0D%0A"){txt=c2+"|"+c6+subtxt[1]}else{txt=c1+"|"+c5+subtxt[1]}break
|
|
||||||
case("bck"):if(escape(c5)!="%0D%0A"){txt=c2+"|"+subtxt[1]}else{txt=c1+"|"+subtxt[1]}break
|
|
||||||
case("del"):if(escape(c4)!="%0D%0A"){txt=subtxt[0]+"|"+c7}else{txt=subtxt[0]+"|"+c8}break
|
|
||||||
default:txt=subtxt[0]+ceci+"|"+subtxt[1];break
|
|
||||||
}
|
|
||||||
afficher(txt)
|
|
||||||
}
|
|
||||||
function RAZ(){txt="";if(dia[accent]!=null){distinguer(false)}afficher(txt)}
|
|
||||||
function haut(){caps=1;MinusMajus()}
|
|
||||||
function bloq(){lock=(lock==1)?0:1;MinusMajus()}
|
|
||||||
|
|
||||||
/*fonctions de traitement du unikey*/
|
|
||||||
function tracer(nom,gauche,haut,ceci,classe){ceci="<span class="+classe+">"+ceci+"</span>";document.write('<div id="'+nom+'" >'+ceci+'</div>');if (ns6){document.getElementById(nom).style.left=gauche+"px";document.getElementById(nom).style.top=haut+"px";}else if (ie){document.all(nom).style.left=gauche;document.all(nom).style.top=haut}}
|
|
||||||
function retracer(nom,ceci,classe){ceci="<span class="+classe+">"+ceci+"</span>";if (ns6){document.getElementById(nom).innerHTML=ceci}else if (ie){doc=document.all(nom);doc.innerHTML=ceci}}
|
|
||||||
function keyscroll(n){
|
|
||||||
keydeb+=n
|
|
||||||
if (keydeb<0){
|
|
||||||
keydeb=0
|
|
||||||
}
|
|
||||||
if (keydeb>key.length-4){
|
|
||||||
keydeb=key.length-4
|
|
||||||
}
|
|
||||||
for (i=keydeb;i<keydeb+4;i++){
|
|
||||||
retracer("key"+(i-keydeb),key[i],"unikey")
|
|
||||||
}
|
|
||||||
if (keydeb==0){
|
|
||||||
retracer("act0"," ","action")
|
|
||||||
}else {
|
|
||||||
retracer("act0",act[0],"action")
|
|
||||||
}
|
|
||||||
if (keydeb==key.length-4){
|
|
||||||
retracer("act1"," ","action")
|
|
||||||
}else {
|
|
||||||
retracer("act1",act[1],"action")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function charger(i){
|
|
||||||
langue=key[i+keydeb];setCk(langue);accent="0000"
|
|
||||||
CarMaj=Maj[langue].split("|");CarMin=Min[langue].split("|")
|
|
||||||
for (i=0;i<nbTouches;i++){
|
|
||||||
CarMaj[i]=((CarMaj[i]!="0000")?(fromhexby4tocar(CarMaj[i])):"")
|
|
||||||
CarMin[i]=((CarMin[i]!="0000")?(fromhexby4tocar(CarMin[i])):"")
|
|
||||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
|
||||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
|
||||||
retracer("car"+i,cecar,((dia[hexa(cecar)]!=null)?"simpledia":"simple"))
|
|
||||||
retracer("minus"+i," ")
|
|
||||||
retracer("majus"+i," ")
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
retracer("car"+i," ")
|
|
||||||
cecar=CarMin[i]
|
|
||||||
retracer("minus"+i,cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
|
||||||
cecar=CarMaj[i]
|
|
||||||
retracer("majus"+i,cecar,((dia[hexa(cecar)]!=null)?"doubledia":"double"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function distinguer(oui){
|
|
||||||
for (i=0;i<nbTouches;i++){
|
|
||||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
|
||||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
|
||||||
if(test(cecar)){retracer("car"+i,oui?(cardia(cecar)):cecar,oui?"simpledia":"simple")}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
cecar=CarMin[i]
|
|
||||||
if(test(cecar)){retracer("minus"+i,oui?(cardia(cecar)):cecar,oui?"doubledia":"double")}
|
|
||||||
cecar=CarMaj[i]
|
|
||||||
if(test(cecar)){retracer("majus"+i,oui?(cardia(cecar)):cecar,oui?"doubledia":"double")}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!oui){accent="0000"}
|
|
||||||
}
|
|
||||||
function MinusMajus(){
|
|
||||||
for (i=0;i<nbTouches;i++){
|
|
||||||
if (CarMaj[i]==CarMin[i].toUpperCase()){
|
|
||||||
cecar=((lock==0)&&(caps==0)?CarMin[i]:CarMaj[i])
|
|
||||||
retracer("car"+i,(test(cecar)?cardia(cecar):cecar),((dia[hexa(cecar)]!=null||test(cecar))?"simpledia":"simple"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function test(cecar){return(dia[accent]!=null&&dia[accent][hexa(cecar)]!=null)}
|
|
||||||
function cardia(cecar){return(fromhexby4tocar(dia[accent][hexa(cecar)]))}
|
|
||||||
function fromhex(inval){out=0;for (a=inval.length-1;a>=0;a--){out+=Math.pow(16,inval.length-a-1)*hexchars.indexOf(inval.charAt(a))}return out}
|
|
||||||
function fromhexby4tocar(ceci){out4=new String();for (l=0;l<ceci.length;l+=4){out4+=String.fromCharCode(fromhex(ceci.substring(l,l+4)))}return out4}
|
|
||||||
function tohex(inval){return hexchars.charAt(inval/16)+hexchars.charAt(inval%16)}
|
|
||||||
function tohex2(inval){return tohex(inval/256)+tohex(inval%256)}
|
|
||||||
function hexa(ceci){out="";for (k=0;k<ceci.length;k++){out+=(tohex2(ceci.charCodeAt(k)))}return out}
|
|
||||||
function getCk(){
|
|
||||||
fromN=document.cookie.indexOf("langue=")+0;
|
|
||||||
if((fromN)!=-1){
|
|
||||||
fromN+=7;
|
|
||||||
toN=document.cookie.indexOf(";",fromN)+0;
|
|
||||||
if(toN==-1){
|
|
||||||
toN=document.cookie.length
|
|
||||||
}
|
|
||||||
return unescape(document.cookie.substring(fromN,toN))
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
function setCk(inval){
|
|
||||||
if(inval!=null){
|
|
||||||
exp=new Date();
|
|
||||||
time=365*60*60*24*1000;
|
|
||||||
exp.setTime(exp.getTime()+time);
|
|
||||||
document.cookie=escape("langue")+"="+escape(inval)+"; "+"expires="+exp.toGMTString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Arabic Keystroke Translator
|
|
||||||
function arkey(e) {
|
|
||||||
if ((document.layers)|(navigator.userAgent.indexOf("MSIE 4")>-1)|(langue!="Arabic")) return true;
|
|
||||||
|
|
||||||
if (!e) var e = window.event;
|
|
||||||
if (e.keyCode) keyCode = e.keyCode;
|
|
||||||
else if (e.which) keyCode = e.which;
|
|
||||||
var character = String.fromCharCode(keyCode);
|
|
||||||
|
|
||||||
entry = true;
|
|
||||||
cont=e.srcElement || e.currentTarget || e.target;
|
|
||||||
if (keyCode>64 && keyCode<91) {
|
|
||||||
entry=false;
|
|
||||||
source='ش لاؤ ي ث ب ل ا ه ت ن م ة ى خ ح ض ق س ف ع ر ص ء غ ئ ';
|
|
||||||
shsource='ِ لآ} ] ُ [ لأأ ÷ ـ ، / آ × ؛ َ ٌ ٍ لإ { ً ْ إ ~';
|
|
||||||
|
|
||||||
if (e.shiftKey) cont.value += shsource.substr((keyCode-64)*2-2,2);
|
|
||||||
else
|
|
||||||
cont.value += source.substr((keyCode-64)*2-2,2);
|
|
||||||
if (cont.value.substr(cont.value.length-1,1)==' ') cont.value=cont.value.substr(0,cont.value.length-1);
|
|
||||||
}
|
|
||||||
if (e.shiftKey) {
|
|
||||||
if (keyCode==186) {cont.value += ':';entry=false;}
|
|
||||||
if (keyCode==188) {cont.value += ',';entry=false;}
|
|
||||||
if (keyCode==190) {cont.value += '.';entry=false;}
|
|
||||||
if (keyCode==191) {cont.value += '؟';entry=false;}
|
|
||||||
if (keyCode==192) {cont.value += 'ّ';entry=false;}
|
|
||||||
if (keyCode==219) {cont.value += '<';entry=false;}
|
|
||||||
if (keyCode==221) {cont.value += '>';entry=false;}
|
|
||||||
} else {
|
|
||||||
if (keyCode==186||keyCode==59) {cont.value += 'ك';entry=false;}
|
|
||||||
if (keyCode==188) {cont.value += 'و';entry=false;}
|
|
||||||
if (keyCode==190) {cont.value += 'ز';entry=false;}
|
|
||||||
if (keyCode==191) {cont.value += 'ظ';entry=false;}
|
|
||||||
if (keyCode==192) {cont.value += 'ذ';entry=false;}
|
|
||||||
if (keyCode==219) {cont.value += 'ج';entry=false;}
|
|
||||||
if (keyCode==221) {cont.value += 'د';entry=false;}
|
|
||||||
if (keyCode==222) {cont.value += 'ط';entry=false;}
|
|
||||||
}
|
|
||||||
return entry;
|
|
||||||
}
|
|
||||||
function hold_it(e){
|
|
||||||
if ((document.layers)|(navigator.userAgent.indexOf("MSIE 4")>-1)|(langue!="Arabic")) return true;
|
|
||||||
|
|
||||||
var keyCode;
|
|
||||||
if (!e) var e = window.event;
|
|
||||||
if (e.keyCode) keyCode = e.keyCode;
|
|
||||||
else if (e.which) keyCode = e.which;
|
|
||||||
var character = String.fromCharCode(keyCode);
|
|
||||||
switch(keyCode){
|
|
||||||
case 186:
|
|
||||||
case 188:
|
|
||||||
case 190:
|
|
||||||
case 191:
|
|
||||||
case 192:
|
|
||||||
case 219:
|
|
||||||
case 221:
|
|
||||||
case 222:
|
|
||||||
case 116:
|
|
||||||
case 59:
|
|
||||||
case 47:
|
|
||||||
case 46:
|
|
||||||
case 44:
|
|
||||||
case 39:
|
|
||||||
return false;
|
|
||||||
case 92:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (keyCode<63) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var obj = document.getElementById( 'uni_area' );
|
|
||||||
if ( obj && langue=="Arabic"){
|
|
||||||
with (navigator) {
|
|
||||||
if (appName=="Netscape")
|
|
||||||
obj.onkeypress = hold_it;
|
|
||||||
}
|
|
||||||
obj.onkeydown = arkey;
|
|
||||||
}
|
|
||||||
// Arabic Keystroke Translator End
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head><title></title></head>
|
|
||||||
<body></body>
|
|
||||||
</html>
|
|
||||||
@@ -1,111 +1,157 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fckdebug.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the Debug window.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* It automatically popups if the Debug = true in the configuration file.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
*
|
||||||
<head>
|
* File Name: fckdebug.html
|
||||||
<title>FCKeditor Debug Window</title>
|
* This is the Debug window.
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* It automatically popups if the Debug = true in the configuration file.
|
||||||
<script type="text/javascript">
|
*
|
||||||
|
* File Authors:
|
||||||
var oWindow ;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var oDiv ;
|
-->
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
if ( !window.FCKMessages )
|
<head>
|
||||||
window.FCKMessages = new Array() ;
|
<title>FCKeditor Debug Window</title>
|
||||||
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
window.onload = function()
|
<script type="text/javascript">
|
||||||
{
|
|
||||||
oWindow = document.getElementById('xOutput').contentWindow ;
|
var oWindow ;
|
||||||
oWindow.document.open() ;
|
var oDiv ;
|
||||||
oWindow.document.write( '<div id="divMsg"><\/div>' ) ;
|
|
||||||
oWindow.document.close() ;
|
if ( !window.FCKMessages )
|
||||||
oDiv = oWindow.document.getElementById('divMsg') ;
|
window.FCKMessages = new Array() ;
|
||||||
}
|
|
||||||
|
window.onload = function()
|
||||||
function Output( message, color )
|
{
|
||||||
{
|
oWindow = document.getElementById('xOutput').contentWindow ;
|
||||||
if ( color )
|
oWindow.document.open() ;
|
||||||
message = '<font color="' + color + '">' + message + '<\/font>' ;
|
oWindow.document.write( '<div id="divMsg"><\/div>' ) ;
|
||||||
|
oWindow.document.close() ;
|
||||||
window.FCKMessages[ window.FCKMessages.length ] = message ;
|
oDiv = oWindow.document.getElementById('divMsg') ;
|
||||||
StartTimer() ;
|
}
|
||||||
}
|
|
||||||
|
function Output( message, color, noParse )
|
||||||
function StartTimer()
|
{
|
||||||
{
|
if ( !noParse && message != null && isNaN( message ) )
|
||||||
window.setTimeout( 'CheckMessages()', 100 ) ;
|
message = message.replace(/</g, "<") ;
|
||||||
}
|
|
||||||
|
if ( color )
|
||||||
function CheckMessages()
|
message = '<font color="' + color + '">' + message + '<\/font>' ;
|
||||||
{
|
|
||||||
if ( window.FCKMessages.length > 0 )
|
window.FCKMessages[ window.FCKMessages.length ] = message ;
|
||||||
{
|
StartTimer() ;
|
||||||
// Get the first item in the queue
|
}
|
||||||
var sMessage = window.FCKMessages[0] ;
|
|
||||||
|
function OutputObject( anyObject, color )
|
||||||
// Removes the first item from the queue
|
{
|
||||||
var oTempArray = new Array() ;
|
var message ;
|
||||||
for ( i = 1 ; i < window.FCKMessages.length ; i++ )
|
|
||||||
oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
|
if ( anyObject != null )
|
||||||
window.FCKMessages = oTempArray ;
|
{
|
||||||
|
message = 'Properties of: ' + anyObject + '</b><blockquote>' ;
|
||||||
var d = new Date() ;
|
|
||||||
var sTime =
|
for (var prop in anyObject)
|
||||||
( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' +
|
{
|
||||||
( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' +
|
try
|
||||||
( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' +
|
{
|
||||||
( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
|
var sVal = anyObject[ prop ] != null ? anyObject[ prop ] + '' : '[null]' ;
|
||||||
|
message += '<b>' + prop + '</b> : ' + sVal.replace(/</g, '<') + '<br>' ;
|
||||||
var oMsgDiv = oWindow.document.createElement( 'div' ) ;
|
}
|
||||||
oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ;
|
catch (e)
|
||||||
oDiv.appendChild( oMsgDiv ) ;
|
{
|
||||||
oMsgDiv.scrollIntoView() ;
|
try
|
||||||
}
|
{
|
||||||
}
|
message += '<b>' + prop + '</b> : [' + typeof( anyObject[ prop ] ) + ']<br>' ;
|
||||||
|
}
|
||||||
function Clear()
|
catch (e)
|
||||||
{
|
{
|
||||||
oDiv.innerHTML = '' ;
|
message += '<b>' + prop + '</b> : [-error-]<br>' ;
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
</head>
|
}
|
||||||
<body style="margin: 10px">
|
|
||||||
<table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0">
|
message += '</blockquote><b>' ;
|
||||||
<tr>
|
} else
|
||||||
<td>
|
message = 'OutputObject : Object is "null".' ;
|
||||||
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
|
||||||
<tr>
|
Output( message, color, true ) ;
|
||||||
<td style="font-weight: bold; font-size: 1.2em;">
|
}
|
||||||
FCKeditor Debug Window</td>
|
|
||||||
<td align="right">
|
function StartTimer()
|
||||||
<input type="button" value="Clear" onclick="Clear();" /></td>
|
{
|
||||||
</tr>
|
window.setTimeout( 'CheckMessages()', 100 ) ;
|
||||||
</table>
|
}
|
||||||
</td>
|
|
||||||
</tr>
|
function CheckMessages()
|
||||||
<tr style="height: 100%">
|
{
|
||||||
<td style="border: #696969 1px solid">
|
if ( window.FCKMessages.length > 0 )
|
||||||
<iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="fckblank.html"
|
{
|
||||||
frameborder="0"></iframe>
|
// Get the first item in the queue
|
||||||
</td>
|
var sMessage = window.FCKMessages[0] ;
|
||||||
</tr>
|
|
||||||
</table>
|
// Removes the first item from the queue
|
||||||
</body>
|
var oTempArray = new Array() ;
|
||||||
</html>
|
for ( i = 1 ; i < window.FCKMessages.length ; i++ )
|
||||||
|
oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
|
||||||
|
window.FCKMessages = oTempArray ;
|
||||||
|
|
||||||
|
var d = new Date() ;
|
||||||
|
var sTime =
|
||||||
|
( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' +
|
||||||
|
( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' +
|
||||||
|
( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' +
|
||||||
|
( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
|
||||||
|
|
||||||
|
var oMsgDiv = oWindow.document.createElement( 'div' ) ;
|
||||||
|
oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ;
|
||||||
|
oDiv.appendChild( oMsgDiv ) ;
|
||||||
|
oMsgDiv.scrollIntoView() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Clear()
|
||||||
|
{
|
||||||
|
oDiv.innerHTML = '' ;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body style="margin: 10px">
|
||||||
|
<table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="font-weight: bold; font-size: 1.2em;">
|
||||||
|
FCKeditor Debug Window</td>
|
||||||
|
<td align="right">
|
||||||
|
<input type="button" value="Clear" onclick="Clear();" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="height: 100%">
|
||||||
|
<td style="border: #696969 1px solid">
|
||||||
|
<iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="javascript:void(0)"
|
||||||
|
frameborder="0"></iframe>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,319 +1,327 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fckdialog.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This page is used by all dialog box as the container.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
* File Name: fckdialog.html
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* This page is used by all dialog box as the container.
|
||||||
<script type="text/javascript">
|
*
|
||||||
|
* File Authors:
|
||||||
// On some Gecko browsers (probably over slow connections) the
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
// "dialogArguments" are not set so we must get it from the opener window.
|
-->
|
||||||
if ( !window.dialogArguments )
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
window.dialogArguments = window.opener.FCKLastDialogInfo ;
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
// Sets the Skin CSS
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
document.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
// Sets the language direction.
|
// On some Gecko browsers (probably over slow connections) the
|
||||||
window.document.dir = window.dialogArguments.Editor.FCKLang.Dir ;
|
// "dialogArguments" are not set so we must get it from the opener window.
|
||||||
|
if ( !window.dialogArguments )
|
||||||
var sTitle = window.dialogArguments.Title ;
|
window.dialogArguments = window.opener.FCKLastDialogInfo ;
|
||||||
document.write( '<title>' + sTitle + '<\/title>' ) ;
|
|
||||||
|
// Sets the Skin CSS
|
||||||
function LoadInnerDialog()
|
document.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
||||||
{
|
|
||||||
// The following value is set, so the editor can check that the dialog has been correctly opened.
|
// Sets the language direction.
|
||||||
window.setTimeout( function() { window.returnValue = true ; }, 100 ) ;
|
window.document.dir = window.dialogArguments.Editor.FCKLang.Dir ;
|
||||||
|
|
||||||
if ( window.onresize )
|
var sTitle = window.dialogArguments.Title ;
|
||||||
window.onresize() ;
|
document.write( '<title>' + sTitle + '<\/title>' ) ;
|
||||||
|
|
||||||
// First of all, translate the dialog box contents.
|
function LoadInnerDialog()
|
||||||
window.dialogArguments.Editor.FCKLanguageManager.TranslatePage( document ) ;
|
{
|
||||||
|
if ( window.onresize )
|
||||||
window.frames["frmMain"].document.location.href = window.dialogArguments.Page ;
|
window.onresize() ;
|
||||||
}
|
|
||||||
|
// First of all, translate the dialog box contents.
|
||||||
function InnerDialogLoaded()
|
window.dialogArguments.Editor.FCKLanguageManager.TranslatePage( document ) ;
|
||||||
{
|
|
||||||
var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
|
window.frames["frmMain"].document.location.href = window.dialogArguments.Page ;
|
||||||
|
}
|
||||||
// Set the language direction.
|
|
||||||
oInnerDoc.dir = window.dialogArguments.Editor.FCKLang.Dir ;
|
function InnerDialogLoaded()
|
||||||
|
{
|
||||||
// Sets the Skin CSS.
|
var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
|
||||||
oInnerDoc.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
|
||||||
|
// Set the language direction.
|
||||||
SetOnKeyDown( oInnerDoc ) ;
|
oInnerDoc.dir = window.dialogArguments.Editor.FCKLang.Dir ;
|
||||||
DisableContextMenu( oInnerDoc ) ;
|
|
||||||
|
// Sets the Skin CSS.
|
||||||
return window.dialogArguments.Editor ;
|
oInnerDoc.write( '<link href="' + window.dialogArguments.Editor.FCKConfig.SkinPath + 'fck_dialog.css" type="text/css" rel="stylesheet">' ) ;
|
||||||
}
|
|
||||||
|
SetOnKeyDown( oInnerDoc ) ;
|
||||||
function SetOkButton( showIt )
|
DisableContextMenu( oInnerDoc ) ;
|
||||||
{
|
|
||||||
document.getElementById('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ;
|
return window.dialogArguments.Editor ;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bAutoSize = false ;
|
function SetOkButton( showIt )
|
||||||
|
{
|
||||||
function SetAutoSize( autoSize )
|
document.getElementById('btnOk').style.visibility = ( showIt ? '' : 'hidden' ) ;
|
||||||
{
|
}
|
||||||
bAutoSize = autoSize ;
|
|
||||||
RefreshSize() ;
|
var bAutoSize = false ;
|
||||||
}
|
|
||||||
|
function SetAutoSize( autoSize )
|
||||||
function RefreshSize()
|
{
|
||||||
{
|
bAutoSize = autoSize ;
|
||||||
if ( bAutoSize )
|
RefreshSize() ;
|
||||||
{
|
}
|
||||||
var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
|
|
||||||
|
function RefreshSize()
|
||||||
var iFrameHeight ;
|
{
|
||||||
if ( document.all )
|
if ( bAutoSize )
|
||||||
iFrameHeight = oInnerDoc.body.offsetHeight ;
|
{
|
||||||
else
|
var oInnerDoc = document.getElementById('frmMain').contentWindow.document ;
|
||||||
iFrameHeight = document.getElementById('frmMain').contentWindow.innerHeight ;
|
|
||||||
|
var iFrameHeight ;
|
||||||
var iInnerHeight = oInnerDoc.body.scrollHeight ;
|
if ( document.all )
|
||||||
|
iFrameHeight = oInnerDoc.body.offsetHeight ;
|
||||||
var iDiff = iInnerHeight - iFrameHeight ;
|
else
|
||||||
|
iFrameHeight = document.getElementById('frmMain').contentWindow.innerHeight ;
|
||||||
if ( iDiff > 0 )
|
|
||||||
{
|
var iInnerHeight = oInnerDoc.body.scrollHeight ;
|
||||||
if ( document.all )
|
|
||||||
window.dialogHeight = ( parseInt( window.dialogHeight ) + iDiff ) + 'px' ;
|
var iDiff = iInnerHeight - iFrameHeight ;
|
||||||
else
|
|
||||||
window.resizeBy( 0, iDiff ) ;
|
if ( iDiff > 0 )
|
||||||
}
|
{
|
||||||
}
|
if ( document.all )
|
||||||
}
|
window.dialogHeight = ( parseInt( window.dialogHeight, 10 ) + iDiff ) + 'px' ;
|
||||||
|
else
|
||||||
function Ok()
|
window.resizeBy( 0, iDiff ) ;
|
||||||
{
|
}
|
||||||
if ( window.frames["frmMain"].Ok && window.frames["frmMain"].Ok() )
|
}
|
||||||
Cancel() ;
|
}
|
||||||
}
|
|
||||||
|
function Ok()
|
||||||
function Cancel()
|
{
|
||||||
{
|
if ( window.frames["frmMain"].Ok && window.frames["frmMain"].Ok() )
|
||||||
// All dialog windows will fire the "OnSelectionChange" event, not matter
|
Cancel() ;
|
||||||
// the Ok or Cancel button have being pressed.
|
}
|
||||||
window.dialogArguments.Editor.FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
|
||||||
window.close() ;
|
function Cancel( dontFireChange )
|
||||||
}
|
{
|
||||||
|
if ( !dontFireChange )
|
||||||
// Object that holds all available tabs.
|
{
|
||||||
var oTabs = new Object() ;
|
// All dialog windows, by default, will fire the "OnSelectionChange"
|
||||||
|
// event, no matter the Ok or Cancel button has been pressed.
|
||||||
function TabDiv_OnClick()
|
window.dialogArguments.Editor.FCK.Events.FireEvent( 'OnSelectionChange' ) ;
|
||||||
{
|
}
|
||||||
SetSelectedTab( this.TabCode ) ;
|
window.close() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddTab( tabCode, tabText, startHidden )
|
// Object that holds all available tabs.
|
||||||
{
|
var oTabs = new Object() ;
|
||||||
if ( typeof( oTabs[ tabCode ] ) != 'undefined' )
|
|
||||||
return ;
|
function TabDiv_OnClick()
|
||||||
|
{
|
||||||
var eTabsRow = document.getElementById( 'Tabs' ) ;
|
SetSelectedTab( this.TabCode ) ;
|
||||||
|
}
|
||||||
var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ;
|
|
||||||
oCell.noWrap = true ;
|
function AddTab( tabCode, tabText, startHidden )
|
||||||
|
{
|
||||||
var oDiv = document.createElement( 'DIV' ) ;
|
if ( typeof( oTabs[ tabCode ] ) != 'undefined' )
|
||||||
oDiv.className = 'PopupTab' ;
|
return ;
|
||||||
oDiv.innerHTML = tabText ;
|
|
||||||
oDiv.TabCode = tabCode ;
|
var eTabsRow = document.getElementById( 'Tabs' ) ;
|
||||||
oDiv.onclick = TabDiv_OnClick ;
|
|
||||||
|
var oCell = eTabsRow.insertCell( eTabsRow.cells.length - 1 ) ;
|
||||||
if ( startHidden )
|
oCell.noWrap = true ;
|
||||||
oDiv.style.display = 'none' ;
|
|
||||||
|
var oDiv = document.createElement( 'DIV' ) ;
|
||||||
eTabsRow = document.getElementById( 'TabsRow' ) ;
|
oDiv.className = 'PopupTab' ;
|
||||||
|
oDiv.innerHTML = tabText ;
|
||||||
oCell.appendChild( oDiv ) ;
|
oDiv.TabCode = tabCode ;
|
||||||
|
oDiv.onclick = TabDiv_OnClick ;
|
||||||
if ( eTabsRow.style.display == 'none' )
|
|
||||||
{
|
if ( startHidden )
|
||||||
var eTitleArea = document.getElementById( 'TitleArea' ) ;
|
oDiv.style.display = 'none' ;
|
||||||
eTitleArea.className = 'PopupTitle' ;
|
|
||||||
|
eTabsRow = document.getElementById( 'TabsRow' ) ;
|
||||||
oDiv.className = 'PopupTabSelected' ;
|
|
||||||
eTabsRow.style.display = '' ;
|
oCell.appendChild( oDiv ) ;
|
||||||
|
|
||||||
if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
if ( eTabsRow.style.display == 'none' )
|
||||||
window.onresize() ;
|
{
|
||||||
}
|
var eTitleArea = document.getElementById( 'TitleArea' ) ;
|
||||||
|
eTitleArea.className = 'PopupTitle' ;
|
||||||
oTabs[ tabCode ] = oDiv ;
|
|
||||||
oTabs[ tabCode ].Index = oTabs.length - 1 ;
|
oDiv.className = 'PopupTabSelected' ;
|
||||||
}
|
eTabsRow.style.display = '' ;
|
||||||
|
|
||||||
function SetSelectedTab( tabCode )
|
if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
||||||
{
|
window.onresize() ;
|
||||||
for ( var sCode in oTabs )
|
}
|
||||||
{
|
|
||||||
if ( sCode == tabCode )
|
oTabs[ tabCode ] = oDiv ;
|
||||||
oTabs[sCode].className = 'PopupTabSelected' ;
|
}
|
||||||
else
|
|
||||||
oTabs[sCode].className = 'PopupTab' ;
|
function SetSelectedTab( tabCode )
|
||||||
}
|
{
|
||||||
|
for ( var sCode in oTabs )
|
||||||
if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' )
|
{
|
||||||
window.frames["frmMain"].OnDialogTabChange( tabCode ) ;
|
if ( sCode == tabCode )
|
||||||
}
|
oTabs[sCode].className = 'PopupTabSelected' ;
|
||||||
|
else
|
||||||
function SetTabVisibility( tabCode, isVisible )
|
oTabs[sCode].className = 'PopupTab' ;
|
||||||
{
|
}
|
||||||
var oTab = oTabs[ tabCode ] ;
|
|
||||||
oTab.style.display = isVisible ? '' : 'none' ;
|
if ( typeof( window.frames["frmMain"].OnDialogTabChange ) == 'function' )
|
||||||
|
window.frames["frmMain"].OnDialogTabChange( tabCode ) ;
|
||||||
if ( ! isVisible && oTab.className == 'PopupTabSelected' )
|
}
|
||||||
{
|
|
||||||
for ( var sCode in oTabs )
|
function SetTabVisibility( tabCode, isVisible )
|
||||||
{
|
{
|
||||||
if ( oTabs[sCode].style.display != 'none' )
|
var oTab = oTabs[ tabCode ] ;
|
||||||
{
|
oTab.style.display = isVisible ? '' : 'none' ;
|
||||||
SetSelectedTab( sCode ) ;
|
|
||||||
break ;
|
if ( ! isVisible && oTab.className == 'PopupTabSelected' )
|
||||||
}
|
{
|
||||||
}
|
for ( var sCode in oTabs )
|
||||||
}
|
{
|
||||||
}
|
if ( oTabs[sCode].style.display != 'none' )
|
||||||
|
{
|
||||||
function SetOnKeyDown( targetDocument )
|
SetSelectedTab( sCode ) ;
|
||||||
{
|
break ;
|
||||||
targetDocument.onkeydown = function ( e )
|
}
|
||||||
{
|
}
|
||||||
e = e || event || this.parentWindow.event ;
|
}
|
||||||
switch ( e.keyCode )
|
}
|
||||||
{
|
|
||||||
case 13 : // ENTER
|
function SetOnKeyDown( targetDocument )
|
||||||
var oTarget = e.srcElement || e.target ;
|
{
|
||||||
if ( oTarget.tagName == 'TEXTAREA' ) return ;
|
targetDocument.onkeydown = function ( e )
|
||||||
Ok() ;
|
{
|
||||||
return false ;
|
e = e || event || this.parentWindow.event ;
|
||||||
case 27 : // ESC
|
switch ( e.keyCode )
|
||||||
Cancel() ;
|
{
|
||||||
return false ;
|
case 13 : // ENTER
|
||||||
break ;
|
var oTarget = e.srcElement || e.target ;
|
||||||
}
|
if ( oTarget.tagName == 'TEXTAREA' )
|
||||||
return true ;
|
return true ;
|
||||||
}
|
Ok() ;
|
||||||
}
|
return false ;
|
||||||
SetOnKeyDown( document ) ;
|
case 27 : // ESC
|
||||||
|
Cancel() ;
|
||||||
function DisableContextMenu( targetDocument )
|
return false ;
|
||||||
{
|
break ;
|
||||||
if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) return ;
|
}
|
||||||
|
return true ;
|
||||||
// Disable Right-Click
|
}
|
||||||
var oOnContextMenu = function( e )
|
}
|
||||||
{
|
SetOnKeyDown( document ) ;
|
||||||
var sTagName = e.target.tagName ;
|
|
||||||
if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) )
|
function DisableContextMenu( targetDocument )
|
||||||
e.preventDefault() ;
|
{
|
||||||
}
|
if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE ) return ;
|
||||||
targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
|
|
||||||
}
|
// Disable Right-Click
|
||||||
DisableContextMenu( document ) ;
|
var oOnContextMenu = function( e )
|
||||||
|
{
|
||||||
if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
var sTagName = e.target.tagName ;
|
||||||
{
|
if ( ! ( ( sTagName == "INPUT" && e.target.type == "text" ) || sTagName == "TEXTAREA" ) )
|
||||||
window.onresize = function()
|
e.preventDefault() ;
|
||||||
{
|
}
|
||||||
var oFrame = document.getElementById("frmMain") ;
|
targetDocument.addEventListener( 'contextmenu', oOnContextMenu, true ) ;
|
||||||
|
}
|
||||||
if ( ! oFrame )
|
DisableContextMenu( document ) ;
|
||||||
return ;
|
|
||||||
|
if ( ! window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
||||||
oFrame.height = 0 ;
|
{
|
||||||
|
window.onresize = function()
|
||||||
var oCell = document.getElementById("FrameCell") ;
|
{
|
||||||
var iHeight = oCell.offsetHeight ;
|
var oFrame = document.getElementById("frmMain") ;
|
||||||
|
|
||||||
oFrame.height = iHeight - 2 ;
|
if ( ! oFrame )
|
||||||
}
|
return ;
|
||||||
}
|
|
||||||
|
oFrame.height = 0 ;
|
||||||
if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
|
||||||
{
|
var oCell = document.getElementById("FrameCell") ;
|
||||||
function Window_OnBeforeUnload()
|
var iHeight = oCell.offsetHeight ;
|
||||||
{
|
|
||||||
for ( var t in oTabs )
|
oFrame.height = iHeight - 2 ;
|
||||||
oTabs[t] = null ;
|
}
|
||||||
|
}
|
||||||
window.dialogArguments.Editor = null ;
|
|
||||||
}
|
if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
|
||||||
window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;
|
{
|
||||||
}
|
function Window_OnBeforeUnload()
|
||||||
|
{
|
||||||
function Window_OnClose()
|
for ( var t in oTabs )
|
||||||
{
|
oTabs[t] = null ;
|
||||||
window.dialogArguments.Editor.FCKFocusManager.Unlock() ;
|
|
||||||
}
|
window.dialogArguments.Editor = null ;
|
||||||
|
}
|
||||||
if ( window.addEventListener )
|
window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;
|
||||||
window.addEventListener( 'unload', Window_OnClose, false ) ;
|
}
|
||||||
|
|
||||||
</script>
|
function Window_OnClose()
|
||||||
</head>
|
{
|
||||||
<body onload="LoadInnerDialog();" class="PopupBody">
|
window.dialogArguments.Editor.FCKFocusManager.Unlock() ;
|
||||||
<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
|
}
|
||||||
<tr>
|
|
||||||
<td id="TitleArea" class="PopupTitle PopupTitleBorder">
|
if ( window.addEventListener )
|
||||||
<script type="text/javascript">
|
window.addEventListener( 'unload', Window_OnClose, false ) ;
|
||||||
document.write( sTitle ) ;
|
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</head>
|
||||||
</tr>
|
<body onload="LoadInnerDialog();" class="PopupBody">
|
||||||
<tr id="TabsRow" style="DISPLAY: none">
|
<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
|
||||||
<td class="PopupTabArea">
|
<tr>
|
||||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
<td id="TitleArea" class="PopupTitle PopupTitleBorder">
|
||||||
<tr id="Tabs" onselectstart="return false;">
|
<script type="text/javascript">
|
||||||
<td class="PopupTabEmptyArea"> </td>
|
document.write( sTitle ) ;
|
||||||
<td class="PopupTabEmptyArea" width="100%"> </td>
|
</script>
|
||||||
</tr>
|
</td>
|
||||||
</table>
|
</tr>
|
||||||
</td>
|
<tr id="TabsRow" style="DISPLAY: none">
|
||||||
</tr>
|
<td class="PopupTabArea">
|
||||||
<tr>
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
<td id="FrameCell" height="100%" valign="top">
|
<tr id="Tabs" onselectstart="return false;">
|
||||||
<iframe id="frmMain" src="fckblank.html" name="frmMain" frameborder="0" height="100%" width="100%" scrolling="auto">
|
<td class="PopupTabEmptyArea"> </td>
|
||||||
</iframe>
|
<td class="PopupTabEmptyArea" width="100%"> </td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
</td>
|
||||||
<td class="PopupButtons">
|
</tr>
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
<tr>
|
||||||
<tr>
|
<td id="FrameCell" height="100%" valign="top">
|
||||||
<td width="100%"> </td>
|
<iframe id="frmMain" src="javascript:void(0)" name="frmMain" frameborder="0" height="100%" width="100%" scrolling="auto">
|
||||||
<td nowrap="nowrap">
|
</iframe>
|
||||||
<input id="btnOk" style="VISIBILITY: hidden; WIDTH: 100px" type="button" value="Ok" class="Button"
|
</td>
|
||||||
onclick="Ok();" fckLang="DlgBtnOK" /> <input type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" />
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td class="PopupButtons">
|
||||||
</table>
|
<table border="0" cellpadding="0" cellspacing="0">
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td width="100%"> </td>
|
||||||
</table>
|
<td nowrap="nowrap">
|
||||||
</body>
|
<input id="btnOk" style="VISIBILITY: hidden; WIDTH: 100px" type="button" value="Ok" class="Button"
|
||||||
|
onclick="Ok();" fckLang="DlgBtnOK" /> <input type="button" value="Cancel" class="Button" onclick="Cancel();" fckLang="DlgBtnCancel" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,210 +1,231 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fckeditor.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Main page that holds the editor.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>FCKeditor</title>
|
* File Name: fckeditor.html
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* Main page that holds the editor.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<meta http-equiv="Cache-Control" content="public" />
|
* File Authors:
|
||||||
<script type="text/javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
// Instead of loading scripts and CSSs using inline tags, all scripts are
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
// loaded by code. In this way we can guarantee the correct processing order,
|
<head>
|
||||||
// otherwise external scripts and inline scripts could be executed in an
|
<title>FCKeditor</title>
|
||||||
// unwanted order (IE).
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
function LoadScript( url )
|
<meta http-equiv="Cache-Control" content="public" />
|
||||||
{
|
<script type="text/javascript">
|
||||||
document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ;
|
|
||||||
}
|
// Instead of loading scripts and CSSs using inline tags, all scripts are
|
||||||
|
// loaded by code. In this way we can guarantee the correct processing order,
|
||||||
function LoadCss( url )
|
// otherwise external scripts and inline scripts could be executed in an
|
||||||
{
|
// unwanted order (IE).
|
||||||
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
|
|
||||||
}
|
function LoadScript( url )
|
||||||
|
{
|
||||||
// Main editor scripts.
|
document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ;
|
||||||
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
|
}
|
||||||
|
|
||||||
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
|
function LoadCss( url )
|
||||||
|
{
|
||||||
// Base configuration file.
|
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
|
||||||
LoadScript( '../fckconfig.js' ) ;
|
}
|
||||||
|
|
||||||
</script>
|
// Main editor scripts.
|
||||||
<script type="text/javascript">
|
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
|
||||||
|
|
||||||
// Create the default cleanup object used by the editor.
|
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
|
||||||
if ( FCKBrowserInfo.IsIE )
|
|
||||||
{
|
// Base configuration file.
|
||||||
FCK.IECleanup = new FCKIECleanup( window ) ;
|
LoadScript( '../fckconfig.js' ) ;
|
||||||
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
|
|
||||||
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
|
</script>
|
||||||
}
|
<script type="text/javascript">
|
||||||
|
|
||||||
// The config hidden field is processed immediately, because
|
if ( FCKBrowserInfo.IsIE )
|
||||||
// CustomConfigurationsPath may be set in the page.
|
{
|
||||||
FCKConfig.ProcessHiddenField() ;
|
// Remove IE mouse flickering.
|
||||||
|
try
|
||||||
// Load the custom configurations file (if defined).
|
{
|
||||||
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
|
document.execCommand( 'BackgroundImageCache', false, true ) ;
|
||||||
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
|
}
|
||||||
|
catch (e)
|
||||||
</script>
|
{
|
||||||
<script type="text/javascript">
|
// We have been reported about loading problems caused by the above
|
||||||
|
// line. For safety, let's just ignore errors.
|
||||||
// Load configurations defined at page level.
|
}
|
||||||
FCKConfig_LoadPageConfig() ;
|
|
||||||
|
// Create the default cleanup object used by the editor.
|
||||||
FCKConfig_PreProcess() ;
|
FCK.IECleanup = new FCKIECleanup( window ) ;
|
||||||
|
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
|
||||||
// Load the active skin CSS.
|
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
|
||||||
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
}
|
||||||
|
|
||||||
// Load the language file.
|
// The config hidden field is processed immediately, because
|
||||||
FCKLanguageManager.Initialize() ;
|
// CustomConfigurationsPath may be set in the page.
|
||||||
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
|
FCKConfig.ProcessHiddenField() ;
|
||||||
|
|
||||||
</script>
|
// Load the custom configurations file (if defined).
|
||||||
<script type="text/javascript">
|
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
|
||||||
|
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
|
||||||
// Initialize the editing area context menu.
|
|
||||||
FCK_ContextMenu_Init() ;
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
FCKPlugins.Load() ;
|
|
||||||
|
// Load configurations defined at page level.
|
||||||
</script>
|
FCKConfig_LoadPageConfig() ;
|
||||||
<script type="text/javascript">
|
|
||||||
|
FCKConfig_PreProcess() ;
|
||||||
// Set the editor interface direction.
|
|
||||||
window.document.dir = FCKLang.Dir ;
|
// Load the active skin CSS.
|
||||||
|
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
||||||
// Activate pasting operations.
|
|
||||||
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
|
// Load the language file.
|
||||||
FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
|
FCKLanguageManager.Initialize() ;
|
||||||
|
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
window.onload = function()
|
|
||||||
{
|
// Initialize the editing area context menu.
|
||||||
InitializeAPI() ;
|
FCK_ContextMenu_Init() ;
|
||||||
|
|
||||||
if ( FCKBrowserInfo.IsIE )
|
FCKPlugins.Load() ;
|
||||||
FCK_PreloadImages() ;
|
|
||||||
else
|
</script>
|
||||||
LoadToolbarSetup() ;
|
<script type="text/javascript">
|
||||||
}
|
|
||||||
|
// Set the editor interface direction.
|
||||||
function LoadToolbarSetup()
|
window.document.dir = FCKLang.Dir ;
|
||||||
{
|
|
||||||
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
|
// Activate pasting operations.
|
||||||
}
|
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
|
||||||
|
FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;
|
||||||
function LoadToolbar()
|
|
||||||
{
|
</script>
|
||||||
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
|
<script type="text/javascript">
|
||||||
|
|
||||||
if ( oToolbarSet.IsLoaded )
|
window.onload = function()
|
||||||
StartEditor() ;
|
{
|
||||||
else
|
InitializeAPI() ;
|
||||||
{
|
|
||||||
oToolbarSet.OnLoad = StartEditor ;
|
if ( FCKBrowserInfo.IsIE )
|
||||||
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
|
FCK_PreloadImages() ;
|
||||||
}
|
else
|
||||||
}
|
LoadToolbarSetup() ;
|
||||||
|
}
|
||||||
function StartEditor()
|
|
||||||
{
|
function LoadToolbarSetup()
|
||||||
// Remove the onload listener.
|
{
|
||||||
FCK.ToolbarSet.OnLoad = null ;
|
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
|
||||||
|
}
|
||||||
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
|
|
||||||
|
function LoadToolbar()
|
||||||
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
|
{
|
||||||
|
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
|
||||||
// Start the editor.
|
|
||||||
FCK.StartEditor() ;
|
if ( oToolbarSet.IsLoaded )
|
||||||
}
|
StartEditor() ;
|
||||||
|
else
|
||||||
function WaitForActive( editorInstance, newStatus )
|
{
|
||||||
{
|
oToolbarSet.OnLoad = StartEditor ;
|
||||||
if ( newStatus == FCK_STATUS_ACTIVE )
|
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
|
||||||
{
|
}
|
||||||
if ( FCKBrowserInfo.IsGecko )
|
}
|
||||||
FCKTools.RunFunction( window.onresize ) ;
|
|
||||||
|
function StartEditor()
|
||||||
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
{
|
||||||
|
// Remove the onload listener.
|
||||||
// Call the special "FCKeditor_OnComplete" function that should be present in
|
FCK.ToolbarSet.OnLoad = null ;
|
||||||
// the HTML page where the editor is located.
|
|
||||||
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
|
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
|
||||||
window.parent.FCKeditor_OnComplete( FCK ) ;
|
|
||||||
}
|
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
|
||||||
}
|
|
||||||
|
// Start the editor.
|
||||||
// Gecko browsers doens't calculate well that IFRAME size so we must
|
FCK.StartEditor() ;
|
||||||
// recalculate it every time the window size changes.
|
}
|
||||||
if ( FCKBrowserInfo.IsGecko )
|
|
||||||
{
|
function WaitForActive( editorInstance, newStatus )
|
||||||
function Window_OnResize()
|
{
|
||||||
{
|
if ( newStatus == FCK_STATUS_ACTIVE )
|
||||||
if ( FCKBrowserInfo.IsOpera )
|
{
|
||||||
return ;
|
if ( FCKBrowserInfo.IsGecko )
|
||||||
|
FCKTools.RunFunction( window.onresize ) ;
|
||||||
var oCell = document.getElementById( 'xEditingArea' ) ;
|
|
||||||
|
_AttachFormSubmitToAPI() ;
|
||||||
var eInnerElement ;
|
|
||||||
if ( eInnerElement = oCell.firstChild )
|
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
||||||
{
|
|
||||||
eInnerElement.style.height = 0 ;
|
// Call the special "FCKeditor_OnComplete" function that should be present in
|
||||||
eInnerElement.style.height = oCell.scrollHeight - 2 ;
|
// the HTML page where the editor is located.
|
||||||
}
|
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
|
||||||
}
|
window.parent.FCKeditor_OnComplete( FCK ) ;
|
||||||
window.onresize = Window_OnResize ;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
// Gecko browsers doens't calculate well that IFRAME size so we must
|
||||||
</head>
|
// recalculate it every time the window size changes.
|
||||||
<body>
|
if ( FCKBrowserInfo.IsGecko )
|
||||||
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
|
{
|
||||||
<tr id="xToolbarRow" style="display: none">
|
function Window_OnResize()
|
||||||
<td id="xToolbarSpace" style="overflow: hidden">
|
{
|
||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
if ( FCKBrowserInfo.IsOpera )
|
||||||
<tr id="xCollapsed" style="display: none">
|
return ;
|
||||||
<td id="xExpandHandle" class="TB_Expand" colspan="3">
|
|
||||||
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
var oCell = document.getElementById( 'xEditingArea' ) ;
|
||||||
</tr>
|
|
||||||
<tr id="xExpanded" style="display: none">
|
var eInnerElement = oCell.firstChild ;
|
||||||
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
|
if ( eInnerElement )
|
||||||
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
|
{
|
||||||
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
eInnerElement.style.height = 0 ;
|
||||||
<td id="xToolbar" class="TB_ToolbarSet"></td>
|
eInnerElement.style.height = oCell.scrollHeight - 2 ;
|
||||||
<td class="TB_SideBorder" style="width: 1px"></td>
|
}
|
||||||
</tr>
|
}
|
||||||
</table>
|
window.onresize = Window_OnResize ;
|
||||||
</td>
|
}
|
||||||
</tr>
|
|
||||||
<tr style="height: 100%">
|
</script>
|
||||||
<td id="xEditingArea" valign="top"></td>
|
</head>
|
||||||
</tr>
|
<body>
|
||||||
</table>
|
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
|
||||||
</body>
|
<tr id="xToolbarRow" style="display: none">
|
||||||
</html>
|
<td id="xToolbarSpace" style="overflow: hidden">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr id="xCollapsed" style="display: none">
|
||||||
|
<td id="xExpandHandle" class="TB_Expand" colspan="3">
|
||||||
|
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr id="xExpanded" style="display: none">
|
||||||
|
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
|
||||||
|
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
|
||||||
|
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
||||||
|
<td id="xToolbar" class="TB_ToolbarSet"></td>
|
||||||
|
<td class="TB_SideBorder" style="width: 1px"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="xEditingArea" valign="top" style="height: 100%"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,292 +1,322 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: fckeditor.original.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Main page that holds the editor.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<title>FCKeditor</title>
|
* File Name: fckeditor.original.html
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
* Main page that holds the editor.
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
*
|
||||||
<!-- @Packager.RemoveLine
|
* File Authors:
|
||||||
<meta http-equiv="Cache-Control" content="public" />
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
@Packager.RemoveLine -->
|
-->
|
||||||
<script type="text/javascript">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
// Instead of loading scripts and CSSs using inline tags, all scripts are
|
<title>FCKeditor</title>
|
||||||
// loaded by code. In this way we can guarantee the correct processing order,
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
// otherwise external scripts and inline scripts could be executed in an
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
// unwanted order (IE).
|
<!-- @Packager.RemoveLine
|
||||||
|
<meta http-equiv="Cache-Control" content="public" />
|
||||||
function LoadScript( url )
|
@Packager.RemoveLine -->
|
||||||
{
|
<script type="text/javascript">
|
||||||
document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ;
|
|
||||||
}
|
// Instead of loading scripts and CSSs using inline tags, all scripts are
|
||||||
|
// loaded by code. In this way we can guarantee the correct processing order,
|
||||||
function LoadCss( url )
|
// otherwise external scripts and inline scripts could be executed in an
|
||||||
{
|
// unwanted order (IE).
|
||||||
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
|
|
||||||
}
|
function LoadScript( url )
|
||||||
|
{
|
||||||
// Main editor scripts.
|
document.write( '<script type="text/javascript" src="' + url + '" onerror="alert(\'Error loading \' + this.src);"><\/script>' ) ;
|
||||||
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
|
}
|
||||||
|
|
||||||
/* @Packager.RemoveLine
|
function LoadCss( url )
|
||||||
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
|
{
|
||||||
@Packager.RemoveLine */
|
document.write( '<link href="' + url + '" type="text/css" rel="stylesheet" onerror="alert(\'Error loading \' + this.src);" />' ) ;
|
||||||
// @Packager.Remove.Start
|
}
|
||||||
|
|
||||||
LoadScript( '_source/fckconstants.js' ) ;
|
// Main editor scripts.
|
||||||
LoadScript( '_source/fckjscoreextensions.js' ) ;
|
var sSuffix = /msie/.test( navigator.userAgent.toLowerCase() ) ? 'ie' : 'gecko' ;
|
||||||
|
|
||||||
if ( sSuffix == 'ie' )
|
/* @Packager.RemoveLine
|
||||||
LoadScript( '_source/classes/fckiecleanup.js' ) ;
|
LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;
|
||||||
|
@Packager.RemoveLine */
|
||||||
LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
|
// @Packager.Remove.Start
|
||||||
LoadScript( '_source/internals/fckurlparams.js' ) ;
|
|
||||||
LoadScript( '_source/internals/fck.js' ) ;
|
LoadScript( '_source/fckconstants.js' ) ;
|
||||||
LoadScript( '_source/internals/fckconfig.js' ) ;
|
LoadScript( '_source/fckjscoreextensions.js' ) ;
|
||||||
|
|
||||||
LoadScript( '_source/internals/fckdebug.js' ) ;
|
if ( sSuffix == 'ie' )
|
||||||
LoadScript( '_source/internals/fcktools.js' ) ;
|
LoadScript( '_source/classes/fckiecleanup.js' ) ;
|
||||||
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
|
|
||||||
LoadScript( '_source/fckeditorapi.js' ) ;
|
LoadScript( '_source/internals/fckbrowserinfo.js' ) ;
|
||||||
LoadScript( '_source/internals/fckregexlib.js' ) ;
|
LoadScript( '_source/internals/fckurlparams.js' ) ;
|
||||||
LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
|
LoadScript( '_source/classes/fckevents.js' ) ;
|
||||||
LoadScript( '_source/classes/fckevents.js' ) ;
|
LoadScript( '_source/internals/fck.js' ) ;
|
||||||
LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
|
LoadScript( '_source/internals/fck_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/internals/fckxhtml.js' ) ;
|
LoadScript( '_source/internals/fckconfig.js' ) ;
|
||||||
LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
|
|
||||||
LoadScript( '_source/internals/fckcodeformatter.js' ) ;
|
LoadScript( '_source/internals/fckdebug.js' ) ;
|
||||||
LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/internals/fckdomtools.js' ) ;
|
||||||
LoadScript( '_source/classes/fckeditingarea.js' ) ;
|
LoadScript( '_source/internals/fcktools.js' ) ;
|
||||||
LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
|
LoadScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/internals/fck_1.js' ) ;
|
LoadScript( '_source/fckeditorapi.js' ) ;
|
||||||
LoadScript( '_source/internals/fck_1_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/classes/fckimagepreloader.js' ) ;
|
||||||
LoadScript( '_source/internals/fck_2.js' ) ;
|
LoadScript( '_source/internals/fckregexlib.js' ) ;
|
||||||
LoadScript( '_source/internals/fck_2_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/internals/fcklanguagemanager.js' ) ;
|
||||||
LoadScript( '_source/internals/fckselection.js' ) ;
|
LoadScript( '_source/internals/fckxhtmlentities.js' ) ;
|
||||||
LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/internals/fckxhtml.js' ) ;
|
||||||
|
LoadScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/internals/fcktablehandler.js' ) ;
|
LoadScript( '_source/internals/fckcodeformatter.js' ) ;
|
||||||
LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/classes/fckeditingarea.js' ) ;
|
||||||
LoadScript( '_source/classes/fckstyledef.js' ) ;
|
LoadScript( '_source/classes/fckkeystrokehandler.js' ) ;
|
||||||
LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;
|
|
||||||
LoadScript( '_source/classes/fckstylesloader.js' ) ;
|
LoadScript( '_source/internals/fcklisthandler.js' ) ;
|
||||||
|
LoadScript( '_source/classes/fckelementpath.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
|
LoadScript( '_source/classes/fckdomrange.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
|
LoadScript( '_source/classes/fckdocumentfragment_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/classes/fckw3crange.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
|
LoadScript( '_source/classes/fckdomrange_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
|
LoadScript( '_source/classes/fckenterkey.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
|
|
||||||
LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
|
LoadScript( '_source/internals/fckdocumentprocessor.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
|
LoadScript( '_source/internals/fckselection.js' ) ;
|
||||||
LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
|
LoadScript( '_source/internals/fckselection_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/internals/fckcommands.js' ) ;
|
|
||||||
|
LoadScript( '_source/internals/fcktablehandler.js' ) ;
|
||||||
LoadScript( '_source/classes/fckpanel.js' ) ;
|
LoadScript( '_source/internals/fcktablehandler_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/classes/fckicon.js' ) ;
|
LoadScript( '_source/classes/fckxml_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
|
LoadScript( '_source/classes/fckstyledef.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
|
LoadScript( '_source/classes/fckstyledef_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/classes/fckspecialcombo.js' ) ;
|
LoadScript( '_source/classes/fckstylesloader.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
|
|
||||||
LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
|
LoadScript( '_source/commandclasses/fcknamedcommand.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
|
LoadScript( '_source/commandclasses/fck_othercommands.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
|
LoadScript( '_source/commandclasses/fckspellcheckcommand_' + sSuffix + '.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
|
LoadScript( '_source/commandclasses/fcktextcolorcommand.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
|
LoadScript( '_source/commandclasses/fckpasteplaintextcommand.js' ) ;
|
||||||
LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
|
LoadScript( '_source/commandclasses/fckpastewordcommand.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbar.js' ) ;
|
LoadScript( '_source/commandclasses/fcktablecommand.js' ) ;
|
||||||
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
|
LoadScript( '_source/commandclasses/fckstylecommand.js' ) ;
|
||||||
LoadScript( '_source/internals/fcktoolbarset.js' ) ;
|
LoadScript( '_source/commandclasses/fckfitwindow.js' ) ;
|
||||||
LoadScript( '_source/internals/fckdialog.js' ) ;
|
LoadScript( '_source/internals/fckcommands.js' ) ;
|
||||||
LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
|
|
||||||
LoadScript( '_source/classes/fckmenuitem.js' ) ;
|
LoadScript( '_source/classes/fckpanel.js' ) ;
|
||||||
LoadScript( '_source/classes/fckmenublock.js' ) ;
|
LoadScript( '_source/classes/fckicon.js' ) ;
|
||||||
LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
|
LoadScript( '_source/classes/fcktoolbarbuttonui.js' ) ;
|
||||||
LoadScript( '_source/classes/fckcontextmenu.js' ) ;
|
LoadScript( '_source/classes/fcktoolbarbutton.js' ) ;
|
||||||
LoadScript( '_source/internals/fck_contextmenu.js' ) ;
|
LoadScript( '_source/classes/fckspecialcombo.js' ) ;
|
||||||
LoadScript( '_source/classes/fckplugin.js' ) ;
|
LoadScript( '_source/classes/fcktoolbarspecialcombo.js' ) ;
|
||||||
LoadScript( '_source/internals/fckplugins.js' ) ;
|
LoadScript( '_source/classes/fcktoolbarfontscombo.js' ) ;
|
||||||
|
LoadScript( '_source/classes/fcktoolbarfontsizecombo.js' ) ;
|
||||||
// @Packager.Remove.End
|
LoadScript( '_source/classes/fcktoolbarfontformatcombo.js' ) ;
|
||||||
|
LoadScript( '_source/classes/fcktoolbarstylecombo.js' ) ;
|
||||||
// Base configuration file.
|
LoadScript( '_source/classes/fcktoolbarpanelbutton.js' ) ;
|
||||||
LoadScript( '../fckconfig.js' ) ;
|
LoadScript( '_source/internals/fcktoolbaritems.js' ) ;
|
||||||
|
LoadScript( '_source/classes/fcktoolbar.js' ) ;
|
||||||
</script>
|
LoadScript( '_source/classes/fcktoolbarbreak_' + sSuffix + '.js' ) ;
|
||||||
<script type="text/javascript">
|
LoadScript( '_source/internals/fcktoolbarset.js' ) ;
|
||||||
|
LoadScript( '_source/internals/fckdialog.js' ) ;
|
||||||
// Create the default cleanup object used by the editor.
|
LoadScript( '_source/internals/fckdialog_' + sSuffix + '.js' ) ;
|
||||||
if ( FCKBrowserInfo.IsIE )
|
LoadScript( '_source/classes/fckmenuitem.js' ) ;
|
||||||
{
|
LoadScript( '_source/classes/fckmenublock.js' ) ;
|
||||||
FCK.IECleanup = new FCKIECleanup( window ) ;
|
LoadScript( '_source/classes/fckmenublockpanel.js' ) ;
|
||||||
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
|
LoadScript( '_source/classes/fckcontextmenu.js' ) ;
|
||||||
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
|
LoadScript( '_source/internals/fck_contextmenu.js' ) ;
|
||||||
}
|
LoadScript( '_source/classes/fckplugin.js' ) ;
|
||||||
|
LoadScript( '_source/internals/fckplugins.js' ) ;
|
||||||
// The config hidden field is processed immediately, because
|
|
||||||
// CustomConfigurationsPath may be set in the page.
|
// @Packager.Remove.End
|
||||||
FCKConfig.ProcessHiddenField() ;
|
|
||||||
|
// Base configuration file.
|
||||||
// Load the custom configurations file (if defined).
|
LoadScript( '../fckconfig.js' ) ;
|
||||||
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
|
|
||||||
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
if ( FCKBrowserInfo.IsIE )
|
||||||
|
{
|
||||||
// Load configurations defined at page level.
|
// Remove IE mouse flickering.
|
||||||
FCKConfig_LoadPageConfig() ;
|
try
|
||||||
|
{
|
||||||
FCKConfig_PreProcess() ;
|
document.execCommand( 'BackgroundImageCache', false, true ) ;
|
||||||
|
}
|
||||||
// Load the active skin CSS.
|
catch (e)
|
||||||
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
{
|
||||||
|
// We have been reported about loading problems caused by the above
|
||||||
// Load the language file.
|
// line. For safety, let's just ignore errors.
|
||||||
FCKLanguageManager.Initialize() ;
|
}
|
||||||
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
|
|
||||||
|
// Create the default cleanup object used by the editor.
|
||||||
</script>
|
FCK.IECleanup = new FCKIECleanup( window ) ;
|
||||||
<script type="text/javascript">
|
FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
|
||||||
|
FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
|
||||||
// Initialize the editing area context menu.
|
}
|
||||||
FCK_ContextMenu_Init() ;
|
|
||||||
|
// The config hidden field is processed immediately, because
|
||||||
FCKPlugins.Load() ;
|
// CustomConfigurationsPath may be set in the page.
|
||||||
|
FCKConfig.ProcessHiddenField() ;
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
// Load the custom configurations file (if defined).
|
||||||
|
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
|
||||||
// Set the editor interface direction.
|
LoadScript( FCKConfig.CustomConfigurationsPath ) ;
|
||||||
window.document.dir = FCKLang.Dir ;
|
|
||||||
|
</script>
|
||||||
// Activate pasting operations.
|
<script type="text/javascript">
|
||||||
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
|
|
||||||
FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
|
// Load configurations defined at page level.
|
||||||
|
FCKConfig_LoadPageConfig() ;
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
FCKConfig_PreProcess() ;
|
||||||
|
|
||||||
window.onload = function()
|
// Load the active skin CSS.
|
||||||
{
|
LoadCss( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
||||||
InitializeAPI() ;
|
|
||||||
|
// Load the language file.
|
||||||
if ( FCKBrowserInfo.IsIE )
|
FCKLanguageManager.Initialize() ;
|
||||||
FCK_PreloadImages() ;
|
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;
|
||||||
else
|
|
||||||
LoadToolbarSetup() ;
|
</script>
|
||||||
}
|
<script type="text/javascript">
|
||||||
|
|
||||||
function LoadToolbarSetup()
|
// Initialize the editing area context menu.
|
||||||
{
|
FCK_ContextMenu_Init() ;
|
||||||
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
|
|
||||||
}
|
FCKPlugins.Load() ;
|
||||||
|
|
||||||
function LoadToolbar()
|
</script>
|
||||||
{
|
<script type="text/javascript">
|
||||||
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
|
|
||||||
|
// Set the editor interface direction.
|
||||||
if ( oToolbarSet.IsLoaded )
|
window.document.dir = FCKLang.Dir ;
|
||||||
StartEditor() ;
|
|
||||||
else
|
// Activate pasting operations.
|
||||||
{
|
if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )
|
||||||
oToolbarSet.OnLoad = StartEditor ;
|
FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;
|
||||||
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
|
|
||||||
}
|
</script>
|
||||||
}
|
<script type="text/javascript">
|
||||||
|
|
||||||
function StartEditor()
|
window.onload = function()
|
||||||
{
|
{
|
||||||
// Remove the onload listener.
|
InitializeAPI() ;
|
||||||
FCK.ToolbarSet.OnLoad = null ;
|
|
||||||
|
if ( FCKBrowserInfo.IsIE )
|
||||||
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
|
FCK_PreloadImages() ;
|
||||||
|
else
|
||||||
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
|
LoadToolbarSetup() ;
|
||||||
|
}
|
||||||
// Start the editor.
|
|
||||||
FCK.StartEditor() ;
|
function LoadToolbarSetup()
|
||||||
}
|
{
|
||||||
|
FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
|
||||||
function WaitForActive( editorInstance, newStatus )
|
}
|
||||||
{
|
|
||||||
if ( newStatus == FCK_STATUS_ACTIVE )
|
function LoadToolbar()
|
||||||
{
|
{
|
||||||
if ( FCKBrowserInfo.IsGecko )
|
var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
|
||||||
FCKTools.RunFunction( window.onresize ) ;
|
|
||||||
|
if ( oToolbarSet.IsLoaded )
|
||||||
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
StartEditor() ;
|
||||||
|
else
|
||||||
// Call the special "FCKeditor_OnComplete" function that should be present in
|
{
|
||||||
// the HTML page where the editor is located.
|
oToolbarSet.OnLoad = StartEditor ;
|
||||||
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
|
oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
|
||||||
window.parent.FCKeditor_OnComplete( FCK ) ;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
function StartEditor()
|
||||||
// Gecko browsers doens't calculate well that IFRAME size so we must
|
{
|
||||||
// recalculate it every time the window size changes.
|
// Remove the onload listener.
|
||||||
if ( FCKBrowserInfo.IsGecko )
|
FCK.ToolbarSet.OnLoad = null ;
|
||||||
{
|
|
||||||
function Window_OnResize()
|
FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;
|
||||||
{
|
|
||||||
if ( FCKBrowserInfo.IsOpera )
|
FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;
|
||||||
return ;
|
|
||||||
|
// Start the editor.
|
||||||
var oCell = document.getElementById( 'xEditingArea' ) ;
|
FCK.StartEditor() ;
|
||||||
|
}
|
||||||
var eInnerElement ;
|
|
||||||
if ( eInnerElement = oCell.firstChild )
|
function WaitForActive( editorInstance, newStatus )
|
||||||
{
|
{
|
||||||
eInnerElement.style.height = 0 ;
|
if ( newStatus == FCK_STATUS_ACTIVE )
|
||||||
eInnerElement.style.height = oCell.scrollHeight - 2 ;
|
{
|
||||||
}
|
if ( FCKBrowserInfo.IsGecko )
|
||||||
}
|
FCKTools.RunFunction( window.onresize ) ;
|
||||||
window.onresize = Window_OnResize ;
|
|
||||||
}
|
_AttachFormSubmitToAPI() ;
|
||||||
|
|
||||||
</script>
|
FCK.SetStatus( FCK_STATUS_COMPLETE ) ;
|
||||||
</head>
|
|
||||||
<body>
|
// Call the special "FCKeditor_OnComplete" function that should be present in
|
||||||
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
|
// the HTML page where the editor is located.
|
||||||
<tr id="xToolbarRow" style="display: none">
|
if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
|
||||||
<td id="xToolbarSpace" style="overflow: hidden">
|
window.parent.FCKeditor_OnComplete( FCK ) ;
|
||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
}
|
||||||
<tr id="xCollapsed" style="display: none">
|
}
|
||||||
<td id="xExpandHandle" class="TB_Expand" colspan="3">
|
|
||||||
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
// Gecko browsers doens't calculate well that IFRAME size so we must
|
||||||
</tr>
|
// recalculate it every time the window size changes.
|
||||||
<tr id="xExpanded" style="display: none">
|
if ( FCKBrowserInfo.IsGecko )
|
||||||
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
|
{
|
||||||
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
|
function Window_OnResize()
|
||||||
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
{
|
||||||
<td id="xToolbar" class="TB_ToolbarSet"></td>
|
if ( FCKBrowserInfo.IsOpera )
|
||||||
<td class="TB_SideBorder" style="width: 1px"></td>
|
return ;
|
||||||
</tr>
|
|
||||||
</table>
|
var oCell = document.getElementById( 'xEditingArea' ) ;
|
||||||
</td>
|
|
||||||
</tr>
|
var eInnerElement = oCell.firstChild ;
|
||||||
<tr style="height: 100%">
|
if ( eInnerElement )
|
||||||
<td id="xEditingArea" valign="top"></td>
|
{
|
||||||
</tr>
|
eInnerElement.style.height = 0 ;
|
||||||
</table>
|
eInnerElement.style.height = oCell.scrollHeight - 2 ;
|
||||||
</body>
|
}
|
||||||
</html>
|
}
|
||||||
|
window.onresize = Window_OnResize ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
|
||||||
|
<tr id="xToolbarRow" style="display: none">
|
||||||
|
<td id="xToolbarSpace" style="overflow: hidden">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
|
<tr id="xCollapsed" style="display: none">
|
||||||
|
<td id="xExpandHandle" class="TB_Expand" colspan="3">
|
||||||
|
<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr id="xExpanded" style="display: none">
|
||||||
|
<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
|
||||||
|
<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
|
||||||
|
<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
|
||||||
|
<td id="xToolbar" class="TB_ToolbarSet"></td>
|
||||||
|
<td class="TB_SideBorder" style="width: 1px"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="xEditingArea" valign="top" style="height: 100%"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,84 +1,92 @@
|
|||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: browser.css
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* CSS styles used by all pages that compose the File Browser.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
body
|
*
|
||||||
{
|
* File Name: browser.css
|
||||||
background-color: #f1f1e3;
|
* CSS styles used by all pages that compose the File Browser.
|
||||||
}
|
*
|
||||||
|
* File Authors:
|
||||||
form
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
{
|
*/
|
||||||
margin: 0px 0px 0px 0px ;
|
|
||||||
padding: 0px 0px 0px 0px ;
|
body
|
||||||
}
|
{
|
||||||
|
background-color: #f1f1e3;
|
||||||
.Frame
|
}
|
||||||
{
|
|
||||||
background-color: #f1f1e3;
|
form
|
||||||
border-color: #f1f1e3;
|
{
|
||||||
border-right: thin inset;
|
margin: 0px 0px 0px 0px ;
|
||||||
border-top: thin inset;
|
padding: 0px 0px 0px 0px ;
|
||||||
border-left: thin inset;
|
}
|
||||||
border-bottom: thin inset;
|
|
||||||
}
|
.Frame
|
||||||
|
{
|
||||||
body.FileArea
|
background-color: #f1f1e3;
|
||||||
{
|
border-color: #f1f1e3;
|
||||||
|
border-right: thin inset;
|
||||||
background-color: #ffffff;
|
border-top: thin inset;
|
||||||
}
|
border-left: thin inset;
|
||||||
|
border-bottom: thin inset;
|
||||||
body, td, input, select
|
}
|
||||||
{
|
|
||||||
font-size: 11px;
|
body.FileArea
|
||||||
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
|
{
|
||||||
}
|
|
||||||
|
background-color: #ffffff;
|
||||||
.ActualFolder
|
}
|
||||||
{
|
|
||||||
font-weight: bold;
|
body, td, input, select
|
||||||
font-size: 14px;
|
{
|
||||||
}
|
font-size: 11px;
|
||||||
|
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
|
||||||
.PopupButtons
|
}
|
||||||
{
|
|
||||||
border-top: #d5d59d 1px solid;
|
.ActualFolder
|
||||||
background-color: #e3e3c7;
|
{
|
||||||
padding: 7px 10px 7px 10px;
|
font-weight: bold;
|
||||||
}
|
font-size: 14px;
|
||||||
|
}
|
||||||
.Button, button
|
|
||||||
{
|
.PopupButtons
|
||||||
border-right: #737357 1px solid;
|
{
|
||||||
border-top: #737357 1px solid;
|
border-top: #d5d59d 1px solid;
|
||||||
border-left: #737357 1px solid;
|
background-color: #e3e3c7;
|
||||||
color: #3b3b1f;
|
padding: 7px 10px 7px 10px;
|
||||||
border-bottom: #737357 1px solid;
|
}
|
||||||
background-color: #c7c78f;
|
|
||||||
}
|
.Button, button
|
||||||
|
{
|
||||||
.FolderListCurrentFolder img
|
border-right: #737357 1px solid;
|
||||||
{
|
border-top: #737357 1px solid;
|
||||||
background-image: url(images/FolderOpened.gif);
|
border-left: #737357 1px solid;
|
||||||
}
|
color: #3b3b1f;
|
||||||
|
border-bottom: #737357 1px solid;
|
||||||
.FolderListFolder img
|
background-color: #c7c78f;
|
||||||
{
|
}
|
||||||
background-image: url(images/Folder.gif);
|
|
||||||
|
.FolderListCurrentFolder img
|
||||||
|
{
|
||||||
|
background-image: url(images/FolderOpened.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.FolderListFolder img
|
||||||
|
{
|
||||||
|
background-image: url(images/Folder.gif);
|
||||||
}
|
}
|
||||||
@@ -1,148 +1,158 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: browser.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This page compose the File Browser dialog frameset.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: browser.html
|
||||||
<title>FCKeditor - Resources Browser</title>
|
* This page compose the File Browser dialog frameset.
|
||||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
*
|
||||||
<script type="text/javascript" src="js/fckxml.js"></script>
|
* File Authors:
|
||||||
<script language="javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
function GetUrlParam( paramName )
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
{
|
<html>
|
||||||
var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
|
<head>
|
||||||
var oMatch = oRegex.exec( window.top.location.search ) ;
|
<title>FCKeditor - Resources Browser</title>
|
||||||
|
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||||
if ( oMatch && oMatch.length > 1 )
|
<script type="text/javascript" src="js/fckxml.js"></script>
|
||||||
return unescape( oMatch[1] ) ;
|
<script language="javascript">
|
||||||
else
|
|
||||||
return '' ;
|
function GetUrlParam( paramName )
|
||||||
}
|
{
|
||||||
|
var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
|
||||||
var oConnector = new Object() ;
|
var oMatch = oRegex.exec( window.top.location.search ) ;
|
||||||
oConnector.CurrentFolder = '/' ;
|
|
||||||
|
if ( oMatch && oMatch.length > 1 )
|
||||||
var sConnUrl = GetUrlParam( 'Connector' ) ;
|
return decodeURIComponent( oMatch[1] ) ;
|
||||||
|
else
|
||||||
// Gecko has some problems when using relative URLs (not starting with slash).
|
return '' ;
|
||||||
if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 )
|
}
|
||||||
sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ;
|
|
||||||
|
var oConnector = new Object() ;
|
||||||
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
|
oConnector.CurrentFolder = '/' ;
|
||||||
|
|
||||||
var sServerPath = GetUrlParam( 'ServerPath' ) ;
|
var sConnUrl = GetUrlParam( 'Connector' ) ;
|
||||||
if ( sServerPath.length > 0 )
|
|
||||||
oConnector.ConnectorUrl += 'ServerPath=' + escape( sServerPath ) + '&' ;
|
// Gecko has some problems when using relative URLs (not starting with slash).
|
||||||
|
if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 )
|
||||||
oConnector.ResourceType = GetUrlParam( 'Type' ) ;
|
sConnUrl = window.location.href.replace( /browser.html.*$/, '' ) + sConnUrl ;
|
||||||
oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
|
|
||||||
|
oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ;
|
||||||
if ( oConnector.ShowAllTypes )
|
|
||||||
oConnector.ResourceType = 'File' ;
|
var sServerPath = GetUrlParam( 'ServerPath' ) ;
|
||||||
|
if ( sServerPath.length > 0 )
|
||||||
oConnector.SendCommand = function( command, params, callBackFunction )
|
oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ;
|
||||||
{
|
|
||||||
var sUrl = this.ConnectorUrl + 'Command=' + command ;
|
oConnector.ResourceType = GetUrlParam( 'Type' ) ;
|
||||||
sUrl += '&Type=' + this.ResourceType ;
|
oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ;
|
||||||
sUrl += '&CurrentFolder=' + escape( this.CurrentFolder ) ;
|
|
||||||
|
if ( oConnector.ShowAllTypes )
|
||||||
if ( params ) sUrl += '&' + params ;
|
oConnector.ResourceType = 'File' ;
|
||||||
|
|
||||||
var oXML = new FCKXml() ;
|
oConnector.SendCommand = function( command, params, callBackFunction )
|
||||||
|
{
|
||||||
if ( callBackFunction )
|
var sUrl = this.ConnectorUrl + 'Command=' + command ;
|
||||||
oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
|
sUrl += '&Type=' + this.ResourceType ;
|
||||||
else
|
sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;
|
||||||
return oXML.LoadUrl( sUrl ) ;
|
|
||||||
}
|
if ( params ) sUrl += '&' + params ;
|
||||||
|
|
||||||
oConnector.CheckError = function( responseXml )
|
var oXML = new FCKXml() ;
|
||||||
{
|
|
||||||
var iErrorNumber = 0
|
if ( callBackFunction )
|
||||||
var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
|
oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load.
|
||||||
|
else
|
||||||
if ( oErrorNode )
|
return oXML.LoadUrl( sUrl ) ;
|
||||||
{
|
|
||||||
iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value ) ;
|
return null ;
|
||||||
|
}
|
||||||
switch ( iErrorNumber )
|
|
||||||
{
|
oConnector.CheckError = function( responseXml )
|
||||||
case 0 :
|
{
|
||||||
break ;
|
var iErrorNumber = 0 ;
|
||||||
case 1 : // Custom error. Message placed in the "text" attribute.
|
var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ;
|
||||||
alert( oErrorNode.attributes.getNamedItem('text').value ) ;
|
|
||||||
break ;
|
if ( oErrorNode )
|
||||||
case 101 :
|
{
|
||||||
alert( 'Folder already exists' ) ;
|
iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ;
|
||||||
break ;
|
|
||||||
case 102 :
|
switch ( iErrorNumber )
|
||||||
alert( 'Invalid folder name' ) ;
|
{
|
||||||
break ;
|
case 0 :
|
||||||
case 103 :
|
break ;
|
||||||
alert( 'You have no permissions to create the folder' ) ;
|
case 1 : // Custom error. Message placed in the "text" attribute.
|
||||||
break ;
|
alert( oErrorNode.attributes.getNamedItem('text').value ) ;
|
||||||
case 110 :
|
break ;
|
||||||
alert( 'Unknown error creating folder' ) ;
|
case 101 :
|
||||||
break ;
|
alert( 'Folder already exists' ) ;
|
||||||
default :
|
break ;
|
||||||
alert( 'Error on your request. Error number: ' + iErrorNumber ) ;
|
case 102 :
|
||||||
break ;
|
alert( 'Invalid folder name' ) ;
|
||||||
}
|
break ;
|
||||||
}
|
case 103 :
|
||||||
return iErrorNumber ;
|
alert( 'You have no permissions to create the folder' ) ;
|
||||||
}
|
break ;
|
||||||
|
case 110 :
|
||||||
var oIcons = new Object() ;
|
alert( 'Unknown error creating folder' ) ;
|
||||||
|
break ;
|
||||||
oIcons.AvailableIconsArray = [
|
default :
|
||||||
'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
|
alert( 'Error on your request. Error number: ' + iErrorNumber ) ;
|
||||||
'mdb','mp3','pdf','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
|
break ;
|
||||||
|
}
|
||||||
oIcons.AvailableIcons = new Object() ;
|
}
|
||||||
|
return iErrorNumber ;
|
||||||
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
|
}
|
||||||
oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
|
|
||||||
|
var oIcons = new Object() ;
|
||||||
oIcons.GetIcon = function( fileName )
|
|
||||||
{
|
oIcons.AvailableIconsArray = [
|
||||||
var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
|
'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js',
|
||||||
|
'mdb','mp3','pdf','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ;
|
||||||
if ( this.AvailableIcons[ sExtension ] == true )
|
|
||||||
return sExtension ;
|
oIcons.AvailableIcons = new Object() ;
|
||||||
else
|
|
||||||
return 'default.icon' ;
|
for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ )
|
||||||
}
|
oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ;
|
||||||
</script>
|
|
||||||
</head>
|
oIcons.GetIcon = function( fileName )
|
||||||
<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
|
{
|
||||||
<frameset rows="50,*" framespacing="0">
|
var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ;
|
||||||
<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
|
|
||||||
<frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1">
|
if ( this.AvailableIcons[ sExtension ] == true )
|
||||||
</frameset>
|
return sExtension ;
|
||||||
<frameset rows="50,*,50" framespacing="0">
|
else
|
||||||
<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
|
return 'default.icon' ;
|
||||||
<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
|
}
|
||||||
<frameset cols="150,*,0" framespacing="0" frameborder="0">
|
</script>
|
||||||
<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
|
</head>
|
||||||
<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
|
<frameset cols="150,*" class="Frame" framespacing="3" bordercolor="#f1f1e3" frameborder="1">
|
||||||
<frame name="frmUploadWorker" src="../../../fckblank.html" scrolling="no" frameborder="0">
|
<frameset rows="50,*" framespacing="0">
|
||||||
</frameset>
|
<frame src="frmresourcetype.html" scrolling="no" frameborder="0">
|
||||||
</frameset>
|
<frame name="frmFolders" src="frmfolders.html" scrolling="auto" frameborder="1">
|
||||||
</frameset>
|
</frameset>
|
||||||
</html>
|
<frameset rows="50,*,50" framespacing="0">
|
||||||
|
<frame name="frmActualFolder" src="frmactualfolder.html" scrolling="no" frameborder="0">
|
||||||
|
<frame name="frmResourcesList" src="frmresourceslist.html" scrolling="auto" frameborder="1">
|
||||||
|
<frameset cols="150,*,0" framespacing="0" frameborder="0">
|
||||||
|
<frame name="frmCreateFolder" src="frmcreatefolder.html" scrolling="no" frameborder="0">
|
||||||
|
<frame name="frmUpload" src="frmupload.html" scrolling="no" frameborder="0">
|
||||||
|
<frame name="frmUploadWorker" src="javascript:void(0)" scrolling="no" frameborder="0">
|
||||||
|
</frameset>
|
||||||
|
</frameset>
|
||||||
|
</frameset>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,58 +1,66 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: basexml.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This file include the functions that create the base XML output.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<%
|
* == END LICENSE ==
|
||||||
|
*
|
||||||
Sub SetXmlHeaders()
|
* File Name: basexml.asp
|
||||||
' Cleans the response buffer.
|
* This file include the functions that create the base XML output.
|
||||||
Response.Clear()
|
*
|
||||||
|
* File Authors:
|
||||||
' Prevent the browser from caching the result.
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
Response.CacheControl = "no-cache"
|
-->
|
||||||
|
<%
|
||||||
' Set the response format.
|
|
||||||
Response.CharSet = "UTF-8"
|
Sub SetXmlHeaders()
|
||||||
Response.ContentType = "text/xml"
|
' Cleans the response buffer.
|
||||||
End Sub
|
Response.Clear()
|
||||||
|
|
||||||
Sub CreateXmlHeader( command, resourceType, currentFolder )
|
' Prevent the browser from caching the result.
|
||||||
' Create the XML document header.
|
Response.CacheControl = "no-cache"
|
||||||
Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
|
|
||||||
|
' Set the response format.
|
||||||
' Create the main "Connector" node.
|
Response.CharSet = "UTF-8"
|
||||||
Response.Write "<Connector command=""" & command & """ resourceType=""" & resourceType & """>"
|
Response.ContentType = "text/xml"
|
||||||
|
End Sub
|
||||||
' Add the current folder node.
|
|
||||||
Response.Write "<CurrentFolder path=""" & ConvertToXmlAttribute( currentFolder ) & """ url=""" & ConvertToXmlAttribute( GetUrlFromPath( resourceType, currentFolder) ) & """ />"
|
Sub CreateXmlHeader( command, resourceType, currentFolder )
|
||||||
End Sub
|
' Create the XML document header.
|
||||||
|
Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
|
||||||
Sub CreateXmlFooter()
|
|
||||||
Response.Write "</Connector>"
|
' Create the main "Connector" node.
|
||||||
End Sub
|
Response.Write "<Connector command=""" & command & """ resourceType=""" & resourceType & """>"
|
||||||
|
|
||||||
Sub SendError( number, text )
|
' Add the current folder node.
|
||||||
SetXmlHeaders
|
Response.Write "<CurrentFolder path=""" & ConvertToXmlAttribute( currentFolder ) & """ url=""" & ConvertToXmlAttribute( GetUrlFromPath( resourceType, currentFolder) ) & """ />"
|
||||||
|
End Sub
|
||||||
' Create the XML document header.
|
|
||||||
Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
|
Sub CreateXmlFooter()
|
||||||
|
Response.Write "</Connector>"
|
||||||
Response.Write "<Connector><Error number=""" & number & """ text=""" & Server.HTMLEncode( text ) & """ /></Connector>"
|
End Sub
|
||||||
|
|
||||||
Response.End
|
Sub SendError( number, text )
|
||||||
End Sub
|
SetXmlHeaders
|
||||||
|
|
||||||
|
' Create the XML document header.
|
||||||
|
Response.Write "<?xml version=""1.0"" encoding=""utf-8"" ?>"
|
||||||
|
|
||||||
|
Response.Write "<Connector><Error number=""" & number & """ text=""" & Server.HTMLEncode( text ) & """ /></Connector>"
|
||||||
|
|
||||||
|
Response.End
|
||||||
|
End Sub
|
||||||
%>
|
%>
|
||||||
@@ -1,230 +1,238 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: class_upload.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* These are the classes used to handle ASP upload without using third
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* part components (OCX/DLL).
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* NetRube (netrube@126.com)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<%
|
*
|
||||||
'**********************************************
|
* File Name: class_upload.asp
|
||||||
' File: NetRube_Upload.asp
|
* These are the classes used to handle ASP upload without using third
|
||||||
' Version: NetRube Upload Class Version 2.1 Build 20050228
|
* part components (OCX/DLL).
|
||||||
' Author: NetRube
|
*
|
||||||
' Email: NetRube@126.com
|
* File Authors:
|
||||||
' Date: 02/28/2005
|
* NetRube (netrube@126.com)
|
||||||
' Comments: The code for the Upload.
|
-->
|
||||||
' This can free usage, but please
|
<%
|
||||||
' not to delete this copyright information.
|
'**********************************************
|
||||||
' If you have a modification version,
|
' File: NetRube_Upload.asp
|
||||||
' Please send out a duplicate to me.
|
' Version: NetRube Upload Class Version 2.1 Build 20050228
|
||||||
'**********************************************
|
' Author: NetRube
|
||||||
' 文件名: NetRube_Upload.asp
|
' Email: NetRube@126.com
|
||||||
' 版本: NetRube Upload Class Version 2.1 Build 20050228
|
' Date: 02/28/2005
|
||||||
' 作者: NetRube(网络乡巴佬)
|
' Comments: The code for the Upload.
|
||||||
' 电子邮件: NetRube@126.com
|
' This can free usage, but please
|
||||||
' 日期: 2005年02月28日
|
' not to delete this copyright information.
|
||||||
' 声明: 文件上传类
|
' If you have a modification version,
|
||||||
' 本上传类可以自由使用,但请保留此版权声明信息
|
' Please send out a duplicate to me.
|
||||||
' 如果您对本上传类进行修改增强,
|
'**********************************************
|
||||||
' 请发送一份给俺。
|
' 文件名: NetRube_Upload.asp
|
||||||
'**********************************************
|
' 版本: NetRube Upload Class Version 2.1 Build 20050228
|
||||||
|
' 作者: NetRube(网络乡巴佬)
|
||||||
Class NetRube_Upload
|
' 电子邮件: NetRube@126.com
|
||||||
|
' 日期: 2005年02月28日
|
||||||
Public File, Form
|
' 声明: 文件上传类
|
||||||
Private oSourceData
|
' 本上传类可以自由使用,但请保留此版权声明信息
|
||||||
Private nMaxSize, nErr, sAllowed, sDenied
|
' 如果您对本上传类进行修改增强,
|
||||||
|
' 请发送一份给俺。
|
||||||
Private Sub Class_Initialize
|
'**********************************************
|
||||||
nErr = 0
|
|
||||||
nMaxSize = 1048576
|
Class NetRube_Upload
|
||||||
|
|
||||||
Set File = Server.CreateObject("Scripting.Dictionary")
|
Public File, Form
|
||||||
File.CompareMode = 1
|
Private oSourceData
|
||||||
Set Form = Server.CreateObject("Scripting.Dictionary")
|
Private nMaxSize, nErr, sAllowed, sDenied
|
||||||
Form.CompareMode = 1
|
|
||||||
|
Private Sub Class_Initialize
|
||||||
Set oSourceData = Server.CreateObject("ADODB.Stream")
|
nErr = 0
|
||||||
oSourceData.Type = 1
|
nMaxSize = 1048576
|
||||||
oSourceData.Mode = 3
|
|
||||||
oSourceData.Open
|
Set File = Server.CreateObject("Scripting.Dictionary")
|
||||||
End Sub
|
File.CompareMode = 1
|
||||||
|
Set Form = Server.CreateObject("Scripting.Dictionary")
|
||||||
Private Sub Class_Terminate
|
Form.CompareMode = 1
|
||||||
Form.RemoveAll
|
|
||||||
Set Form = Nothing
|
Set oSourceData = Server.CreateObject("ADODB.Stream")
|
||||||
File.RemoveAll
|
oSourceData.Type = 1
|
||||||
Set File = Nothing
|
oSourceData.Mode = 3
|
||||||
|
oSourceData.Open
|
||||||
oSourceData.Close
|
End Sub
|
||||||
Set oSourceData = Nothing
|
|
||||||
End Sub
|
Private Sub Class_Terminate
|
||||||
|
Form.RemoveAll
|
||||||
Public Property Get Version
|
Set Form = Nothing
|
||||||
Version = "NetRube Upload Class Version 1.0 Build 20041218"
|
File.RemoveAll
|
||||||
End Property
|
Set File = Nothing
|
||||||
|
|
||||||
Public Property Get ErrNum
|
oSourceData.Close
|
||||||
ErrNum = nErr
|
Set oSourceData = Nothing
|
||||||
End Property
|
End Sub
|
||||||
|
|
||||||
Public Property Let MaxSize(nSize)
|
Public Property Get Version
|
||||||
nMaxSize = nSize
|
Version = "NetRube Upload Class Version 1.0 Build 20041218"
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property Let Allowed(sExt)
|
Public Property Get ErrNum
|
||||||
sAllowed = sExt
|
ErrNum = nErr
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property Let Denied(sExt)
|
Public Property Let MaxSize(nSize)
|
||||||
sDenied = sExt
|
nMaxSize = nSize
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub GetData
|
Public Property Let Allowed(sExt)
|
||||||
Dim aCType
|
sAllowed = sExt
|
||||||
aCType = Split(Request.ServerVariables("HTTP_CONTENT_TYPE"), ";")
|
End Property
|
||||||
If aCType(0) <> "multipart/form-data" Then
|
|
||||||
nErr = 1
|
Public Property Let Denied(sExt)
|
||||||
Exit Sub
|
sDenied = sExt
|
||||||
End If
|
End Property
|
||||||
|
|
||||||
Dim nTotalSize
|
Public Sub GetData
|
||||||
nTotalSize = Request.TotalBytes
|
Dim aCType
|
||||||
If nTotalSize < 1 Then
|
aCType = Split(Request.ServerVariables("HTTP_CONTENT_TYPE"), ";")
|
||||||
nErr = 2
|
If aCType(0) <> "multipart/form-data" Then
|
||||||
Exit Sub
|
nErr = 1
|
||||||
End If
|
Exit Sub
|
||||||
If nMaxSize > 0 And nTotalSize > nMaxSize Then
|
End If
|
||||||
nErr = 3
|
|
||||||
Exit Sub
|
Dim nTotalSize
|
||||||
End If
|
nTotalSize = Request.TotalBytes
|
||||||
|
If nTotalSize < 1 Then
|
||||||
oSourceData.Write Request.BinaryRead(nTotalSize)
|
nErr = 2
|
||||||
oSourceData.Position = 0
|
Exit Sub
|
||||||
|
End If
|
||||||
Dim oTotalData, oFormStream, sFormHeader, sFormName, bCrLf, nBoundLen, nFormStart, nFormEnd, nPosStart, nPosEnd, sBoundary
|
If nMaxSize > 0 And nTotalSize > nMaxSize Then
|
||||||
|
nErr = 3
|
||||||
oTotalData = oSourceData.Read
|
Exit Sub
|
||||||
bCrLf = ChrB(13) & ChrB(10)
|
End If
|
||||||
sBoundary = MidB(oTotalData, 1, InStrB(1, oTotalData, bCrLf) - 1)
|
|
||||||
nBoundLen = LenB(sBoundary) + 2
|
oSourceData.Write Request.BinaryRead(nTotalSize)
|
||||||
nFormStart = nBoundLen
|
oSourceData.Position = 0
|
||||||
|
|
||||||
Set oFormStream = Server.CreateObject("ADODB.Stream")
|
Dim oTotalData, oFormStream, sFormHeader, sFormName, bCrLf, nBoundLen, nFormStart, nFormEnd, nPosStart, nPosEnd, sBoundary
|
||||||
|
|
||||||
Do While (nFormStart + 2) < nTotalSize
|
oTotalData = oSourceData.Read
|
||||||
nFormEnd = InStrB(nFormStart, oTotalData, bCrLf & bCrLf) + 3
|
bCrLf = ChrB(13) & ChrB(10)
|
||||||
|
sBoundary = MidB(oTotalData, 1, InStrB(1, oTotalData, bCrLf) - 1)
|
||||||
With oFormStream
|
nBoundLen = LenB(sBoundary) + 2
|
||||||
.Type = 1
|
nFormStart = nBoundLen
|
||||||
.Mode = 3
|
|
||||||
.Open
|
Set oFormStream = Server.CreateObject("ADODB.Stream")
|
||||||
oSourceData.Position = nFormStart
|
|
||||||
oSourceData.CopyTo oFormStream, nFormEnd - nFormStart
|
Do While (nFormStart + 2) < nTotalSize
|
||||||
.Position = 0
|
nFormEnd = InStrB(nFormStart, oTotalData, bCrLf & bCrLf) + 3
|
||||||
.Type = 2
|
|
||||||
.CharSet = "UTF-8"
|
With oFormStream
|
||||||
sFormHeader = .ReadText
|
.Type = 1
|
||||||
.Close
|
.Mode = 3
|
||||||
End With
|
.Open
|
||||||
|
oSourceData.Position = nFormStart
|
||||||
nFormStart = InStrB(nFormEnd, oTotalData, sBoundary) - 1
|
oSourceData.CopyTo oFormStream, nFormEnd - nFormStart
|
||||||
nPosStart = InStr(22, sFormHeader, " name=", 1) + 7
|
.Position = 0
|
||||||
nPosEnd = InStr(nPosStart, sFormHeader, """")
|
.Type = 2
|
||||||
sFormName = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
.CharSet = "UTF-8"
|
||||||
|
sFormHeader = .ReadText
|
||||||
If InStr(45, sFormHeader, " filename=", 1) > 0 Then
|
.Close
|
||||||
Set File(sFormName) = New NetRube_FileInfo
|
End With
|
||||||
File(sFormName).FormName = sFormName
|
|
||||||
File(sFormName).Start = nFormEnd
|
nFormStart = InStrB(nFormEnd, oTotalData, sBoundary) - 1
|
||||||
File(sFormName).Size = nFormStart - nFormEnd - 2
|
nPosStart = InStr(22, sFormHeader, " name=", 1) + 7
|
||||||
nPosStart = InStr(nPosEnd, sFormHeader, " filename=", 1) + 11
|
nPosEnd = InStr(nPosStart, sFormHeader, """")
|
||||||
nPosEnd = InStr(nPosStart, sFormHeader, """")
|
sFormName = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
||||||
File(sFormName).ClientPath = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
|
||||||
File(sFormName).Name = Mid(File(sFormName).ClientPath, InStrRev(File(sFormName).ClientPath, "\") + 1)
|
If InStr(45, sFormHeader, " filename=", 1) > 0 Then
|
||||||
File(sFormName).Ext = LCase(Mid(File(sFormName).Name, InStrRev(File(sFormName).Name, ".") + 1))
|
Set File(sFormName) = New NetRube_FileInfo
|
||||||
nPosStart = InStr(nPosEnd, sFormHeader, "Content-Type: ", 1) + 14
|
File(sFormName).FormName = sFormName
|
||||||
nPosEnd = InStr(nPosStart, sFormHeader, vbCr)
|
File(sFormName).Start = nFormEnd
|
||||||
File(sFormName).MIME = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
File(sFormName).Size = nFormStart - nFormEnd - 2
|
||||||
Else
|
nPosStart = InStr(nPosEnd, sFormHeader, " filename=", 1) + 11
|
||||||
With oFormStream
|
nPosEnd = InStr(nPosStart, sFormHeader, """")
|
||||||
.Type = 1
|
File(sFormName).ClientPath = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
||||||
.Mode = 3
|
File(sFormName).Name = Mid(File(sFormName).ClientPath, InStrRev(File(sFormName).ClientPath, "\") + 1)
|
||||||
.Open
|
File(sFormName).Ext = LCase(Mid(File(sFormName).Name, InStrRev(File(sFormName).Name, ".") + 1))
|
||||||
oSourceData.Position = nPosEnd
|
nPosStart = InStr(nPosEnd, sFormHeader, "Content-Type: ", 1) + 14
|
||||||
oSourceData.CopyTo oFormStream, nFormStart - nFormEnd - 2
|
nPosEnd = InStr(nPosStart, sFormHeader, vbCr)
|
||||||
.Position = 0
|
File(sFormName).MIME = Mid(sFormHeader, nPosStart, nPosEnd - nPosStart)
|
||||||
.Type = 2
|
Else
|
||||||
.CharSet = "UTF-8"
|
With oFormStream
|
||||||
Form(sFormName) = .ReadText
|
.Type = 1
|
||||||
.Close
|
.Mode = 3
|
||||||
End With
|
.Open
|
||||||
End If
|
oSourceData.Position = nPosEnd
|
||||||
|
oSourceData.CopyTo oFormStream, nFormStart - nFormEnd - 2
|
||||||
nFormStart = nFormStart + nBoundLen
|
.Position = 0
|
||||||
Loop
|
.Type = 2
|
||||||
|
.CharSet = "UTF-8"
|
||||||
oTotalData = ""
|
Form(sFormName) = .ReadText
|
||||||
Set oFormStream = Nothing
|
.Close
|
||||||
End Sub
|
End With
|
||||||
|
End If
|
||||||
Public Sub SaveAs(sItem, sFileName)
|
|
||||||
If File(sItem).Size < 1 Then
|
nFormStart = nFormStart + nBoundLen
|
||||||
nErr = 2
|
Loop
|
||||||
Exit Sub
|
|
||||||
End If
|
oTotalData = ""
|
||||||
|
Set oFormStream = Nothing
|
||||||
If Not IsAllowed(File(sItem).Ext) Then
|
End Sub
|
||||||
nErr = 4
|
|
||||||
Exit Sub
|
Public Sub SaveAs(sItem, sFileName)
|
||||||
End If
|
If File(sItem).Size < 1 Then
|
||||||
|
nErr = 2
|
||||||
Dim oFileStream
|
Exit Sub
|
||||||
Set oFileStream = Server.CreateObject("ADODB.Stream")
|
End If
|
||||||
With oFileStream
|
|
||||||
.Type = 1
|
If Not IsAllowed(File(sItem).Ext) Then
|
||||||
.Mode = 3
|
nErr = 4
|
||||||
.Open
|
Exit Sub
|
||||||
oSourceData.Position = File(sItem).Start
|
End If
|
||||||
oSourceData.CopyTo oFileStream, File(sItem).Size
|
|
||||||
.Position = 0
|
Dim oFileStream
|
||||||
.SaveToFile sFileName, 2
|
Set oFileStream = Server.CreateObject("ADODB.Stream")
|
||||||
.Close
|
With oFileStream
|
||||||
End With
|
.Type = 1
|
||||||
Set oFileStream = Nothing
|
.Mode = 3
|
||||||
End Sub
|
.Open
|
||||||
|
oSourceData.Position = File(sItem).Start
|
||||||
Private Function IsAllowed(sExt)
|
oSourceData.CopyTo oFileStream, File(sItem).Size
|
||||||
Dim oRE
|
.Position = 0
|
||||||
Set oRE = New RegExp
|
.SaveToFile sFileName, 2
|
||||||
oRE.IgnoreCase = True
|
.Close
|
||||||
oRE.Global = True
|
End With
|
||||||
|
Set oFileStream = Nothing
|
||||||
If sDenied = "" Then
|
End Sub
|
||||||
oRE.Pattern = sAllowed
|
|
||||||
IsAllowed = (sAllowed = "") Or oRE.Test(sExt)
|
Private Function IsAllowed(sExt)
|
||||||
Else
|
Dim oRE
|
||||||
oRE.Pattern = sDenied
|
Set oRE = New RegExp
|
||||||
IsAllowed = Not oRE.Test(sExt)
|
oRE.IgnoreCase = True
|
||||||
End If
|
oRE.Global = True
|
||||||
|
|
||||||
Set oRE = Nothing
|
If sDenied = "" Then
|
||||||
End Function
|
oRE.Pattern = sAllowed
|
||||||
End Class
|
IsAllowed = (sAllowed = "") Or oRE.Test(sExt)
|
||||||
|
Else
|
||||||
Class NetRube_FileInfo
|
oRE.Pattern = sDenied
|
||||||
Dim FormName, ClientPath, Path, Name, Ext, Content, Size, MIME, Start
|
IsAllowed = Not oRE.Test(sExt)
|
||||||
End Class
|
End If
|
||||||
|
|
||||||
|
Set oRE = Nothing
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Class NetRube_FileInfo
|
||||||
|
Dim FormName, ClientPath, Path, Name, Ext, Content, Size, MIME, Start
|
||||||
|
End Class
|
||||||
%>
|
%>
|
||||||
@@ -1,179 +1,187 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: commands.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This file include the functions that handle the Command requests
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* in the ASP Connector.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<%
|
*
|
||||||
Sub GetFolders( resourceType, currentFolder )
|
* File Name: commands.asp
|
||||||
' Map the virtual path to the local server path.
|
* This file include the functions that handle the Command requests
|
||||||
Dim sServerDir
|
* in the ASP Connector.
|
||||||
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
*
|
||||||
|
* File Authors:
|
||||||
' Open the "Folders" node.
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
Response.Write "<Folders>"
|
-->
|
||||||
|
<%
|
||||||
Dim oFSO, oCurrentFolder, oFolders, oFolder
|
Sub GetFolders( resourceType, currentFolder )
|
||||||
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
' Map the virtual path to the local server path.
|
||||||
Set oCurrentFolder = oFSO.GetFolder( sServerDir )
|
Dim sServerDir
|
||||||
Set oFolders = oCurrentFolder.SubFolders
|
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
||||||
|
|
||||||
For Each oFolder in oFolders
|
' Open the "Folders" node.
|
||||||
Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
|
Response.Write "<Folders>"
|
||||||
Next
|
|
||||||
|
Dim oFSO, oCurrentFolder, oFolders, oFolder
|
||||||
Set oFSO = Nothing
|
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
||||||
|
Set oCurrentFolder = oFSO.GetFolder( sServerDir )
|
||||||
' Close the "Folders" node.
|
Set oFolders = oCurrentFolder.SubFolders
|
||||||
Response.Write "</Folders>"
|
|
||||||
End Sub
|
For Each oFolder in oFolders
|
||||||
|
Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
|
||||||
Sub GetFoldersAndFiles( resourceType, currentFolder )
|
Next
|
||||||
' Map the virtual path to the local server path.
|
|
||||||
Dim sServerDir
|
Set oFSO = Nothing
|
||||||
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
|
||||||
|
' Close the "Folders" node.
|
||||||
Dim oFSO, oCurrentFolder, oFolders, oFolder, oFiles, oFile
|
Response.Write "</Folders>"
|
||||||
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
End Sub
|
||||||
Set oCurrentFolder = oFSO.GetFolder( sServerDir )
|
|
||||||
Set oFolders = oCurrentFolder.SubFolders
|
Sub GetFoldersAndFiles( resourceType, currentFolder )
|
||||||
Set oFiles = oCurrentFolder.Files
|
' Map the virtual path to the local server path.
|
||||||
|
Dim sServerDir
|
||||||
' Open the "Folders" node.
|
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
||||||
Response.Write "<Folders>"
|
|
||||||
|
Dim oFSO, oCurrentFolder, oFolders, oFolder, oFiles, oFile
|
||||||
For Each oFolder in oFolders
|
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
||||||
Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
|
Set oCurrentFolder = oFSO.GetFolder( sServerDir )
|
||||||
Next
|
Set oFolders = oCurrentFolder.SubFolders
|
||||||
|
Set oFiles = oCurrentFolder.Files
|
||||||
' Close the "Folders" node.
|
|
||||||
Response.Write "</Folders>"
|
' Open the "Folders" node.
|
||||||
|
Response.Write "<Folders>"
|
||||||
' Open the "Files" node.
|
|
||||||
Response.Write "<Files>"
|
For Each oFolder in oFolders
|
||||||
|
Response.Write "<Folder name=""" & ConvertToXmlAttribute( oFolder.name ) & """ />"
|
||||||
For Each oFile in oFiles
|
Next
|
||||||
Dim iFileSize
|
|
||||||
iFileSize = Round( oFile.size / 1024 )
|
' Close the "Folders" node.
|
||||||
If ( iFileSize < 1 AND oFile.size <> 0 ) Then iFileSize = 1
|
Response.Write "</Folders>"
|
||||||
|
|
||||||
Response.Write "<File name=""" & ConvertToXmlAttribute( oFile.name ) & """ size=""" & iFileSize & """ />"
|
' Open the "Files" node.
|
||||||
Next
|
Response.Write "<Files>"
|
||||||
|
|
||||||
' Close the "Files" node.
|
For Each oFile in oFiles
|
||||||
Response.Write "</Files>"
|
Dim iFileSize
|
||||||
End Sub
|
iFileSize = Round( oFile.size / 1024 )
|
||||||
|
If ( iFileSize < 1 AND oFile.size <> 0 ) Then iFileSize = 1
|
||||||
Sub CreateFolder( resourceType, currentFolder )
|
|
||||||
Dim sErrorNumber
|
Response.Write "<File name=""" & ConvertToXmlAttribute( oFile.name ) & """ size=""" & iFileSize & """ />"
|
||||||
|
Next
|
||||||
Dim sNewFolderName
|
|
||||||
sNewFolderName = Request.QueryString( "NewFolderName" )
|
' Close the "Files" node.
|
||||||
|
Response.Write "</Files>"
|
||||||
If ( sNewFolderName = "" OR InStr( 1, sNewFolderName, ".." ) > 0 ) Then
|
End Sub
|
||||||
sErrorNumber = "102"
|
|
||||||
Else
|
Sub CreateFolder( resourceType, currentFolder )
|
||||||
' Map the virtual path to the local server path of the current folder.
|
Dim sErrorNumber
|
||||||
Dim sServerDir
|
|
||||||
sServerDir = ServerMapFolder( resourceType, currentFolder & "/" & sNewFolderName )
|
Dim sNewFolderName
|
||||||
|
sNewFolderName = Request.QueryString( "NewFolderName" )
|
||||||
On Error Resume Next
|
|
||||||
|
If ( sNewFolderName = "" OR InStr( 1, sNewFolderName, ".." ) > 0 ) Then
|
||||||
CreateServerFolder sServerDir
|
sErrorNumber = "102"
|
||||||
|
Else
|
||||||
Dim iErrNumber, sErrDescription
|
' Map the virtual path to the local server path of the current folder.
|
||||||
iErrNumber = err.number
|
Dim sServerDir
|
||||||
sErrDescription = err.Description
|
sServerDir = ServerMapFolder( resourceType, currentFolder & "/" & sNewFolderName )
|
||||||
|
|
||||||
On Error Goto 0
|
On Error Resume Next
|
||||||
|
|
||||||
Select Case iErrNumber
|
CreateServerFolder sServerDir
|
||||||
Case 0
|
|
||||||
sErrorNumber = "0"
|
Dim iErrNumber, sErrDescription
|
||||||
Case 52
|
iErrNumber = err.number
|
||||||
sErrorNumber = "102" ' Invalid Folder Name.
|
sErrDescription = err.Description
|
||||||
Case 70
|
|
||||||
sErrorNumber = "103" ' Security Error.
|
On Error Goto 0
|
||||||
Case 76
|
|
||||||
sErrorNumber = "102" ' Path too long.
|
Select Case iErrNumber
|
||||||
Case Else
|
Case 0
|
||||||
sErrorNumber = "110"
|
sErrorNumber = "0"
|
||||||
End Select
|
Case 52
|
||||||
End If
|
sErrorNumber = "102" ' Invalid Folder Name.
|
||||||
|
Case 70
|
||||||
' Create the "Error" node.
|
sErrorNumber = "103" ' Security Error.
|
||||||
Response.Write "<Error number=""" & sErrorNumber & """ originalNumber=""" & iErrNumber & """ originalDescription=""" & ConvertToXmlAttribute( sErrDescription ) & """ />"
|
Case 76
|
||||||
End Sub
|
sErrorNumber = "102" ' Path too long.
|
||||||
|
Case Else
|
||||||
Sub FileUpload( resourceType, currentFolder )
|
sErrorNumber = "110"
|
||||||
Dim oUploader
|
End Select
|
||||||
Set oUploader = New NetRube_Upload
|
End If
|
||||||
oUploader.MaxSize = 0
|
|
||||||
oUploader.Allowed = ConfigAllowedExtensions.Item( resourceType )
|
' Create the "Error" node.
|
||||||
oUploader.Denied = ConfigDeniedExtensions.Item( resourceType )
|
Response.Write "<Error number=""" & sErrorNumber & """ originalNumber=""" & iErrNumber & """ originalDescription=""" & ConvertToXmlAttribute( sErrDescription ) & """ />"
|
||||||
oUploader.GetData
|
End Sub
|
||||||
|
|
||||||
Dim sErrorNumber
|
Sub FileUpload( resourceType, currentFolder )
|
||||||
sErrorNumber = "0"
|
Dim oUploader
|
||||||
|
Set oUploader = New NetRube_Upload
|
||||||
Dim sFileName, sOriginalFileName, sExtension
|
oUploader.MaxSize = 0
|
||||||
sFileName = ""
|
oUploader.Allowed = ConfigAllowedExtensions.Item( resourceType )
|
||||||
|
oUploader.Denied = ConfigDeniedExtensions.Item( resourceType )
|
||||||
If oUploader.ErrNum > 1 Then
|
oUploader.GetData
|
||||||
sErrorNumber = "202"
|
|
||||||
Else
|
Dim sErrorNumber
|
||||||
' Map the virtual path to the local server path.
|
sErrorNumber = "0"
|
||||||
Dim sServerDir
|
|
||||||
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
Dim sFileName, sOriginalFileName, sExtension
|
||||||
|
sFileName = ""
|
||||||
Dim oFSO
|
|
||||||
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
If oUploader.ErrNum > 1 Then
|
||||||
|
sErrorNumber = "202"
|
||||||
' Get the uploaded file name.
|
Else
|
||||||
sFileName = oUploader.File( "NewFile" ).Name
|
' Map the virtual path to the local server path.
|
||||||
sExtension = oUploader.File( "NewFile" ).Ext
|
Dim sServerDir
|
||||||
sOriginalFileName = sFileName
|
sServerDir = ServerMapFolder( resourceType, currentFolder )
|
||||||
|
|
||||||
Dim iCounter
|
Dim oFSO
|
||||||
iCounter = 0
|
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
||||||
|
|
||||||
Do While ( True )
|
' Get the uploaded file name.
|
||||||
Dim sFilePath
|
sFileName = oUploader.File( "NewFile" ).Name
|
||||||
sFilePath = sServerDir & sFileName
|
sExtension = oUploader.File( "NewFile" ).Ext
|
||||||
|
sOriginalFileName = sFileName
|
||||||
If ( oFSO.FileExists( sFilePath ) ) Then
|
|
||||||
iCounter = iCounter + 1
|
Dim iCounter
|
||||||
sFileName = RemoveExtension( sOriginalFileName ) & "(" & iCounter & ")." & sExtension
|
iCounter = 0
|
||||||
sErrorNumber = "201"
|
|
||||||
Else
|
Do While ( True )
|
||||||
oUploader.SaveAs "NewFile", sFilePath
|
Dim sFilePath
|
||||||
If oUploader.ErrNum > 0 Then sErrorNumber = "202"
|
sFilePath = sServerDir & sFileName
|
||||||
Exit Do
|
|
||||||
End If
|
If ( oFSO.FileExists( sFilePath ) ) Then
|
||||||
Loop
|
iCounter = iCounter + 1
|
||||||
End If
|
sFileName = RemoveExtension( sOriginalFileName ) & "(" & iCounter & ")." & sExtension
|
||||||
|
sErrorNumber = "201"
|
||||||
Set oUploader = Nothing
|
Else
|
||||||
|
oUploader.SaveAs "NewFile", sFilePath
|
||||||
Response.Clear
|
If oUploader.ErrNum > 0 Then sErrorNumber = "202"
|
||||||
|
Exit Do
|
||||||
Response.Write "<script type=""text/javascript"">"
|
End If
|
||||||
Response.Write "window.parent.frames['frmUpload'].OnUploadCompleted(" & sErrorNumber & ",'" & Replace( sFileName, "'", "\'" ) & "') ;"
|
Loop
|
||||||
Response.Write "</script>"
|
End If
|
||||||
|
|
||||||
Response.End
|
Set oUploader = Nothing
|
||||||
End Sub
|
|
||||||
|
Response.Clear
|
||||||
|
|
||||||
|
Response.Write "<script type=""text/javascript"">"
|
||||||
|
Response.Write "window.parent.frames['frmUpload'].OnUploadCompleted(" & sErrorNumber & ",'" & Replace( sFileName, "'", "\'" ) & "') ;"
|
||||||
|
Response.Write "</script>"
|
||||||
|
|
||||||
|
Response.End
|
||||||
|
End Sub
|
||||||
%>
|
%>
|
||||||
@@ -1,45 +1,53 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: config.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Configuration file for the File Manager Connector for ASP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<%
|
* == END LICENSE ==
|
||||||
|
*
|
||||||
' SECURITY: You must explicitelly enable this "connector" (set it to "True").
|
* File Name: config.asp
|
||||||
Dim ConfigIsEnabled
|
* Configuration file for the File Manager Connector for ASP.
|
||||||
ConfigIsEnabled = False
|
*
|
||||||
|
* File Authors:
|
||||||
' Path to user files relative to the document root.
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
Dim ConfigUserFilesPath
|
-->
|
||||||
ConfigUserFilesPath = "/UserFiles/"
|
<%
|
||||||
|
|
||||||
Dim ConfigAllowedExtensions, ConfigDeniedExtensions
|
' SECURITY: You must explicitelly enable this "connector" (set it to "True").
|
||||||
Set ConfigAllowedExtensions = CreateObject( "Scripting.Dictionary" )
|
Dim ConfigIsEnabled
|
||||||
Set ConfigDeniedExtensions = CreateObject( "Scripting.Dictionary" )
|
ConfigIsEnabled = False
|
||||||
|
|
||||||
ConfigAllowedExtensions.Add "File", ""
|
' Path to user files relative to the document root.
|
||||||
ConfigDeniedExtensions.Add "File", "php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi"
|
Dim ConfigUserFilesPath
|
||||||
|
ConfigUserFilesPath = "/userfiles/"
|
||||||
ConfigAllowedExtensions.Add "Image", "jpg|gif|jpeg|png|bmp"
|
|
||||||
ConfigDeniedExtensions.Add "Image", ""
|
Dim ConfigAllowedExtensions, ConfigDeniedExtensions
|
||||||
|
Set ConfigAllowedExtensions = CreateObject( "Scripting.Dictionary" )
|
||||||
ConfigAllowedExtensions.Add "Flash", "swf|fla"
|
Set ConfigDeniedExtensions = CreateObject( "Scripting.Dictionary" )
|
||||||
ConfigDeniedExtensions.Add "Flash", ""
|
|
||||||
|
ConfigAllowedExtensions.Add "File", ""
|
||||||
ConfigAllowedExtensions.Add "Media", "swf|fla|jpg|gif|jpeg|png|avi|mpg|mpeg|mp(1-4)|wma|wmv|wav|mid|midi|rmi|rm|ram|rmvb|mov|qt"
|
ConfigDeniedExtensions.Add "File", "html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis"
|
||||||
ConfigDeniedExtensions.Add "Media", ""
|
|
||||||
|
ConfigAllowedExtensions.Add "Image", "jpg|gif|jpeg|png|bmp"
|
||||||
|
ConfigDeniedExtensions.Add "Image", ""
|
||||||
|
|
||||||
|
ConfigAllowedExtensions.Add "Flash", "swf|fla"
|
||||||
|
ConfigDeniedExtensions.Add "Flash", ""
|
||||||
|
|
||||||
|
ConfigAllowedExtensions.Add "Media", "swf|fla|jpg|gif|jpeg|png|avi|mpg|mpeg|mp(1-4)|wma|wmv|wav|mid|midi|rmi|rm|ram|rmvb|mov|qt"
|
||||||
|
ConfigDeniedExtensions.Add "Media", ""
|
||||||
|
|
||||||
%>
|
%>
|
||||||
@@ -1,120 +1,128 @@
|
|||||||
<%@ CodePage=65001 Language="VBScript"%>
|
<%@ CodePage=65001 Language="VBScript"%>
|
||||||
<%
|
<%
|
||||||
Option Explicit
|
Option Explicit
|
||||||
Response.Buffer = True
|
Response.Buffer = True
|
||||||
%>
|
%>
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: connector.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for ASP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!--#include file="config.asp"-->
|
* == END LICENSE ==
|
||||||
<!--#include file="util.asp"-->
|
*
|
||||||
<!--#include file="io.asp"-->
|
* File Name: connector.asp
|
||||||
<!--#include file="basexml.asp"-->
|
* This is the File Manager Connector for ASP.
|
||||||
<!--#include file="commands.asp"-->
|
*
|
||||||
<!--#include file="class_upload.asp"-->
|
* File Authors:
|
||||||
<%
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
If ( ConfigIsEnabled = False ) Then
|
<!--#include file="config.asp"-->
|
||||||
SendError 1, "This connector is disabled. Please check the ""editor/filemanager/browser/default/connectors/asp/config.asp"" file"
|
<!--#include file="util.asp"-->
|
||||||
End If
|
<!--#include file="io.asp"-->
|
||||||
|
<!--#include file="basexml.asp"-->
|
||||||
' Get the "UserFiles" path.
|
<!--#include file="commands.asp"-->
|
||||||
Dim sUserFilesPath
|
<!--#include file="class_upload.asp"-->
|
||||||
|
<%
|
||||||
If ( Not IsEmpty( ConfigUserFilesPath ) ) Then
|
|
||||||
sUserFilesPath = ConfigUserFilesPath
|
If ( ConfigIsEnabled = False ) Then
|
||||||
|
SendError 1, "This connector is disabled. Please check the ""editor/filemanager/browser/default/connectors/asp/config.asp"" file"
|
||||||
If ( Right( sUserFilesPath, 1 ) <> "/" ) Then
|
End If
|
||||||
sUserFilesPath = sUserFilesPath & "/"
|
|
||||||
End If
|
' Get the "UserFiles" path.
|
||||||
Else
|
Dim sUserFilesPath
|
||||||
sUserFilesPath = "/UserFiles/"
|
|
||||||
End If
|
If ( Not IsEmpty( ConfigUserFilesPath ) ) Then
|
||||||
|
sUserFilesPath = ConfigUserFilesPath
|
||||||
' Map the "UserFiles" path to a local directory.
|
|
||||||
Dim sUserFilesDirectory
|
If ( Right( sUserFilesPath, 1 ) <> "/" ) Then
|
||||||
sUserFilesDirectory = Server.MapPath( sUserFilesPath )
|
sUserFilesPath = sUserFilesPath & "/"
|
||||||
|
End If
|
||||||
If ( Right( sUserFilesDirectory, 1 ) <> "\" ) Then
|
Else
|
||||||
sUserFilesDirectory = sUserFilesDirectory & "\"
|
sUserFilesPath = "/userfiles/"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DoResponse
|
' Map the "UserFiles" path to a local directory.
|
||||||
|
Dim sUserFilesDirectory
|
||||||
Sub DoResponse()
|
sUserFilesDirectory = Server.MapPath( sUserFilesPath )
|
||||||
Dim sCommand, sResourceType, sCurrentFolder
|
|
||||||
|
If ( Right( sUserFilesDirectory, 1 ) <> "\" ) Then
|
||||||
' Get the main request information.
|
sUserFilesDirectory = sUserFilesDirectory & "\"
|
||||||
sCommand = Request.QueryString("Command")
|
End If
|
||||||
If ( sCommand = "" ) Then Exit Sub
|
|
||||||
|
DoResponse
|
||||||
sResourceType = Request.QueryString("Type")
|
|
||||||
If ( sResourceType = "" ) Then Exit Sub
|
Sub DoResponse()
|
||||||
|
Dim sCommand, sResourceType, sCurrentFolder
|
||||||
sCurrentFolder = Request.QueryString("CurrentFolder")
|
|
||||||
If ( sCurrentFolder = "" ) Then Exit Sub
|
' Get the main request information.
|
||||||
|
sCommand = Request.QueryString("Command")
|
||||||
' Check if it is an allower resource type.
|
If ( sCommand = "" ) Then Exit Sub
|
||||||
if ( Not IsAllowedType( sResourceType ) ) Then Exit Sub
|
|
||||||
|
sResourceType = Request.QueryString("Type")
|
||||||
' Check the current folder syntax (must begin and start with a slash).
|
If ( sResourceType = "" ) Then Exit Sub
|
||||||
If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/"
|
|
||||||
If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder
|
sCurrentFolder = Request.QueryString("CurrentFolder")
|
||||||
|
If ( sCurrentFolder = "" ) Then Exit Sub
|
||||||
' Check for invalid folder paths (..)
|
|
||||||
If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sResourceType, ".." ) <> 0 ) Then
|
' Check if it is an allower resource type.
|
||||||
SendError 102, ""
|
if ( Not IsAllowedType( sResourceType ) ) Then Exit Sub
|
||||||
End If
|
|
||||||
|
' Check the current folder syntax (must begin and start with a slash).
|
||||||
' File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
If ( Right( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = sCurrentFolder & "/"
|
||||||
If ( sCommand = "FileUpload" ) Then
|
If ( Left( sCurrentFolder, 1 ) <> "/" ) Then sCurrentFolder = "/" & sCurrentFolder
|
||||||
FileUpload sResourceType, sCurrentFolder
|
|
||||||
Exit Sub
|
' Check for invalid folder paths (..)
|
||||||
End If
|
If ( InStr( 1, sCurrentFolder, ".." ) <> 0 OR InStr( 1, sResourceType, ".." ) <> 0 ) Then
|
||||||
|
SendError 102, ""
|
||||||
SetXmlHeaders
|
End If
|
||||||
|
|
||||||
CreateXmlHeader sCommand, sResourceType, sCurrentFolder
|
' File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
||||||
|
If ( sCommand = "FileUpload" ) Then
|
||||||
' Execute the required command.
|
FileUpload sResourceType, sCurrentFolder
|
||||||
Select Case sCommand
|
Exit Sub
|
||||||
Case "GetFolders"
|
End If
|
||||||
GetFolders sResourceType, sCurrentFolder
|
|
||||||
Case "GetFoldersAndFiles"
|
SetXmlHeaders
|
||||||
GetFoldersAndFiles sResourceType, sCurrentFolder
|
|
||||||
Case "CreateFolder"
|
CreateXmlHeader sCommand, sResourceType, sCurrentFolder
|
||||||
CreateFolder sResourceType, sCurrentFolder
|
|
||||||
End Select
|
' Execute the required command.
|
||||||
|
Select Case sCommand
|
||||||
CreateXmlFooter
|
Case "GetFolders"
|
||||||
|
GetFolders sResourceType, sCurrentFolder
|
||||||
Response.End
|
Case "GetFoldersAndFiles"
|
||||||
End Sub
|
GetFoldersAndFiles sResourceType, sCurrentFolder
|
||||||
|
Case "CreateFolder"
|
||||||
Function IsAllowedType( resourceType )
|
CreateFolder sResourceType, sCurrentFolder
|
||||||
Dim oRE
|
End Select
|
||||||
Set oRE = New RegExp
|
|
||||||
oRE.IgnoreCase = True
|
CreateXmlFooter
|
||||||
oRE.Global = True
|
|
||||||
oRE.Pattern = "^(File|Image|Flash|Media)$"
|
Response.End
|
||||||
|
End Sub
|
||||||
IsAllowedType = oRE.Test( resourceType )
|
|
||||||
|
Function IsAllowedType( resourceType )
|
||||||
Set oRE = Nothing
|
Dim oRE
|
||||||
End Function
|
Set oRE = New RegExp
|
||||||
|
oRE.IgnoreCase = True
|
||||||
|
oRE.Global = True
|
||||||
|
oRE.Pattern = "^(File|Image|Flash|Media)$"
|
||||||
|
|
||||||
|
IsAllowedType = oRE.Test( resourceType )
|
||||||
|
|
||||||
|
Set oRE = Nothing
|
||||||
|
End Function
|
||||||
%>
|
%>
|
||||||
@@ -1,85 +1,93 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: io.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This file include IO specific functions used by the ASP Connector.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<%
|
* == END LICENSE ==
|
||||||
Function GetUrlFromPath( resourceType, folderPath )
|
*
|
||||||
If resourceType = "" Then
|
* File Name: io.asp
|
||||||
GetUrlFromPath = RemoveFromEnd( sUserFilesPath, "/" ) & folderPath
|
* This file include IO specific functions used by the ASP Connector.
|
||||||
Else
|
*
|
||||||
GetUrlFromPath = sUserFilesPath & resourceType & folderPath
|
* File Authors:
|
||||||
End If
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
End Function
|
-->
|
||||||
|
<%
|
||||||
Function RemoveExtension( fileName )
|
Function GetUrlFromPath( resourceType, folderPath )
|
||||||
RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 )
|
If resourceType = "" Then
|
||||||
End Function
|
GetUrlFromPath = RemoveFromEnd( sUserFilesPath, "/" ) & folderPath
|
||||||
|
Else
|
||||||
Function ServerMapFolder( resourceType, folderPath )
|
GetUrlFromPath = sUserFilesPath & LCase( resourceType ) & folderPath
|
||||||
' Get the resource type directory.
|
End If
|
||||||
Dim sResourceTypePath
|
End Function
|
||||||
sResourceTypePath = sUserFilesDirectory & resourceType & "\"
|
|
||||||
|
Function RemoveExtension( fileName )
|
||||||
' Ensure that the directory exists.
|
RemoveExtension = Left( fileName, InStrRev( fileName, "." ) - 1 )
|
||||||
CreateServerFolder sResourceTypePath
|
End Function
|
||||||
|
|
||||||
' Return the resource type directory combined with the required path.
|
Function ServerMapFolder( resourceType, folderPath )
|
||||||
ServerMapFolder = sResourceTypePath & RemoveFromStart( folderPath, "/" )
|
' Get the resource type directory.
|
||||||
End Function
|
Dim sResourceTypePath
|
||||||
|
sResourceTypePath = sUserFilesDirectory & LCase( resourceType ) & "\"
|
||||||
Sub CreateServerFolder( folderPath )
|
|
||||||
Dim oFSO
|
' Ensure that the directory exists.
|
||||||
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
CreateServerFolder sResourceTypePath
|
||||||
|
|
||||||
Dim sParent
|
' Return the resource type directory combined with the required path.
|
||||||
sParent = oFSO.GetParentFolderName( folderPath )
|
ServerMapFolder = sResourceTypePath & RemoveFromStart( folderPath, "/" )
|
||||||
|
End Function
|
||||||
' Check if the parent exists, or create it.
|
|
||||||
If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent )
|
Sub CreateServerFolder( folderPath )
|
||||||
|
Dim oFSO
|
||||||
If ( oFSO.FolderExists( folderPath ) = False ) Then
|
Set oFSO = Server.CreateObject( "Scripting.FileSystemObject" )
|
||||||
oFSO.CreateFolder( folderPath )
|
|
||||||
End If
|
Dim sParent
|
||||||
|
sParent = oFSO.GetParentFolderName( folderPath )
|
||||||
Set oFSO = Nothing
|
|
||||||
End Sub
|
' Check if the parent exists, or create it.
|
||||||
|
If ( NOT oFSO.FolderExists( sParent ) ) Then CreateServerFolder( sParent )
|
||||||
Function IsAllowedExt( extension, resourceType )
|
|
||||||
Dim oRE
|
If ( oFSO.FolderExists( folderPath ) = False ) Then
|
||||||
Set oRE = New RegExp
|
oFSO.CreateFolder( folderPath )
|
||||||
oRE.IgnoreCase = True
|
End If
|
||||||
oRE.Global = True
|
|
||||||
|
Set oFSO = Nothing
|
||||||
Dim sAllowed, sDenied
|
End Sub
|
||||||
sAllowed = ConfigAllowedExtensions.Item( resourceType )
|
|
||||||
sDenied = ConfigDeniedExtensions.Item( resourceType )
|
Function IsAllowedExt( extension, resourceType )
|
||||||
|
Dim oRE
|
||||||
IsAllowedExt = True
|
Set oRE = New RegExp
|
||||||
|
oRE.IgnoreCase = True
|
||||||
If sDenied <> "" Then
|
oRE.Global = True
|
||||||
oRE.Pattern = sDenied
|
|
||||||
IsAllowedExt = Not oRE.Test( extension )
|
Dim sAllowed, sDenied
|
||||||
End If
|
sAllowed = ConfigAllowedExtensions.Item( resourceType )
|
||||||
|
sDenied = ConfigDeniedExtensions.Item( resourceType )
|
||||||
If IsAllowedExt And sAllowed <> "" Then
|
|
||||||
oRE.Pattern = sAllowed
|
IsAllowedExt = True
|
||||||
IsAllowedExt = oRE.Test( extension )
|
|
||||||
End If
|
If sDenied <> "" Then
|
||||||
|
oRE.Pattern = sDenied
|
||||||
Set oRE = Nothing
|
IsAllowedExt = Not oRE.Test( extension )
|
||||||
End Function
|
End If
|
||||||
|
|
||||||
|
If IsAllowedExt And sAllowed <> "" Then
|
||||||
|
oRE.Pattern = sAllowed
|
||||||
|
IsAllowedExt = oRE.Test( extension )
|
||||||
|
End If
|
||||||
|
|
||||||
|
Set oRE = Nothing
|
||||||
|
End Function
|
||||||
%>
|
%>
|
||||||
@@ -1,51 +1,59 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: util.asp
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This file include generic functions used by the ASP Connector.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<%
|
* == END LICENSE ==
|
||||||
Function RemoveFromStart( sourceString, charToRemove )
|
*
|
||||||
Dim oRegex
|
* File Name: util.asp
|
||||||
Set oRegex = New RegExp
|
* This file include generic functions used by the ASP Connector.
|
||||||
oRegex.Pattern = "^" & charToRemove & "+"
|
*
|
||||||
|
* File Authors:
|
||||||
RemoveFromStart = oRegex.Replace( sourceString, "" )
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
End Function
|
-->
|
||||||
|
<%
|
||||||
Function RemoveFromEnd( sourceString, charToRemove )
|
Function RemoveFromStart( sourceString, charToRemove )
|
||||||
Dim oRegex
|
Dim oRegex
|
||||||
Set oRegex = New RegExp
|
Set oRegex = New RegExp
|
||||||
oRegex.Pattern = charToRemove & "+$"
|
oRegex.Pattern = "^" & charToRemove & "+"
|
||||||
|
|
||||||
RemoveFromEnd = oRegex.Replace( sourceString, "" )
|
RemoveFromStart = oRegex.Replace( sourceString, "" )
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function ConvertToXmlAttribute( value )
|
Function RemoveFromEnd( sourceString, charToRemove )
|
||||||
ConvertToXmlAttribute = Replace( value, "&", "&" )
|
Dim oRegex
|
||||||
End Function
|
Set oRegex = New RegExp
|
||||||
|
oRegex.Pattern = charToRemove & "+$"
|
||||||
Function InArray( value, sourceArray )
|
|
||||||
Dim i
|
RemoveFromEnd = oRegex.Replace( sourceString, "" )
|
||||||
For i = 0 to UBound( sourceArray )
|
End Function
|
||||||
If sourceArray(i) = value Then
|
|
||||||
InArray = True
|
Function ConvertToXmlAttribute( value )
|
||||||
Exit Function
|
ConvertToXmlAttribute = Replace( value, "&", "&" )
|
||||||
End If
|
End Function
|
||||||
Next
|
|
||||||
InArray = False
|
Function InArray( value, sourceArray )
|
||||||
End Function
|
Dim i
|
||||||
|
For i = 0 to UBound( sourceArray )
|
||||||
|
If sourceArray(i) = value Then
|
||||||
|
InArray = True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
InArray = False
|
||||||
|
End Function
|
||||||
|
|
||||||
%>
|
%>
|
||||||
@@ -1,26 +1,34 @@
|
|||||||
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.FileBrowserConnector" AutoEventWireup="false" %>
|
<%@ Page language="c#" Inherits="FredCK.FCKeditorV2.FileBrowserConnector" AutoEventWireup="false" %>
|
||||||
<%--
|
<%--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: connector.aspx
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Browser Connector for ASP.NET.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* The code of this page if included in the FCKeditor.Net package,
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* in the FredCK.FCKeditorV2.dll assemblyfile. So to use it you must
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* include that DLL in your "bin" directory.
|
*
|
||||||
*
|
* == END LICENSE ==
|
||||||
* To download the FCKeditor.Net package, go to our official web site:
|
*
|
||||||
* http://www.fckeditor.net
|
* File Name: connector.aspx
|
||||||
*
|
* This is the File Browser Connector for ASP.NET.
|
||||||
* File Authors:
|
*
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* The code of this page if included in the FCKeditor.Net package,
|
||||||
|
* in the FredCK.FCKeditorV2.dll assemblyfile. So to use it you must
|
||||||
|
* include that DLL in your "bin" directory.
|
||||||
|
*
|
||||||
|
* To download the FCKeditor.Net package, go to our official web site:
|
||||||
|
* http://www.fckeditor.net
|
||||||
|
*
|
||||||
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
--%>
|
--%>
|
||||||
@@ -1,80 +1,80 @@
|
|||||||
<cfsetting enablecfoutputonly="Yes">
|
<cfsetting enablecfoutputonly="Yes">
|
||||||
|
|
||||||
<cfscript>
|
<cfscript>
|
||||||
config = structNew();
|
config = structNew();
|
||||||
|
|
||||||
// SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
|
// SECURITY: You must explicitly enable this "connector". (Set enabled to "true")
|
||||||
config.enabled = false;
|
config.enabled = false;
|
||||||
|
|
||||||
config.userFilesPath = "/UserFiles/";
|
config.userFilesPath = "/userfiles/";
|
||||||
|
|
||||||
config.serverPath = ""; // use this to force the server path if FCKeditor is not running directly off the root of the application or the FCKeditor directory in the URL is a virtual directory or a symbolic link / junction
|
config.serverPath = ""; // use this to force the server path if FCKeditor is not running directly off the root of the application or the FCKeditor directory in the URL is a virtual directory or a symbolic link / junction
|
||||||
|
|
||||||
config.allowedExtensions = structNew();
|
config.allowedExtensions = structNew();
|
||||||
config.deniedExtensions = structNew();
|
config.deniedExtensions = structNew();
|
||||||
|
|
||||||
// config.allowedExtensions["File"] = "doc,rtf,pdf,ppt,pps,xls,csv,vnd,zip";
|
// config.allowedExtensions["File"] = "doc,rtf,pdf,ppt,pps,xls,csv,vnd,zip";
|
||||||
config.allowedExtensions["File"] = "";
|
config.allowedExtensions["File"] = "";
|
||||||
config.deniedExtensions["File"] = "php,php2,php3,php4,php5,phtml,pwml,inc,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,com,dll,vbs,js,reg,cgi";
|
config.deniedExtensions["File"] = "html,htm,php,php2,php3,php4,php5,phtml,pwml,inc,asp,aspx,ascx,jsp,cfm,cfc,pl,bat,exe,com,dll,vbs,js,reg,cgi,htaccess,asis";
|
||||||
|
|
||||||
config.allowedExtensions["Image"] = "png,gif,jpg,jpeg,bmp";
|
config.allowedExtensions["Image"] = "png,gif,jpg,jpeg,bmp";
|
||||||
config.deniedExtensions["Image"] = "";
|
config.deniedExtensions["Image"] = "";
|
||||||
|
|
||||||
config.allowedExtensions["Flash"] = "swf,fla";
|
config.allowedExtensions["Flash"] = "swf,fla";
|
||||||
config.deniedExtensions["Flash"] = "";
|
config.deniedExtensions["Flash"] = "";
|
||||||
|
|
||||||
config.allowedExtensions["Media"] = "swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,mp3,mp4,m4a,wma,wmv,wav,mid,midi,rmi,rm,ram,rmvb,mov,qt";
|
config.allowedExtensions["Media"] = "swf,fla,jpg,gif,jpeg,png,avi,mpg,mpeg,mp3,mp4,m4a,wma,wmv,wav,mid,midi,rmi,rm,ram,rmvb,mov,qt";
|
||||||
config.deniedExtensions["Media"] = "";
|
config.deniedExtensions["Media"] = "";
|
||||||
</cfscript>
|
</cfscript>
|
||||||
|
|
||||||
<!--- code to maintain backwards compatibility with previous version of cfm connector --->
|
<!--- code to maintain backwards compatibility with previous version of cfm connector --->
|
||||||
<cfif isDefined("application.userFilesPath")>
|
<cfif isDefined("application.userFilesPath")>
|
||||||
|
|
||||||
<cflock scope="application" type="readonly" timeout="5">
|
<cflock scope="application" type="readonly" timeout="5">
|
||||||
<cfset config.userFilesPath = application.userFilesPath>
|
<cfset config.userFilesPath = application.userFilesPath>
|
||||||
</cflock>
|
</cflock>
|
||||||
|
|
||||||
<cfelseif isDefined("server.userFilesPath")>
|
<cfelseif isDefined("server.userFilesPath")>
|
||||||
|
|
||||||
<cflock scope="server" type="readonly" timeout="5">
|
<cflock scope="server" type="readonly" timeout="5">
|
||||||
<cfset config.userFilesPath = server.userFilesPath>
|
<cfset config.userFilesPath = server.userFilesPath>
|
||||||
</cflock>
|
</cflock>
|
||||||
|
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|
||||||
<!--- look for config struct in request, application and server scopes --->
|
<!--- look for config struct in request, application and server scopes --->
|
||||||
<cfif isDefined("request.FCKeditor") and isStruct(request.FCKeditor)>
|
<cfif isDefined("request.FCKeditor") and isStruct(request.FCKeditor)>
|
||||||
|
|
||||||
<cfset variables.FCKeditor = request.FCKeditor>
|
<cfset variables.FCKeditor = request.FCKeditor>
|
||||||
|
|
||||||
<cfelseif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
|
<cfelseif isDefined("application.FCKeditor") and isStruct(application.FCKeditor)>
|
||||||
|
|
||||||
<cflock scope="application" type="readonly" timeout="5">
|
<cflock scope="application" type="readonly" timeout="5">
|
||||||
<cfset variables.FCKeditor = duplicate(application.FCKeditor)>
|
<cfset variables.FCKeditor = duplicate(application.FCKeditor)>
|
||||||
</cflock>
|
</cflock>
|
||||||
|
|
||||||
<cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
|
<cfelseif isDefined("server.FCKeditor") and isStruct(server.FCKeditor)>
|
||||||
|
|
||||||
<cflock scope="server" type="readonly" timeout="5">
|
<cflock scope="server" type="readonly" timeout="5">
|
||||||
<cfset variables.FCKeditor = duplicate(server.FCKeditor)>
|
<cfset variables.FCKeditor = duplicate(server.FCKeditor)>
|
||||||
</cflock>
|
</cflock>
|
||||||
|
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|
||||||
<cfif isDefined("FCKeditor")>
|
<cfif isDefined("FCKeditor")>
|
||||||
|
|
||||||
<!--- copy key values from external to local config (i.e. override default config as required) --->
|
<!--- copy key values from external to local config (i.e. override default config as required) --->
|
||||||
<cfscript>
|
<cfscript>
|
||||||
function structCopyKeys(stFrom, stTo) {
|
function structCopyKeys(stFrom, stTo) {
|
||||||
for ( key in stFrom ) {
|
for ( key in stFrom ) {
|
||||||
if ( isStruct(stFrom[key]) ) {
|
if ( isStruct(stFrom[key]) ) {
|
||||||
structCopyKeys(stFrom[key],stTo[key]);
|
structCopyKeys(stFrom[key],stTo[key]);
|
||||||
} else {
|
} else {
|
||||||
stTo[key] = stFrom[key];
|
stTo[key] = stFrom[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
structCopyKeys(FCKeditor, config);
|
structCopyKeys(FCKeditor, config);
|
||||||
</cfscript>
|
</cfscript>
|
||||||
|
|
||||||
</cfif>
|
</cfif>
|
||||||
|
|||||||
@@ -1,364 +1,372 @@
|
|||||||
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
|
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
|
||||||
<!---
|
<!---
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: connector.cfm
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* File Browser connector for ColdFusion.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Note:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* FCKeditor requires that the connector responds with UTF-8 encoded XML.
|
*
|
||||||
* As ColdFusion 5 does not fully support UTF-8 encoding, we force ASCII
|
* == END LICENSE ==
|
||||||
* file and folder names in this connector to allow CF5 send a UTF-8
|
*
|
||||||
* encoded response - code points under 127 in UTF-8 are stored using a
|
* File Name: connector.cfm
|
||||||
* single byte, using the same encoding as ASCII, which is damn handy.
|
* File Browser connector for ColdFusion.
|
||||||
* This is all grand for the English speakers, like meself, but I dunno
|
* (based on the original CF connector by Hendrik Kramer - hk@lwd.de)
|
||||||
* how others are gonna take to it. Well, the previous version of this
|
*
|
||||||
* connector already did this with file names and nobody seemed to mind,
|
* Note:
|
||||||
* so fingers-crossed nobody will mind their folder names being munged too.
|
* FCKeditor requires that the connector responds with UTF-8 encoded XML.
|
||||||
*
|
* As ColdFusion 5 does not fully support UTF-8 encoding, we force ASCII
|
||||||
*
|
* file and folder names in this connector to allow CF5 send a UTF-8
|
||||||
* File Authors:
|
* encoded response - code points under 127 in UTF-8 are stored using a
|
||||||
* Mark Woods (mark@thickpaddy.com)
|
* single byte, using the same encoding as ASCII, which is damn handy.
|
||||||
* Wim Lemmens (didgiman@gmail.com)
|
* This is all grand for the English speakers, like meself, but I dunno
|
||||||
--->
|
* how others are gonna take to it. Well, the previous version of this
|
||||||
|
* connector already did this with file names and nobody seemed to mind,
|
||||||
<cfparam name="url.command">
|
* so fingers-crossed nobody will mind their folder names being munged too.
|
||||||
<cfparam name="url.type">
|
*
|
||||||
<cfparam name="url.currentFolder">
|
*
|
||||||
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
|
* File Authors:
|
||||||
|
* Mark Woods (mark@thickpaddy.com)
|
||||||
<cfinclude template="config.cfm">
|
* Wim Lemmens (didgiman@gmail.com)
|
||||||
|
--->
|
||||||
<cfscript>
|
|
||||||
userFilesPath = config.userFilesPath;
|
<cfparam name="url.command">
|
||||||
lAllowedExtensions = config.allowedExtensions[url.type];
|
<cfparam name="url.type">
|
||||||
lDeniedExtensions = config.deniedExtensions[url.type];
|
<cfparam name="url.currentFolder">
|
||||||
|
<!--- note: no serverPath url parameter - see config.cfm if you need to set the serverPath manually --->
|
||||||
// make sure the user files path is correctly formatted
|
|
||||||
userFilesPath = replace(userFilesPath, "\", "/", "ALL");
|
<cfinclude template="config.cfm">
|
||||||
userFilesPath = replace(userFilesPath, '//', '/', 'ALL');
|
|
||||||
if ( right(userFilesPath,1) neq "/" ) {
|
<cfscript>
|
||||||
userFilesPath = userFilesPath & "/";
|
userFilesPath = config.userFilesPath;
|
||||||
}
|
lAllowedExtensions = config.allowedExtensions[url.type];
|
||||||
if ( left(userFilesPath,1) neq "/" ) {
|
lDeniedExtensions = config.deniedExtensions[url.type];
|
||||||
userFilesPath = "/" & userFilesPath;
|
|
||||||
}
|
// make sure the user files path is correctly formatted
|
||||||
|
userFilesPath = replace(userFilesPath, "\", "/", "ALL");
|
||||||
// make sure the current folder is correctly formatted
|
userFilesPath = replace(userFilesPath, '//', '/', 'ALL');
|
||||||
url.currentFolder = replace(url.currentFolder, "\", "/", "ALL");
|
if ( right(userFilesPath,1) neq "/" ) {
|
||||||
url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL');
|
userFilesPath = userFilesPath & "/";
|
||||||
if ( right(url.currentFolder,1) neq "/" ) {
|
}
|
||||||
url.currentFolder = url.currentFolder & "/";
|
if ( left(userFilesPath,1) neq "/" ) {
|
||||||
}
|
userFilesPath = "/" & userFilesPath;
|
||||||
if ( left(url.currentFolder,1) neq "/" ) {
|
}
|
||||||
url.currentFolder = "/" & url.currentFolder;
|
|
||||||
}
|
// make sure the current folder is correctly formatted
|
||||||
|
url.currentFolder = replace(url.currentFolder, "\", "/", "ALL");
|
||||||
if ( find("/",getBaseTemplatePath()) neq 0 ) {
|
url.currentFolder = replace(url.currentFolder, '//', '/', 'ALL');
|
||||||
fs = "/";
|
if ( right(url.currentFolder,1) neq "/" ) {
|
||||||
} else {
|
url.currentFolder = url.currentFolder & "/";
|
||||||
fs = "\";
|
}
|
||||||
}
|
if ( left(url.currentFolder,1) neq "/" ) {
|
||||||
|
url.currentFolder = "/" & url.currentFolder;
|
||||||
// Get the base physical path to the web root for this application. The code to determine the path automatically assumes that
|
}
|
||||||
// the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a
|
|
||||||
// virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary.
|
if ( find("/",getBaseTemplatePath()) neq 0 ) {
|
||||||
if ( len(config.serverPath) ) {
|
fs = "/";
|
||||||
serverPath = config.serverPath;
|
} else {
|
||||||
} else {
|
fs = "\";
|
||||||
serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"");
|
}
|
||||||
}
|
|
||||||
|
// Get the base physical path to the web root for this application. The code to determine the path automatically assumes that
|
||||||
// map the user files path to a physical directory
|
// the "FCKeditor" directory in the http request path is directly off the web root for the application and that it's not a
|
||||||
userFilesServerPath = serverPath & replace(userFilesPath,"/",fs,"all");
|
// virtual directory or a symbolic link / junction. Use the serverPath config setting to force a physical path if necessary.
|
||||||
|
if ( len(config.serverPath) ) {
|
||||||
xmlContent = ""; // append to this string to build content
|
serverPath = config.serverPath;
|
||||||
</cfscript>
|
} else {
|
||||||
|
serverPath = replaceNoCase(getBaseTemplatePath(),replace(cgi.script_name,"/",fs,"all"),"");
|
||||||
<cfif not config.enabled>
|
}
|
||||||
|
|
||||||
<cfset xmlContent = "<Error number=""1"" text=""This connector is disabled. Please check the 'editor/filemanager/browser/default/connectors/cfm/config.cfm' file"" />">
|
// map the user files path to a physical directory
|
||||||
|
userFilesServerPath = serverPath & replace(userFilesPath,"/",fs,"all");
|
||||||
<cfelseif find("..",url.currentFolder)>
|
|
||||||
|
xmlContent = ""; // append to this string to build content
|
||||||
<cfset xmlContent = "<Error number=""102"" />">
|
</cfscript>
|
||||||
|
|
||||||
</cfif>
|
<cfif not config.enabled>
|
||||||
|
|
||||||
<cfif not len(xmlContent)>
|
<cfset xmlContent = "<Error number=""1"" text=""This connector is disabled. Please check the 'editor/filemanager/browser/default/connectors/cfm/config.cfm' file"" />">
|
||||||
|
|
||||||
<!--- create directories in physical path if they don't already exist --->
|
<cfelseif find("..",url.currentFolder)>
|
||||||
<cfset currentPath = serverPath>
|
|
||||||
<cftry>
|
<cfset xmlContent = "<Error number=""102"" />">
|
||||||
|
|
||||||
<cfloop list="#userFilesPath#" index="name" delimiters="/">
|
</cfif>
|
||||||
|
|
||||||
<cfif not directoryExists(currentPath & fs & name)>
|
<cfif not len(xmlContent)>
|
||||||
<cfdirectory action="create" directory="#currentPath##fs##name#" mode="755">
|
|
||||||
</cfif>
|
<!--- create directories in physical path if they don't already exist --->
|
||||||
|
<cfset currentPath = serverPath>
|
||||||
<cfset currentPath = currentPath & fs & name>
|
<cftry>
|
||||||
|
|
||||||
</cfloop>
|
<cfloop list="#userFilesPath#" index="name" delimiters="/">
|
||||||
|
|
||||||
<!--- create sub-directory for file type if it doesn't already exist --->
|
<cfif not directoryExists(currentPath & fs & name)>
|
||||||
<cfif not directoryExists(userFilesServerPath & url.type)>
|
<cfdirectory action="create" directory="#currentPath##fs##name#" mode="755">
|
||||||
<cfdirectory action="create" directory="#userFilesServerPath##url.type#" mode="755">
|
</cfif>
|
||||||
</cfif>
|
|
||||||
|
<cfset currentPath = currentPath & fs & name>
|
||||||
<cfcatch>
|
|
||||||
|
</cfloop>
|
||||||
<!--- this should only occur as a result of a permissions problem --->
|
|
||||||
<cfset xmlContent = "<Error number=""103"" />">
|
<!--- create sub-directory for file type if it doesn't already exist --->
|
||||||
|
<cfif not directoryExists(userFilesServerPath & url.type)>
|
||||||
</cfcatch>
|
<cfdirectory action="create" directory="#userFilesServerPath##url.type#" mode="755">
|
||||||
</cftry>
|
</cfif>
|
||||||
|
|
||||||
</cfif>
|
<cfcatch>
|
||||||
|
|
||||||
<cfif not len(xmlContent)>
|
<!--- this should only occur as a result of a permissions problem --->
|
||||||
|
<cfset xmlContent = "<Error number=""103"" />">
|
||||||
<!--- no errors thus far - run command --->
|
|
||||||
|
</cfcatch>
|
||||||
<!--- we need to know the physical path to the current folder for all commands --->
|
</cftry>
|
||||||
<cfset currentFolderPath = userFilesServerPath & url.type & replace(url.currentFolder,"/",fs,"all")>
|
|
||||||
|
</cfif>
|
||||||
<cfswitch expression="#url.command#">
|
|
||||||
|
<cfif not len(xmlContent)>
|
||||||
|
|
||||||
<cfcase value="FileUpload">
|
<!--- no errors thus far - run command --->
|
||||||
|
|
||||||
<cfset fileName = "">
|
<!--- we need to know the physical path to the current folder for all commands --->
|
||||||
<cfset fileExt = "">
|
<cfset currentFolderPath = userFilesServerPath & url.type & replace(url.currentFolder,"/",fs,"all")>
|
||||||
|
|
||||||
<cftry>
|
<cfswitch expression="#url.command#">
|
||||||
|
|
||||||
<!--- TODO: upload to a temp directory and move file if extension is allowed --->
|
|
||||||
|
<cfcase value="FileUpload">
|
||||||
<!--- first upload the file with an unique filename --->
|
|
||||||
<cffile action="upload"
|
<cfset fileName = "">
|
||||||
fileField="NewFile"
|
<cfset fileExt = "">
|
||||||
destination="#currentFolderPath#"
|
|
||||||
nameConflict="makeunique"
|
<cftry>
|
||||||
mode="644"
|
|
||||||
attributes="normal">
|
<!--- TODO: upload to a temp directory and move file if extension is allowed --->
|
||||||
|
|
||||||
<cfif cffile.fileSize EQ 0>
|
<!--- first upload the file with an unique filename --->
|
||||||
<cfthrow>
|
<cffile action="upload"
|
||||||
</cfif>
|
fileField="NewFile"
|
||||||
|
destination="#currentFolderPath#"
|
||||||
<cfif ( len(lAllowedExtensions) and not listFindNoCase(lAllowedExtensions,cffile.ServerFileExt) )
|
nameConflict="makeunique"
|
||||||
or ( len(lDeniedExtensions) and listFindNoCase(lDeniedExtensions,cffile.ServerFileExt) )>
|
mode="644"
|
||||||
|
attributes="normal">
|
||||||
<cfset errorNumber = "202">
|
|
||||||
<cffile action="delete" file="#cffile.ServerDirectory##fs##cffile.ServerFile#">
|
<cfif cffile.fileSize EQ 0>
|
||||||
|
<cfthrow>
|
||||||
<cfelse>
|
</cfif>
|
||||||
|
|
||||||
<cfscript>
|
<cfif ( len(lAllowedExtensions) and not listFindNoCase(lAllowedExtensions,cffile.ServerFileExt) )
|
||||||
errorNumber = 0;
|
or ( len(lDeniedExtensions) and listFindNoCase(lDeniedExtensions,cffile.ServerFileExt) )>
|
||||||
fileName = cffile.ClientFileName;
|
|
||||||
fileExt = cffile.ServerFileExt;
|
<cfset errorNumber = "202">
|
||||||
|
<cffile action="delete" file="#cffile.ServerDirectory##fs##cffile.ServerFile#">
|
||||||
// munge filename for html download. Only a-z, 0-9, _, - and . are allowed
|
|
||||||
if( reFind("[^A-Za-z0-9_\-\.]", fileName) ) {
|
<cfelse>
|
||||||
fileName = reReplace(fileName, "[^A-Za-z0-9\-\.]", "_", "ALL");
|
|
||||||
fileName = reReplace(fileName, "_{2,}", "_", "ALL");
|
<cfscript>
|
||||||
fileName = reReplace(fileName, "([^_]+)_+$", "\1", "ALL");
|
errorNumber = 0;
|
||||||
fileName = reReplace(fileName, "$_([^_]+)$", "\1", "ALL");
|
fileName = cffile.ClientFileName;
|
||||||
}
|
fileExt = cffile.ServerFileExt;
|
||||||
|
|
||||||
// When the original filename already exists, add numbers (0), (1), (2), ... at the end of the filename.
|
// munge filename for html download. Only a-z, 0-9, _, - and . are allowed
|
||||||
if( compare( cffile.ServerFileName, fileName ) ) {
|
if( reFind("[^A-Za-z0-9_\-\.]", fileName) ) {
|
||||||
counter = 0;
|
fileName = reReplace(fileName, "[^A-Za-z0-9\-\.]", "_", "ALL");
|
||||||
tmpFileName = fileName;
|
fileName = reReplace(fileName, "_{2,}", "_", "ALL");
|
||||||
while( fileExists("#currentFolderPath##fileName#.#fileExt#") ) {
|
fileName = reReplace(fileName, "([^_]+)_+$", "\1", "ALL");
|
||||||
counter = counter + 1;
|
fileName = reReplace(fileName, "$_([^_]+)$", "\1", "ALL");
|
||||||
fileName = tmpFileName & '(#counter#)';
|
}
|
||||||
}
|
|
||||||
}
|
// When the original filename already exists, add numbers (0), (1), (2), ... at the end of the filename.
|
||||||
</cfscript>
|
if( compare( cffile.ServerFileName, fileName ) ) {
|
||||||
|
counter = 0;
|
||||||
<!--- Rename the uploaded file, if neccessary --->
|
tmpFileName = fileName;
|
||||||
<cfif compare(cffile.ServerFileName,fileName)>
|
while( fileExists("#currentFolderPath##fileName#.#fileExt#") ) {
|
||||||
|
counter = counter + 1;
|
||||||
<cfset errorNumber = "201">
|
fileName = tmpFileName & '(#counter#)';
|
||||||
<cffile
|
}
|
||||||
action="rename"
|
}
|
||||||
source="#currentFolderPath##cffile.ServerFileName#.#cffile.ServerFileExt#"
|
</cfscript>
|
||||||
destination="#currentFolderPath##fileName#.#fileExt#"
|
|
||||||
mode="644"
|
<!--- Rename the uploaded file, if neccessary --->
|
||||||
attributes="normal">
|
<cfif compare(cffile.ServerFileName,fileName)>
|
||||||
|
|
||||||
</cfif>
|
<cfset errorNumber = "201">
|
||||||
|
<cffile
|
||||||
</cfif>
|
action="rename"
|
||||||
|
source="#currentFolderPath##cffile.ServerFileName#.#cffile.ServerFileExt#"
|
||||||
<cfcatch type="Any">
|
destination="#currentFolderPath##fileName#.#fileExt#"
|
||||||
|
mode="644"
|
||||||
<cfset errorNumber = "202">
|
attributes="normal">
|
||||||
|
|
||||||
</cfcatch>
|
</cfif>
|
||||||
|
|
||||||
</cftry>
|
</cfif>
|
||||||
|
|
||||||
|
<cfcatch type="Any">
|
||||||
<cfif errorNumber eq 201>
|
|
||||||
|
<cfset errorNumber = "202">
|
||||||
<!--- file was changed (201), submit the new filename --->
|
|
||||||
<cfoutput>
|
</cfcatch>
|
||||||
<script type="text/javascript">
|
|
||||||
window.parent.frames['frmUpload'].OnUploadCompleted(#errorNumber#,'#replace( fileName & "." & fileExt, "'", "\'", "ALL")#');
|
</cftry>
|
||||||
</script>
|
|
||||||
</cfoutput>
|
|
||||||
|
<cfif errorNumber eq 201>
|
||||||
<cfelse>
|
|
||||||
|
<!--- file was changed (201), submit the new filename --->
|
||||||
<!--- file was uploaded succesfully(0) or an error occured(202). Submit only the error code. --->
|
<cfoutput>
|
||||||
<cfoutput>
|
<script type="text/javascript">
|
||||||
<script type="text/javascript">
|
window.parent.frames['frmUpload'].OnUploadCompleted(#errorNumber#,'#replace( fileName & "." & fileExt, "'", "\'", "ALL")#');
|
||||||
window.parent.frames['frmUpload'].OnUploadCompleted(#errorNumber#);
|
</script>
|
||||||
</script>
|
</cfoutput>
|
||||||
</cfoutput>
|
|
||||||
|
<cfelse>
|
||||||
</cfif>
|
|
||||||
|
<!--- file was uploaded succesfully(0) or an error occured(202). Submit only the error code. --->
|
||||||
<cfabort>
|
<cfoutput>
|
||||||
|
<script type="text/javascript">
|
||||||
</cfcase>
|
window.parent.frames['frmUpload'].OnUploadCompleted(#errorNumber#);
|
||||||
|
</script>
|
||||||
|
</cfoutput>
|
||||||
<cfcase value="GetFolders">
|
|
||||||
|
</cfif>
|
||||||
<!--- Sort directories first, name ascending --->
|
|
||||||
<cfdirectory
|
<cfabort>
|
||||||
action="list"
|
|
||||||
directory="#currentFolderPath#"
|
</cfcase>
|
||||||
name="qDir"
|
|
||||||
sort="type,name">
|
|
||||||
|
<cfcase value="GetFolders">
|
||||||
<cfscript>
|
|
||||||
i=1;
|
<!--- Sort directories first, name ascending --->
|
||||||
folders = "";
|
<cfdirectory
|
||||||
while( i lte qDir.recordCount ) {
|
action="list"
|
||||||
if( not compareNoCase( qDir.type[i], "FILE" ))
|
directory="#currentFolderPath#"
|
||||||
break;
|
name="qDir"
|
||||||
if( not listFind(".,..", qDir.name[i]) )
|
sort="type,name">
|
||||||
folders = folders & '<Folder name="#qDir.name[i]#" />';
|
|
||||||
i=i+1;
|
<cfscript>
|
||||||
}
|
i=1;
|
||||||
|
folders = "";
|
||||||
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
while( i lte qDir.recordCount ) {
|
||||||
</cfscript>
|
if( not compareNoCase( qDir.type[i], "FILE" ))
|
||||||
|
break;
|
||||||
</cfcase>
|
if( not listFind(".,..", qDir.name[i]) )
|
||||||
|
folders = folders & '<Folder name="#qDir.name[i]#" />';
|
||||||
|
i=i+1;
|
||||||
<cfcase value="GetFoldersAndFiles">
|
}
|
||||||
|
|
||||||
<!--- Sort directories first, name ascending --->
|
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
||||||
<cfdirectory
|
</cfscript>
|
||||||
action="list"
|
|
||||||
directory="#currentFolderPath#"
|
</cfcase>
|
||||||
name="qDir"
|
|
||||||
sort="type,name">
|
|
||||||
|
<cfcase value="GetFoldersAndFiles">
|
||||||
<cfscript>
|
|
||||||
i=1;
|
<!--- Sort directories first, name ascending --->
|
||||||
folders = "";
|
<cfdirectory
|
||||||
files = "";
|
action="list"
|
||||||
while( i lte qDir.recordCount ) {
|
directory="#currentFolderPath#"
|
||||||
if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) {
|
name="qDir"
|
||||||
folders = folders & '<Folder name="#qDir.name[i]#" />';
|
sort="type,name">
|
||||||
} else if( not compareNoCase( qDir.type[i], "FILE" ) ) {
|
|
||||||
fileSizeKB = round(qDir.size[i] / 1024);
|
<cfscript>
|
||||||
files = files & '<File name="#qDir.name[i]#" size="#IIf( fileSizeKB GT 0, DE( fileSizeKB ), 1)#" />';
|
i=1;
|
||||||
}
|
folders = "";
|
||||||
i=i+1;
|
files = "";
|
||||||
}
|
while( i lte qDir.recordCount ) {
|
||||||
|
if( not compareNoCase( qDir.type[i], "DIR" ) and not listFind(".,..", qDir.name[i]) ) {
|
||||||
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
folders = folders & '<Folder name="#qDir.name[i]#" />';
|
||||||
xmlContent = xmlContent & '<Files>' & files & '</Files>';
|
} else if( not compareNoCase( qDir.type[i], "FILE" ) ) {
|
||||||
</cfscript>
|
fileSizeKB = round(qDir.size[i] / 1024);
|
||||||
|
files = files & '<File name="#qDir.name[i]#" size="#IIf( fileSizeKB GT 0, DE( fileSizeKB ), 1)#" />';
|
||||||
</cfcase>
|
}
|
||||||
|
i=i+1;
|
||||||
|
}
|
||||||
<cfcase value="CreateFolder">
|
|
||||||
|
xmlContent = xmlContent & '<Folders>' & folders & '</Folders>';
|
||||||
<cfparam name="url.newFolderName" default="">
|
xmlContent = xmlContent & '<Files>' & files & '</Files>';
|
||||||
|
</cfscript>
|
||||||
<cfscript>
|
|
||||||
newFolderName = url.newFolderName;
|
</cfcase>
|
||||||
if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) {
|
|
||||||
// Munge folder name same way as we do the filename
|
|
||||||
// This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8
|
<cfcase value="CreateFolder">
|
||||||
newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all");
|
|
||||||
newFolderName = reReplace(newFolderName, "_{2,}", "_", "all");
|
<cfparam name="url.newFolderName" default="">
|
||||||
newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all");
|
|
||||||
newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all");
|
<cfscript>
|
||||||
}
|
newFolderName = url.newFolderName;
|
||||||
</cfscript>
|
if( reFind("[^A-Za-z0-9_\-\.]", newFolderName) ) {
|
||||||
|
// Munge folder name same way as we do the filename
|
||||||
<cfif not len(newFolderName) or len(newFolderName) gt 255>
|
// This means folder names are always US-ASCII so we don't have to worry about CF5 and UTF-8
|
||||||
<cfset errorNumber = 102>
|
newFolderName = reReplace(newFolderName, "[^A-Za-z0-9\-\.]", "_", "all");
|
||||||
<cfelseif directoryExists(currentFolderPath & newFolderName)>
|
newFolderName = reReplace(newFolderName, "_{2,}", "_", "all");
|
||||||
<cfset errorNumber = 101>
|
newFolderName = reReplace(newFolderName, "([^_]+)_+$", "\1", "all");
|
||||||
<cfelseif reFind("^\.\.",newFolderName)>
|
newFolderName = reReplace(newFolderName, "$_([^_]+)$", "\1", "all");
|
||||||
<cfset errorNumber = 103>
|
}
|
||||||
<cfelse>
|
</cfscript>
|
||||||
<cfset errorNumber = 0>
|
|
||||||
|
<cfif not len(newFolderName) or len(newFolderName) gt 255>
|
||||||
<cftry>
|
<cfset errorNumber = 102>
|
||||||
<cfdirectory
|
<cfelseif directoryExists(currentFolderPath & newFolderName)>
|
||||||
action="create"
|
<cfset errorNumber = 101>
|
||||||
directory="#currentFolderPath##newFolderName#"
|
<cfelseif reFind("^\.\.",newFolderName)>
|
||||||
mode="755">
|
<cfset errorNumber = 103>
|
||||||
<cfcatch>
|
<cfelse>
|
||||||
<!---
|
<cfset errorNumber = 0>
|
||||||
un-resolvable error numbers in ColdFusion:
|
|
||||||
* 102 : Invalid folder name.
|
<cftry>
|
||||||
* 103 : You have no permissions to create the folder.
|
<cfdirectory
|
||||||
--->
|
action="create"
|
||||||
<cfset errorNumber = 110>
|
directory="#currentFolderPath##newFolderName#"
|
||||||
</cfcatch>
|
mode="755">
|
||||||
</cftry>
|
<cfcatch>
|
||||||
</cfif>
|
<!---
|
||||||
|
un-resolvable error numbers in ColdFusion:
|
||||||
<cfset xmlContent = xmlContent & '<Error number="#errorNumber#" />'>
|
* 102 : Invalid folder name.
|
||||||
|
* 103 : You have no permissions to create the folder.
|
||||||
</cfcase>
|
--->
|
||||||
|
<cfset errorNumber = 110>
|
||||||
|
</cfcatch>
|
||||||
<cfdefaultcase>
|
</cftry>
|
||||||
|
</cfif>
|
||||||
<cfthrow type="fckeditor.connector" message="Illegal command: #url.command#">
|
|
||||||
|
<cfset xmlContent = xmlContent & '<Error number="#errorNumber#" />'>
|
||||||
</cfdefaultcase>
|
|
||||||
|
</cfcase>
|
||||||
|
|
||||||
</cfswitch>
|
|
||||||
|
<cfdefaultcase>
|
||||||
</cfif>
|
|
||||||
|
<cfthrow type="fckeditor.connector" message="Illegal command: #url.command#">
|
||||||
<cfscript>
|
|
||||||
xmlHeader = '<?xml version="1.0" encoding="utf-8" ?><Connector command="#url.command#" resourceType="#url.type#">';
|
</cfdefaultcase>
|
||||||
xmlHeader = xmlHeader & '<CurrentFolder path="#url.currentFolder#" url="#userFilesPath##url.type##url.currentFolder#" />';
|
|
||||||
xmlFooter = '</Connector>';
|
|
||||||
</cfscript>
|
</cfswitch>
|
||||||
|
|
||||||
<cfheader name="Expires" value="#GetHttpTimeString(Now())#">
|
</cfif>
|
||||||
<cfheader name="Pragma" value="no-cache">
|
|
||||||
<cfheader name="Cache-Control" value="no-cache, no-store, must-revalidate">
|
<cfscript>
|
||||||
<cfcontent reset="true" type="text/xml; charset=UTF-8">
|
xmlHeader = '<?xml version="1.0" encoding="utf-8" ?><Connector command="#url.command#" resourceType="#url.type#">';
|
||||||
|
xmlHeader = xmlHeader & '<CurrentFolder path="#url.currentFolder#" url="#userFilesPath##url.type##url.currentFolder#" />';
|
||||||
|
xmlFooter = '</Connector>';
|
||||||
|
</cfscript>
|
||||||
|
|
||||||
|
<cfheader name="Expires" value="#GetHttpTimeString(Now())#">
|
||||||
|
<cfheader name="Pragma" value="no-cache">
|
||||||
|
<cfheader name="Cache-Control" value="no-cache, no-store, must-revalidate">
|
||||||
|
<cfcontent reset="true" type="text/xml; charset=UTF-8">
|
||||||
<cfoutput>#xmlHeader##xmlContent##xmlFooter#</cfoutput>
|
<cfoutput>#xmlHeader##xmlContent##xmlFooter#</cfoutput>
|
||||||
@@ -1,61 +1,69 @@
|
|||||||
[//lasso
|
[//lasso
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: config.lasso
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Configuration file for the File Manager Connector for Lasso.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Jason Huck (jason.huck@corefive.com)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
/*.....................................................................
|
*
|
||||||
The connector uses the file tags, which require authentication. Enter a
|
* File Name: config.lasso
|
||||||
valid username and password from Lasso admin for a group with file tags
|
* Configuration file for the File Manager Connector for Lasso.
|
||||||
permissions for uploads and the path you define in UserFilesPath below.
|
*
|
||||||
*/
|
* File Authors:
|
||||||
|
* Jason Huck (jason.huck@corefive.com)
|
||||||
var('connection') = array(
|
*/
|
||||||
-username='xxxxxxxx',
|
|
||||||
-password='xxxxxxxx'
|
/*.....................................................................
|
||||||
);
|
The connector uses the file tags, which require authentication. Enter a
|
||||||
|
valid username and password from Lasso admin for a group with file tags
|
||||||
|
permissions for uploads and the path you define in UserFilesPath below.
|
||||||
/*.....................................................................
|
*/
|
||||||
Set the base path for files that users can upload and browse (relative
|
|
||||||
to server root).
|
var('connection') = array(
|
||||||
|
-username='xxxxxxxx',
|
||||||
Set which file extensions are allowed and/or denied for each file type.
|
-password='xxxxxxxx'
|
||||||
*/
|
);
|
||||||
var('config') = map(
|
|
||||||
'Enabled' = true,
|
|
||||||
'UserFilesPath' = '/UserFiles/',
|
/*.....................................................................
|
||||||
'Subdirectories' = map(
|
Set the base path for files that users can upload and browse (relative
|
||||||
'File' = 'File/',
|
to server root).
|
||||||
'Image' = 'Image/',
|
|
||||||
'Flash' = 'Flash/',
|
Set which file extensions are allowed and/or denied for each file type.
|
||||||
'Media' = 'Media/'
|
*/
|
||||||
),
|
var('config') = map(
|
||||||
'AllowedExtensions' = map(
|
'Enabled' = true,
|
||||||
'File' = array(),
|
'UserFilesPath' = '/userfiles/',
|
||||||
'Image' = array('jpg','gif','jpeg','png'),
|
'Subdirectories' = map(
|
||||||
'Flash' = array('swf','fla'),
|
'File' = 'File/',
|
||||||
'Media' = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg')
|
'Image' = 'Image/',
|
||||||
),
|
'Flash' = 'Flash/',
|
||||||
'DeniedExtensions' = map(
|
'Media' = 'Media/'
|
||||||
'File' = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','lasso','lassoapp'),
|
),
|
||||||
'Image' = array(),
|
'AllowedExtensions' = map(
|
||||||
'Flash' = array(),
|
'File' = array(),
|
||||||
'Media' = array()
|
'Image' = array('jpg','gif','jpeg','png'),
|
||||||
)
|
'Flash' = array('swf','fla'),
|
||||||
);
|
'Media' = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg')
|
||||||
|
),
|
||||||
|
'DeniedExtensions' = map(
|
||||||
|
'File' = array('html','htm','php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','lasso','lassoapp','htaccess','asis'),
|
||||||
|
'Image' = array(),
|
||||||
|
'Flash' = array(),
|
||||||
|
'Media' = array()
|
||||||
|
)
|
||||||
|
);
|
||||||
]
|
]
|
||||||
@@ -1,245 +1,253 @@
|
|||||||
[//lasso
|
[//lasso
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: connector.lasso
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for Lasso.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Jason Huck (jason.huck@corefive.com)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
/*.....................................................................
|
*
|
||||||
Include global configuration. See config.lasso for details.
|
* File Name: connector.lasso
|
||||||
*/
|
* This is the File Manager Connector for Lasso.
|
||||||
include('config.lasso');
|
*
|
||||||
|
* File Authors:
|
||||||
|
* Jason Huck (jason.huck@corefive.com)
|
||||||
/*.....................................................................
|
*/
|
||||||
Translate current date/time to GMT for custom header.
|
|
||||||
*/
|
/*.....................................................................
|
||||||
var('headerDate') = date_localtogmt(date)->format('%a, %d %b %Y %T GMT');
|
Include global configuration. See config.lasso for details.
|
||||||
|
*/
|
||||||
|
include('config.lasso');
|
||||||
/*.....................................................................
|
|
||||||
Convert query string parameters to variables and initialize output.
|
|
||||||
*/
|
/*.....................................................................
|
||||||
var(
|
Translate current date/time to GMT for custom header.
|
||||||
'Command' = action_param('Command'),
|
*/
|
||||||
'Type' = action_param('Type'),
|
var('headerDate') = date_localtogmt(date)->format('%a, %d %b %Y %T GMT');
|
||||||
'CurrentFolder' = action_param('CurrentFolder'),
|
|
||||||
'ServerPath' = action_param('ServerPath'),
|
|
||||||
'NewFolderName' = action_param('NewFolderName'),
|
/*.....................................................................
|
||||||
'NewFile' = null,
|
Convert query string parameters to variables and initialize output.
|
||||||
'NewFileName' = string,
|
*/
|
||||||
'OrigFilePath' = string,
|
var(
|
||||||
'NewFilePath' = string,
|
'Command' = action_param('Command'),
|
||||||
'commandData' = string,
|
'Type' = action_param('Type'),
|
||||||
'folders' = '\t<Folders>\n',
|
'CurrentFolder' = action_param('CurrentFolder'),
|
||||||
'files' = '\t<Files>\n',
|
'ServerPath' = action_param('ServerPath'),
|
||||||
'errorNumber' = integer,
|
'NewFolderName' = action_param('NewFolderName'),
|
||||||
'responseType' = 'xml',
|
'NewFile' = null,
|
||||||
'uploadResult' = '0'
|
'NewFileName' = string,
|
||||||
);
|
'OrigFilePath' = string,
|
||||||
|
'NewFilePath' = string,
|
||||||
|
'commandData' = string,
|
||||||
/*.....................................................................
|
'folders' = '\t<Folders>\n',
|
||||||
Calculate the path to the current folder.
|
'files' = '\t<Files>\n',
|
||||||
*/
|
'errorNumber' = integer,
|
||||||
$ServerPath == '' ? $ServerPath = $config->find('UserFilesPath');
|
'responseType' = 'xml',
|
||||||
|
'uploadResult' = '0'
|
||||||
var('currentFolderURL' = $ServerPath
|
);
|
||||||
+ $config->find('Subdirectories')->find(action_param('Type'))
|
|
||||||
+ action_param('CurrentFolder')
|
|
||||||
);
|
/*.....................................................................
|
||||||
|
Calculate the path to the current folder.
|
||||||
|
*/
|
||||||
/*.....................................................................
|
$ServerPath == '' ? $ServerPath = $config->find('UserFilesPath');
|
||||||
Build the appropriate response per the 'Command' parameter. Wrap the
|
|
||||||
entire process in an inline for file tag permissions.
|
var('currentFolderURL' = $ServerPath
|
||||||
*/
|
+ $config->find('Subdirectories')->find(action_param('Type'))
|
||||||
inline($connection);
|
+ action_param('CurrentFolder')
|
||||||
select($Command);
|
);
|
||||||
/*.............................................................
|
|
||||||
List all subdirectories in the 'Current Folder' directory.
|
|
||||||
*/
|
/*.....................................................................
|
||||||
case('GetFolders');
|
Build the appropriate response per the 'Command' parameter. Wrap the
|
||||||
$commandData += '\t<Folders>\n';
|
entire process in an inline for file tag permissions.
|
||||||
|
*/
|
||||||
iterate(file_listdirectory($currentFolderURL), local('this'));
|
inline($connection);
|
||||||
#this->endswith('/') ? $commandData += '\t\t<Folder name="' + #this->removetrailing('/')& + '" />\n';
|
select($Command);
|
||||||
/iterate;
|
/*.............................................................
|
||||||
|
List all subdirectories in the 'Current Folder' directory.
|
||||||
$commandData += '\t</Folders>\n';
|
*/
|
||||||
|
case('GetFolders');
|
||||||
|
$commandData += '\t<Folders>\n';
|
||||||
/*.............................................................
|
|
||||||
List both files and folders in the 'Current Folder' directory.
|
iterate(file_listdirectory($currentFolderURL), local('this'));
|
||||||
Include the file sizes in kilobytes.
|
#this->endswith('/') ? $commandData += '\t\t<Folder name="' + #this->removetrailing('/')& + '" />\n';
|
||||||
*/
|
/iterate;
|
||||||
case('GetFoldersAndFiles');
|
|
||||||
iterate(file_listdirectory($currentFolderURL), local('this'));
|
$commandData += '\t</Folders>\n';
|
||||||
if(#this->endswith('/'));
|
|
||||||
$folders += '\t\t<Folder name="' + #this->removetrailing('/')& + '" />\n';
|
|
||||||
else;
|
/*.............................................................
|
||||||
local('size') = file_getsize($currentFolderURL + #this) / 1024;
|
List both files and folders in the 'Current Folder' directory.
|
||||||
$files += '\t\t<File name="' + #this + '" size="' + #size + '" />\n';
|
Include the file sizes in kilobytes.
|
||||||
/if;
|
*/
|
||||||
/iterate;
|
case('GetFoldersAndFiles');
|
||||||
|
iterate(file_listdirectory($currentFolderURL), local('this'));
|
||||||
$folders += '\t</Folders>\n';
|
if(#this->endswith('/'));
|
||||||
$files += '\t</Files>\n';
|
$folders += '\t\t<Folder name="' + #this->removetrailing('/')& + '" />\n';
|
||||||
|
else;
|
||||||
$commandData += $folders + $files;
|
local('size') = file_getsize($currentFolderURL + #this) / 1024;
|
||||||
|
$files += '\t\t<File name="' + #this + '" size="' + #size + '" />\n';
|
||||||
|
/if;
|
||||||
/*.............................................................
|
/iterate;
|
||||||
Create a directory 'NewFolderName' within the 'Current Folder.'
|
|
||||||
*/
|
$folders += '\t</Folders>\n';
|
||||||
case('CreateFolder');
|
$files += '\t</Files>\n';
|
||||||
var('newFolder' = $currentFolderURL + $NewFolderName + '/');
|
|
||||||
file_create($newFolder);
|
$commandData += $folders + $files;
|
||||||
|
|
||||||
|
|
||||||
/*.........................................................
|
/*.............................................................
|
||||||
Map Lasso's file error codes to FCKEditor's error codes.
|
Create a directory 'NewFolderName' within the 'Current Folder.'
|
||||||
*/
|
*/
|
||||||
select(file_currenterror( -errorcode));
|
case('CreateFolder');
|
||||||
case(0);
|
var('newFolder' = $currentFolderURL + $NewFolderName + '/');
|
||||||
$errorNumber = 0;
|
file_create($newFolder);
|
||||||
case( -9983);
|
|
||||||
$errorNumber = 101;
|
|
||||||
case( -9976);
|
/*.........................................................
|
||||||
$errorNumber = 102;
|
Map Lasso's file error codes to FCKEditor's error codes.
|
||||||
case( -9977);
|
*/
|
||||||
$errorNumber = 102;
|
select(file_currenterror( -errorcode));
|
||||||
case( -9961);
|
case(0);
|
||||||
$errorNumber = 103;
|
$errorNumber = 0;
|
||||||
case;
|
case( -9983);
|
||||||
$errorNumber = 110;
|
$errorNumber = 101;
|
||||||
/select;
|
case( -9976);
|
||||||
|
$errorNumber = 102;
|
||||||
$commandData += '<Error number="' + $errorNumber + '" />\n';
|
case( -9977);
|
||||||
|
$errorNumber = 102;
|
||||||
|
case( -9961);
|
||||||
/*.............................................................
|
$errorNumber = 103;
|
||||||
Process an uploaded file.
|
case;
|
||||||
*/
|
$errorNumber = 110;
|
||||||
case('FileUpload');
|
/select;
|
||||||
/*.........................................................
|
|
||||||
This is the only command that returns an HTML response.
|
$commandData += '<Error number="' + $errorNumber + '" />\n';
|
||||||
*/
|
|
||||||
$responseType = 'html';
|
|
||||||
|
/*.............................................................
|
||||||
|
Process an uploaded file.
|
||||||
/*.........................................................
|
*/
|
||||||
Was a file actually uploaded?
|
case('FileUpload');
|
||||||
*/
|
/*.........................................................
|
||||||
file_uploads->size ? $NewFile = file_uploads->get(1) | $uploadResult = '202';
|
This is the only command that returns an HTML response.
|
||||||
|
*/
|
||||||
if($uploadResult == '0');
|
$responseType = 'html';
|
||||||
/*.....................................................
|
|
||||||
Split the file's extension from the filename in order
|
|
||||||
to follow the API's naming convention for duplicate
|
/*.........................................................
|
||||||
files. (Test.txt, Test(1).txt, Test(2).txt, etc.)
|
Was a file actually uploaded?
|
||||||
*/
|
*/
|
||||||
$NewFileName = $NewFile->find('OrigName');
|
file_uploads->size ? $NewFile = file_uploads->get(1) | $uploadResult = '202';
|
||||||
$OrigFilePath = $currentFolderURL + $NewFileName;
|
|
||||||
$NewFilePath = $OrigFilePath;
|
if($uploadResult == '0');
|
||||||
local('fileExtension') = '.' + $NewFile->find('OrigExtension');
|
/*.....................................................
|
||||||
local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&;
|
Split the file's extension from the filename in order
|
||||||
|
to follow the API's naming convention for duplicate
|
||||||
|
files. (Test.txt, Test(1).txt, Test(2).txt, etc.)
|
||||||
/*.....................................................
|
*/
|
||||||
Make sure the file extension is allowed.
|
$NewFileName = $NewFile->find('OrigName');
|
||||||
*/
|
$OrigFilePath = $currentFolderURL + $NewFileName;
|
||||||
if($config->find('DeniedExtensions')->find($Type) >> $NewFile->find('OrigExtension'));
|
$NewFilePath = $OrigFilePath;
|
||||||
$uploadResult = '202';
|
local('fileExtension') = '.' + $NewFile->find('OrigExtension');
|
||||||
else;
|
local('shortFileName') = $NewFileName->removetrailing(#fileExtension)&;
|
||||||
/*.................................................
|
|
||||||
Rename the target path until it is unique.
|
|
||||||
*/
|
/*.....................................................
|
||||||
while(file_exists($NewFilePath));
|
Make sure the file extension is allowed.
|
||||||
$NewFilePath = $currentFolderURL + #shortFileName + '(' + loop_count + ')' + #fileExtension;
|
*/
|
||||||
/while;
|
if($config->find('DeniedExtensions')->find($Type) >> $NewFile->find('OrigExtension'));
|
||||||
|
$uploadResult = '202';
|
||||||
|
else;
|
||||||
/*.................................................
|
/*.................................................
|
||||||
Copy the uploaded file to its final location.
|
Rename the target path until it is unique.
|
||||||
*/
|
*/
|
||||||
file_copy($NewFile->find('path'), $NewFilePath);
|
while(file_exists($NewFilePath));
|
||||||
|
$NewFilePath = $currentFolderURL + #shortFileName + '(' + loop_count + ')' + #fileExtension;
|
||||||
|
/while;
|
||||||
/*.................................................
|
|
||||||
Set the error code for the response. Note whether
|
|
||||||
the file had to be renamed.
|
/*.................................................
|
||||||
*/
|
Copy the uploaded file to its final location.
|
||||||
select(file_currenterror( -errorcode));
|
*/
|
||||||
case(0);
|
file_copy($NewFile->find('path'), $NewFilePath);
|
||||||
$OrigFilePath != $NewFilePath ? $uploadResult = '201, \'' + $NewFilePath->split('/')->last + '\'';
|
|
||||||
case;
|
|
||||||
$uploadResult = '202';
|
/*.................................................
|
||||||
/select;
|
Set the error code for the response. Note whether
|
||||||
/if;
|
the file had to be renamed.
|
||||||
/if;
|
*/
|
||||||
|
select(file_currenterror( -errorcode));
|
||||||
|
case(0);
|
||||||
/*.........................................................
|
$OrigFilePath != $NewFilePath ? $uploadResult = '201, \'' + $NewFilePath->split('/')->last + '\'';
|
||||||
Set the HTML response.
|
case;
|
||||||
*/
|
$uploadResult = '202';
|
||||||
$__html_reply__ = '\
|
/select;
|
||||||
<script type="text/javascript">
|
/if;
|
||||||
window.parent.frames[\'frmUpload\'].OnUploadCompleted(' + $uploadResult + ');
|
/if;
|
||||||
</script>
|
|
||||||
';
|
|
||||||
/select;
|
/*.........................................................
|
||||||
/inline;
|
Set the HTML response.
|
||||||
|
*/
|
||||||
|
$__html_reply__ = '\
|
||||||
/*.....................................................................
|
<script type="text/javascript">
|
||||||
Send a custom header for xml responses.
|
window.parent.frames[\'frmUpload\'].OnUploadCompleted(' + $uploadResult + ');
|
||||||
*/
|
</script>
|
||||||
if($responseType == 'xml');
|
';
|
||||||
header;
|
/select;
|
||||||
]
|
/inline;
|
||||||
HTTP/1.0 200 OK
|
|
||||||
Date: [$headerDate]
|
|
||||||
Server: Lasso Professional [lasso_version( -lassoversion)]
|
/*.....................................................................
|
||||||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
Send a custom header for xml responses.
|
||||||
Last-Modified: [$headerDate]
|
*/
|
||||||
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
if($responseType == 'xml');
|
||||||
Pragma: no-cache
|
header;
|
||||||
Keep-Alive: timeout=15, max=98
|
]
|
||||||
Connection: Keep-Alive
|
HTTP/1.0 200 OK
|
||||||
Content-Type: text/xml; charset=utf-8
|
Date: [$headerDate]
|
||||||
[//lasso
|
Server: Lasso Professional [lasso_version( -lassoversion)]
|
||||||
/header;
|
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||||
|
Last-Modified: [$headerDate]
|
||||||
|
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
||||||
/*.................................................................
|
Pragma: no-cache
|
||||||
Set the content type encoding for Lasso.
|
Keep-Alive: timeout=15, max=98
|
||||||
*/
|
Connection: Keep-Alive
|
||||||
content_type('text/xml; charset=utf-8');
|
Content-Type: text/xml; charset=utf-8
|
||||||
|
[//lasso
|
||||||
|
/header;
|
||||||
/*.................................................................
|
|
||||||
Wrap the response as XML and output.
|
|
||||||
*/
|
/*.................................................................
|
||||||
$__html_reply__ = '\
|
Set the content type encoding for Lasso.
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
*/
|
||||||
<Connector command="' + $Command + '" resourceType="' + $Type + '">
|
content_type('text/xml; charset=utf-8');
|
||||||
<CurrentFolder path="' + $CurrentFolder + '" url="' + $currentFolderURL + '" />
|
|
||||||
' + $commandData + '
|
|
||||||
</Connector>
|
/*.................................................................
|
||||||
';
|
Wrap the response as XML and output.
|
||||||
/if;
|
*/
|
||||||
]
|
$__html_reply__ = '\
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Connector command="' + $Command + '" resourceType="' + $Type + '">
|
||||||
|
<CurrentFolder path="' + $CurrentFolder + '" url="' + $currentFolderURL + '" />
|
||||||
|
' + $commandData + '
|
||||||
|
</Connector>
|
||||||
|
';
|
||||||
|
/if;
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,59 +1,67 @@
|
|||||||
#####
|
#####
|
||||||
# FCKeditor - The text editor for internet
|
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the GNU Lesser General Public License:
|
# == BEGIN LICENSE ==
|
||||||
# http://www.opensource.org/licenses/lgpl-license.php
|
#
|
||||||
#
|
# Licensed under the terms of any of the following licenses at your
|
||||||
# For further information visit:
|
# choice:
|
||||||
# http://www.fckeditor.net/
|
#
|
||||||
#
|
# - GNU General Public License Version 2 or later (the "GPL")
|
||||||
# "Support Open Source software. What about a donation today?"
|
# http://www.gnu.org/licenses/gpl.html
|
||||||
#
|
#
|
||||||
# File Name: basexml.pl
|
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
# This is the File Manager Connector for Perl.
|
# http://www.gnu.org/licenses/lgpl.html
|
||||||
#
|
#
|
||||||
# File Authors:
|
# - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
# Takashi Yamaguchi (jack@omakase.net)
|
# http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
#####
|
#
|
||||||
|
# == END LICENSE ==
|
||||||
sub CreateXmlHeader
|
#
|
||||||
{
|
# File Name: basexml.pl
|
||||||
local($command,$resourceType,$currentFolder) = @_;
|
# This is the File Manager Connector for Perl.
|
||||||
|
#
|
||||||
# Create the XML document header.
|
# File Authors:
|
||||||
print '<?xml version="1.0" encoding="utf-8" ?>';
|
# Takashi Yamaguchi (jack@omakase.net)
|
||||||
|
#####
|
||||||
# Create the main "Connector" node.
|
|
||||||
print '<Connector command="' . $command . '" resourceType="' . $resourceType . '">';
|
sub CreateXmlHeader
|
||||||
|
{
|
||||||
# Add the current folder node.
|
local($command,$resourceType,$currentFolder) = @_;
|
||||||
print '<CurrentFolder path="' . ConvertToXmlAttribute($currentFolder) . '" url="' . ConvertToXmlAttribute(GetUrlFromPath($resourceType,$currentFolder)) . '" />';
|
|
||||||
}
|
# Create the XML document header.
|
||||||
|
print '<?xml version="1.0" encoding="utf-8" ?>';
|
||||||
sub CreateXmlFooter
|
|
||||||
{
|
# Create the main "Connector" node.
|
||||||
print '</Connector>';
|
print '<Connector command="' . $command . '" resourceType="' . $resourceType . '">';
|
||||||
}
|
|
||||||
|
# Add the current folder node.
|
||||||
sub SendError
|
print '<CurrentFolder path="' . ConvertToXmlAttribute($currentFolder) . '" url="' . ConvertToXmlAttribute(GetUrlFromPath($resourceType,$currentFolder)) . '" />';
|
||||||
{
|
}
|
||||||
local( $number, $text ) = @_;
|
|
||||||
|
sub CreateXmlFooter
|
||||||
print << "_HTML_HEAD_";
|
{
|
||||||
Content-Type:text/xml; charset=utf-8
|
print '</Connector>';
|
||||||
Pragma: no-cache
|
}
|
||||||
Cache-Control: no-cache
|
|
||||||
Expires: Thu, 01 Dec 1994 16:00:00 GMT
|
sub SendError
|
||||||
|
{
|
||||||
_HTML_HEAD_
|
local( $number, $text ) = @_;
|
||||||
|
|
||||||
# Create the XML document header
|
print << "_HTML_HEAD_";
|
||||||
print '<?xml version="1.0" encoding="utf-8" ?>' ;
|
Content-Type:text/xml; charset=utf-8
|
||||||
|
Pragma: no-cache
|
||||||
print '<Connector><Error number="' . $number . '" text="' . &specialchar_cnv( $text ) . '" /></Connector>' ;
|
Cache-Control: no-cache
|
||||||
|
Expires: Thu, 01 Dec 1994 16:00:00 GMT
|
||||||
exit ;
|
|
||||||
}
|
_HTML_HEAD_
|
||||||
|
|
||||||
1;
|
# Create the XML document header
|
||||||
|
print '<?xml version="1.0" encoding="utf-8" ?>' ;
|
||||||
|
|
||||||
|
print '<Connector><Error number="' . $number . '" text="' . &specialchar_cnv( $text ) . '" /></Connector>' ;
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|||||||
@@ -1,154 +1,162 @@
|
|||||||
#####
|
#####
|
||||||
# FCKeditor - The text editor for internet
|
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the GNU Lesser General Public License:
|
# == BEGIN LICENSE ==
|
||||||
# http://www.opensource.org/licenses/lgpl-license.php
|
#
|
||||||
#
|
# Licensed under the terms of any of the following licenses at your
|
||||||
# For further information visit:
|
# choice:
|
||||||
# http://www.fckeditor.net/
|
#
|
||||||
#
|
# - GNU General Public License Version 2 or later (the "GPL")
|
||||||
# "Support Open Source software. What about a donation today?"
|
# http://www.gnu.org/licenses/gpl.html
|
||||||
#
|
#
|
||||||
# File Name: commands.pl
|
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
# This is the File Manager Connector for Perl.
|
# http://www.gnu.org/licenses/lgpl.html
|
||||||
#
|
#
|
||||||
# File Authors:
|
# - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
# Takashi Yamaguchi (jack@omakase.net)
|
# http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
#####
|
#
|
||||||
|
# == END LICENSE ==
|
||||||
sub GetFolders
|
#
|
||||||
{
|
# File Name: commands.pl
|
||||||
|
# This is the File Manager Connector for Perl.
|
||||||
local($resourceType, $currentFolder) = @_;
|
#
|
||||||
|
# File Authors:
|
||||||
# Map the virtual path to the local server path.
|
# Takashi Yamaguchi (jack@omakase.net)
|
||||||
$sServerDir = &ServerMapFolder($resourceType, $currentFolder);
|
#####
|
||||||
print "<Folders>"; # Open the "Folders" node.
|
|
||||||
|
sub GetFolders
|
||||||
opendir(DIR,"$sServerDir");
|
{
|
||||||
@files = grep(!/^\.\.?$/,readdir(DIR));
|
|
||||||
closedir(DIR);
|
local($resourceType, $currentFolder) = @_;
|
||||||
|
|
||||||
foreach $sFile (@files) {
|
# Map the virtual path to the local server path.
|
||||||
if($sFile != '.' && $sFile != '..' && (-d "$sServerDir$sFile")) {
|
$sServerDir = &ServerMapFolder($resourceType, $currentFolder);
|
||||||
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
print "<Folders>"; # Open the "Folders" node.
|
||||||
print '<Folder name="' . $cnv_filename . '" />';
|
|
||||||
}
|
opendir(DIR,"$sServerDir");
|
||||||
}
|
@files = grep(!/^\.\.?$/,readdir(DIR));
|
||||||
print "</Folders>"; # Close the "Folders" node.
|
closedir(DIR);
|
||||||
}
|
|
||||||
|
foreach $sFile (@files) {
|
||||||
sub GetFoldersAndFiles
|
if($sFile != '.' && $sFile != '..' && (-d "$sServerDir$sFile")) {
|
||||||
{
|
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
||||||
|
print '<Folder name="' . $cnv_filename . '" />';
|
||||||
local($resourceType, $currentFolder) = @_;
|
}
|
||||||
# Map the virtual path to the local server path.
|
}
|
||||||
$sServerDir = &ServerMapFolder($resourceType,$currentFolder);
|
print "</Folders>"; # Close the "Folders" node.
|
||||||
|
}
|
||||||
# Initialize the output buffers for "Folders" and "Files".
|
|
||||||
$sFolders = '<Folders>';
|
sub GetFoldersAndFiles
|
||||||
$sFiles = '<Files>';
|
{
|
||||||
|
|
||||||
opendir(DIR,"$sServerDir");
|
local($resourceType, $currentFolder) = @_;
|
||||||
@files = grep(!/^\.\.?$/,readdir(DIR));
|
# Map the virtual path to the local server path.
|
||||||
closedir(DIR);
|
$sServerDir = &ServerMapFolder($resourceType,$currentFolder);
|
||||||
|
|
||||||
foreach $sFile (@files) {
|
# Initialize the output buffers for "Folders" and "Files".
|
||||||
if($sFile ne '.' && $sFile ne '..') {
|
$sFolders = '<Folders>';
|
||||||
if(-d "$sServerDir$sFile") {
|
$sFiles = '<Files>';
|
||||||
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
|
||||||
$sFolders .= '<Folder name="' . $cnv_filename . '" />' ;
|
opendir(DIR,"$sServerDir");
|
||||||
} else {
|
@files = grep(!/^\.\.?$/,readdir(DIR));
|
||||||
($iFileSize,$refdate,$filedate,$fileperm) = (stat("$sServerDir$sFile"))[7,8,9,2];
|
closedir(DIR);
|
||||||
if($iFileSize > 0) {
|
|
||||||
$iFileSize = int($iFileSize / 1024);
|
foreach $sFile (@files) {
|
||||||
if($iFileSize < 1) {
|
if($sFile ne '.' && $sFile ne '..') {
|
||||||
$iFileSize = 1;
|
if(-d "$sServerDir$sFile") {
|
||||||
}
|
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
||||||
}
|
$sFolders .= '<Folder name="' . $cnv_filename . '" />' ;
|
||||||
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
} else {
|
||||||
$sFiles .= '<File name="' . $cnv_filename . '" size="' . $iFileSize . '" />' ;
|
($iFileSize,$refdate,$filedate,$fileperm) = (stat("$sServerDir$sFile"))[7,8,9,2];
|
||||||
}
|
if($iFileSize > 0) {
|
||||||
}
|
$iFileSize = int($iFileSize / 1024);
|
||||||
}
|
if($iFileSize < 1) {
|
||||||
print $sFolders ;
|
$iFileSize = 1;
|
||||||
print '</Folders>'; # Close the "Folders" node.
|
}
|
||||||
print $sFiles ;
|
}
|
||||||
print '</Files>'; # Close the "Files" node.
|
$cnv_filename = &ConvertToXmlAttribute($sFile);
|
||||||
}
|
$sFiles .= '<File name="' . $cnv_filename . '" size="' . $iFileSize . '" />' ;
|
||||||
|
}
|
||||||
sub CreateFolder
|
}
|
||||||
{
|
}
|
||||||
|
print $sFolders ;
|
||||||
local($resourceType, $currentFolder) = @_;
|
print '</Folders>'; # Close the "Folders" node.
|
||||||
$sErrorNumber = '0' ;
|
print $sFiles ;
|
||||||
$sErrorMsg = '' ;
|
print '</Files>'; # Close the "Files" node.
|
||||||
|
}
|
||||||
if($FORM{'NewFolderName'} ne "") {
|
|
||||||
$sNewFolderName = $FORM{'NewFolderName'};
|
sub CreateFolder
|
||||||
# Map the virtual path to the local server path of the current folder.
|
{
|
||||||
$sServerDir = &ServerMapFolder($resourceType, $currentFolder);
|
|
||||||
if(-w $sServerDir) {
|
local($resourceType, $currentFolder) = @_;
|
||||||
$sServerDir .= $sNewFolderName;
|
$sErrorNumber = '0' ;
|
||||||
$sErrorMsg = &CreateServerFolder($sServerDir);
|
$sErrorMsg = '' ;
|
||||||
if($sErrorMsg == 0) {
|
|
||||||
$sErrorNumber = '0';
|
if($FORM{'NewFolderName'} ne "") {
|
||||||
} elsif($sErrorMsg eq 'Invalid argument' || $sErrorMsg eq 'No such file or directory') {
|
$sNewFolderName = $FORM{'NewFolderName'};
|
||||||
$sErrorNumber = '102'; #// Path too long.
|
# Map the virtual path to the local server path of the current folder.
|
||||||
} else {
|
$sServerDir = &ServerMapFolder($resourceType, $currentFolder);
|
||||||
$sErrorNumber = '110';
|
if(-w $sServerDir) {
|
||||||
}
|
$sServerDir .= $sNewFolderName;
|
||||||
} else {
|
$sErrorMsg = &CreateServerFolder($sServerDir);
|
||||||
$sErrorNumber = '103';
|
if($sErrorMsg == 0) {
|
||||||
}
|
$sErrorNumber = '0';
|
||||||
} else {
|
} elsif($sErrorMsg eq 'Invalid argument' || $sErrorMsg eq 'No such file or directory') {
|
||||||
$sErrorNumber = '102' ;
|
$sErrorNumber = '102'; #// Path too long.
|
||||||
}
|
} else {
|
||||||
# Create the "Error" node.
|
$sErrorNumber = '110';
|
||||||
$cnv_errmsg = &ConvertToXmlAttribute($sErrorMsg);
|
}
|
||||||
print '<Error number="' . $sErrorNumber . '" originalDescription="' . $cnv_errmsg . '" />';
|
} else {
|
||||||
}
|
$sErrorNumber = '103';
|
||||||
|
}
|
||||||
sub FileUpload
|
} else {
|
||||||
{
|
$sErrorNumber = '102' ;
|
||||||
eval("use File::Copy;");
|
}
|
||||||
|
# Create the "Error" node.
|
||||||
local($resourceType, $currentFolder) = @_;
|
$cnv_errmsg = &ConvertToXmlAttribute($sErrorMsg);
|
||||||
|
print '<Error number="' . $sErrorNumber . '" originalDescription="' . $cnv_errmsg . '" />';
|
||||||
$sErrorNumber = '0' ;
|
}
|
||||||
$sFileName = '' ;
|
|
||||||
if($new_fname) {
|
sub FileUpload
|
||||||
# Map the virtual path to the local server path.
|
{
|
||||||
$sServerDir = &ServerMapFolder($resourceType,$currentFolder);
|
eval("use File::Copy;");
|
||||||
|
|
||||||
# Get the uploaded file name.
|
local($resourceType, $currentFolder) = @_;
|
||||||
$sFileName = $new_fname;
|
|
||||||
$sOriginalFileName = $sFileName;
|
$sErrorNumber = '0' ;
|
||||||
|
$sFileName = '' ;
|
||||||
$iCounter = 0;
|
if($new_fname) {
|
||||||
while(1) {
|
# Map the virtual path to the local server path.
|
||||||
$sFilePath = $sServerDir . $sFileName;
|
$sServerDir = &ServerMapFolder($resourceType,$currentFolder);
|
||||||
if(-e $sFilePath) {
|
|
||||||
$iCounter++ ;
|
# Get the uploaded file name.
|
||||||
($path,$BaseName,$ext) = &RemoveExtension($sOriginalFileName);
|
$sFileName = $new_fname;
|
||||||
$sFileName = $BaseName . '(' . $iCounter . ').' . $ext;
|
$sOriginalFileName = $sFileName;
|
||||||
$sErrorNumber = '201';
|
|
||||||
} else {
|
$iCounter = 0;
|
||||||
copy("$img_dir/$new_fname","$sFilePath");
|
while(1) {
|
||||||
chmod(0777,$sFilePath);
|
$sFilePath = $sServerDir . $sFileName;
|
||||||
unlink("$img_dir/$new_fname");
|
if(-e $sFilePath) {
|
||||||
last;
|
$iCounter++ ;
|
||||||
}
|
($path,$BaseName,$ext) = &RemoveExtension($sOriginalFileName);
|
||||||
}
|
$sFileName = $BaseName . '(' . $iCounter . ').' . $ext;
|
||||||
} else {
|
$sErrorNumber = '201';
|
||||||
$sErrorNumber = '202' ;
|
} else {
|
||||||
}
|
copy("$img_dir/$new_fname","$sFilePath");
|
||||||
$sFileName =~ s/"/\\"/g;
|
chmod(0777,$sFilePath);
|
||||||
print "Content-type: text/html\n\n";
|
unlink("$img_dir/$new_fname");
|
||||||
print '<script type="text/javascript">';
|
last;
|
||||||
print 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . $sFileName . '") ;';
|
}
|
||||||
print '</script>';
|
}
|
||||||
exit ;
|
} else {
|
||||||
}
|
$sErrorNumber = '202' ;
|
||||||
1;
|
}
|
||||||
|
$sFileName =~ s/"/\\"/g;
|
||||||
|
print "Content-type: text/html\n\n";
|
||||||
|
print '<script type="text/javascript">';
|
||||||
|
print 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . $sFileName . '") ;';
|
||||||
|
print '</script>';
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
|
1;
|
||||||
|
|||||||
@@ -1,134 +1,142 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
#####
|
#####
|
||||||
# FCKeditor - The text editor for internet
|
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the GNU Lesser General Public License:
|
# == BEGIN LICENSE ==
|
||||||
# http://www.opensource.org/licenses/lgpl-license.php
|
#
|
||||||
#
|
# Licensed under the terms of any of the following licenses at your
|
||||||
# For further information visit:
|
# choice:
|
||||||
# http://www.fckeditor.net/
|
#
|
||||||
#
|
# - GNU General Public License Version 2 or later (the "GPL")
|
||||||
# "Support Open Source software. What about a donation today?"
|
# http://www.gnu.org/licenses/gpl.html
|
||||||
#
|
#
|
||||||
# File Name: connector.cgi
|
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
# This is the File Manager Connector for Perl.
|
# http://www.gnu.org/licenses/lgpl.html
|
||||||
#
|
#
|
||||||
# File Authors:
|
# - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
# Takashi Yamaguchi (jack@omakase.net)
|
# http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
# Frederico Caldeira Knabben (fredck@fckeditor.net)
|
#
|
||||||
#####
|
# == END LICENSE ==
|
||||||
|
#
|
||||||
##
|
# File Name: connector.cgi
|
||||||
# ATTENTION: To enable this connector, look for the "SECURITY" comment in this file.
|
# This is the File Manager Connector for Perl.
|
||||||
##
|
#
|
||||||
|
# File Authors:
|
||||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
# Takashi Yamaguchi (jack@omakase.net)
|
||||||
if(Windows_check()) {
|
# Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
chdir(GetScriptPath($0));
|
#####
|
||||||
}
|
|
||||||
|
##
|
||||||
sub Windows_check
|
# ATTENTION: To enable this connector, look for the "SECURITY" comment in this file.
|
||||||
{
|
##
|
||||||
# IIS,PWS(NT/95)
|
|
||||||
$www_server_os = $^O;
|
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||||
# Win98 & NT(SP4)
|
if(Windows_check()) {
|
||||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
chdir(GetScriptPath($0));
|
||||||
# AnHTTPd/Omni/IIS
|
}
|
||||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
|
||||||
# Win Apache
|
sub Windows_check
|
||||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
{
|
||||||
if($www_server_os=~ /win/i) { return(1); }
|
# IIS,PWS(NT/95)
|
||||||
return(0);
|
$www_server_os = $^O;
|
||||||
}
|
# Win98 & NT(SP4)
|
||||||
|
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||||
sub GetScriptPath {
|
# AnHTTPd/Omni/IIS
|
||||||
local($path) = @_;
|
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
# Win Apache
|
||||||
$path;
|
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||||
}
|
if($www_server_os=~ /win/i) { return(1); }
|
||||||
## END: Hack for IIS
|
return(0);
|
||||||
|
}
|
||||||
require 'util.pl';
|
|
||||||
require 'io.pl';
|
sub GetScriptPath {
|
||||||
require 'basexml.pl';
|
local($path) = @_;
|
||||||
require 'commands.pl';
|
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||||
require 'upload_fck.pl';
|
$path;
|
||||||
|
}
|
||||||
##
|
## END: Hack for IIS
|
||||||
# SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR.
|
|
||||||
##
|
require 'util.pl';
|
||||||
&SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/perl/connector.cgi" file' ) ;
|
require 'io.pl';
|
||||||
|
require 'basexml.pl';
|
||||||
&read_input();
|
require 'commands.pl';
|
||||||
|
require 'upload_fck.pl';
|
||||||
if($FORM{'ServerPath'} ne "") {
|
|
||||||
$GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'};
|
##
|
||||||
if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) {
|
# SECURITY: REMOVE/COMMENT THE FOLLOWING LINE TO ENABLE THIS CONNECTOR.
|
||||||
$GLOBALS{'UserFilesPath'} .= '/' ;
|
##
|
||||||
}
|
&SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/perl/connector.cgi" file' ) ;
|
||||||
} else {
|
|
||||||
$GLOBALS{'UserFilesPath'} = '/UserFiles/';
|
&read_input();
|
||||||
}
|
|
||||||
|
if($FORM{'ServerPath'} ne "") {
|
||||||
# Map the "UserFiles" path to a local directory.
|
$GLOBALS{'UserFilesPath'} = $FORM{'ServerPath'};
|
||||||
$rootpath = &GetRootPath();
|
if(!($GLOBALS{'UserFilesPath'} =~ /\/$/)) {
|
||||||
$GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'};
|
$GLOBALS{'UserFilesPath'} .= '/' ;
|
||||||
|
}
|
||||||
&DoResponse();
|
} else {
|
||||||
|
$GLOBALS{'UserFilesPath'} = '/userfiles/';
|
||||||
sub DoResponse
|
}
|
||||||
{
|
|
||||||
|
# Map the "UserFiles" path to a local directory.
|
||||||
if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") {
|
$rootpath = &GetRootPath();
|
||||||
return ;
|
$GLOBALS{'UserFilesDirectory'} = $rootpath . $GLOBALS{'UserFilesPath'};
|
||||||
}
|
|
||||||
# Get the main request informaiton.
|
&DoResponse();
|
||||||
$sCommand = $FORM{'Command'};
|
|
||||||
$sResourceType = $FORM{'Type'};
|
sub DoResponse
|
||||||
$sCurrentFolder = $FORM{'CurrentFolder'};
|
{
|
||||||
|
|
||||||
# Check the current folder syntax (must begin and start with a slash).
|
if($FORM{'Command'} eq "" || $FORM{'Type'} eq "" || $FORM{'CurrentFolder'} eq "") {
|
||||||
if(!($sCurrentFolder =~ /\/$/)) {
|
return ;
|
||||||
$sCurrentFolder .= '/';
|
}
|
||||||
}
|
# Get the main request informaiton.
|
||||||
if(!($sCurrentFolder =~ /^\//)) {
|
$sCommand = $FORM{'Command'};
|
||||||
$sCurrentFolder = '/' . $sCurrentFolder;
|
$sResourceType = $FORM{'Type'};
|
||||||
}
|
$sCurrentFolder = $FORM{'CurrentFolder'};
|
||||||
|
|
||||||
# Check for invalid folder paths (..)
|
# Check the current folder syntax (must begin and start with a slash).
|
||||||
if ( $sCurrentFolder =~ /\.\./ ) {
|
if(!($sCurrentFolder =~ /\/$/)) {
|
||||||
SendError( 102, "" ) ;
|
$sCurrentFolder .= '/';
|
||||||
}
|
}
|
||||||
|
if(!($sCurrentFolder =~ /^\//)) {
|
||||||
# File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
$sCurrentFolder = '/' . $sCurrentFolder;
|
||||||
if($sCommand eq 'FileUpload') {
|
}
|
||||||
FileUpload($sResourceType,$sCurrentFolder);
|
|
||||||
return ;
|
# Check for invalid folder paths (..)
|
||||||
}
|
if ( $sCurrentFolder =~ /\.\./ ) {
|
||||||
|
SendError( 102, "" ) ;
|
||||||
print << "_HTML_HEAD_";
|
}
|
||||||
Content-Type:text/xml; charset=utf-8
|
|
||||||
Pragma: no-cache
|
# File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
||||||
Cache-Control: no-cache
|
if($sCommand eq 'FileUpload') {
|
||||||
Expires: Thu, 01 Dec 1994 16:00:00 GMT
|
FileUpload($sResourceType,$sCurrentFolder);
|
||||||
|
return ;
|
||||||
_HTML_HEAD_
|
}
|
||||||
|
|
||||||
&CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder);
|
print << "_HTML_HEAD_";
|
||||||
|
Content-Type:text/xml; charset=utf-8
|
||||||
# Execute the required command.
|
Pragma: no-cache
|
||||||
if($sCommand eq 'GetFolders') {
|
Cache-Control: no-cache
|
||||||
&GetFolders($sResourceType,$sCurrentFolder);
|
Expires: Thu, 01 Dec 1994 16:00:00 GMT
|
||||||
} elsif($sCommand eq 'GetFoldersAndFiles') {
|
|
||||||
&GetFoldersAndFiles($sResourceType,$sCurrentFolder);
|
_HTML_HEAD_
|
||||||
} elsif($sCommand eq 'CreateFolder') {
|
|
||||||
&CreateFolder($sResourceType,$sCurrentFolder);
|
&CreateXmlHeader($sCommand,$sResourceType,$sCurrentFolder);
|
||||||
}
|
|
||||||
|
# Execute the required command.
|
||||||
&CreateXmlFooter();
|
if($sCommand eq 'GetFolders') {
|
||||||
|
&GetFolders($sResourceType,$sCurrentFolder);
|
||||||
exit ;
|
} elsif($sCommand eq 'GetFoldersAndFiles') {
|
||||||
}
|
&GetFoldersAndFiles($sResourceType,$sCurrentFolder);
|
||||||
|
} elsif($sCommand eq 'CreateFolder') {
|
||||||
|
&CreateFolder($sResourceType,$sCurrentFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
&CreateXmlFooter();
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,127 +1,135 @@
|
|||||||
#####
|
#####
|
||||||
# FCKeditor - The text editor for internet
|
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the GNU Lesser General Public License:
|
# == BEGIN LICENSE ==
|
||||||
# http://www.opensource.org/licenses/lgpl-license.php
|
#
|
||||||
#
|
# Licensed under the terms of any of the following licenses at your
|
||||||
# For further information visit:
|
# choice:
|
||||||
# http://www.fckeditor.net/
|
#
|
||||||
#
|
# - GNU General Public License Version 2 or later (the "GPL")
|
||||||
# "Support Open Source software. What about a donation today?"
|
# http://www.gnu.org/licenses/gpl.html
|
||||||
#
|
#
|
||||||
# File Name: io.pl
|
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
# This is the File Manager Connector for Perl.
|
# http://www.gnu.org/licenses/lgpl.html
|
||||||
#
|
#
|
||||||
# File Authors:
|
# - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
# Takashi Yamaguchi (jack@omakase.net)
|
# http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
#####
|
#
|
||||||
|
# == END LICENSE ==
|
||||||
sub GetUrlFromPath
|
#
|
||||||
{
|
# File Name: io.pl
|
||||||
local($resourceType, $folderPath) = @_;
|
# This is the File Manager Connector for Perl.
|
||||||
|
#
|
||||||
if($resourceType eq '') {
|
# File Authors:
|
||||||
$rmpath = &RemoveFromEnd($GLOBALS{'UserFilesPath'},'/');
|
# Takashi Yamaguchi (jack@omakase.net)
|
||||||
return("$rmpath$folderPath");
|
#####
|
||||||
} else {
|
|
||||||
return("$GLOBALS{'UserFilesPath'}$resourceType$folderPath");
|
sub GetUrlFromPath
|
||||||
}
|
{
|
||||||
}
|
local($resourceType, $folderPath) = @_;
|
||||||
|
|
||||||
sub RemoveExtension
|
if($resourceType eq '') {
|
||||||
{
|
$rmpath = &RemoveFromEnd($GLOBALS{'UserFilesPath'},'/');
|
||||||
local($fileName) = @_;
|
return("$rmpath$folderPath");
|
||||||
local($path, $base, $ext);
|
} else {
|
||||||
if($fileName !~ /\./) {
|
return("$GLOBALS{'UserFilesPath'}$resourceType$folderPath");
|
||||||
$fileName .= '.';
|
}
|
||||||
}
|
}
|
||||||
if($fileName =~ /([^\\\/]*)\.(.*)$/) {
|
|
||||||
$base = $1;
|
sub RemoveExtension
|
||||||
$ext = $2;
|
{
|
||||||
if($fileName =~ /(.*)$base\.$ext$/) {
|
local($fileName) = @_;
|
||||||
$path = $1;
|
local($path, $base, $ext);
|
||||||
}
|
if($fileName !~ /\./) {
|
||||||
}
|
$fileName .= '.';
|
||||||
return($path,$base,$ext);
|
}
|
||||||
|
if($fileName =~ /([^\\\/]*)\.(.*)$/) {
|
||||||
}
|
$base = $1;
|
||||||
|
$ext = $2;
|
||||||
sub ServerMapFolder
|
if($fileName =~ /(.*)$base\.$ext$/) {
|
||||||
{
|
$path = $1;
|
||||||
local($resourceType,$folderPath) = @_;
|
}
|
||||||
|
}
|
||||||
# Get the resource type directory.
|
return($path,$base,$ext);
|
||||||
$sResourceTypePath = $GLOBALS{'UserFilesDirectory'} . $resourceType . '/';
|
|
||||||
|
}
|
||||||
# Ensure that the directory exists.
|
|
||||||
&CreateServerFolder($sResourceTypePath);
|
sub ServerMapFolder
|
||||||
|
{
|
||||||
# Return the resource type directory combined with the required path.
|
local($resourceType,$folderPath) = @_;
|
||||||
$rmpath = &RemoveFromStart($folderPath,'/');
|
|
||||||
return("$sResourceTypePath$rmpath");
|
# Get the resource type directory.
|
||||||
}
|
$sResourceTypePath = $GLOBALS{'UserFilesDirectory'} . $resourceType . '/';
|
||||||
|
|
||||||
sub GetParentFolder
|
# Ensure that the directory exists.
|
||||||
{
|
&CreateServerFolder($sResourceTypePath);
|
||||||
local($folderPath) = @_;
|
|
||||||
|
# Return the resource type directory combined with the required path.
|
||||||
$folderPath =~ s/[\/][^\/]+[\/]?$//g;
|
$rmpath = &RemoveFromStart($folderPath,'/');
|
||||||
return $folderPath;
|
return("$sResourceTypePath$rmpath");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub CreateServerFolder
|
sub GetParentFolder
|
||||||
{
|
{
|
||||||
local($folderPath) = @_;
|
local($folderPath) = @_;
|
||||||
|
|
||||||
$sParent = &GetParentFolder($folderPath);
|
$folderPath =~ s/[\/][^\/]+[\/]?$//g;
|
||||||
# Check if the parent exists, or create it.
|
return $folderPath;
|
||||||
if(!(-e $sParent)) {
|
}
|
||||||
$sErrorMsg = &CreateServerFolder($sParent);
|
|
||||||
if($sErrorMsg == 1) {
|
sub CreateServerFolder
|
||||||
return(1);
|
{
|
||||||
}
|
local($folderPath) = @_;
|
||||||
}
|
|
||||||
if(!(-e $folderPath)) {
|
$sParent = &GetParentFolder($folderPath);
|
||||||
umask(000);
|
# Check if the parent exists, or create it.
|
||||||
mkdir("$folderPath",0777);
|
if(!(-e $sParent)) {
|
||||||
chmod(0777,"$folderPath");
|
$sErrorMsg = &CreateServerFolder($sParent);
|
||||||
return(0);
|
if($sErrorMsg == 1) {
|
||||||
} else {
|
return(1);
|
||||||
return(1);
|
}
|
||||||
}
|
}
|
||||||
}
|
if(!(-e $folderPath)) {
|
||||||
|
umask(000);
|
||||||
sub GetRootPath
|
mkdir("$folderPath",0777);
|
||||||
{
|
chmod(0777,"$folderPath");
|
||||||
#use Cwd;
|
return(0);
|
||||||
|
} else {
|
||||||
# my $dir = getcwd;
|
return(1);
|
||||||
# print $dir;
|
}
|
||||||
# $dir =~ s/$ENV{'DOCUMENT_ROOT'}//g;
|
}
|
||||||
# print $dir;
|
|
||||||
# return($dir);
|
sub GetRootPath
|
||||||
|
{
|
||||||
# $wk = $0;
|
#use Cwd;
|
||||||
# $wk =~ s/\/connector\.cgi//g;
|
|
||||||
# if($wk) {
|
# my $dir = getcwd;
|
||||||
# $current_dir = $wk;
|
# print $dir;
|
||||||
# } else {
|
# $dir =~ s/$ENV{'DOCUMENT_ROOT'}//g;
|
||||||
# $current_dir = `pwd`;
|
# print $dir;
|
||||||
# }
|
# return($dir);
|
||||||
# return($current_dir);
|
|
||||||
use Cwd;
|
# $wk = $0;
|
||||||
|
# $wk =~ s/\/connector\.cgi//g;
|
||||||
if($ENV{'DOCUMENT_ROOT'}) {
|
# if($wk) {
|
||||||
$dir = $ENV{'DOCUMENT_ROOT'};
|
# $current_dir = $wk;
|
||||||
} else {
|
# } else {
|
||||||
my $dir = getcwd;
|
# $current_dir = `pwd`;
|
||||||
$workdir =~ s/\/connector\.cgi//g;
|
# }
|
||||||
$dir =~ s/$workdir//g;
|
# return($current_dir);
|
||||||
}
|
use Cwd;
|
||||||
return($dir);
|
|
||||||
|
if($ENV{'DOCUMENT_ROOT'}) {
|
||||||
|
$dir = $ENV{'DOCUMENT_ROOT'};
|
||||||
|
} else {
|
||||||
}
|
my $dir = getcwd;
|
||||||
1;
|
$workdir =~ s/\/connector\.cgi//g;
|
||||||
|
$dir =~ s/$workdir//g;
|
||||||
|
}
|
||||||
|
return($dir);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
1;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,56 +1,64 @@
|
|||||||
#####
|
#####
|
||||||
# FCKeditor - The text editor for internet
|
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
#
|
#
|
||||||
# Licensed under the terms of the GNU Lesser General Public License:
|
# == BEGIN LICENSE ==
|
||||||
# http://www.opensource.org/licenses/lgpl-license.php
|
#
|
||||||
#
|
# Licensed under the terms of any of the following licenses at your
|
||||||
# For further information visit:
|
# choice:
|
||||||
# http://www.fckeditor.net/
|
#
|
||||||
#
|
# - GNU General Public License Version 2 or later (the "GPL")
|
||||||
# "Support Open Source software. What about a donation today?"
|
# http://www.gnu.org/licenses/gpl.html
|
||||||
#
|
#
|
||||||
# File Name: util.pl
|
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
# This is the File Manager Connector for Perl.
|
# http://www.gnu.org/licenses/lgpl.html
|
||||||
#
|
#
|
||||||
# File Authors:
|
# - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
# Takashi Yamaguchi (jack@omakase.net)
|
# http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
#####
|
#
|
||||||
|
# == END LICENSE ==
|
||||||
sub RemoveFromStart
|
#
|
||||||
{
|
# File Name: util.pl
|
||||||
local($sourceString, $charToRemove) = @_;
|
# This is the File Manager Connector for Perl.
|
||||||
$sPattern = '^' . $charToRemove . '+' ;
|
#
|
||||||
$sourceString =~ s/^$charToRemove+//g;
|
# File Authors:
|
||||||
return $sourceString;
|
# Takashi Yamaguchi (jack@omakase.net)
|
||||||
}
|
#####
|
||||||
|
|
||||||
sub RemoveFromEnd
|
sub RemoveFromStart
|
||||||
{
|
{
|
||||||
local($sourceString, $charToRemove) = @_;
|
local($sourceString, $charToRemove) = @_;
|
||||||
$sPattern = $charToRemove . '+$' ;
|
$sPattern = '^' . $charToRemove . '+' ;
|
||||||
$sourceString =~ s/$charToRemove+$//g;
|
$sourceString =~ s/^$charToRemove+//g;
|
||||||
return $sourceString;
|
return $sourceString;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub ConvertToXmlAttribute
|
sub RemoveFromEnd
|
||||||
{
|
{
|
||||||
local($value) = @_;
|
local($sourceString, $charToRemove) = @_;
|
||||||
return $value;
|
$sPattern = $charToRemove . '+$' ;
|
||||||
# return utf8_encode(htmlspecialchars($value));
|
$sourceString =~ s/$charToRemove+$//g;
|
||||||
|
return $sourceString;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub specialchar_cnv
|
sub ConvertToXmlAttribute
|
||||||
{
|
{
|
||||||
local($ch) = @_;
|
local($value) = @_;
|
||||||
|
return $value;
|
||||||
$ch =~ s/&/&/g; # &
|
# return utf8_encode(htmlspecialchars($value));
|
||||||
$ch =~ s/\"/"/g; #"
|
|
||||||
$ch =~ s/\'/'/g; # '
|
}
|
||||||
$ch =~ s/</</g; # <
|
|
||||||
$ch =~ s/>/>/g; # >
|
sub specialchar_cnv
|
||||||
return($ch);
|
{
|
||||||
}
|
local($ch) = @_;
|
||||||
|
|
||||||
1;
|
$ch =~ s/&/&/g; # &
|
||||||
|
$ch =~ s/\"/"/g; #"
|
||||||
|
$ch =~ s/\'/'/g; # '
|
||||||
|
$ch =~ s/</</g; # <
|
||||||
|
$ch =~ s/>/>/g; # >
|
||||||
|
return($ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|||||||
@@ -1,71 +1,79 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: basexml.php
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* These functions define the base of the XML response sent by the PHP
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* connector.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
*/
|
* == END LICENSE ==
|
||||||
|
*
|
||||||
function SetXmlHeaders()
|
* File Name: basexml.php
|
||||||
{
|
* These functions define the base of the XML response sent by the PHP
|
||||||
ob_end_clean() ;
|
* connector.
|
||||||
|
*
|
||||||
// Prevent the browser from caching the result.
|
* File Authors:
|
||||||
// Date in the past
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
|
*/
|
||||||
// always modified
|
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
|
function SetXmlHeaders()
|
||||||
// HTTP/1.1
|
{
|
||||||
header('Cache-Control: no-store, no-cache, must-revalidate') ;
|
ob_end_clean() ;
|
||||||
header('Cache-Control: post-check=0, pre-check=0', false) ;
|
|
||||||
// HTTP/1.0
|
// Prevent the browser from caching the result.
|
||||||
header('Pragma: no-cache') ;
|
// Date in the past
|
||||||
|
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
|
||||||
// Set the response format.
|
// always modified
|
||||||
header( 'Content-Type:text/xml; charset=utf-8' ) ;
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
|
||||||
}
|
// HTTP/1.1
|
||||||
|
header('Cache-Control: no-store, no-cache, must-revalidate') ;
|
||||||
function CreateXmlHeader( $command, $resourceType, $currentFolder )
|
header('Cache-Control: post-check=0, pre-check=0', false) ;
|
||||||
{
|
// HTTP/1.0
|
||||||
SetXmlHeaders() ;
|
header('Pragma: no-cache') ;
|
||||||
|
|
||||||
// Create the XML document header.
|
// Set the response format.
|
||||||
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
|
header( 'Content-Type:text/xml; charset=utf-8' ) ;
|
||||||
|
}
|
||||||
// Create the main "Connector" node.
|
|
||||||
echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ;
|
function CreateXmlHeader( $command, $resourceType, $currentFolder )
|
||||||
|
{
|
||||||
// Add the current folder node.
|
SetXmlHeaders() ;
|
||||||
echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
|
|
||||||
}
|
// Create the XML document header.
|
||||||
|
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
|
||||||
function CreateXmlFooter()
|
|
||||||
{
|
// Create the main "Connector" node.
|
||||||
echo '</Connector>' ;
|
echo '<Connector command="' . $command . '" resourceType="' . $resourceType . '">' ;
|
||||||
}
|
|
||||||
|
// Add the current folder node.
|
||||||
function SendError( $number, $text )
|
echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;
|
||||||
{
|
}
|
||||||
SetXmlHeaders() ;
|
|
||||||
|
function CreateXmlFooter()
|
||||||
// Create the XML document header
|
{
|
||||||
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
|
echo '</Connector>' ;
|
||||||
|
}
|
||||||
echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
|
|
||||||
|
function SendError( $number, $text )
|
||||||
exit ;
|
{
|
||||||
}
|
SetXmlHeaders() ;
|
||||||
|
|
||||||
|
// Create the XML document header
|
||||||
|
echo '<?xml version="1.0" encoding="utf-8" ?>' ;
|
||||||
|
|
||||||
|
echo '<Connector><Error number="' . $number . '" text="' . htmlspecialchars( $text ) . '" /></Connector>' ;
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,218 +1,226 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: commands.php
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for PHP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
function GetFolders( $resourceType, $currentFolder )
|
*
|
||||||
{
|
* File Name: commands.php
|
||||||
// Map the virtual path to the local server path.
|
* This is the File Manager Connector for PHP.
|
||||||
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
*
|
||||||
|
* File Authors:
|
||||||
// Array that will hold the folders names.
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
$aFolders = array() ;
|
*/
|
||||||
|
|
||||||
$oCurrentFolder = opendir( $sServerDir ) ;
|
function GetFolders( $resourceType, $currentFolder )
|
||||||
|
{
|
||||||
while ( $sFile = readdir( $oCurrentFolder ) )
|
// Map the virtual path to the local server path.
|
||||||
{
|
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
||||||
if ( $sFile != '.' && $sFile != '..' && is_dir( $sServerDir . $sFile ) )
|
|
||||||
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
|
// Array that will hold the folders names.
|
||||||
}
|
$aFolders = array() ;
|
||||||
|
|
||||||
closedir( $oCurrentFolder ) ;
|
$oCurrentFolder = opendir( $sServerDir ) ;
|
||||||
|
|
||||||
// Open the "Folders" node.
|
while ( $sFile = readdir( $oCurrentFolder ) )
|
||||||
echo "<Folders>" ;
|
{
|
||||||
|
if ( $sFile != '.' && $sFile != '..' && is_dir( $sServerDir . $sFile ) )
|
||||||
natcasesort( $aFolders ) ;
|
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
|
||||||
foreach ( $aFolders as $sFolder )
|
}
|
||||||
echo $sFolder ;
|
|
||||||
|
closedir( $oCurrentFolder ) ;
|
||||||
// Close the "Folders" node.
|
|
||||||
echo "</Folders>" ;
|
// Open the "Folders" node.
|
||||||
}
|
echo "<Folders>" ;
|
||||||
|
|
||||||
function GetFoldersAndFiles( $resourceType, $currentFolder )
|
natcasesort( $aFolders ) ;
|
||||||
{
|
foreach ( $aFolders as $sFolder )
|
||||||
// Map the virtual path to the local server path.
|
echo $sFolder ;
|
||||||
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
|
||||||
|
// Close the "Folders" node.
|
||||||
// Arrays that will hold the folders and files names.
|
echo "</Folders>" ;
|
||||||
$aFolders = array() ;
|
}
|
||||||
$aFiles = array() ;
|
|
||||||
|
function GetFoldersAndFiles( $resourceType, $currentFolder )
|
||||||
$oCurrentFolder = opendir( $sServerDir ) ;
|
{
|
||||||
|
// Map the virtual path to the local server path.
|
||||||
while ( $sFile = readdir( $oCurrentFolder ) )
|
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
||||||
{
|
|
||||||
if ( $sFile != '.' && $sFile != '..' )
|
// Arrays that will hold the folders and files names.
|
||||||
{
|
$aFolders = array() ;
|
||||||
if ( is_dir( $sServerDir . $sFile ) )
|
$aFiles = array() ;
|
||||||
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
|
|
||||||
else
|
$oCurrentFolder = opendir( $sServerDir ) ;
|
||||||
{
|
|
||||||
$iFileSize = filesize( $sServerDir . $sFile ) ;
|
while ( $sFile = readdir( $oCurrentFolder ) )
|
||||||
if ( $iFileSize > 0 )
|
{
|
||||||
{
|
if ( $sFile != '.' && $sFile != '..' )
|
||||||
$iFileSize = round( $iFileSize / 1024 ) ;
|
{
|
||||||
if ( $iFileSize < 1 ) $iFileSize = 1 ;
|
if ( is_dir( $sServerDir . $sFile ) )
|
||||||
}
|
$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
|
||||||
|
else
|
||||||
$aFiles[] = '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ;
|
{
|
||||||
}
|
$iFileSize = filesize( $sServerDir . $sFile ) ;
|
||||||
}
|
if ( $iFileSize > 0 )
|
||||||
}
|
{
|
||||||
|
$iFileSize = round( $iFileSize / 1024 ) ;
|
||||||
// Send the folders
|
if ( $iFileSize < 1 ) $iFileSize = 1 ;
|
||||||
natcasesort( $aFolders ) ;
|
}
|
||||||
echo '<Folders>' ;
|
|
||||||
|
$aFiles[] = '<File name="' . ConvertToXmlAttribute( $sFile ) . '" size="' . $iFileSize . '" />' ;
|
||||||
foreach ( $aFolders as $sFolder )
|
}
|
||||||
echo $sFolder ;
|
}
|
||||||
|
}
|
||||||
echo '</Folders>' ;
|
|
||||||
|
// Send the folders
|
||||||
// Send the files
|
natcasesort( $aFolders ) ;
|
||||||
natcasesort( $aFiles ) ;
|
echo '<Folders>' ;
|
||||||
echo '<Files>' ;
|
|
||||||
|
foreach ( $aFolders as $sFolder )
|
||||||
foreach ( $aFiles as $sFiles )
|
echo $sFolder ;
|
||||||
echo $sFiles ;
|
|
||||||
|
echo '</Folders>' ;
|
||||||
echo '</Files>' ;
|
|
||||||
}
|
// Send the files
|
||||||
|
natcasesort( $aFiles ) ;
|
||||||
function CreateFolder( $resourceType, $currentFolder )
|
echo '<Files>' ;
|
||||||
{
|
|
||||||
$sErrorNumber = '0' ;
|
foreach ( $aFiles as $sFiles )
|
||||||
$sErrorMsg = '' ;
|
echo $sFiles ;
|
||||||
|
|
||||||
if ( isset( $_GET['NewFolderName'] ) )
|
echo '</Files>' ;
|
||||||
{
|
}
|
||||||
$sNewFolderName = $_GET['NewFolderName'] ;
|
|
||||||
|
function CreateFolder( $resourceType, $currentFolder )
|
||||||
if ( strpos( $sNewFolderName, '..' ) !== FALSE )
|
{
|
||||||
$sErrorNumber = '102' ; // Invalid folder name.
|
$sErrorNumber = '0' ;
|
||||||
else
|
$sErrorMsg = '' ;
|
||||||
{
|
|
||||||
// Map the virtual path to the local server path of the current folder.
|
if ( isset( $_GET['NewFolderName'] ) )
|
||||||
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
{
|
||||||
|
$sNewFolderName = $_GET['NewFolderName'] ;
|
||||||
if ( is_writable( $sServerDir ) )
|
|
||||||
{
|
if ( strpos( $sNewFolderName, '..' ) !== FALSE )
|
||||||
$sServerDir .= $sNewFolderName ;
|
$sErrorNumber = '102' ; // Invalid folder name.
|
||||||
|
else
|
||||||
$sErrorMsg = CreateServerFolder( $sServerDir ) ;
|
{
|
||||||
|
// Map the virtual path to the local server path of the current folder.
|
||||||
switch ( $sErrorMsg )
|
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
||||||
{
|
|
||||||
case '' :
|
if ( is_writable( $sServerDir ) )
|
||||||
$sErrorNumber = '0' ;
|
{
|
||||||
break ;
|
$sServerDir .= $sNewFolderName ;
|
||||||
case 'Invalid argument' :
|
|
||||||
case 'No such file or directory' :
|
$sErrorMsg = CreateServerFolder( $sServerDir ) ;
|
||||||
$sErrorNumber = '102' ; // Path too long.
|
|
||||||
break ;
|
switch ( $sErrorMsg )
|
||||||
default :
|
{
|
||||||
$sErrorNumber = '110' ;
|
case '' :
|
||||||
break ;
|
$sErrorNumber = '0' ;
|
||||||
}
|
break ;
|
||||||
}
|
case 'Invalid argument' :
|
||||||
else
|
case 'No such file or directory' :
|
||||||
$sErrorNumber = '103' ;
|
$sErrorNumber = '102' ; // Path too long.
|
||||||
}
|
break ;
|
||||||
}
|
default :
|
||||||
else
|
$sErrorNumber = '110' ;
|
||||||
$sErrorNumber = '102' ;
|
break ;
|
||||||
|
}
|
||||||
// Create the "Error" node.
|
}
|
||||||
echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ;
|
else
|
||||||
}
|
$sErrorNumber = '103' ;
|
||||||
|
}
|
||||||
function FileUpload( $resourceType, $currentFolder )
|
}
|
||||||
{
|
else
|
||||||
$sErrorNumber = '0' ;
|
$sErrorNumber = '102' ;
|
||||||
$sFileName = '' ;
|
|
||||||
|
// Create the "Error" node.
|
||||||
if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) )
|
echo '<Error number="' . $sErrorNumber . '" originalDescription="' . ConvertToXmlAttribute( $sErrorMsg ) . '" />' ;
|
||||||
{
|
}
|
||||||
global $Config ;
|
|
||||||
|
function FileUpload( $resourceType, $currentFolder )
|
||||||
$oFile = $_FILES['NewFile'] ;
|
{
|
||||||
|
$sErrorNumber = '0' ;
|
||||||
// Map the virtual path to the local server path.
|
$sFileName = '' ;
|
||||||
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
|
||||||
|
if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) )
|
||||||
// Get the uploaded file name.
|
{
|
||||||
$sFileName = $oFile['name'] ;
|
global $Config ;
|
||||||
|
|
||||||
// Replace dots in the name with underscores (only one dot can be there... security issue).
|
$oFile = $_FILES['NewFile'] ;
|
||||||
if ( $Config['ForceSingleExtension'] )
|
|
||||||
$sFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sFileName ) ;
|
// Map the virtual path to the local server path.
|
||||||
|
$sServerDir = ServerMapFolder( $resourceType, $currentFolder ) ;
|
||||||
$sOriginalFileName = $sFileName ;
|
|
||||||
|
// Get the uploaded file name.
|
||||||
// Get the extension.
|
$sFileName = $oFile['name'] ;
|
||||||
$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
|
|
||||||
$sExtension = strtolower( $sExtension ) ;
|
// Replace dots in the name with underscores (only one dot can be there... security issue).
|
||||||
|
if ( $Config['ForceSingleExtension'] )
|
||||||
$arAllowed = $Config['AllowedExtensions'][$resourceType] ;
|
$sFileName = preg_replace( '/\\.(?![^.]*$)/', '_', $sFileName ) ;
|
||||||
$arDenied = $Config['DeniedExtensions'][$resourceType] ;
|
|
||||||
|
$sOriginalFileName = $sFileName ;
|
||||||
if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) )
|
|
||||||
{
|
// Get the extension.
|
||||||
$iCounter = 0 ;
|
$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
|
||||||
|
$sExtension = strtolower( $sExtension ) ;
|
||||||
while ( true )
|
|
||||||
{
|
$arAllowed = $Config['AllowedExtensions'][$resourceType] ;
|
||||||
$sFilePath = $sServerDir . $sFileName ;
|
$arDenied = $Config['DeniedExtensions'][$resourceType] ;
|
||||||
|
|
||||||
if ( is_file( $sFilePath ) )
|
if ( ( count($arAllowed) == 0 || in_array( $sExtension, $arAllowed ) ) && ( count($arDenied) == 0 || !in_array( $sExtension, $arDenied ) ) )
|
||||||
{
|
{
|
||||||
$iCounter++ ;
|
$iCounter = 0 ;
|
||||||
$sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ;
|
|
||||||
$sErrorNumber = '201' ;
|
while ( true )
|
||||||
}
|
{
|
||||||
else
|
$sFilePath = $sServerDir . $sFileName ;
|
||||||
{
|
|
||||||
move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;
|
if ( is_file( $sFilePath ) )
|
||||||
|
{
|
||||||
if ( is_file( $sFilePath ) )
|
$iCounter++ ;
|
||||||
{
|
$sFileName = RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ;
|
||||||
$oldumask = umask(0) ;
|
$sErrorNumber = '201' ;
|
||||||
chmod( $sFilePath, 0777 ) ;
|
}
|
||||||
umask( $oldumask ) ;
|
else
|
||||||
}
|
{
|
||||||
|
move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;
|
||||||
break ;
|
|
||||||
}
|
if ( is_file( $sFilePath ) )
|
||||||
}
|
{
|
||||||
}
|
$oldumask = umask(0) ;
|
||||||
else
|
chmod( $sFilePath, 0777 ) ;
|
||||||
$sErrorNumber = '202' ;
|
umask( $oldumask ) ;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
$sErrorNumber = '202' ;
|
break ;
|
||||||
|
}
|
||||||
echo '<script type="text/javascript">' ;
|
}
|
||||||
echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ;
|
}
|
||||||
echo '</script>' ;
|
else
|
||||||
|
$sErrorNumber = '202' ;
|
||||||
exit ;
|
}
|
||||||
}
|
else
|
||||||
|
$sErrorNumber = '202' ;
|
||||||
|
|
||||||
|
echo '<script type="text/javascript">' ;
|
||||||
|
echo 'window.parent.frames["frmUpload"].OnUploadCompleted(' . $sErrorNumber . ',"' . str_replace( '"', '\\"', $sFileName ) . '") ;' ;
|
||||||
|
echo '</script>' ;
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,21 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
|
||||||
*
|
*
|
||||||
* For further information visit:
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* http://www.fckeditor.net/
|
* choice:
|
||||||
*
|
*
|
||||||
* "Support Open Source software. What about a donation today?"
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
|
*
|
||||||
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
|
*
|
||||||
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
*
|
*
|
||||||
* File Name: config.php
|
* File Name: config.php
|
||||||
* Configuration file for the File Manager Connector for PHP.
|
* Configuration file for the File Manager Connector for PHP.
|
||||||
*
|
*
|
||||||
* File Authors:
|
* File Authors:
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
global $Config ;
|
global $Config ;
|
||||||
@@ -53,7 +61,7 @@ $Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
|
|||||||
$Config['ForceSingleExtension'] = true ;
|
$Config['ForceSingleExtension'] = true ;
|
||||||
|
|
||||||
$Config['AllowedExtensions']['File'] = array() ;
|
$Config['AllowedExtensions']['File'] = array() ;
|
||||||
$Config['DeniedExtensions']['File'] = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi') ;
|
$Config['DeniedExtensions']['File'] = array('html','htm','php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','htaccess','asis') ;
|
||||||
|
|
||||||
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
|
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
|
||||||
$Config['DeniedExtensions']['Image'] = array() ;
|
$Config['DeniedExtensions']['Image'] = array() ;
|
||||||
|
|||||||
@@ -1,109 +1,117 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: connector.php
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for PHP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
ob_start() ;
|
*
|
||||||
|
* File Name: connector.php
|
||||||
include('config.php') ;
|
* This is the File Manager Connector for PHP.
|
||||||
include('util.php') ;
|
*
|
||||||
include('io.php') ;
|
* File Authors:
|
||||||
include('basexml.php') ;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
include('commands.php') ;
|
*/
|
||||||
|
|
||||||
if ( !$Config['Enabled'] )
|
ob_start() ;
|
||||||
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/php/config.php" file' ) ;
|
|
||||||
|
include('config.php') ;
|
||||||
// Get the "UserFiles" path.
|
include('util.php') ;
|
||||||
$GLOBALS["UserFilesPath"] = '' ;
|
include('io.php') ;
|
||||||
|
include('basexml.php') ;
|
||||||
if ( isset( $Config['UserFilesPath'] ) )
|
include('commands.php') ;
|
||||||
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
|
|
||||||
else if ( isset( $_GET['ServerPath'] ) )
|
if ( !$Config['Enabled'] )
|
||||||
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
|
SendError( 1, 'This connector is disabled. Please check the "editor/filemanager/browser/default/connectors/php/config.php" file' ) ;
|
||||||
else
|
|
||||||
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
|
// Get the "UserFiles" path.
|
||||||
|
$GLOBALS["UserFilesPath"] = '' ;
|
||||||
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
|
|
||||||
$GLOBALS["UserFilesPath"] .= '/' ;
|
if ( isset( $Config['UserFilesPath'] ) )
|
||||||
|
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
|
||||||
if ( strlen( $Config['UserFilesAbsolutePath'] ) > 0 )
|
else if ( isset( $_GET['ServerPath'] ) )
|
||||||
{
|
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
|
||||||
$GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'] ;
|
else
|
||||||
|
$GLOBALS["UserFilesPath"] = '/userfiles/' ;
|
||||||
if ( ! ereg( '/$', $GLOBALS["UserFilesDirectory"] ) )
|
|
||||||
$GLOBALS["UserFilesDirectory"] .= '/' ;
|
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
|
||||||
}
|
$GLOBALS["UserFilesPath"] .= '/' ;
|
||||||
else
|
|
||||||
{
|
if ( strlen( $Config['UserFilesAbsolutePath'] ) > 0 )
|
||||||
// Map the "UserFiles" path to a local directory.
|
{
|
||||||
$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
|
$GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'] ;
|
||||||
}
|
|
||||||
|
if ( ! ereg( '/$', $GLOBALS["UserFilesDirectory"] ) )
|
||||||
DoResponse() ;
|
$GLOBALS["UserFilesDirectory"] .= '/' ;
|
||||||
|
}
|
||||||
function DoResponse()
|
else
|
||||||
{
|
{
|
||||||
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
|
// Map the "UserFiles" path to a local directory.
|
||||||
return ;
|
$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
|
||||||
|
}
|
||||||
// Get the main request informaiton.
|
|
||||||
$sCommand = $_GET['Command'] ;
|
DoResponse() ;
|
||||||
$sResourceType = $_GET['Type'] ;
|
|
||||||
$sCurrentFolder = $_GET['CurrentFolder'] ;
|
function DoResponse()
|
||||||
|
{
|
||||||
// Check if it is an allowed type.
|
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
|
||||||
if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
|
return ;
|
||||||
return ;
|
|
||||||
|
// Get the main request informaiton.
|
||||||
// Check the current folder syntax (must begin and start with a slash).
|
$sCommand = $_GET['Command'] ;
|
||||||
if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
|
$sResourceType = $_GET['Type'] ;
|
||||||
if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;
|
$sCurrentFolder = $_GET['CurrentFolder'] ;
|
||||||
|
|
||||||
// Check for invalid folder paths (..)
|
// Check if it is an allowed type.
|
||||||
if ( strpos( $sCurrentFolder, '..' ) )
|
if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
|
||||||
SendError( 102, "" ) ;
|
return ;
|
||||||
|
|
||||||
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
// Check the current folder syntax (must begin and start with a slash).
|
||||||
if ( $sCommand == 'FileUpload' )
|
if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
|
||||||
{
|
if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;
|
||||||
FileUpload( $sResourceType, $sCurrentFolder ) ;
|
|
||||||
return ;
|
// Check for invalid folder paths (..)
|
||||||
}
|
if ( strpos( $sCurrentFolder, '..' ) )
|
||||||
|
SendError( 102, "" ) ;
|
||||||
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
|
|
||||||
|
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
|
||||||
// Execute the required command.
|
if ( $sCommand == 'FileUpload' )
|
||||||
switch ( $sCommand )
|
{
|
||||||
{
|
FileUpload( $sResourceType, $sCurrentFolder ) ;
|
||||||
case 'GetFolders' :
|
return ;
|
||||||
GetFolders( $sResourceType, $sCurrentFolder ) ;
|
}
|
||||||
break ;
|
|
||||||
case 'GetFoldersAndFiles' :
|
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
|
||||||
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
|
|
||||||
break ;
|
// Execute the required command.
|
||||||
case 'CreateFolder' :
|
switch ( $sCommand )
|
||||||
CreateFolder( $sResourceType, $sCurrentFolder ) ;
|
{
|
||||||
break ;
|
case 'GetFolders' :
|
||||||
}
|
GetFolders( $sResourceType, $sCurrentFolder ) ;
|
||||||
|
break ;
|
||||||
CreateXmlFooter() ;
|
case 'GetFoldersAndFiles' :
|
||||||
|
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
|
||||||
exit ;
|
break ;
|
||||||
}
|
case 'CreateFolder' :
|
||||||
|
CreateFolder( $sResourceType, $sCurrentFolder ) ;
|
||||||
|
break ;
|
||||||
|
}
|
||||||
|
|
||||||
|
CreateXmlFooter() ;
|
||||||
|
|
||||||
|
exit ;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,97 +1,105 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: io.php
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for ASP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
function GetUrlFromPath( $resourceType, $folderPath )
|
*
|
||||||
{
|
* File Name: io.php
|
||||||
if ( $resourceType == '' )
|
* This is the File Manager Connector for ASP.
|
||||||
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
|
*
|
||||||
else
|
* File Authors:
|
||||||
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
}
|
*/
|
||||||
|
|
||||||
function RemoveExtension( $fileName )
|
function GetUrlFromPath( $resourceType, $folderPath )
|
||||||
{
|
{
|
||||||
return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ;
|
if ( $resourceType == '' )
|
||||||
}
|
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
|
||||||
|
else
|
||||||
function ServerMapFolder( $resourceType, $folderPath )
|
return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ;
|
||||||
{
|
}
|
||||||
// Get the resource type directory.
|
|
||||||
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/' ;
|
function RemoveExtension( $fileName )
|
||||||
|
{
|
||||||
// Ensure that the directory exists.
|
return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ;
|
||||||
CreateServerFolder( $sResourceTypePath ) ;
|
}
|
||||||
|
|
||||||
// Return the resource type directory combined with the required path.
|
function ServerMapFolder( $resourceType, $folderPath )
|
||||||
return $sResourceTypePath . RemoveFromStart( $folderPath, '/' ) ;
|
{
|
||||||
}
|
// Get the resource type directory.
|
||||||
|
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . strtolower( $resourceType ) . '/' ;
|
||||||
function GetParentFolder( $folderPath )
|
|
||||||
{
|
// Ensure that the directory exists.
|
||||||
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
|
CreateServerFolder( $sResourceTypePath ) ;
|
||||||
return preg_replace( $sPattern, '', $folderPath ) ;
|
|
||||||
}
|
// Return the resource type directory combined with the required path.
|
||||||
|
return $sResourceTypePath . RemoveFromStart( $folderPath, '/' ) ;
|
||||||
function CreateServerFolder( $folderPath )
|
}
|
||||||
{
|
|
||||||
$sParent = GetParentFolder( $folderPath ) ;
|
function GetParentFolder( $folderPath )
|
||||||
|
{
|
||||||
// Check if the parent exists, or create it.
|
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
|
||||||
if ( !file_exists( $sParent ) )
|
return preg_replace( $sPattern, '', $folderPath ) ;
|
||||||
{
|
}
|
||||||
$sErrorMsg = CreateServerFolder( $sParent ) ;
|
|
||||||
if ( $sErrorMsg != '' )
|
function CreateServerFolder( $folderPath )
|
||||||
return $sErrorMsg ;
|
{
|
||||||
}
|
$sParent = GetParentFolder( $folderPath ) ;
|
||||||
|
|
||||||
if ( !file_exists( $folderPath ) )
|
// Check if the parent exists, or create it.
|
||||||
{
|
if ( !file_exists( $sParent ) )
|
||||||
// Turn off all error reporting.
|
{
|
||||||
error_reporting( 0 ) ;
|
$sErrorMsg = CreateServerFolder( $sParent ) ;
|
||||||
// Enable error tracking to catch the error.
|
if ( $sErrorMsg != '' )
|
||||||
ini_set( 'track_errors', '1' ) ;
|
return $sErrorMsg ;
|
||||||
|
}
|
||||||
// To create the folder with 0777 permissions, we need to set umask to zero.
|
|
||||||
$oldumask = umask(0) ;
|
if ( !file_exists( $folderPath ) )
|
||||||
mkdir( $folderPath, 0777 ) ;
|
{
|
||||||
umask( $oldumask ) ;
|
// Turn off all error reporting.
|
||||||
|
error_reporting( 0 ) ;
|
||||||
$sErrorMsg = $php_errormsg ;
|
// Enable error tracking to catch the error.
|
||||||
|
ini_set( 'track_errors', '1' ) ;
|
||||||
// Restore the configurations.
|
|
||||||
ini_restore( 'track_errors' ) ;
|
// To create the folder with 0777 permissions, we need to set umask to zero.
|
||||||
ini_restore( 'error_reporting' ) ;
|
$oldumask = umask(0) ;
|
||||||
|
mkdir( $folderPath, 0777 ) ;
|
||||||
return $sErrorMsg ;
|
umask( $oldumask ) ;
|
||||||
}
|
|
||||||
else
|
$sErrorMsg = $php_errormsg ;
|
||||||
return '' ;
|
|
||||||
}
|
// Restore the configurations.
|
||||||
|
ini_restore( 'track_errors' ) ;
|
||||||
function GetRootPath()
|
ini_restore( 'error_reporting' ) ;
|
||||||
{
|
|
||||||
$sRealPath = realpath( './' ) ;
|
return $sErrorMsg ;
|
||||||
|
}
|
||||||
$sSelfPath = $_SERVER['PHP_SELF'] ;
|
else
|
||||||
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
|
return '' ;
|
||||||
|
}
|
||||||
return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ;
|
|
||||||
}
|
function GetRootPath()
|
||||||
|
{
|
||||||
|
$sRealPath = realpath( './' ) ;
|
||||||
|
|
||||||
|
$sSelfPath = $_SERVER['PHP_SELF'] ;
|
||||||
|
$sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ;
|
||||||
|
|
||||||
|
return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1,37 +1,45 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: util.php
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This is the File Manager Connector for ASP.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
*/
|
*
|
||||||
|
* == END LICENSE ==
|
||||||
function RemoveFromStart( $sourceString, $charToRemove )
|
*
|
||||||
{
|
* File Name: util.php
|
||||||
$sPattern = '|^' . $charToRemove . '+|' ;
|
* Utility functions for the File Manager Connector for PHP.
|
||||||
return preg_replace( $sPattern, '', $sourceString ) ;
|
*
|
||||||
}
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
function RemoveFromEnd( $sourceString, $charToRemove )
|
*/
|
||||||
{
|
|
||||||
$sPattern = '|' . $charToRemove . '+$|' ;
|
function RemoveFromStart( $sourceString, $charToRemove )
|
||||||
return preg_replace( $sPattern, '', $sourceString ) ;
|
{
|
||||||
}
|
$sPattern = '|^' . $charToRemove . '+|' ;
|
||||||
|
return preg_replace( $sPattern, '', $sourceString ) ;
|
||||||
function ConvertToXmlAttribute( $value )
|
}
|
||||||
{
|
|
||||||
return utf8_encode( htmlspecialchars( $value ) ) ;
|
function RemoveFromEnd( $sourceString, $charToRemove )
|
||||||
}
|
{
|
||||||
|
$sPattern = '|' . $charToRemove . '+$|' ;
|
||||||
|
return preg_replace( $sPattern, '', $sourceString ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ConvertToXmlAttribute( $value )
|
||||||
|
{
|
||||||
|
return utf8_encode( htmlspecialchars( $value ) ) ;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,63 +1,71 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: frmactualfolder.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This page shows the actual folder path.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: frmactualfolder.html
|
||||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
* This page shows the actual folder path.
|
||||||
<script type="text/javascript">
|
*
|
||||||
|
* File Authors:
|
||||||
function OnResize()
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
{
|
-->
|
||||||
divName.style.width = "1px" ;
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
divName.style.width = tdName.offsetWidth + "px" ;
|
<html>
|
||||||
}
|
<head>
|
||||||
|
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||||
function SetCurrentFolder( resourceType, folderPath )
|
<script type="text/javascript">
|
||||||
{
|
|
||||||
document.getElementById('tdName').innerHTML = folderPath ;
|
function OnResize()
|
||||||
}
|
{
|
||||||
|
divName.style.width = "1px" ;
|
||||||
window.onload = function()
|
divName.style.width = tdName.offsetWidth + "px" ;
|
||||||
{
|
}
|
||||||
window.top.IsLoadedActualFolder = true ;
|
|
||||||
}
|
function SetCurrentFolder( resourceType, folderPath )
|
||||||
|
{
|
||||||
</script>
|
document.getElementById('tdName').innerHTML = folderPath ;
|
||||||
</head>
|
}
|
||||||
<body bottomMargin="0" topMargin="0">
|
|
||||||
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
window.onload = function()
|
||||||
<tr>
|
{
|
||||||
<td>
|
window.top.IsLoadedActualFolder = true ;
|
||||||
<button style="WIDTH: 100%" type="button">
|
}
|
||||||
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
|
||||||
<tr>
|
</script>
|
||||||
<td><img height="32" alt="" src="images/FolderOpened32.gif" width="32"></td>
|
</head>
|
||||||
<td> </td>
|
<body bottomMargin="0" topMargin="0">
|
||||||
<td id="tdName" width="100%" nowrap class="ActualFolder">/</td>
|
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||||
<td> </td>
|
<tr>
|
||||||
<td><img height="8" src="images/ButtonArrow.gif" width="12"></td>
|
<td>
|
||||||
<td> </td>
|
<button style="WIDTH: 100%" type="button">
|
||||||
</tr>
|
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||||
</table>
|
<tr>
|
||||||
</button>
|
<td><img height="32" alt="" src="images/FolderOpened32.gif" width="32"></td>
|
||||||
</td>
|
<td> </td>
|
||||||
</tr>
|
<td id="tdName" width="100%" nowrap class="ActualFolder">/</td>
|
||||||
</table>
|
<td> </td>
|
||||||
</body>
|
<td><img height="8" src="images/ButtonArrow.gif" width="12"></td>
|
||||||
</html>
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,109 +1,117 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: frmcreatefolder.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* Page used to create new folders in the current folder.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
* == END LICENSE ==
|
||||||
<html>
|
*
|
||||||
<head>
|
* File Name: frmcreatefolder.html
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
* Page used to create new folders in the current folder.
|
||||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
*
|
||||||
<script type="text/javascript" src="js/common.js"></script>
|
* File Authors:
|
||||||
<script language="javascript">
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
function SetCurrentFolder( resourceType, folderPath )
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
{
|
<html>
|
||||||
oConnector.ResourceType = resourceType ;
|
<head>
|
||||||
oConnector.CurrentFolder = folderPath
|
<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>
|
||||||
function CreateFolder()
|
<script language="javascript">
|
||||||
{
|
|
||||||
var sFolderName ;
|
function SetCurrentFolder( resourceType, folderPath )
|
||||||
|
{
|
||||||
while ( true )
|
oConnector.ResourceType = resourceType ;
|
||||||
{
|
oConnector.CurrentFolder = folderPath ;
|
||||||
sFolderName = prompt( 'Type the name of the new folder:', '' ) ;
|
}
|
||||||
|
|
||||||
if ( sFolderName == null )
|
function CreateFolder()
|
||||||
return ;
|
{
|
||||||
else if ( sFolderName.length == 0 )
|
var sFolderName ;
|
||||||
alert( 'Please type the folder name' ) ;
|
|
||||||
else
|
while ( true )
|
||||||
break ;
|
{
|
||||||
}
|
sFolderName = prompt( 'Type the name of the new folder:', '' ) ;
|
||||||
|
|
||||||
oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + escape( sFolderName) , CreateFolderCallBack ) ;
|
if ( sFolderName == null )
|
||||||
}
|
return ;
|
||||||
|
else if ( sFolderName.length == 0 )
|
||||||
function CreateFolderCallBack( fckXml )
|
alert( 'Please type the folder name' ) ;
|
||||||
{
|
else
|
||||||
if ( oConnector.CheckError( fckXml ) == 0 )
|
break ;
|
||||||
window.parent.frames['frmResourcesList'].Refresh() ;
|
}
|
||||||
|
|
||||||
/*
|
oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ;
|
||||||
// Get the current folder path.
|
}
|
||||||
var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ;
|
|
||||||
var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ;
|
function CreateFolderCallBack( fckXml )
|
||||||
|
{
|
||||||
switch ( iErrorNumber )
|
if ( oConnector.CheckError( fckXml ) == 0 )
|
||||||
{
|
window.parent.frames['frmResourcesList'].Refresh() ;
|
||||||
case 0 :
|
|
||||||
window.parent.frames['frmResourcesList'].Refresh() ;
|
/*
|
||||||
break ;
|
// Get the current folder path.
|
||||||
case 101 :
|
var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ;
|
||||||
alert( 'Folder already exists' ) ;
|
var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ;
|
||||||
break ;
|
|
||||||
case 102 :
|
switch ( iErrorNumber )
|
||||||
alert( 'Invalid folder name' ) ;
|
{
|
||||||
break ;
|
case 0 :
|
||||||
case 103 :
|
window.parent.frames['frmResourcesList'].Refresh() ;
|
||||||
alert( 'You have no permissions to create the folder' ) ;
|
break ;
|
||||||
break ;
|
case 101 :
|
||||||
case 110 :
|
alert( 'Folder already exists' ) ;
|
||||||
alert( 'Unknown error creating folder' ) ;
|
break ;
|
||||||
break ;
|
case 102 :
|
||||||
default :
|
alert( 'Invalid folder name' ) ;
|
||||||
alert( 'Error creating folder. Error number: ' + iErrorNumber ) ;
|
break ;
|
||||||
break ;
|
case 103 :
|
||||||
}
|
alert( 'You have no permissions to create the folder' ) ;
|
||||||
*/
|
break ;
|
||||||
}
|
case 110 :
|
||||||
|
alert( 'Unknown error creating folder' ) ;
|
||||||
window.onload = function()
|
break ;
|
||||||
{
|
default :
|
||||||
window.top.IsLoadedCreateFolder = true ;
|
alert( 'Error creating folder. Error number: ' + iErrorNumber ) ;
|
||||||
}
|
break ;
|
||||||
</script>
|
}
|
||||||
</head>
|
*/
|
||||||
<body bottomMargin="0" topMargin="0">
|
}
|
||||||
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
|
||||||
<tr>
|
window.onload = function()
|
||||||
<td>
|
{
|
||||||
<button type="button" style="WIDTH: 100%" onclick="CreateFolder();">
|
window.top.IsLoadedCreateFolder = true ;
|
||||||
<table cellSpacing="0" cellPadding="0" border="0">
|
}
|
||||||
<tr>
|
</script>
|
||||||
<td><img height="16" alt="" src="images/Folder.gif" width="16"></td>
|
</head>
|
||||||
<td> </td>
|
<body bottomMargin="0" topMargin="0">
|
||||||
<td nowrap>Create New Folder</td>
|
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td>
|
||||||
</button>
|
<button type="button" style="WIDTH: 100%" onclick="CreateFolder();">
|
||||||
</td>
|
<table cellSpacing="0" cellPadding="0" border="0">
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td><img height="16" alt="" src="images/Folder.gif" width="16"></td>
|
||||||
</body>
|
<td> </td>
|
||||||
</html>
|
<td nowrap>Create New Folder</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,192 +1,200 @@
|
|||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: frmfolders.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This page shows the list of folders available in the parent folder
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
* of the current folder.
|
*
|
||||||
*
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* File Authors:
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
*
|
||||||
-->
|
* == END LICENSE ==
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
*
|
||||||
<html>
|
* File Name: frmfolders.html
|
||||||
<head>
|
* This page shows the list of folders available in the parent folder
|
||||||
<link href="browser.css" type="text/css" rel="stylesheet">
|
* of the current folder.
|
||||||
<script type="text/javascript" src="js/common.js"></script>
|
*
|
||||||
<script language="javascript">
|
* File Authors:
|
||||||
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
var sActiveFolder ;
|
-->
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
var bIsLoaded = false ;
|
<html>
|
||||||
var iIntervalId ;
|
<head>
|
||||||
|
<link href="browser.css" type="text/css" rel="stylesheet">
|
||||||
var oListManager = new Object() ;
|
<script type="text/javascript" src="js/common.js"></script>
|
||||||
|
<script language="javascript">
|
||||||
oListManager.Init = function()
|
|
||||||
{
|
var sActiveFolder ;
|
||||||
this.Table = document.getElementById('tableFiles') ;
|
|
||||||
this.UpRow = document.getElementById('trUp') ;
|
var bIsLoaded = false ;
|
||||||
|
var iIntervalId ;
|
||||||
this.TableRows = new Object() ;
|
|
||||||
}
|
var oListManager = new Object() ;
|
||||||
|
|
||||||
oListManager.Clear = function()
|
oListManager.Init = function()
|
||||||
{
|
{
|
||||||
// Remove all other rows available.
|
this.Table = document.getElementById('tableFiles') ;
|
||||||
while ( this.Table.rows.length > 1 )
|
this.UpRow = document.getElementById('trUp') ;
|
||||||
this.Table.deleteRow(1) ;
|
|
||||||
|
this.TableRows = new Object() ;
|
||||||
// Reset the TableRows collection.
|
}
|
||||||
this.TableRows = new Object() ;
|
|
||||||
}
|
oListManager.Clear = function()
|
||||||
|
{
|
||||||
oListManager.AddItem = function( folderName, folderPath )
|
// Remove all other rows available.
|
||||||
{
|
while ( this.Table.rows.length > 1 )
|
||||||
// Create the new row.
|
this.Table.deleteRow(1) ;
|
||||||
var oRow = this.Table.insertRow(-1) ;
|
|
||||||
oRow.className = 'FolderListFolder' ;
|
// Reset the TableRows collection.
|
||||||
|
this.TableRows = new Object() ;
|
||||||
// Build the link to view the folder.
|
}
|
||||||
var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ;
|
|
||||||
|
oListManager.AddItem = function( folderName, folderPath )
|
||||||
// Add the folder icon cell.
|
{
|
||||||
var oCell = oRow.insertCell(-1) ;
|
// Create the new row.
|
||||||
oCell.width = 16 ;
|
var oRow = this.Table.insertRow(-1) ;
|
||||||
oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"></a>' ;
|
oRow.className = 'FolderListFolder' ;
|
||||||
|
|
||||||
// Add the folder name cell.
|
// Build the link to view the folder.
|
||||||
oCell = oRow.insertCell(-1) ;
|
var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath + '\');return false;">' ;
|
||||||
oCell.noWrap = true ;
|
|
||||||
oCell.innerHTML = ' ' + sLink + folderName + '</a>' ;
|
// Add the folder icon cell.
|
||||||
|
var oCell = oRow.insertCell(-1) ;
|
||||||
this.TableRows[ folderPath ] = oRow ;
|
oCell.width = 16 ;
|
||||||
}
|
oCell.innerHTML = sLink + '<img alt="" src="images/spacer.gif" width="16" height="16" border="0"></a>' ;
|
||||||
|
|
||||||
oListManager.ShowUpFolder = function( upFolderPath )
|
// Add the folder name cell.
|
||||||
{
|
oCell = oRow.insertCell(-1) ;
|
||||||
this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ;
|
oCell.noWrap = true ;
|
||||||
|
oCell.innerHTML = ' ' + sLink + folderName + '</a>' ;
|
||||||
if ( upFolderPath != null )
|
|
||||||
{
|
this.TableRows[ folderPath ] = oRow ;
|
||||||
document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function()
|
}
|
||||||
{
|
|
||||||
LoadFolders( upFolderPath ) ;
|
oListManager.ShowUpFolder = function( upFolderPath )
|
||||||
return false ;
|
{
|
||||||
}
|
this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ;
|
||||||
}
|
|
||||||
}
|
if ( upFolderPath != null )
|
||||||
|
{
|
||||||
function CheckLoaded()
|
document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function()
|
||||||
{
|
{
|
||||||
if ( window.top.IsLoadedActualFolder
|
LoadFolders( upFolderPath ) ;
|
||||||
&& window.top.IsLoadedCreateFolder
|
return false ;
|
||||||
&& window.top.IsLoadedUpload
|
}
|
||||||
&& window.top.IsLoadedResourcesList )
|
}
|
||||||
{
|
}
|
||||||
window.clearInterval( iIntervalId ) ;
|
|
||||||
bIsLoaded = true ;
|
function CheckLoaded()
|
||||||
OpenFolder( sActiveFolder ) ;
|
{
|
||||||
}
|
if ( window.top.IsLoadedActualFolder
|
||||||
}
|
&& window.top.IsLoadedCreateFolder
|
||||||
|
&& window.top.IsLoadedUpload
|
||||||
function OpenFolder( folderPath )
|
&& window.top.IsLoadedResourcesList )
|
||||||
{
|
{
|
||||||
sActiveFolder = folderPath ;
|
window.clearInterval( iIntervalId ) ;
|
||||||
|
bIsLoaded = true ;
|
||||||
if ( ! bIsLoaded )
|
OpenFolder( sActiveFolder ) ;
|
||||||
{
|
}
|
||||||
if ( ! iIntervalId )
|
}
|
||||||
iIntervalId = window.setInterval( CheckLoaded, 100 ) ;
|
|
||||||
return ;
|
function OpenFolder( folderPath )
|
||||||
}
|
{
|
||||||
|
sActiveFolder = folderPath ;
|
||||||
// Change the style for the select row (to show the opened folder).
|
|
||||||
for ( var sFolderPath in oListManager.TableRows )
|
if ( ! bIsLoaded )
|
||||||
{
|
{
|
||||||
oListManager.TableRows[ sFolderPath ].className =
|
if ( ! iIntervalId )
|
||||||
( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ;
|
iIntervalId = window.setInterval( CheckLoaded, 100 ) ;
|
||||||
}
|
return ;
|
||||||
|
}
|
||||||
// Set the current folder in all frames.
|
|
||||||
window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
// Change the style for the select row (to show the opened folder).
|
||||||
window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
for ( var sFolderPath in oListManager.TableRows )
|
||||||
window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
{
|
||||||
|
oListManager.TableRows[ sFolderPath ].className =
|
||||||
// Load the resources list for this folder.
|
( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ;
|
||||||
window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ;
|
}
|
||||||
}
|
|
||||||
|
// Set the current folder in all frames.
|
||||||
function LoadFolders( folderPath )
|
window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
||||||
{
|
window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
||||||
// Clear the folders list.
|
window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ;
|
||||||
oListManager.Clear() ;
|
|
||||||
|
// Load the resources list for this folder.
|
||||||
// Get the parent folder path.
|
window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ;
|
||||||
var sParentFolderPath ;
|
}
|
||||||
if ( folderPath != '/' )
|
|
||||||
sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ;
|
function LoadFolders( folderPath )
|
||||||
|
{
|
||||||
// Show/Hide the Up Folder.
|
// Clear the folders list.
|
||||||
oListManager.ShowUpFolder( sParentFolderPath ) ;
|
oListManager.Clear() ;
|
||||||
|
|
||||||
if ( folderPath != '/' )
|
// Get the parent folder path.
|
||||||
{
|
var sParentFolderPath ;
|
||||||
sActiveFolder = folderPath ;
|
if ( folderPath != '/' )
|
||||||
oConnector.CurrentFolder = sParentFolderPath
|
sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ;
|
||||||
oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ;
|
|
||||||
}
|
// Show/Hide the Up Folder.
|
||||||
else
|
oListManager.ShowUpFolder( sParentFolderPath ) ;
|
||||||
OpenFolder( '/' ) ;
|
|
||||||
}
|
if ( folderPath != '/' )
|
||||||
|
{
|
||||||
function GetFoldersCallBack( fckXml )
|
sActiveFolder = folderPath ;
|
||||||
{
|
oConnector.CurrentFolder = sParentFolderPath ;
|
||||||
if ( oConnector.CheckError( fckXml ) != 0 )
|
oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ;
|
||||||
return ;
|
}
|
||||||
|
else
|
||||||
// Get the current folder path.
|
OpenFolder( '/' ) ;
|
||||||
var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
|
}
|
||||||
var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
|
|
||||||
|
function GetFoldersCallBack( fckXml )
|
||||||
var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
|
{
|
||||||
|
if ( oConnector.CheckError( fckXml ) != 0 )
|
||||||
for ( var i = 0 ; i < oNodes.length ; i++ )
|
return ;
|
||||||
{
|
|
||||||
var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
|
// Get the current folder path.
|
||||||
oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ;
|
var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
|
||||||
}
|
var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
|
||||||
|
|
||||||
OpenFolder( sActiveFolder ) ;
|
var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
|
||||||
}
|
|
||||||
|
for ( var i = 0 ; i < oNodes.length ; i++ )
|
||||||
function SetResourceType( type )
|
{
|
||||||
{
|
var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
|
||||||
oConnector.ResourceType = type ;
|
oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ;
|
||||||
LoadFolders( '/' ) ;
|
}
|
||||||
}
|
|
||||||
|
OpenFolder( sActiveFolder ) ;
|
||||||
window.onload = function()
|
}
|
||||||
{
|
|
||||||
oListManager.Init() ;
|
function SetResourceType( type )
|
||||||
LoadFolders( '/' ) ;
|
{
|
||||||
}
|
oConnector.ResourceType = type ;
|
||||||
</script>
|
LoadFolders( '/' ) ;
|
||||||
</head>
|
}
|
||||||
<body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
|
|
||||||
<table id="tableFiles" cellSpacing="0" cellPadding="0" width="100%" border="0">
|
window.onload = function()
|
||||||
<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>
|
oListManager.Init() ;
|
||||||
<td nowrap width="100%"> <a id="linkUp" href="#">..</a></td>
|
LoadFolders( '/' ) ;
|
||||||
</tr>
|
}
|
||||||
</table>
|
</script>
|
||||||
</body>
|
</head>
|
||||||
</html>
|
<body class="FileArea" bottomMargin="10" leftMargin="10" topMargin="10" rightMargin="10">
|
||||||
|
<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>
|
||||||
|
<td nowrap width="100%"> <a id="linkUp" href="#">..</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -1,145 +1,164 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<!--
|
<!--
|
||||||
* FCKeditor - The text editor for internet
|
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
|
||||||
*
|
*
|
||||||
* Licensed under the terms of the GNU Lesser General Public License:
|
* == BEGIN LICENSE ==
|
||||||
* http://www.opensource.org/licenses/lgpl-license.php
|
*
|
||||||
*
|
* Licensed under the terms of any of the following licenses at your
|
||||||
* For further information visit:
|
* choice:
|
||||||
* http://www.fckeditor.net/
|
*
|
||||||
*
|
* - GNU General Public License Version 2 or later (the "GPL")
|
||||||
* "Support Open Source software. What about a donation today?"
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* File Name: frmresourceslist.html
|
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
||||||
* This page shows all resources available in a folder in the File Browser.
|
* http://www.gnu.org/licenses/lgpl.html
|
||||||
*
|
*
|
||||||
* File Authors:
|
* - Mozilla Public License Version 1.1 or later (the "MPL")
|
||||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
* http://www.mozilla.org/MPL/MPL-1.1.html
|
||||||
-->
|
*
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
* == END LICENSE ==
|
||||||
<head>
|
*
|
||||||
<link href="browser.css" type="text/css" rel="stylesheet" />
|
* File Name: frmresourceslist.html
|
||||||
<script type="text/javascript" src="js/common.js"></script>
|
* This page shows all resources available in a folder in the File Browser.
|
||||||
<script type="text/javascript">
|
*
|
||||||
|
* File Authors:
|
||||||
var oListManager = new Object() ;
|
* Frederico Caldeira Knabben (www.fckeditor.net)
|
||||||
|
-->
|
||||||
oListManager.Clear = function()
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
{
|
<head>
|
||||||
document.body.innerHTML = '' ;
|
<link href="browser.css" type="text/css" rel="stylesheet" />
|
||||||
}
|
<script type="text/javascript" src="js/common.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
oListManager.GetFolderRowHtml = function( folderName, folderPath )
|
|
||||||
{
|
var oListManager = new Object() ;
|
||||||
// Build the link to view the folder.
|
|
||||||
var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath.replace( /'/g, '\\\'') + '\');return false;">' ;
|
oListManager.Clear = function()
|
||||||
|
{
|
||||||
return '<tr>' +
|
document.body.innerHTML = '' ;
|
||||||
'<td width="16">' +
|
}
|
||||||
sLink +
|
|
||||||
'<img alt="" src="images/Folder.gif" width="16" height="16" border="0"></a>' +
|
oListManager.GetFolderRowHtml = function( folderName, folderPath )
|
||||||
'</td><td nowrap colspan="2"> ' +
|
{
|
||||||
sLink +
|
// Build the link to view the folder.
|
||||||
folderName +
|
var sLink = '<a href="#" onclick="OpenFolder(\'' + folderPath.replace( /'/g, '\\\'') + '\');return false;">' ;
|
||||||
'</a>' +
|
|
||||||
'</td></tr>' ;
|
return '<tr>' +
|
||||||
}
|
'<td width="16">' +
|
||||||
|
sLink +
|
||||||
oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )
|
'<img alt="" src="images/Folder.gif" width="16" height="16" border="0"></a>' +
|
||||||
{
|
'</td><td nowrap colspan="2"> ' +
|
||||||
// Build the link to view the folder.
|
sLink +
|
||||||
var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">' ;
|
folderName +
|
||||||
|
'</a>' +
|
||||||
// Get the file icon.
|
'</td></tr>' ;
|
||||||
var sIcon = oIcons.GetIcon( fileName ) ;
|
}
|
||||||
|
|
||||||
return '<tr>' +
|
oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )
|
||||||
'<td width="16">' +
|
{
|
||||||
sLink +
|
// Build the link to view the folder.
|
||||||
'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
|
var sLink = '<a href="#" onclick="OpenFile(\'' + fileUrl.replace( /'/g, '\\\'') + '\');return false;">' ;
|
||||||
'</td><td> ' +
|
|
||||||
sLink +
|
// Get the file icon.
|
||||||
fileName +
|
var sIcon = oIcons.GetIcon( fileName ) ;
|
||||||
'</a>' +
|
|
||||||
'</td><td align="right" nowrap> ' +
|
return '<tr>' +
|
||||||
fileSize +
|
'<td width="16">' +
|
||||||
' KB' +
|
sLink +
|
||||||
'</td></tr>' ;
|
'<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' +
|
||||||
}
|
'</td><td> ' +
|
||||||
|
sLink +
|
||||||
function OpenFolder( folderPath )
|
fileName +
|
||||||
{
|
'</a>' +
|
||||||
// Load the resources list for this folder.
|
'</td><td align="right" nowrap> ' +
|
||||||
window.parent.frames['frmFolders'].LoadFolders( folderPath ) ;
|
fileSize +
|
||||||
}
|
' KB' +
|
||||||
|
'</td></tr>' ;
|
||||||
function OpenFile( fileUrl )
|
}
|
||||||
{
|
|
||||||
window.top.opener.SetUrl( fileUrl ) ;
|
function OpenFolder( folderPath )
|
||||||
window.top.close() ;
|
{
|
||||||
window.top.opener.focus() ;
|
// Load the resources list for this folder.
|
||||||
}
|
window.parent.frames['frmFolders'].LoadFolders( folderPath ) ;
|
||||||
|
}
|
||||||
function LoadResources( resourceType, folderPath )
|
|
||||||
{
|
function OpenFile( fileUrl )
|
||||||
oListManager.Clear() ;
|
{
|
||||||
oConnector.ResourceType = resourceType ;
|
window.top.opener.SetUrl( fileUrl ) ;
|
||||||
oConnector.CurrentFolder = folderPath
|
window.top.close() ;
|
||||||
oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ;
|
window.top.opener.focus() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Refresh()
|
function LoadResources( resourceType, folderPath )
|
||||||
{
|
{
|
||||||
LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ;
|
oListManager.Clear() ;
|
||||||
}
|
oConnector.ResourceType = resourceType ;
|
||||||
|
oConnector.CurrentFolder = folderPath ;
|
||||||
function GetFoldersAndFilesCallBack( fckXml )
|
oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ;
|
||||||
{
|
}
|
||||||
if ( oConnector.CheckError( fckXml ) != 0 )
|
|
||||||
return ;
|
function Refresh()
|
||||||
|
{
|
||||||
// Get the current folder path.
|
LoadResources( oConnector.ResourceType, oConnector.CurrentFolder ) ;
|
||||||
var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
|
}
|
||||||
var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
|
|
||||||
var sCurrentFolderUrl = oNode.attributes.getNamedItem('url').value ;
|
function GetFoldersAndFilesCallBack( fckXml )
|
||||||
|
{
|
||||||
// var dTimer = new Date() ;
|
if ( oConnector.CheckError( fckXml ) != 0 )
|
||||||
|
return ;
|
||||||
var oHtml = new StringBuilder( '<table id="tableFiles" cellspacing="1" cellpadding="0" width="100%" border="0">' ) ;
|
|
||||||
|
// Get the current folder path.
|
||||||
// Add the Folders.
|
var oFolderNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
|
||||||
var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
|
if ( oFolderNode == null )
|
||||||
for ( var i = 0 ; i < oNodes.length ; i++ )
|
{
|
||||||
{
|
alert( 'The server didn\'t reply with a proper XML file\r\nCheck your configuration.' ) ;
|
||||||
var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
|
return ;
|
||||||
oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ) ;
|
}
|
||||||
}
|
var sCurrentFolderPath = oFolderNode.attributes.getNamedItem('path').value ;
|
||||||
|
var sCurrentFolderUrl = oFolderNode.attributes.getNamedItem('url').value ;
|
||||||
// Add the Files.
|
|
||||||
var oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;
|
// var dTimer = new Date() ;
|
||||||
for ( var i = 0 ; i < oNodes.length ; i++ )
|
|
||||||
{
|
var oHtml = new StringBuilder( '<table id="tableFiles" cellspacing="1" cellpadding="0" width="100%" border="0">' ) ;
|
||||||
var oNode = oNodes[i] ;
|
|
||||||
var sFileName = oNode.attributes.getNamedItem('name').value ;
|
// Add the Folders.
|
||||||
var sFileSize = oNode.attributes.getNamedItem('size').value ;
|
var oNodes ;
|
||||||
oHtml.Append( oListManager.GetFileRowHtml( sFileName, sCurrentFolderUrl + sFileName, sFileSize ) ) ;
|
oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
|
||||||
}
|
for ( var i = 0 ; i < oNodes.length ; i++ )
|
||||||
|
{
|
||||||
oHtml.Append( '</table>' ) ;
|
var sFolderName = oNodes[i].attributes.getNamedItem('name').value ;
|
||||||
|
oHtml.Append( oListManager.GetFolderRowHtml( sFolderName, sCurrentFolderPath + sFolderName + "/" ) ) ;
|
||||||
document.body.innerHTML = oHtml.ToString() ;
|
}
|
||||||
|
|
||||||
// window.top.document.title = 'Finished processing in ' + ( ( ( new Date() ) - dTimer ) / 1000 ) + ' seconds' ;
|
// Add the Files.
|
||||||
|
oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;
|
||||||
}
|
for ( var j = 0 ; j < oNodes.length ; j++ )
|
||||||
|
{
|
||||||
window.onload = function()
|
var oNode = oNodes[j] ;
|
||||||
{
|
var sFileName = oNode.attributes.getNamedItem('name').value ;
|
||||||
window.top.IsLoadedResourcesList = true ;
|
var sFileSize = oNode.attributes.getNamedItem('size').value ;
|
||||||
}
|
|
||||||
</script>
|
// Get the optional "url" attribute. If not available, build the url.
|
||||||
</head>
|
var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ;
|
||||||
<body class="FileArea" bottommargin="10" leftmargin="10" topmargin="10" rightmargin="10">
|
var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : sCurrentFolderUrl + sFileName ;
|
||||||
</body>
|
|
||||||
</html>
|
oHtml.Append( oListManager.GetFileRowHtml( sFileName, sFileUrl, sFileSize ) ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
oHtml.Append( '<\/table>' ) ;
|
||||||
|
|
||||||
|
document.body.innerHTML = oHtml.ToString() ;
|
||||||
|
|
||||||
|
// window.top.document.title = 'Finished processing in ' + ( ( ( new Date() ) - dTimer ) / 1000 ) + ' seconds' ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function()
|
||||||
|
{
|
||||||
|
window.top.IsLoadedResourcesList = true ;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="FileArea" bottommargin="10" leftmargin="10" topmargin="10" rightmargin="10">
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user