From: moodler Date: Mon, 3 Nov 2003 15:17:21 +0000 (+0000) Subject: Goodbye Richtext editor! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=47037513fe321492f1412335f6499b39ff8455c1;p=moodle.git Goodbye Richtext editor! This does not affect any of the existing modules - I've kept some stub functions to retain backward compatibility. --- diff --git a/lib/javascript.php b/lib/javascript.php index 74a51cb7d0..07dfe26790 100644 --- a/lib/javascript.php +++ b/lib/javascript.php @@ -27,7 +27,7 @@ function openpopup(url,name,options,fullscreen) { } function copyrichtext(textname) { - textname.value = document.richedit.docHtml; +/// Legacy stub for old editor - to be removed soon return true; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 089587afce..24c7d5dfc3 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1574,21 +1574,29 @@ function ini_get_bool($ini_get_arg) { } function can_use_richtext_editor() { +/// Compatibility stub to provide backward compatibility + return can_use_html_editor(); +} + +function can_use_html_editor() { /// Is the HTML editor enabled? This depends on site and user /// settings, as well as the current browser being used. +/// Returns false is editor is not being used, otherwise +/// returns "MSIE" or "Gecko" global $USER, $CFG; if (!empty($USER->htmleditor) and !empty($CFG->htmleditor)) { if (check_browser_version("MSIE", 5.5)) { - return true; - } else if (check_browser_version("Gecko", 20030516) and !empty($CFG->useneweditor) ) { - return true; + return "MSIE"; + } else if (check_browser_version("Gecko", 20030516)) { + return "Gecko"; } } return false; } + function check_gd_version() { /// Hack to find out the GD version by parsing phpinfo output $gdversion = 0; diff --git a/lib/rte/README_MOODLE b/lib/rte/README_MOODLE deleted file mode 100644 index b8d4a9035b..0000000000 --- a/lib/rte/README_MOODLE +++ /dev/null @@ -1,26 +0,0 @@ -10/10/2002: - -This version of the Richtext editor started out as 0.3 beta 1, -and I've hacked richedit.html to make the toolbars more compact. - -I've also changed the smilies to refer to Moodle smilies, and -added/removed some. - - - -12/10/2003: - -I've just added and further hacked some changes from Janne -Mikkonen (http://moodle.org/mod/forum/discuss.php?d=2126) -to allow a popup so that images can be selected from the -course files area. - -This includes these PHP files in this folder: - - -- courseimages.php - -- dlg_ins_image.php - -- richedit.php - -- rte.php - - -Martin Dougiamas diff --git a/lib/rte/_header_css.txt b/lib/rte/_header_css.txt deleted file mode 100644 index 02e22639d8..0000000000 --- a/lib/rte/_header_css.txt +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* -** -** $Header$ -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ diff --git a/lib/rte/_header_html.txt b/lib/rte/_header_html.txt deleted file mode 100644 index 87dbcc2abf..0000000000 --- a/lib/rte/_header_html.txt +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/lib/rte/_header_js.txt b/lib/rte/_header_js.txt deleted file mode 100644 index ff94710e67..0000000000 --- a/lib/rte/_header_js.txt +++ /dev/null @@ -1,46 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// $Header$ -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// diff --git a/lib/rte/about_logo.swf b/lib/rte/about_logo.swf deleted file mode 100644 index d849cea8ae..0000000000 Binary files a/lib/rte/about_logo.swf and /dev/null differ diff --git a/lib/rte/about_logo.swi b/lib/rte/about_logo.swi deleted file mode 100644 index a741b7c65e..0000000000 Binary files a/lib/rte/about_logo.swi and /dev/null differ diff --git a/lib/rte/changelog b/lib/rte/changelog deleted file mode 100644 index 2fec2ef238..0000000000 --- a/lib/rte/changelog +++ /dev/null @@ -1,90 +0,0 @@ -Version DEV - -- Added multi-lingual support. The editor detects the userLanguage - of the browser and uses this select the relevent language from the - new rte_lang.js module which is then applied to the main editor - window. This is a work in progress, dialog need translation also. - -- Re-implemented Undo/Redo (history) option this time using the - document.execCommand('Undo'/'Redo') options which although - documented as not implemented do work in IE 6.0. - -Version 0.2.3 - -- Improved option handling to maintain an array of options that are - not "features" and added a getOption() private method to obtain - the current option value. - -- The saveHistory() function is now a no-op if the history option is - not enabled. Previously it was still doing all the buffer saving - behind the scenes. This should improve the performance of the - editor. - -- Corrected version and company information in the about dialog. - -- Remove showHistory() status (debug) messages - -- After set editor options, apply them. In most circumstances the - options property is set after the editor has initialised and so - the options need to be processed as the options are set not - when the editor is initialised. - -- Added numerous options: - styleBar=yes|no default yes - style=yes|no default yes - font=yes|no default yes - fontSize=yes|no default yes - colour=yes|no default yes - dragdrop=yes|no default no - -- Added code to disable drag and drop in the editor. Previously - it was possible to drag a toolbar button and drop a copy of it - into the editor window. Now, nothing can be dragged from the - toolbar and nothing can be dropped into the editor window. - This does not disable any functionality because the editor - window did not act as a drop target for objects from outside - of the IE control. It was however possible to drag elements - from one page and drop them into the editor, this is now not - possible unless dragdrop=yes is specified. However, the - dragdrop handling is weak (non-existent) and so is disabled - by default. - -- Some minor cosmetic changes to the toolbar. - -- Added debug window functionality to aid development and support - of the editor. Over time, diagnostic debugs will be added to - the editor code. - -- Default edit area to not editable (effectivly disabled) until - inisialisation of the editor is complete. - -- Added Full Justify Option - -- Re-worked font color/back color resetting (color none) so that - a) it worked and b) it only removes the fore/background color - and preserves the other formatting that bit of text may have. - -- Disable post button when in view source mode. The post button - is greyed out whilst disabled. - -Version 0.2.2 -============= -- Disabled buggy history and view source options by default in preparation - for official 0.2 release (to be officially released in a later release). - -- Added editor.options property to allow optional functionality to be - enabled/disabled. - -Version 0.2.1 -============= -- Corrected a bug in test_embedded.asp (JavaScript error). - -Version 0.2.0 -============= -- Added support for Custom Fields -- Beta versions of undo-history and view source options added - -Version 0.1 -=========== -- Original release of The Richtext Editor - diff --git a/lib/rte/colorchooser.html b/lib/rte/colorchooser.html deleted file mode 100644 index 670d878ea6..0000000000 --- a/lib/rte/colorchooser.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Standard Colors
Web Safe
None
- - diff --git a/lib/rte/courseimages.php b/lib/rte/courseimages.php deleted file mode 100644 index 67e55b96c0..0000000000 --- a/lib/rte/courseimages.php +++ /dev/null @@ -1,851 +0,0 @@ -id); - - if (! isteacher($course->id) ) { - error("Only teachers can edit files"); - } - - function html_footer() { - echo ""; - } - - function html_header($course, $wdir, $formfield=""){ - - global $CFG; - - if (! $site = get_site()) { - error("Invalid site!"); - } - - if ($course->id == $site->id) { - $strfiles = get_string("sitefiles"); - } else { - $strfiles = get_string("files"); - } - - if ($wdir == "/") { - $fullnav = "$strfiles"; - } else { - $dirs = explode("/", $wdir); - $numdirs = count($dirs); - $link = ""; - $navigation = ""; - for ($i=1; $i<$numdirs; $i++) { - $navigation .= " -> "; - $link .= "/".urlencode($dirs[$i]); - $navigation .= "id&wdir=$link\">".$dirs[$i].""; - } - $fullnav = "id&wdir=/\">$strfiles $navigation"; - } - - print_header(); - ?> - - '; - echo ''; - echo ''; - echo ''."$course->shortname -> $fullnav".''; - echo ''; - echo ''; - echo ''; - - if ($course->id == $site->id) { - print_heading(get_string("publicsitefileswarning"), "center", 2); - } - - echo ""; - echo ""; - echo "\n"; -} - -function displaydir ($wdir) { -// $wdir == / or /a or /a/b/c/d etc - - global $basedir; - global $id; - global $USER, $CFG; - - $fullpath = $basedir.$wdir; - - $directory = opendir($fullpath); // Find all files - while ($file = readdir($directory)) { - if ($file == "." || $file == "..") { - continue; - } - - if (is_dir($fullpath."/".$file)) { - $dirlist[] = $file; - } else { - $filelist[] = $file; - } - } - closedir($directory); - - $strname = get_string("name"); - $strsize = get_string("size"); - $strmodified = get_string("modified"); - $straction = get_string("action"); - $strmakeafolder = get_string("makeafolder"); - $struploadafile = get_string("uploadafile"); - $strwithchosenfiles = get_string("withchosenfiles"); - $strmovetoanotherfolder = get_string("movetoanotherfolder"); - $strmovefilestohere = get_string("movefilestohere"); - $strdeletecompletely = get_string("deletecompletely"); - $strcreateziparchive = get_string("createziparchive"); - $strrename = get_string("rename"); - $stredit = get_string("edit"); - $strunzip = get_string("unzip"); - $strlist = get_string("list"); - $strchoose = get_string("choose"); - - - echo ""; - echo "
"; - } - - if (! $basedir = make_upload_directory("$course->id")) { - error("The site administrator needs to fix the file permissions"); - } - - $baseweb = $CFG->wwwroot; - -// End of configuration and access control - - - $regexp="\\.\\."; - if (ereg( $regexp, $file, $regs )| ereg( $regexp, $wdir,$regs )) { - $message = "Error: Directories can not contain \"..\""; - $wdir = "/"; - $action = ""; - } - - if (!$wdir) { - $wdir="/"; - } - - - switch ($action) { - - case "upload": - html_header($course, $wdir); - - if (!empty($_FILES['userfile'])) { - $userfile = $_FILES['userfile']; - } else { - $save = false; - } - if (!empty($save)) { - if (!is_uploaded_file($userfile['tmp_name']) or $userfile['size'] == 0) { - notify(get_string("uploadnofilefound")); - } else { - $userfile_name = clean_filename($userfile['name']); - if ($userfile_name) { - $newfile = "$basedir$wdir/$userfile_name"; - if (move_uploaded_file($userfile['tmp_name'], $newfile)) { - chmod($newfile, 0666); - $a = NULL; - $a->file = "$userfile_name (".$userfile['type'].")"; - $a->directory = $wdir; - print_string("uploadedfileto", "", $a); - } else { - notify(get_string("uploadproblem", "", $userfile_name)); - } - } - } - displaydir($wdir); - - } else { - $upload_max_filesize = get_max_upload_file_size(); - $filesize = display_size($upload_max_filesize); - - $struploadafile = get_string("uploadafile"); - $struploadthisfile = get_string("uploadthisfile"); - $strmaxsize = get_string("maxsize", "", $filesize); - $strcancel = get_string("cancel"); - - echo "

$struploadafile ($strmaxsize) --> $wdir"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo " "; - echo ""; - echo ""; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } - html_footer(); - break; - - case "delete": - if (!empty($confirm)) { - html_header($course, $wdir); - foreach ($USER->filelist as $file) { - $fullfile = $basedir.$file; - if (! fulldelete($fullfile)) { - echo "
Error: Could not delete: $fullfile"; - } - } - clearfilelist(); - displaydir($wdir); - html_footer(); - - } else { - html_header($course, $wdir); - if (setfilelist($_POST)) { - echo "

".get_string("deletecheckwarning").":

"; - print_simple_box_start("center"); - printfilelist($USER->filelist); - print_simple_box_end(); - echo "
"; - notice_yesno (get_string("deletecheckfiles"), - "".basename($_SERVER['PHP_SELF'])."?id=$id&wdir=$wdir&action=delete&confirm=1", - "".basename($_SERVER['PHP_SELF'])."?id=$id&wdir=$wdir&action=cancel"); - } else { - displaydir($wdir); - } - html_footer(); - } - break; - - case "move": - html_header($course, $wdir); - if ($count = setfilelist($_POST)) { - $USER->fileop = $action; - $USER->filesource = $wdir; - echo "

"; - print_string("selectednowmove", "moodle", $count); - echo "

"; - } - displaydir($wdir); - html_footer(); - break; - - case "paste": - html_header($course, $wdir); - if (isset($USER->fileop) and $USER->fileop == "move") { - foreach ($USER->filelist as $file) { - $shortfile = basename($file); - $oldfile = $basedir.$file; - $newfile = $basedir.$wdir."/".$shortfile; - if (!rename($oldfile, $newfile)) { - echo "

Error: $shortfile not moved"; - } - } - } - clearfilelist(); - displaydir($wdir); - html_footer(); - break; - - case "rename": - if (!empty($name)) { - html_header($course, $wdir); - $name = clean_filename($name); - if (file_exists($basedir.$wdir."/".$name)) { - echo "Error: $name already exists!"; - } else if (!rename($basedir.$wdir."/".$oldname, $basedir.$wdir."/".$name)) { - echo "Error: could not rename $oldname to $name"; - } - displaydir($wdir); - - } else { - $strrename = get_string("rename"); - $strcancel = get_string("cancel"); - $strrenamefileto = get_string("renamefileto", "moodle", $file); - html_header($course, $wdir, "form.name"); - echo "

$strrenamefileto:"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } - html_footer(); - break; - - case "mkdir": - if (!empty($name)) { - html_header($course, $wdir); - $name = clean_filename($name); - if (file_exists("$basedir$wdir/$name")) { - echo "Error: $name already exists!"; - } else if (! make_upload_directory("$course->id/$wdir/$name")) { - echo "Error: could not create $name"; - } - displaydir($wdir); - - } else { - $strcreate = get_string("create"); - $strcancel = get_string("cancel"); - $strcreatefolder = get_string("createfolder", "moodle", $wdir); - html_header($course, $wdir, "form.name"); - echo "

$strcreatefolder:"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } - html_footer(); - break; - - case "edit": - html_header($course, $wdir); - if (isset($text)) { - $fileptr = fopen($basedir.$file,"w"); - fputs($fileptr, stripslashes($text)); - fclose($fileptr); - displaydir($wdir); - - } else { - $streditfile = get_string("edit", "", "$file"); - $fileptr = fopen($basedir.$file, "r"); - $contents = fread($fileptr, filesize($basedir.$file)); - fclose($fileptr); - - if (mimeinfo("type", $file) == "text/html") { - if ($usehtmleditor = can_use_richtext_editor()) { - $onsubmit = "onsubmit=\"copyrichtext(document.form.text);\""; - } else { - $onsubmit = ""; - } - } else { - $usehtmleditor = false; - $onsubmit = ""; - } - - print_heading("$streditfile"); - - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - print_textarea($usehtmleditor, 25, 80, 680, 400, "text", $contents); - echo "
"; - echo " "; - echo ""; - echo ""; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - - if ($usehtmleditor) { - print_richedit_javascript("form", "text", "yes"); - } - - - } - html_footer(); - break; - - case "zip": - if (!empty($name)) { - html_header($course, $wdir); - $name = clean_filename($name); - if (empty($CFG->zip)) { // Use built-in php-based zip function - $files = array(); - foreach ($USER->filelist as $file) { - $files[] = "$basedir/$file"; - } - include_once('../pclzip/pclzip.lib.php'); - $archive = new PclZip("$basedir/$wdir/$name"); - if (($list = $archive->create($files,'',"$basedir/$wdir/")) == 0) { - error($archive->errorInfo(true)); - } - } else { // Use external zip program - $files = ""; - foreach ($USER->filelist as $file) { - $files .= basename($file); - $files .= " "; - } - $command = "cd $basedir/$wdir ; $CFG->zip -r $name $files"; - Exec($command); - } - clearfilelist(); - displaydir($wdir); - - } else { - html_header($course, $wdir, "form.name"); - - if (setfilelist($_POST)) { - echo "

".get_string("youareabouttocreatezip").":

"; - print_simple_box_start("center"); - printfilelist($USER->filelist); - print_simple_box_end(); - echo "
"; - echo "

".get_string("whattocallzip"); - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } else { - displaydir($wdir); - clearfilelist(); - } - } - html_footer(); - break; - - case "unzip": - html_header($course, $wdir); - if (!empty($file)) { - $strname = get_string("name"); - $strsize = get_string("size"); - $strmodified = get_string("modified"); - $strstatus = get_string("status"); - $strok = get_string("ok"); - $strunpacking = get_string("unpacking", "", $file); - - echo "

$strunpacking:

"; - - $file = basename($file); - - if (empty($CFG->unzip)) { // Use built-in php-based unzip function - include_once('../pclzip/pclzip.lib.php'); - $archive = new PclZip("$basedir/$wdir/$file"); - if (!$list = $archive->extract("$basedir/$wdir")) { - error($archive->errorInfo(true)); - } else { // print some output - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - foreach ($list as $item) { - echo ""; - $item['filename'] = str_replace("$basedir/$wdir/", "", $item['filename']); - print_cell("left", $item['filename']); - if (! $item['folder']) { - print_cell("right", display_size($item['size'])); - } else { - echo ""; - } - $filedate = userdate($item['mtime'], get_string("strftimedatetime")); - print_cell("right", $filedate); - print_cell("right", $item['status']); - echo ""; - } - echo "
$strname$strsize$strmodified$strstatus
 
"; - } - - } else { // Use external unzip program - print_simple_box_start("center"); - echo "
";
-                    $command = "cd $basedir/$wdir ; $CFG->unzip -o $file 2>&1";
-                    passthru($command);
-                    echo "
"; - print_simple_box_end(); - } - - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } else { - displaydir($wdir); - } - html_footer(); - break; - - case "listzip": - html_header($course, $wdir); - if (!empty($file)) { - $strname = get_string("name"); - $strsize = get_string("size"); - $strmodified = get_string("modified"); - $strok = get_string("ok"); - $strlistfiles = get_string("listfiles", "", $file); - - echo "

$strlistfiles:

"; - $file = basename($file); - - include_once('../lib/pclzip/pclzip.lib.php'); - $archive = new PclZip("$basedir/$wdir/$file"); - if (!$list = $archive->listContent("$basedir/$wdir")) { - notify($archive->errorInfo(true)); - - } else { - echo ""; - echo ""; - foreach ($list as $item) { - echo ""; - print_cell("left", $item['filename']); - if (! $item['folder']) { - print_cell("right", display_size($item['size'])); - } else { - echo ""; - } - $filedate = userdate($item['mtime'], get_string("strftimedatetime")); - print_cell("right", $filedate); - echo ""; - } - echo "
$strname$strsize$strmodified
 
"; - } - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - } else { - displaydir($wdir); - } - html_footer(); - break; - - case "torte": - if($_POST) - { - while(list($key, $val) = each($_POST)) - { - if(ereg("file([0-9]+)", $key, $regs)) - { - $file = $val; - } - } - if(@filetype($CFG->dataroot ."/". $course->id . $file) == "file") - { - if(mimeinfo("icon", $file) == "image.gif") - { - $url = $CFG->wwwroot ."/file.php?file=/" .$course->id . $file; - runjavascript($url); - } - else - { - print "File is not a image!"; - } - } - else - { - print "You cannot insert FOLDER into richtext editor!!!"; - } - } - break; - case "cancel"; - clearfilelist(); - - default: - html_header($course, $wdir); - displaydir($wdir); - html_footer(); - break; -} - - -/// FILE FUNCTIONS /////////////////////////////////////////////////////////// - - -function fulldelete($location) { - if (is_dir($location)) { - $currdir = opendir($location); - while ($file = readdir($currdir)) { - if ($file <> ".." && $file <> ".") { - $fullfile = $location."/".$file; - if (is_dir($fullfile)) { - if (!fulldelete($fullfile)) { - return false; - } - } else { - if (!unlink($fullfile)) { - return false; - } - } - } - } - closedir($currdir); - if (! rmdir($location)) { - return false; - } - - } else { - if (!unlink($location)) { - return false; - } - } - return true; -} - - - -function setfilelist($VARS) { - global $USER; - - $USER->filelist = array (); - $USER->fileop = ""; - - $count = 0; - foreach ($VARS as $key => $val) { - if (substr($key,0,4) == "file") { - $count++; - $USER->filelist[] = rawurldecode($val); - } - } - return $count; -} - -function clearfilelist() { - global $USER; - - $USER->filelist = array (); - $USER->fileop = ""; -} - - -function printfilelist($filelist) { - global $basedir, $CFG; - - foreach ($filelist as $file) { - if (is_dir($basedir.$file)) { - echo "wwwroot/files/pix/folder.gif\" HEIGHT=16 WIDTH=16> $file
"; - $subfilelist = array(); - $currdir = opendir($basedir.$file); - while ($subfile = readdir($currdir)) { - if ($subfile <> ".." && $subfile <> ".") { - $subfilelist[] = $file."/".$subfile; - } - } - printfilelist($subfilelist); - - } else { - $icon = mimeinfo("icon", $file); - echo "wwwroot/files/pix/$icon\" HEIGHT=16 WIDTH=16> $file
"; - } - } -} - - -function print_cell($alignment="center", $text=" ") { - echo "
"; - echo ""; - echo "$text"; - echo ""; - echo "
"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - - if ($wdir == "/") { - $wdir = ""; - } - - $count = 0; - - if (!empty($dirlist)) { - asort($dirlist); - foreach ($dirlist as $dir) { - - $count++; - - $filename = $fullpath."/".$dir; - $fileurl = rawurlencode($wdir."/".$dir); - $filesafe = rawurlencode($dir); - $filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p"); - - echo ""; - - print_cell("center", ""); - print_cell("left", "wwwroot/files/pix/folder.gif\" HEIGHT=16 WIDTH=16 BORDER=0 ALT=\"Folder\">".htmlspecialchars($dir).""); - print_cell("right", "-"); - print_cell("right", $filedate); - print_cell("right", "$strrename"); - - echo ""; - } - } - - - if (!empty($filelist)) { - asort($filelist); - foreach ($filelist as $file) { - - $icon = mimeinfo("icon", $file); - - $count++; - $filename = $fullpath."/".$file; - $fileurl = "$wdir/$file"; - $filesafe = rawurlencode($file); - $fileurlsafe = rawurlencode($fileurl); - $filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p"); - - echo ""; - - print_cell("center", ""); - echo ""; - - $file_size = filesize($filename); - print_cell("right", display_size($file_size)); - print_cell("right", $filedate); - - if ($icon == "text.gif" || $icon == "html.gif") { - $edittext = "$stredit"; - } else if ($icon == "zip.gif") { - $edittext = "$strunzip "; - $edittext .= "$strlist "; - } else if ($icon == "image.gif") { - $edittext = "wwwroot/$ffurl')\" href=\"\">$strchoose"; - } else { - $edittext = ""; - } - print_cell("right", "$edittext $strrename"); - - echo ""; - } - } - echo "
$strname$strsize$strmodified$straction
"; - if ($CFG->slasharguments) { - $ffurl = "/file.php/$id$fileurl"; - } else { - $ffurl = "/file.php?file=/$id$fileurl"; - } - link_to_popup_window ($ffurl, "display", - "wwwroot/files/pix/$icon\" HEIGHT=16 WIDTH=16 BORDER=0 ALT=\"File\">", - 480, 640); - echo ""; - link_to_popup_window ($ffurl, "display", - htmlspecialchars($file), - 480, 640); - echo "
"; - echo "
"; - - if (empty($wdir)) { - $wdir = "/"; - } - - echo ""; - echo ""; - echo ""; - echo "
"; - echo ""; - echo " "; - $options = array ( - "move" => "$strmovetoanotherfolder", - "delete" => "$strdeletecompletely", - "zip" => "$strcreateziparchive" - ); - if (!empty($count)) { - choose_from_menu ($options, "action", "", "$strwithchosenfiles...", "javascript:document.dirform.submit()"); - } - - echo ""; - echo ""; - if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) { - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - } - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - echo " "; - echo " "; - echo " "; - echo " "; - echo "
"; - echo "
"; - echo "
"; - -} - -?> diff --git a/lib/rte/credits.html b/lib/rte/credits.html deleted file mode 100644 index 0ae4c696e6..0000000000 --- a/lib/rte/credits.html +++ /dev/null @@ -1,104 +0,0 @@ - - - -Acknowledgements - - - -
-PROJECT MANAGER
-
-AUSTIN DAVID FRANCE
-http://sourceforge.net/users/third_of_five/
-
-
-LEAD PROGRAMMER
-
-AUSTIN DAVID FRANCE
-http://sourceforge.net/users/third_of_five/
-
-
-DEVELOPERS
-
-William R. Cook
-http://sourceforge.net/users/wcook/
-
-Bill Chalmers
-http://sourceforge.net/users/bchalmers/
-
-Leon Reinders
-http://sourceforge.net/users/leonreinders/
-
-Torbjørn Engedal
-http://sourceforge.net/users/torbjoen/
-
-Jan Seda
-http://sourceforge.net/users/aramir/
-
-Dave Otto
-http://sourceforge.net/users/daveotto/
-
-
-RELEASE TECHNITIONS
-
-William R. Cook
-http://sourceforge.net/users/wcook/
-
-AUSTIN DAVID FRANCE
-http://sourceforge.net/users/third_of_five/
-
-
-DREAMWEAVER EXTENSION
-
-Bill Chalmers
-http://sourceforge.net/users/bchalmers/
-
diff --git a/lib/rte/custom.css b/lib/rte/custom.css deleted file mode 100644 index cdcb5d5f98..0000000000 --- a/lib/rte/custom.css +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ - -.rebar #featureHistory { display: ; } /* Change to display: none to disable history feature */ -.rebar #featureSource { display: ; } /* Change to display: none to disable source feature */ \ No newline at end of file diff --git a/lib/rte/debug_embedded.asp b/lib/rte/debug_embedded.asp deleted file mode 100644 index 01f7ba7d84..0000000000 --- a/lib/rte/debug_embedded.asp +++ /dev/null @@ -1,148 +0,0 @@ -<%@language="JavaScript"%> - -<% -var strHTML = Request.Form("text").Item(); -if (strHTML) -{ - // Update your database here - // ... - - // Confirmation - Response.Write("

Database Updated

"); - Response.Write("

HTML:-


" + Server.HTMLEncode(strHTML) + "

"); - Response.End(); -} - -// Get your HTML from the datbase here -strHTML = '

Heading 1

' - + '

Heading 2

' - + '

Heading 3

' - + '

Normal

' - + '

Welcome to the richtext text editor, the HTML text editor which works inside a web page.

' - + '

This is Link' - ; -%> - - -Edit Text - - - - - - - -

-
- -
- -
- - - - - - - diff --git a/lib/rte/dialog.css b/lib/rte/dialog.css deleted file mode 100644 index 3e90ef6db7..0000000000 --- a/lib/rte/dialog.css +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ - -BODY { background-color: buttonface; } -TD, INPUT, SELECT { font-family: "MS Sans Serif"; font-size: xx-small; vertical-align: middle; } -TABLE.dlg { border:0; } -.dlg TD { align: left; height: 20; } -.dlg INPUT { border-size: 2px; } -INPUT.button { border-top: 1px solid white; border-left: 1px solid white; -border-bottom: 1px solid black; border-right: 1px solid black; -font-size: x-small; width: 60; } -SELECT { height: 75%; } diff --git a/lib/rte/dlg_about.html b/lib/rte/dlg_about.html deleted file mode 100644 index ac068eb97a..0000000000 --- a/lib/rte/dlg_about.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - -About Richtext Editor - - - - - - - - - - - - - - - - - - -
 

 Richtext Editor 
 Version rt-0.3.0-beta-1 
Copyright © 2001-2002, Ramesys Construction Services
http://richtext.sourceforge.net/
Acknowledgments:
License Agreement:
-
- - diff --git a/lib/rte/dlg_ins_char.html b/lib/rte/dlg_ins_char.html deleted file mode 100644 index 1c324e2757..0000000000 --- a/lib/rte/dlg_ins_char.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - -Insert Character - - - - - - - - - - -
Choose Character
- - - - -
- - - -
- -

-
- - - - diff --git a/lib/rte/dlg_ins_image.html b/lib/rte/dlg_ins_image.html deleted file mode 100644 index 451decd2b8..0000000000 --- a/lib/rte/dlg_ins_image.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Picture Info 
 Url:
 Alt Text:Align: -
  - - - - - - -
Border: Width:Height:Vspace:Hspace:
-

  - -
- - diff --git a/lib/rte/dlg_ins_image.php b/lib/rte/dlg_ins_image.php deleted file mode 100644 index 240b9b29aa..0000000000 --- a/lib/rte/dlg_ins_image.php +++ /dev/null @@ -1,214 +0,0 @@ - -fullname = ""; // Just to keep display happy, though browsing may fail - } - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Picture Info 
 Url:
 Alt Text:Align: -
  - - - - - - -
Border: Width:Height:Vspace:Hspace:
-

  - -
- - diff --git a/lib/rte/dlg_ins_smile.html b/lib/rte/dlg_ins_smile.html deleted file mode 100644 index 4b31d50f1d..0000000000 --- a/lib/rte/dlg_ins_smile.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - -Insert Smiley Icon                  - - - - - - - - - - - -
Choose an icon to insert
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
smile:-)
big grin:-D
wink;-)
mixed:-/
thoughtfulV-.
tongue out:-P
coolB-)
approve^-)
wide eyes8-)
surprise8-o
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sad:-(
shy8-.
blush:-I
kisses:-X
clown:o)
black eyeP-|
angry8-[
deadxx-P
sleepy|-.
evil}-]
-
- -

-
- - diff --git a/lib/rte/dlg_ins_table.html b/lib/rte/dlg_ins_table.html deleted file mode 100644 index 3115100ca5..0000000000 --- a/lib/rte/dlg_ins_table.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - -Insert Table - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Layout
 Rows:Cell Padding:
 Cols:Cell Spacing:
 Rows Height:
 Column Width:
Borders
 Width:Color:
Background
 Color:

  -
- - diff --git a/lib/rte/example.html b/lib/rte/example.html deleted file mode 100644 index 3154aae5bc..0000000000 --- a/lib/rte/example.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - -
-
- -
-

- - - - - -
-header
td 1
- -

 

- - - - - - - - -
- - - - diff --git a/lib/rte/images/CloseWindow.gif b/lib/rte/images/CloseWindow.gif deleted file mode 100644 index 93ada9e5a2..0000000000 Binary files a/lib/rte/images/CloseWindow.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r11_c2.gif b/lib/rte/images/Editor_r11_c2.gif deleted file mode 100644 index e46ec615d9..0000000000 Binary files a/lib/rte/images/Editor_r11_c2.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r11_c5.gif b/lib/rte/images/Editor_r11_c5.gif deleted file mode 100644 index 66128f39d1..0000000000 Binary files a/lib/rte/images/Editor_r11_c5.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r4_c1.gif b/lib/rte/images/Editor_r4_c1.gif deleted file mode 100644 index 8a0906b06e..0000000000 Binary files a/lib/rte/images/Editor_r4_c1.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r4_c4.gif b/lib/rte/images/Editor_r4_c4.gif deleted file mode 100644 index 55dc540f27..0000000000 Binary files a/lib/rte/images/Editor_r4_c4.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r4_c7.gif b/lib/rte/images/Editor_r4_c7.gif deleted file mode 100644 index 55fff78d2b..0000000000 Binary files a/lib/rte/images/Editor_r4_c7.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r5_c2.gif b/lib/rte/images/Editor_r5_c2.gif deleted file mode 100644 index d062655e39..0000000000 Binary files a/lib/rte/images/Editor_r5_c2.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r5_c5.gif b/lib/rte/images/Editor_r5_c5.gif deleted file mode 100644 index f8dd6430a8..0000000000 Binary files a/lib/rte/images/Editor_r5_c5.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r7_c2.gif b/lib/rte/images/Editor_r7_c2.gif deleted file mode 100644 index d062655e39..0000000000 Binary files a/lib/rte/images/Editor_r7_c2.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r7_c5.gif b/lib/rte/images/Editor_r7_c5.gif deleted file mode 100644 index f8dd6430a8..0000000000 Binary files a/lib/rte/images/Editor_r7_c5.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r9_c2.gif b/lib/rte/images/Editor_r9_c2.gif deleted file mode 100644 index e46ec615d9..0000000000 Binary files a/lib/rte/images/Editor_r9_c2.gif and /dev/null differ diff --git a/lib/rte/images/Editor_r9_c5.gif b/lib/rte/images/Editor_r9_c5.gif deleted file mode 100644 index 66128f39d1..0000000000 Binary files a/lib/rte/images/Editor_r9_c5.gif and /dev/null differ diff --git a/lib/rte/images/add_col.gif b/lib/rte/images/add_col.gif deleted file mode 100644 index 942f10b0f1..0000000000 Binary files a/lib/rte/images/add_col.gif and /dev/null differ diff --git a/lib/rte/images/add_col_f2.gif b/lib/rte/images/add_col_f2.gif deleted file mode 100644 index aab24cd52d..0000000000 Binary files a/lib/rte/images/add_col_f2.gif and /dev/null differ diff --git a/lib/rte/images/add_row.gif b/lib/rte/images/add_row.gif deleted file mode 100644 index 72d22c1d26..0000000000 Binary files a/lib/rte/images/add_row.gif and /dev/null differ diff --git a/lib/rte/images/add_row_f2.gif b/lib/rte/images/add_row_f2.gif deleted file mode 100644 index dc9dbbf08a..0000000000 Binary files a/lib/rte/images/add_row_f2.gif and /dev/null differ diff --git a/lib/rte/images/bg.gif b/lib/rte/images/bg.gif deleted file mode 100644 index 843b088459..0000000000 Binary files a/lib/rte/images/bg.gif and /dev/null differ diff --git a/lib/rte/images/em.icon.smile.gif b/lib/rte/images/em.icon.smile.gif deleted file mode 100644 index 46bafcd945..0000000000 Binary files a/lib/rte/images/em.icon.smile.gif and /dev/null differ diff --git a/lib/rte/images/hdr_tables.gif b/lib/rte/images/hdr_tables.gif deleted file mode 100644 index 14d8daa76b..0000000000 Binary files a/lib/rte/images/hdr_tables.gif and /dev/null differ diff --git a/lib/rte/images/icon_about.gif b/lib/rte/images/icon_about.gif deleted file mode 100644 index 42f90ff9f8..0000000000 Binary files a/lib/rte/images/icon_about.gif and /dev/null differ diff --git a/lib/rte/images/icon_block.gif b/lib/rte/images/icon_block.gif deleted file mode 100644 index a9ce564d1c..0000000000 Binary files a/lib/rte/images/icon_block.gif and /dev/null differ diff --git a/lib/rte/images/icon_bold.gif b/lib/rte/images/icon_bold.gif deleted file mode 100644 index 925229af72..0000000000 Binary files a/lib/rte/images/icon_bold.gif and /dev/null differ diff --git a/lib/rte/images/icon_bullist.gif b/lib/rte/images/icon_bullist.gif deleted file mode 100644 index 55d86897ba..0000000000 Binary files a/lib/rte/images/icon_bullist.gif and /dev/null differ diff --git a/lib/rte/images/icon_center.gif b/lib/rte/images/icon_center.gif deleted file mode 100644 index d4ba94d6aa..0000000000 Binary files a/lib/rte/images/icon_center.gif and /dev/null differ diff --git a/lib/rte/images/icon_color_fill.gif b/lib/rte/images/icon_color_fill.gif deleted file mode 100644 index 85ba81db4f..0000000000 Binary files a/lib/rte/images/icon_color_fill.gif and /dev/null differ diff --git a/lib/rte/images/icon_color_text.gif b/lib/rte/images/icon_color_text.gif deleted file mode 100644 index 0b045090e2..0000000000 Binary files a/lib/rte/images/icon_color_text.gif and /dev/null differ diff --git a/lib/rte/images/icon_copy.gif b/lib/rte/images/icon_copy.gif deleted file mode 100644 index 5322f462e7..0000000000 Binary files a/lib/rte/images/icon_copy.gif and /dev/null differ diff --git a/lib/rte/images/icon_cut.gif b/lib/rte/images/icon_cut.gif deleted file mode 100644 index 1eec71f9b0..0000000000 Binary files a/lib/rte/images/icon_cut.gif and /dev/null differ diff --git a/lib/rte/images/icon_edt_table.gif b/lib/rte/images/icon_edt_table.gif deleted file mode 100644 index 1aa7af1c5c..0000000000 Binary files a/lib/rte/images/icon_edt_table.gif and /dev/null differ diff --git a/lib/rte/images/icon_indent.gif b/lib/rte/images/icon_indent.gif deleted file mode 100644 index 2289066c5e..0000000000 Binary files a/lib/rte/images/icon_indent.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_char.gif b/lib/rte/images/icon_ins_char.gif deleted file mode 100644 index b24452ae34..0000000000 Binary files a/lib/rte/images/icon_ins_char.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_image.gif b/lib/rte/images/icon_ins_image.gif deleted file mode 100644 index 1b9413e988..0000000000 Binary files a/lib/rte/images/icon_ins_image.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_link.gif b/lib/rte/images/icon_ins_link.gif deleted file mode 100644 index c1f2ca7e94..0000000000 Binary files a/lib/rte/images/icon_ins_link.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_sub.gif b/lib/rte/images/icon_ins_sub.gif deleted file mode 100644 index bc7763599b..0000000000 Binary files a/lib/rte/images/icon_ins_sub.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_sup.gif b/lib/rte/images/icon_ins_sup.gif deleted file mode 100644 index 8d64b22008..0000000000 Binary files a/lib/rte/images/icon_ins_sup.gif and /dev/null differ diff --git a/lib/rte/images/icon_ins_table.gif b/lib/rte/images/icon_ins_table.gif deleted file mode 100644 index b47fec9305..0000000000 Binary files a/lib/rte/images/icon_ins_table.gif and /dev/null differ diff --git a/lib/rte/images/icon_italic.gif b/lib/rte/images/icon_italic.gif deleted file mode 100644 index 0bea697348..0000000000 Binary files a/lib/rte/images/icon_italic.gif and /dev/null differ diff --git a/lib/rte/images/icon_left.gif b/lib/rte/images/icon_left.gif deleted file mode 100644 index d2d19c1f2b..0000000000 Binary files a/lib/rte/images/icon_left.gif and /dev/null differ diff --git a/lib/rte/images/icon_numlist.gif b/lib/rte/images/icon_numlist.gif deleted file mode 100644 index 0608c97f83..0000000000 Binary files a/lib/rte/images/icon_numlist.gif and /dev/null differ diff --git a/lib/rte/images/icon_outdent.gif b/lib/rte/images/icon_outdent.gif deleted file mode 100644 index 0eb1077ffb..0000000000 Binary files a/lib/rte/images/icon_outdent.gif and /dev/null differ diff --git a/lib/rte/images/icon_paste.gif b/lib/rte/images/icon_paste.gif deleted file mode 100644 index b09eaea1b8..0000000000 Binary files a/lib/rte/images/icon_paste.gif and /dev/null differ diff --git a/lib/rte/images/icon_post.gif b/lib/rte/images/icon_post.gif deleted file mode 100644 index 62d7f8cf69..0000000000 Binary files a/lib/rte/images/icon_post.gif and /dev/null differ diff --git a/lib/rte/images/icon_redo.gif b/lib/rte/images/icon_redo.gif deleted file mode 100644 index 75825568fa..0000000000 Binary files a/lib/rte/images/icon_redo.gif and /dev/null differ diff --git a/lib/rte/images/icon_rem_formatting.gif b/lib/rte/images/icon_rem_formatting.gif deleted file mode 100644 index ad8d0475e5..0000000000 Binary files a/lib/rte/images/icon_rem_formatting.gif and /dev/null differ diff --git a/lib/rte/images/icon_rem_link.gif b/lib/rte/images/icon_rem_link.gif deleted file mode 100644 index f653109b80..0000000000 Binary files a/lib/rte/images/icon_rem_link.gif and /dev/null differ diff --git a/lib/rte/images/icon_right.gif b/lib/rte/images/icon_right.gif deleted file mode 100644 index c7cf3f067c..0000000000 Binary files a/lib/rte/images/icon_right.gif and /dev/null differ diff --git a/lib/rte/images/icon_rule.gif b/lib/rte/images/icon_rule.gif deleted file mode 100644 index 648e7f078c..0000000000 Binary files a/lib/rte/images/icon_rule.gif and /dev/null differ diff --git a/lib/rte/images/icon_select_all.gif b/lib/rte/images/icon_select_all.gif deleted file mode 100644 index 430fdb288b..0000000000 Binary files a/lib/rte/images/icon_select_all.gif and /dev/null differ diff --git a/lib/rte/images/icon_spell.gif b/lib/rte/images/icon_spell.gif deleted file mode 100644 index 7849726f33..0000000000 Binary files a/lib/rte/images/icon_spell.gif and /dev/null differ diff --git a/lib/rte/images/icon_strikethrough.gif b/lib/rte/images/icon_strikethrough.gif deleted file mode 100644 index dae104d40d..0000000000 Binary files a/lib/rte/images/icon_strikethrough.gif and /dev/null differ diff --git a/lib/rte/images/icon_underline.gif b/lib/rte/images/icon_underline.gif deleted file mode 100644 index 0809c025e4..0000000000 Binary files a/lib/rte/images/icon_underline.gif and /dev/null differ diff --git a/lib/rte/images/icon_undo.gif b/lib/rte/images/icon_undo.gif deleted file mode 100644 index bb9e1dbdd8..0000000000 Binary files a/lib/rte/images/icon_undo.gif and /dev/null differ diff --git a/lib/rte/images/incr_colspan.gif b/lib/rte/images/incr_colspan.gif deleted file mode 100644 index 84b8fa13e8..0000000000 Binary files a/lib/rte/images/incr_colspan.gif and /dev/null differ diff --git a/lib/rte/images/incr_colspan_f2.gif b/lib/rte/images/incr_colspan_f2.gif deleted file mode 100644 index 65bf50e4e9..0000000000 Binary files a/lib/rte/images/incr_colspan_f2.gif and /dev/null differ diff --git a/lib/rte/images/incr_rowspan.gif b/lib/rte/images/incr_rowspan.gif deleted file mode 100644 index a27b719379..0000000000 Binary files a/lib/rte/images/incr_rowspan.gif and /dev/null differ diff --git a/lib/rte/images/incr_rowspan_f2.gif b/lib/rte/images/incr_rowspan_f2.gif deleted file mode 100644 index 997e42fefe..0000000000 Binary files a/lib/rte/images/incr_rowspan_f2.gif and /dev/null differ diff --git a/lib/rte/images/lang/de.icon_post.gif b/lib/rte/images/lang/de.icon_post.gif deleted file mode 100644 index af0ca6331a..0000000000 Binary files a/lib/rte/images/lang/de.icon_post.gif and /dev/null differ diff --git a/lib/rte/images/lang/no.icon_post.gif b/lib/rte/images/lang/no.icon_post.gif deleted file mode 100644 index 9891aa2930..0000000000 Binary files a/lib/rte/images/lang/no.icon_post.gif and /dev/null differ diff --git a/lib/rte/images/minimize.gif b/lib/rte/images/minimize.gif deleted file mode 100644 index 876965baa8..0000000000 Binary files a/lib/rte/images/minimize.gif and /dev/null differ diff --git a/lib/rte/images/plt_ftr.gif b/lib/rte/images/plt_ftr.gif deleted file mode 100644 index e2f086f92a..0000000000 Binary files a/lib/rte/images/plt_ftr.gif and /dev/null differ diff --git a/lib/rte/images/plt_hdr.gif b/lib/rte/images/plt_hdr.gif deleted file mode 100644 index 8a7c6091cc..0000000000 Binary files a/lib/rte/images/plt_hdr.gif and /dev/null differ diff --git a/lib/rte/images/rmv_col.gif b/lib/rte/images/rmv_col.gif deleted file mode 100644 index fce7c3f355..0000000000 Binary files a/lib/rte/images/rmv_col.gif and /dev/null differ diff --git a/lib/rte/images/rmv_col_f2.gif b/lib/rte/images/rmv_col_f2.gif deleted file mode 100644 index b9e92a1adf..0000000000 Binary files a/lib/rte/images/rmv_col_f2.gif and /dev/null differ diff --git a/lib/rte/images/rmv_colspan.gif b/lib/rte/images/rmv_colspan.gif deleted file mode 100644 index 43d33b1f02..0000000000 Binary files a/lib/rte/images/rmv_colspan.gif and /dev/null differ diff --git a/lib/rte/images/rmv_colspan_f2.gif b/lib/rte/images/rmv_colspan_f2.gif deleted file mode 100644 index 79b2c0e65b..0000000000 Binary files a/lib/rte/images/rmv_colspan_f2.gif and /dev/null differ diff --git a/lib/rte/images/rmv_row.gif b/lib/rte/images/rmv_row.gif deleted file mode 100644 index a1a4c3acae..0000000000 Binary files a/lib/rte/images/rmv_row.gif and /dev/null differ diff --git a/lib/rte/images/rmv_row_f2.gif b/lib/rte/images/rmv_row_f2.gif deleted file mode 100644 index 674d79667d..0000000000 Binary files a/lib/rte/images/rmv_row_f2.gif and /dev/null differ diff --git a/lib/rte/images/rmv_rowspan.gif b/lib/rte/images/rmv_rowspan.gif deleted file mode 100644 index e62f51ebd7..0000000000 Binary files a/lib/rte/images/rmv_rowspan.gif and /dev/null differ diff --git a/lib/rte/images/rmv_rowspan_f2.gif b/lib/rte/images/rmv_rowspan_f2.gif deleted file mode 100644 index 30150751a0..0000000000 Binary files a/lib/rte/images/rmv_rowspan_f2.gif and /dev/null differ diff --git a/lib/rte/images/spacer.gif b/lib/rte/images/spacer.gif deleted file mode 100644 index fc2560981e..0000000000 Binary files a/lib/rte/images/spacer.gif and /dev/null differ diff --git a/lib/rte/images/toolbar.gif b/lib/rte/images/toolbar.gif deleted file mode 100644 index 2de10434dc..0000000000 Binary files a/lib/rte/images/toolbar.gif and /dev/null differ diff --git a/lib/rte/index.php b/lib/rte/index.php deleted file mode 100644 index 8b13789179..0000000000 --- a/lib/rte/index.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/rte/license.html b/lib/rte/license.html deleted file mode 100644 index 4ee5829cfc..0000000000 --- a/lib/rte/license.html +++ /dev/null @@ -1,514 +0,0 @@ - - - -GNU LESSER GENERAL PUBLIC LICENSE - - -
-                   GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- 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.
-
-[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.]
-
-                            Preamble
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-  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.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. 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".
-
-  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.
-
-  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".)
-
-  "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.
-
-  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.
-
-  1. 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.
-
-  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.
-
-  2. 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:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    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.
-
-    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.
-
-    (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.)
-
-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.
-
-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.
-
-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.
-
-  3. 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.
-
-  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.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. 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.
-
-  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.
-
-  5. 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.
-
-  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.
-
-  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.
-
-  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.)
-
-  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.
-
-  6. 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.
-
-  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:
-
-    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.)
-
-    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.
-
-    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.
-
-    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.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  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.
-
-  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.
-
-  7. 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:
-
-    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.
-
-    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.
-
-  8. 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.
-
-  9. 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.
-
-  10. 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.
-
-  11. 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.
-
-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.
-
-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.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. 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.
-
-  13. 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.
-
-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.
-
-  14. 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.
-
-                            NO WARRANTY
-
-  15. 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.
-
-  16. 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.
-
-                     END OF TERMS AND CONDITIONS
-
-
\ No newline at end of file diff --git a/lib/rte/license.txt b/lib/rte/license.txt deleted file mode 100644 index 59c5f03e4f..0000000000 --- a/lib/rte/license.txt +++ /dev/null @@ -1,459 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - 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. - -[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.] - - Preamble - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. 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". - - 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. - - 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".) - - "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. - - 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. - - 1. 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. - - 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. - - 2. 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: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - 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. - - 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. - - (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.) - -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. - -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. - -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. - - 3. 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. - - 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. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. 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. - - 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. - - 5. 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. - - 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. - - 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. - - 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.) - - 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. - - 6. 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. - - 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: - - 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.) - - 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. - - 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. - - 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. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - 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. - - 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. - - 7. 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: - - 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. - - 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. - - 8. 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. - - 9. 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. - - 10. 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. - - 11. 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. - -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. - -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. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. 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. - - 13. 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. - -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. - - 14. 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. - - NO WARRANTY - - 15. 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. - - 16. 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. - - END OF TERMS AND CONDITIONS - diff --git a/lib/rte/popup_editor.html b/lib/rte/popup_editor.html deleted file mode 100644 index f41ac413d9..0000000000 --- a/lib/rte/popup_editor.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - -Edit Text - - - - - - - - - - - diff --git a/lib/rte/readme.txt b/lib/rte/readme.txt deleted file mode 100644 index ec7e25df6b..0000000000 --- a/lib/rte/readme.txt +++ /dev/null @@ -1,44 +0,0 @@ -RichText is an HTML Text Editor written using DHTML, JavaScript and -Scriptlet technologies allows WYSIWYG editing of HTML from -within a web page. Ideal for use as a forum message editor -or anywhere else description text is required. - - -## -## Home Page: http://richtext.sourceforge.net/ -## Support: http://richtext.sourceforge.net/ -## - -Author: - - Austin David France - Ramesys (Contracting Services) Limited - Mentor House - Ainsworth Street - Blackburn - Lancashire - BB1 6AY - United Kingdom - - email: Austin.France@Ramesys.com - - -HTML Text Editing Component for hosting in Web Pages -Copyright (C) 2001 Ramesys (Contracting Services) Limited - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU LesserGeneral Public License -along with this program; if not a copy can be obtained from - - http://www.gnu.org/copyleft/lesser.html - - diff --git a/lib/rte/richedit.css b/lib/rte/richedit.css deleted file mode 100644 index db6f267671..0000000000 --- a/lib/rte/richedit.css +++ /dev/null @@ -1,231 +0,0 @@ -/******************************************************************************* -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ - -body { width: 100%; border: 1px inset buttonface; border-left: 0px; background-color: buttonface } - -table#editor { width: 100%; height: 100%; border: 0px; visibility: hidden; } - -td.textedit { } - -.textedit div.document { - height: 150; - font-family: "Times New Roman"; - background-color: window; - border: 2px inset buttonface; padding:5; -} - -/* rebar styles ***************************************************************/ -td.rebar { padding:0; padding-bottom:2; padding-top:2; - font-family: "MS Sans Serif"; font-size: xx-small; vertical-align: middle; -} - -td.spacer { - border-top: 1px solid buttonhighlight; - padding: 0; margin: 0; height: 4; -} - -.rebar span.toolbar { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - padding: 0; margin: 0; padding-bottom:1; padding-top:1; -} - -.rebar span.spacer { width: 2px; } - -.rebar span.start { - margin:0; - background-color: buttonface; - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - width: 3px; - height: 18px; -} - -.rebar span.label { border:0; position:relative; top: -2; margin-left: 3; } - -.rebar span.sep { - margin:0; - background-color: buttonface; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - width: 2px; - height: 18px; -} - -.rebar select { - font-size: 11px; - margin-top: 1; margin-bottom: 1; - width : 100px; -} - -.rebar .fontselect { - font-size: 11px; - margin-top: 1; margin-bottom: 1; - width : 200px; -} - -.rebar .fontsize { - font-size: 11px; - margin-top: 1; margin-bottom: 1; - width : 60px; -} - -.rebar .fontstyle { - font-size: 11px; - margin-top: 1; margin-bottom: 1; - width : 80px; -} - -.rebar option { border: 5px solid red; } - -.rebar span.field { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - padding: 0; margin: 0; padding-bottom:1; padding-top:1; -} - -.rebar .field span.label { - margin-left: 0; - padding-left: 8; width: 60; -} - -.rebar .field span.start { - position: relative; top: 1; - -} - -.rebar .field input.field { - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - height: 20px; margin: 0px; - margin-bottom: -1px; -} - -.rebar img { - border: 1px solid buttonface; margin:0; padding:1; - cursor: hand; -} - -.rebar img.hover { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; -} - -.rebar img.down { - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; -} - -.rebar img.disabled { - border: 1px solid buttonface; margin:0; padding:0; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30); - cursor: normal; -} - -.rebar img.spacer { - cursor: normal; -} - -/* table control styles ***************************************************************/ -td.tbl { padding:0; padding-bottom:0; padding-top:0; - font-family: "MS Sans Serif"; font-size: xx-small; vertical-align: middle; -} - -td.spacer { - border-top: 1px solid buttonhighlight; - padding: 0; margin: 0; height: 4; -} - -.tbl img { - border: 1px solid buttonface; margin:0; padding:1; - cursor: hand; -} - -.tbl img.hover { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; -} - -.tbl img.down { - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; -} - -.tbl img.disabled { - border: 1px solid buttonface; margin:0; padding:0; - filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30); - cursor: normal; -} - -.tbl img.spacer { - cursor: normal; -} - - -/* control styles ***************************************************************/ -object#color { - position: absolute; - width:252; height: 225; - display: none; - background-color: white; border: 1px outset buttonface -} diff --git a/lib/rte/richedit.html b/lib/rte/richedit.html deleted file mode 100644 index c7a8cb4094..0000000000 --- a/lib/rte/richedit.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
-
- Loading ... -
-
- - - - - - - - - - - - - - - -
- - @{Bold} - @{Italic} - @{Underline} - @{Strikethrough} - - @{AlignLeft} - @{Center} - @{AlignRight} - @{AlignBlock} - - @{NumberedList} - @{BulettedList} - - @{DecreaseIndent} - @{IncreaseIndent} - @{SelectAll} - - - @{HistoryBack} - @{HistoryForward} - - - @{InsertLink} - @{RemoveLink} - - @{InsertImage} - @{InsertTable} - @{EditTable} - @{InsertLine} - @{InsertSmily} - @{InsertCharacter} - -   - - @{Source} - - -
-   - - @{Style} - - - - - @{Font} - - - - - @{Size} - - - - - @{TextColor} - @{BackgroundColor} - -
-
-
-
- - - - - - - - diff --git a/lib/rte/richedit.php b/lib/rte/richedit.php deleted file mode 100644 index a7adf3b560..0000000000 --- a/lib/rte/richedit.php +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
-
- Loading ... -
-
- - - - - - - - - - - - - - - -
- - @{Bold} - @{Italic} - @{Underline} - @{Strikethrough} - - @{AlignLeft} - @{Center} - @{AlignRight} - @{AlignBlock} - - @{NumberedList} - @{BulettedList} - - @{DecreaseIndent} - @{IncreaseIndent} - @{SelectAll} - - - @{HistoryBack} - @{HistoryForward} - - - @{InsertLink} - @{RemoveLink} - - @{InsertImage} - @{InsertTable} - @{EditTable} - @{InsertLine} - @{InsertSmily} - @{InsertCharacter} - -   - - @{Source} - - -
-   - - @{Style} - - - - - @{Font} - - - - - @{Size} - - - - - @{TextColor} - @{BackgroundColor} - -
-
-
-
- - - - - - - - diff --git a/lib/rte/rte.js b/lib/rte/rte.js deleted file mode 100644 index 01c0d0c301..0000000000 --- a/lib/rte/rte.js +++ /dev/null @@ -1,633 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Authors & Contributers: -// -// OZ Austin David France [austin.france@ramesys.com] -// Primary Developer -// -// LEON Leon Reinders [leonreinders@hetnet.nl] -// Author of View Source, History and Extended Style Functions -// -// DIRK Dirk Datzert [Dirk.Datzert@rasselstein-hoesch.de] -// Justify Full Option -// -// BC Bill Chalmers [bill_paula@btinternet.com] -// Font Selection -// -// History: -// -// OZ 21-01-2002 -// Fix a bug in applyOptions() that was not detecting a truth setting -// properly. Changed substr(eq) to substr(eq+1). Also, set the -// runtime style property, not the style property. -// -// OZ 22-01-2002 -// Moved initEditor() function into here from richedit.html -// -// OZ 22-01-2002 -// Added handleDrag() method to handle drag and drop events within the -// html of the editor. Drag and drop is currently disabled until we -// can find a practicle use for it. -// -// OZ 10-02-2002 -// Added code to handle the new Full Justify Option. Implementation of -// a mod to the editor made by Dirk Datzert who supplied the code and -// the Image. -// -// OZ 11-02-2002 -// Startup with text area set to contenteditable="false". The content -// is made editable when the editor has been initialised. -// -// OZ 12-02-2002 -// Fix handling of mouse hover when hover over a button that is in the -// down state. The down state of the button was being lost. This is -// a re-introduction of an earlier bug which I thought was fixed. -// The bug also occured when the button was pressed in some -// circumstances. The fix implemented is to have a button state -// property which is set when the state of a button is set in the -// setState() routine and this is used to restore the button state when -// the button is released or mouse moves out. -// -// OZ 12-06-2002 [richtext-Bugs-567960] Text area of editor window not get focus -// Ensure the doc element (the DIV) has focus once initialisation is -// complete. This ensures that when no HTML is supplied via the docHtml -// property, that focus is where the user expects. -// -// BC 10-07-2002 -// added getfontface() function to retrieve the new "web style" font selection -// this function is called from reset() in the same way as getStyle() -// -//////////////////////////////////////////////////////////////////////////////// - -// Internal (private) properties. -// RichEditor is the global RichEditor object (function) of which there is only -// 1 instance. -RichEditor.txtView = true; // WYSIWYG mode. false == View Source - -// initEditor(): Initialise the editor (called on window load, see below) -function initEditor() -{ - // Apply style data if supplied - if (!public_description.styleData) { - public_description.put_styleData(null); - } - - // Apply default editor options - var strDefaults = 'dragdrop=no;source=yes'; - strDefaults += ';history=' + (document.queryCommandSupported('Undo') ? 'yes' : 'no'); - applyOptions(strDefaults); - - // Prepare the editable region - loading.style.display = 'none'; - doc.contentEditable = "true"; - editor.style.visibility = 'visible'; - - // OZ - 12-06-2002 - // Put focus into the document (required when no HTML is supplied via docHtml property) - doc.focus(); -} - -// checkRange(): make sure our pretend document (the content editable -// DIV with id of "doc") has focus and that a text range exists (which -// is what execCommand() operates on). -function checkRange() -{ - RichEditor.selectedImage = null; - if (!RichEditor.txtView) return; // Disabled in View Source mode - doc.focus(); - if (document.selection.type == "None") { - document.selection.createRange(); - } -var r = document.selection.createRange(); - DBG(1, 'RANGE Bounding(' - + 'top='+r.boundingHeight - + ', left='+r.boundingHeight - + ', width='+r.boundingWidth - + ', height='+r.boundingHeight + ')' - + ', Offset(' - + 'top='+r.offsetTop - + ', left='+r.offsetLeft + ')' - + ', Text=(' + r.text + ')' - + ', HTML=(' + r.htmlText + ')' - ); -} - -// post(): Called in response to clicking the post button in the -// toolbar. It fires an event in the container named post, passing the -// HTML of our newly edited document as the data argument. -function post() -{ - DBG(1, 'Raise "post" event'); - window.external.raiseEvent("post", doc.innerHTML); -} - -// insert(): called in response to clicking the insert table, image, -// smily icons in the toolbar. Loads up an appropriate dialog to -// prompt for information, the dialog then returns the HTML code or -// NULL. We paste the HTML code into the document. -function insert(what) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - - DBG(1, 'insert(' + what + ')'); - - // Chose action based on what is being inserted. - switch(what) - { - case "table": - strPage = "dlg_ins_table.html"; - strAttr = "status:no;dialogWidth:340px;dialogHeight:360px;help:no"; - break; - case "smile": - strPage = "dlg_ins_smile.html"; - strAttr = "status:no;dialogWidth:300px;dialogHeight:350px;help:no"; - break; - case "char": - strPage = "dlg_ins_char.html"; - strAttr = "status:no;dialogWidth:450px;dialogHeight:290px;help:no"; - break; - case "image": - strPage = "dlg_ins_image.html"; - strAttr = "status:no;dialogWidth:400px;dialogHeight:200px;help:no";' ' - break; - case "about": - strPage = "dlg_about.html"; - strAttr = "status:no;dialogWidth:500px;dialogHeight:405px;help:no";' ' - break; - } - - // run the dialog that implements this type of element - html = showModalDialog(strPage, window, strAttr); - - // and insert any result into the document. - if (html) { - insertHtml(html); - } -} - -// insertHtml(): Insert the supplied HTML into the current position -// within the document. -function insertHtml(html) -{ - doc.focus(); - var sel = document.selection.createRange(); - // don't try to insert HTML into a control selection (ie. image or table) - if (document.selection.type == 'Control') { - return; - } - sel.pasteHTML(html); -} - -// doStyle(): called to handle the simple style commands such a bold, -// italic etc. These require no special handling, just a call to -// execCommand(). We also call reset so that the toolbar represents -// the state of the current text. -// -// 2002-07-30 Updated based on patch submitted by Michael Keck (mkkeck) -// -function doStyle(s){ - if(!RichEditor.txtView) return; - /* Disabled in View Source mode */ - DBG(1, 'doStyle(' + s + ')'); - checkRange(); - if(s!='InsertHorizontalRule'){ - /* what command string? */ - document.execCommand(s); - } else if( s=='InsertHorizontalRule') { - /* if s=='InsertHorizontalRule then use this command */ - document.execCommand(s,false, null); - - /* Note: - In your source view the
has an ID like this -
- */ - } - reset(); -} - - -// link(): called to insert a hyperlink. It will use the selected text -// if there is some, or the URL entered if not. If clicked when over a -// link, that link is allowed to be edited. -function link(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - - var strURL = "http://"; - var strText; - - // First, pick up the current selection. - doc.focus(); - var r = document.selection.createRange(); - var el = r.parentElement(); - - // Is this aready a link? - if (el && el.nodeName == "A") { - r.moveToElementText(el); - if (!on) { // If removing the link, then replace all with - r.pasteHTML(el.innerHTML); - return; - } - strURL = el.href; - } - - // Get the text associated with this link - strText = r.text; - - // Prompt for the URL - strURL = window.prompt("Enter URL", strURL); - if (strURL) { - // Default the TEXT to the url if non selected - if (!strText || !strText.length) { - strText = strURL; - } - - // Replace with new URL - r.pasteHTML('' + strText + ''); - } - - reset(); -} - -// sel(); similar to doStyle() but called from the dropdown list boxes -// for font and style commands. -function sel(el) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - checkRange(); - switch(el.id) - { - case "ctlFont": - document.execCommand('FontName', false, el[el.selectedIndex].value); - break; - case "ctlSize": - document.execCommand('FontSize', false, el[el.selectedIndex].value); - break; - case "ctlStyle": - document.execCommand('FormatBlock', false, el[el.selectedIndex].text); - break; - } - doc.focus(); - reset(); -} - -// pickColor(): called when the text or fill color icons are clicked. Displays -// the color chooser control. The color setting is completed by the event -// handler of this control (see richedit.html) -function pickColor(fg) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - checkRange(); - var el = window.event.srcElement; - if (el && el.nodeName == "IMG") { - setState(el, true); - } - color.style.top = window.event.clientY + 10; - color.style.left = window.event.clientX - 250; - color.style.display = 'block'; - color._fg = fg; -} - -// setColor(): called from the fore/back color selection dialog event handler -// to set/reset the fore/background color. -function setColor(name, data) -{ - color.style.display = 'none'; - checkRange(); - if (!data) { - removeFormat(document.selection.createRange(), color._fg); - } else { - document.execCommand(color._fg, false, data); - } - setState(btnText, false); - setState(btnFill, false); - doc.focus(); -} - -// removeFormat(): Called to remove specific formats from the selected text. -// The 'removeFormat' command removes all formatting. The principle behind -// this routine is to have a list of the possible formats the selection may -// have, check the selection for the current formats, ignoreing the one we -// want to use, then remove all formatting and then re-apply all but the -// one we wanted to remove. -function removeFormat(r, name) -{ - var cmd = [ "Bold", "Italic", "Underline", "Strikethrough", "FontName", "FontSize", "ForeColor", "BackColor" ]; - var on = new Array(cmd.length); - for (var i = 0; i < cmd.length; i++) { - on[i] = name == cmd[i] ? null : r.queryCommandValue(cmd[i]); - } - r.execCommand('RemoveFormat'); - for (var i = 0; i < cmd.length; i++) { - if (on[i]) r.execCommand(cmd[i], false, on[i]); - } -} - -// setValue(): called from reset() to make a select list show the current font -// or style attributes -function selValue(el, str) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - for (var i = 0; i < el.length; i++) { - if ((!el[i].value && el[i].text == str) || el[i].value == str) { - el.selectedIndex = i; - return; - } - } - el.selectedIndex = 0; -} - -// setState(): called from reset() to make a button represent the state -// of the current text. Pressed is on, unpressed is off. -function setState(el, on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - if (!el.disabled) { - if (on) { - el.defaultState = el.className = "down"; - } else { - el.defaultState = el.className = null; - } - } -} - -// getStyle(): called to obtain the class or type of formatting applied to an element, -// This is used by reset() to set the state of the toolbar to indicate the class of -// the current element. -function getStyle() { - var style = document.queryCommandValue('FormatBlock'); - if (style == "Normal") { - doc.focus(); - var rng = document.selection.createRange(); - if (typeof(rng.parentElement) != "undefined") { - var el = rng.parentElement(); - var tag = el.nodeName.toUpperCase(); - var str = el.className.toLowerCase(); - if (!(tag == "DIV" && el.id == "doc" && str == "textedit")) { - if (tag == "SPAN") { - style = "." + str; - } else if (str == "") { - style = tag; - } else { - style = tag + "." + str; - } - } - return style; - } - } - return style; -} - -// getfontface(): called to obtain the face attribute applied to a font tag, -// This is used by reset() to set the state of the toolbar to indicate the class of -// the current element. -function getfontface() -{ -var family = document.selection.createRange(); //create text range - -// don't get font face for image or table -if (document.selection.type == 'Control') { - return; -} - -var el = family.parentElement(); //get parent element -var tag = el.nodeName.toUpperCase(); //convert tag element to upper case - - if (typeof(el.parentElement) != "undefined" && tag == "FONT") { //only do function if tag is font - this is for greater execution speed - var elface = el.getAttribute('FACE'); //get the font tags FACE attribute - return elface; //return the value of the face attribute to the reset() function - } -} - -// markSelectedElement(): called by onClick and onKeyup events -// on the contectEditable area -function markSelectedElement() { - - RichEditor.selectedImage = null; - - var r = document.selection.createRange(); - - if (document.selection.type != 'Text') { - if (r.length == 1) { - if (r.item(0).tagName == "IMG") { - RichEditor.selectedImage = r.item(0); - } - } - } -} - -// reset(): called from all over the place to make the toolbar -// represent the current text. If el specified, it was called from -// hover(off) -function reset(el) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - if (!el) color.style.display = 'none'; - if (!el || el == ctlStyle) selValue(ctlStyle, getStyle()); - if (!el || el == ctlFont) selValue(ctlFont, getfontface()); - if (!el || el == ctlSize) selValue(ctlSize, document.queryCommandValue('FontSize')); - if (!el || el == btnBold) setState(btnBold, document.queryCommandValue('Bold')); - if (!el || el == btnItalic) setState(btnItalic, document.queryCommandValue('Italic')); - if (!el || el == btnUnderline) setState(btnUnderline, document.queryCommandValue('Underline')); - if (!el || el == btnStrikethrough) setState(btnStrikethrough, document.queryCommandValue('Strikethrough')); - if (!el || el == btnLeftJustify) setState(btnLeftJustify, document.queryCommandValue('JustifyLeft')); - if (!el || el == btnCenter) setState(btnCenter, document.queryCommandValue('JustifyCenter')); - if (!el || el == btnRightJustify) setState(btnRightJustify, document.queryCommandValue('JustifyRight')); - if (!el || el == btnFullJustify) setState(btnFullJustify, document.queryCommandValue('JustifyFull')); - if (!el || el == btnNumList) setState(btnNumList, document.queryCommandValue('InsertOrderedList')); - if (!el || el == btnBulList) setState(btnBulList, document.queryCommandValue('InsertUnorderedList')); -} - -// hover(): Handles mouse hovering over toolbar buttons -function hover(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - var el = window.event.srcElement; - if (el && !el.disabled && el.nodeName == "IMG" && el.className != "spacer") { - if (on) { - el.className = "hover"; - } else { - el.className = el.defaultState ? el.defaultState : null; - } - } -} -// hover(): Handles mouse clicks on toolbar buttons -function press(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - var el = window.event.srcElement; - if (el && !el.disabled && el.nodeName == "IMG" && el.className != "spacer") { - if (on) { - el.className = "down"; - } else { - el.className = el.className == "down" ? "hover" : el.defaultState ? el.defaultState : null; - } - } -} - -// addTag(): This is the handler for the style dropdown. This takes value -// selected and interprates it and makes the necessary changes to the HTML to -// apply this style. -function addTag(obj) { - - if (!RichEditor.txtView) return; // Disabled in View Source mode - - // Determine the type of element we are dealing with. - // TYPE 0 IS NORMAL-TAG, 1 IS CLASS, 2 IS SUBCLASS, 3 = Format Block command - var value = obj[obj.selectedIndex].value; - if (!value) { // Format Block - sel(obj); - return; - } - - var type = 0; // TAG - - if (value.indexOf(".") == 0) { // .className - type = 1; - } else if (value.indexOf(".") != -1) { // TAG.className - type = 2; - } - - doc.focus(); - - // Pick up the highlighted text - var r = document.selection.createRange(); - r.select(); - var s = r.htmlText; - - // If we have some selected text, then ignore silly selections - if (s == " " || s == " ") { - return; - } - - // How we apply formatting is based upon the type of formitting being - // done. - switch(type) - { - case 1: - // class: Wrap the selected text with a span of the specified - // class name - value = value.substring(1,value.length); - r.pasteHTML("" + r.htmlText + "") - break; - - case 2: - // subclass: split the value into tag + class - value = value.split("."); - r.pasteHTML('<' + value[0] + ' class="' + value[1] +'">' - + r.htmlText - + '' - ); - break; - - default: - // TAG: wrap up the highlighted text with the specified tag - r.pasteHTML("<"+value+">"+r.htmlText+"") - break; - } -} - -// initStyleDropdown(): This takes the passed styleList and generates the style -// dropdown list box from it. -function initStyleDropdown(styleList) { - - // Build the option list for the styles dropdown from the passed styles - for (var i = 0; i < styleList.length; i++) { - var oOption = document.createElement("OPTION"); - if (styleList[i][0]) oOption.value = styleList[i][0]; - oOption.text = styleList[i][1]; - oOption.style.backgroundColor = 'white'; - document.all.ctlStyle.add(oOption); - } -} - -// applyOptions(): This takes the passed options string and actions them. -// Called during the init process. -function applyOptions(str) -{ - var options = str.split(";"); - for (var i = 0; i < options.length; i++) { - var eq = options[i].indexOf('='); - var on = eq == -1 ? true : "yes;true;1".indexOf(options[i].substr(eq+1).toLowerCase()) != -1; - var name = eq == -1 ? options[i] : options[i].substr(0,eq); - var el = document.all("feature" + name); - if (el) { - el.runtimeStyle.display = (on ? 'inline' : 'none'); - } else { - if (!RichEditor.aOptions) RichEditor.aOptions = new Array; - RichEditor.aOptions[name] = on; - } - } -} - -// getOption(): Get the value for a previously set option or return undefined if -// the option is not set. -function getOption(name) -{ - if (RichEditor.aOptions) return RichEditor.aOptions[name]; - return; // Undefined -} - -// Handle drag and drop events into the editor window. Until we -// work out how to handle these better (which requires co-operation -// from the code being dragged from as far as I can tell) we simply -// disable the functionality. -function handleDrag(n) -{ - // if drag and drop is disabled, then cancel the dragdrop - // events - if (!getOption("dragdrop")) - { - switch(n) { - case 0: // ondragenter - window.event.dataTransfer.dropEffect = "none"; - break; - } - // Cancel the event - window.event.returnValue = false; - } -} - diff --git a/lib/rte/rte.php b/lib/rte/rte.php deleted file mode 100644 index 388401acb2..0000000000 --- a/lib/rte/rte.php +++ /dev/null @@ -1,640 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Authors & Contributers: -// -// OZ Austin David France [austin.france@ramesys.com] -// Primary Developer -// -// LEON Leon Reinders [leonreinders@hetnet.nl] -// Author of View Source, History and Extended Style Functions -// -// DIRK Dirk Datzert [Dirk.Datzert@rasselstein-hoesch.de] -// Justify Full Option -// -// BC Bill Chalmers [bill_paula@btinternet.com] -// Font Selection -// -// History: -// -// OZ 21-01-2002 -// Fix a bug in applyOptions() that was not detecting a truth setting -// properly. Changed substr(eq) to substr(eq+1). Also, set the -// runtime style property, not the style property. -// -// OZ 22-01-2002 -// Moved initEditor() function into here from richedit.html -// -// OZ 22-01-2002 -// Added handleDrag() method to handle drag and drop events within the -// html of the editor. Drag and drop is currently disabled until we -// can find a practicle use for it. -// -// OZ 10-02-2002 -// Added code to handle the new Full Justify Option. Implementation of -// a mod to the editor made by Dirk Datzert who supplied the code and -// the Image. -// -// OZ 11-02-2002 -// Startup with text area set to contenteditable="false". The content -// is made editable when the editor has been initialised. -// -// OZ 12-02-2002 -// Fix handling of mouse hover when hover over a button that is in the -// down state. The down state of the button was being lost. This is -// a re-introduction of an earlier bug which I thought was fixed. -// The bug also occured when the button was pressed in some -// circumstances. The fix implemented is to have a button state -// property which is set when the state of a button is set in the -// setState() routine and this is used to restore the button state when -// the button is released or mouse moves out. -// -// OZ 12-06-2002 [richtext-Bugs-567960] Text area of editor window not get focus -// Ensure the doc element (the DIV) has focus once initialisation is -// complete. This ensures that when no HTML is supplied via the docHtml -// property, that focus is where the user expects. -// -// BC 10-07-2002 -// added getfontface() function to retrieve the new "web style" font selection -// this function is called from reset() in the same way as getStyle() -// -//////////////////////////////////////////////////////////////////////////////// - - - -// Internal (private) properties. -// RichEditor is the global RichEditor object (function) of which there is only -// 1 instance. -RichEditor.txtView = true; // WYSIWYG mode. false == View Source - -// initEditor(): Initialise the editor (called on window load, see below) -function initEditor() -{ - // Apply style data if supplied - if (!public_description.styleData) { - public_description.put_styleData(null); - } - - // Apply default editor options - var strDefaults = 'dragdrop=no;source=yes'; - strDefaults += ';history=' + (document.queryCommandSupported('Undo') ? 'yes' : 'no'); - applyOptions(strDefaults); - - // Prepare the editable region - loading.style.display = 'none'; - doc.contentEditable = "true"; - editor.style.visibility = 'visible'; - - // OZ - 12-06-2002 - // Put focus into the document (required when no HTML is supplied via docHtml property) - doc.focus(); -} - -// checkRange(): make sure our pretend document (the content editable -// DIV with id of "doc") has focus and that a text range exists (which -// is what execCommand() operates on). -function checkRange() -{ - RichEditor.selectedImage = null; - if (!RichEditor.txtView) return; // Disabled in View Source mode - doc.focus(); - if (document.selection.type == "None") { - document.selection.createRange(); - } -var r = document.selection.createRange(); - DBG(1, 'RANGE Bounding(' - + 'top='+r.boundingHeight - + ', left='+r.boundingHeight - + ', width='+r.boundingWidth - + ', height='+r.boundingHeight + ')' - + ', Offset(' - + 'top='+r.offsetTop - + ', left='+r.offsetLeft + ')' - + ', Text=(' + r.text + ')' - + ', HTML=(' + r.htmlText + ')' - ); -} - -// post(): Called in response to clicking the post button in the -// toolbar. It fires an event in the container named post, passing the -// HTML of our newly edited document as the data argument. -function post() -{ - DBG(1, 'Raise "post" event'); - window.external.raiseEvent("post", doc.innerHTML); -} - -// insert(): called in response to clicking the insert table, image, -// smily icons in the toolbar. Loads up an appropriate dialog to -// prompt for information, the dialog then returns the HTML code or -// NULL. We paste the HTML code into the document. -function insert(what) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - - DBG(1, 'insert(' + what + ')'); - - // Chose action based on what is being inserted. - switch(what) - { - case "table": - strPage = "dlg_ins_table.html"; - strAttr = "status:no;dialogWidth:340px;dialogHeight:360px;help:no"; - break; - case "smile": - strPage = "dlg_ins_smile.html"; - strAttr = "status:no;dialogWidth:300px;dialogHeight:350px;help:no"; - break; - case "char": - strPage = "dlg_ins_char.html"; - strAttr = "status:no;dialogWidth:450px;dialogHeight:290px;help:no"; - break; - case "image": - strPage = "dlg_ins_image.php?id="; - strAttr = "status:no;dialogWidth:400px;dialogHeight:200px;help:no";' ' - break; - case "about": - strPage = "dlg_about.html"; - strAttr = "status:no;dialogWidth:500px;dialogHeight:405px;help:no";' ' - break; - } - - // run the dialog that implements this type of element - html = showModalDialog(strPage, window, strAttr); - - // and insert any result into the document. - if (html) { - insertHtml(html); - } -} - -// insertHtml(): Insert the supplied HTML into the current position -// within the document. -function insertHtml(html) -{ - doc.focus(); - var sel = document.selection.createRange(); - // don't try to insert HTML into a control selection (ie. image or table) - if (document.selection.type == 'Control') { - return; - } - sel.pasteHTML(html); -} - -// doStyle(): called to handle the simple style commands such a bold, -// italic etc. These require no special handling, just a call to -// execCommand(). We also call reset so that the toolbar represents -// the state of the current text. -// -// 2002-07-30 Updated based on patch submitted by Michael Keck (mkkeck) -// -function doStyle(s){ - if(!RichEditor.txtView) return; - /* Disabled in View Source mode */ - DBG(1, 'doStyle(' + s + ')'); - checkRange(); - if(s!='InsertHorizontalRule'){ - /* what command string? */ - document.execCommand(s); - } else if( s=='InsertHorizontalRule') { - /* if s=='InsertHorizontalRule then use this command */ - document.execCommand(s,false, null); - - /* Note: - In your source view the
has an ID like this -
- */ - } - reset(); -} - - -// link(): called to insert a hyperlink. It will use the selected text -// if there is some, or the URL entered if not. If clicked when over a -// link, that link is allowed to be edited. -function link(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - - var strURL = "http://"; - var strText; - - // First, pick up the current selection. - doc.focus(); - var r = document.selection.createRange(); - var el = r.parentElement(); - - // Is this aready a link? - if (el && el.nodeName == "A") { - r.moveToElementText(el); - if (!on) { // If removing the link, then replace all with - r.pasteHTML(el.innerHTML); - return; - } - strURL = el.href; - } - - // Get the text associated with this link - strText = r.text; - - // Prompt for the URL - strURL = window.prompt("Enter URL", strURL); - if (strURL) { - // Default the TEXT to the url if non selected - if (!strText || !strText.length) { - strText = strURL; - } - - // Replace with new URL - r.pasteHTML('' + strText + ''); - } - - reset(); -} - -// sel(); similar to doStyle() but called from the dropdown list boxes -// for font and style commands. -function sel(el) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - checkRange(); - switch(el.id) - { - case "ctlFont": - document.execCommand('FontName', false, el[el.selectedIndex].value); - break; - case "ctlSize": - document.execCommand('FontSize', false, el[el.selectedIndex].value); - break; - case "ctlStyle": - document.execCommand('FormatBlock', false, el[el.selectedIndex].text); - break; - } - doc.focus(); - reset(); -} - -// pickColor(): called when the text or fill color icons are clicked. Displays -// the color chooser control. The color setting is completed by the event -// handler of this control (see richedit.html) -function pickColor(fg) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - checkRange(); - var el = window.event.srcElement; - if (el && el.nodeName == "IMG") { - setState(el, true); - } - color.style.top = window.event.clientY + 10; - color.style.left = window.event.clientX - 250; - color.style.display = 'block'; - color._fg = fg; -} - -// setColor(): called from the fore/back color selection dialog event handler -// to set/reset the fore/background color. -function setColor(name, data) -{ - color.style.display = 'none'; - checkRange(); - if (!data) { - removeFormat(document.selection.createRange(), color._fg); - } else { - document.execCommand(color._fg, false, data); - } - setState(btnText, false); - setState(btnFill, false); - doc.focus(); -} - -// removeFormat(): Called to remove specific formats from the selected text. -// The 'removeFormat' command removes all formatting. The principle behind -// this routine is to have a list of the possible formats the selection may -// have, check the selection for the current formats, ignoreing the one we -// want to use, then remove all formatting and then re-apply all but the -// one we wanted to remove. -function removeFormat(r, name) -{ - var cmd = [ "Bold", "Italic", "Underline", "Strikethrough", "FontName", "FontSize", "ForeColor", "BackColor" ]; - var on = new Array(cmd.length); - for (var i = 0; i < cmd.length; i++) { - on[i] = name == cmd[i] ? null : r.queryCommandValue(cmd[i]); - } - r.execCommand('RemoveFormat'); - for (var i = 0; i < cmd.length; i++) { - if (on[i]) r.execCommand(cmd[i], false, on[i]); - } -} - -// setValue(): called from reset() to make a select list show the current font -// or style attributes -function selValue(el, str) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - for (var i = 0; i < el.length; i++) { - if ((!el[i].value && el[i].text == str) || el[i].value == str) { - el.selectedIndex = i; - return; - } - } - el.selectedIndex = 0; -} - -// setState(): called from reset() to make a button represent the state -// of the current text. Pressed is on, unpressed is off. -function setState(el, on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - if (!el.disabled) { - if (on) { - el.defaultState = el.className = "down"; - } else { - el.defaultState = el.className = null; - } - } -} - -// getStyle(): called to obtain the class or type of formatting applied to an element, -// This is used by reset() to set the state of the toolbar to indicate the class of -// the current element. -function getStyle() { - var style = document.queryCommandValue('FormatBlock'); - if (style == "Normal") { - doc.focus(); - var rng = document.selection.createRange(); - if (typeof(rng.parentElement) != "undefined") { - var el = rng.parentElement(); - var tag = el.nodeName.toUpperCase(); - var str = el.className.toLowerCase(); - if (!(tag == "DIV" && el.id == "doc" && str == "textedit")) { - if (tag == "SPAN") { - style = "." + str; - } else if (str == "") { - style = tag; - } else { - style = tag + "." + str; - } - } - return style; - } - } - return style; -} - -// getfontface(): called to obtain the face attribute applied to a font tag, -// This is used by reset() to set the state of the toolbar to indicate the class of -// the current element. -function getfontface() -{ -var family = document.selection.createRange(); //create text range - -// don't get font face for image or table -if (document.selection.type == 'Control') { - return; -} - -var el = family.parentElement(); //get parent element -var tag = el.nodeName.toUpperCase(); //convert tag element to upper case - - if (typeof(el.parentElement) != "undefined" && tag == "FONT") { //only do function if tag is font - this is for greater execution speed - var elface = el.getAttribute('FACE'); //get the font tags FACE attribute - return elface; //return the value of the face attribute to the reset() function - } -} - -// markSelectedElement(): called by onClick and onKeyup events -// on the contectEditable area -function markSelectedElement() { - - RichEditor.selectedImage = null; - - var r = document.selection.createRange(); - - if (document.selection.type != 'Text') { - if (r.length == 1) { - if (r.item(0).tagName == "IMG") { - RichEditor.selectedImage = r.item(0); - } - } - } -} - -// reset(): called from all over the place to make the toolbar -// represent the current text. If el specified, it was called from -// hover(off) -function reset(el) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - if (!el) color.style.display = 'none'; - if (!el || el == ctlStyle) selValue(ctlStyle, getStyle()); - if (!el || el == ctlFont) selValue(ctlFont, getfontface()); - if (!el || el == ctlSize) selValue(ctlSize, document.queryCommandValue('FontSize')); - if (!el || el == btnBold) setState(btnBold, document.queryCommandValue('Bold')); - if (!el || el == btnItalic) setState(btnItalic, document.queryCommandValue('Italic')); - if (!el || el == btnUnderline) setState(btnUnderline, document.queryCommandValue('Underline')); - if (!el || el == btnStrikethrough) setState(btnStrikethrough, document.queryCommandValue('Strikethrough')); - if (!el || el == btnLeftJustify) setState(btnLeftJustify, document.queryCommandValue('JustifyLeft')); - if (!el || el == btnCenter) setState(btnCenter, document.queryCommandValue('JustifyCenter')); - if (!el || el == btnRightJustify) setState(btnRightJustify, document.queryCommandValue('JustifyRight')); - if (!el || el == btnFullJustify) setState(btnFullJustify, document.queryCommandValue('JustifyFull')); - if (!el || el == btnNumList) setState(btnNumList, document.queryCommandValue('InsertOrderedList')); - if (!el || el == btnBulList) setState(btnBulList, document.queryCommandValue('InsertUnorderedList')); -} - -// hover(): Handles mouse hovering over toolbar buttons -function hover(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - var el = window.event.srcElement; - if (el && !el.disabled && el.nodeName == "IMG" && el.className != "spacer") { - if (on) { - el.className = "hover"; - } else { - el.className = el.defaultState ? el.defaultState : null; - } - } -} -// hover(): Handles mouse clicks on toolbar buttons -function press(on) -{ - if (!RichEditor.txtView) return; // Disabled in View Source mode - var el = window.event.srcElement; - if (el && !el.disabled && el.nodeName == "IMG" && el.className != "spacer") { - if (on) { - el.className = "down"; - } else { - el.className = el.className == "down" ? "hover" : el.defaultState ? el.defaultState : null; - } - } -} - -// addTag(): This is the handler for the style dropdown. This takes value -// selected and interprates it and makes the necessary changes to the HTML to -// apply this style. -function addTag(obj) { - - if (!RichEditor.txtView) return; // Disabled in View Source mode - - // Determine the type of element we are dealing with. - // TYPE 0 IS NORMAL-TAG, 1 IS CLASS, 2 IS SUBCLASS, 3 = Format Block command - var value = obj[obj.selectedIndex].value; - if (!value) { // Format Block - sel(obj); - return; - } - - var type = 0; // TAG - - if (value.indexOf(".") == 0) { // .className - type = 1; - } else if (value.indexOf(".") != -1) { // TAG.className - type = 2; - } - - doc.focus(); - - // Pick up the highlighted text - var r = document.selection.createRange(); - r.select(); - var s = r.htmlText; - - // If we have some selected text, then ignore silly selections - if (s == " " || s == " ") { - return; - } - - // How we apply formatting is based upon the type of formitting being - // done. - switch(type) - { - case 1: - // class: Wrap the selected text with a span of the specified - // class name - value = value.substring(1,value.length); - r.pasteHTML("" + r.htmlText + "") - break; - - case 2: - // subclass: split the value into tag + class - value = value.split("."); - r.pasteHTML('<' + value[0] + ' class="' + value[1] +'">' - + r.htmlText - + '' - ); - break; - - default: - // TAG: wrap up the highlighted text with the specified tag - r.pasteHTML("<"+value+">"+r.htmlText+"") - break; - } -} - -// initStyleDropdown(): This takes the passed styleList and generates the style -// dropdown list box from it. -function initStyleDropdown(styleList) { - - // Build the option list for the styles dropdown from the passed styles - for (var i = 0; i < styleList.length; i++) { - var oOption = document.createElement("OPTION"); - if (styleList[i][0]) oOption.value = styleList[i][0]; - oOption.text = styleList[i][1]; - oOption.style.backgroundColor = 'white'; - document.all.ctlStyle.add(oOption); - } -} - -// applyOptions(): This takes the passed options string and actions them. -// Called during the init process. -function applyOptions(str) -{ - var options = str.split(";"); - for (var i = 0; i < options.length; i++) { - var eq = options[i].indexOf('='); - var on = eq == -1 ? true : "yes;true;1".indexOf(options[i].substr(eq+1).toLowerCase()) != -1; - var name = eq == -1 ? options[i] : options[i].substr(0,eq); - var el = document.all("feature" + name); - if (el) { - el.runtimeStyle.display = (on ? 'inline' : 'none'); - } else { - if (!RichEditor.aOptions) RichEditor.aOptions = new Array; - RichEditor.aOptions[name] = on; - } - } -} - -// getOption(): Get the value for a previously set option or return undefined if -// the option is not set. -function getOption(name) -{ - if (RichEditor.aOptions) return RichEditor.aOptions[name]; - return; // Undefined -} - -// Handle drag and drop events into the editor window. Until we -// work out how to handle these better (which requires co-operation -// from the code being dragged from as far as I can tell) we simply -// disable the functionality. -function handleDrag(n) -{ - // if drag and drop is disabled, then cancel the dragdrop - // events - if (!getOption("dragdrop")) - { - switch(n) { - case 0: // ondragenter - window.event.dataTransfer.dropEffect = "none"; - break; - } - // Cancel the event - window.event.returnValue = false; - } -} - diff --git a/lib/rte/rte_codesweep.js b/lib/rte/rte_codesweep.js deleted file mode 100644 index 4033805678..0000000000 --- a/lib/rte/rte_codesweep.js +++ /dev/null @@ -1,115 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Author(s): leonreinders@hetnet.nl LEON -// -// History: -// -// LEON 04-08-2001 -// Initial Implementation -// -//////////////////////////////////////////////////////////////////////////////// - -function replaceCharacters(html) { - - // Special characters and their HTML equivelent - var set = [ - ["€","‘","’","’","“","”","–","—","¡","¢","£","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ"], - ["€","‘","’","’","“","”","–","—","¡","¢","£","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ü","ý","þ","ÿ"] - ]; - - // Replace each instance of one of the above special characters with it's HTML equivelent - if (html) { - for(var j = 0; j < set[0].length; j++){ - html = html.replace(eval("/"+set[0][j]+"/g"),set[1][j]); - } - } - - // Return the HTML or an empty string if no HTML was supplied - return html || ""; -} - -// removes empty tags and tags with only non-breaking-spaces unlimited levels -function removeEmptyTags(html) { - var re = /<[^(>|\/)]+>[ | ]*<\/[^>]+>/gi; - while(re.test(html)) { - html = html.replace(re,""); - while(re.test(html)) { - html = html.replace(re,""); - } - } - return html; -} - -// replaceAbsoluteUrls(): replaces absolute URL's with relative urls -// assuming the editor is in a level equal-to or above the image. -function replaceAbsoluteUrls(html) { - var docLoc = document.location.toString(); - docLoc = docLoc.substring(0,docLoc.lastIndexOf("/")+1); - docLoc = docLoc.replace(/\//gi,"\\\/"); - var re = eval("/"+docLoc+"/gi"); - return html.replace(re, ""); -} - -// replaceTags(): replace tags for better formatting -// set: [[tag,replacement],[tag,replacm.... -function replaceTags(set, html) { - var re; - for(var i = 0; i < set.length; i++) { - re = eval("/(<[\/]{0,1})"+set[i][0]+">/gi"); - html=html.replace(re,"$1"+set[i][1]+">"); - } - return html -} - -// codeSweeper(): apply several code-modifications -function codeSweeper() { - var html = doc.innerHTML; - if (html) html = replaceCharacters(html); - if (html) html = replaceAbsoluteUrls(html); - // if (html) html = removeEmptyTags(html) - if (html) html = replaceTags([["strong","B"],["em","I"]],html); - return html; -} diff --git a/lib/rte/rte_debug.js b/lib/rte/rte_debug.js deleted file mode 100644 index 88964b922b..0000000000 --- a/lib/rte/rte_debug.js +++ /dev/null @@ -1,106 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Authors & Contributers: -// -// OZ Austin David France [austin.france@ramesys.com] -// Primary Developer -// -//////////////////////////////////////////////////////////////////////////////// - -// DBG(): Get the debug window handle in a safe manaer. -function DBGGetWindow(el) { - if (el) { - // Debug window closed? - try { el.className; } catch(e) { - if (e.number == -2147418094) { - return null; - } - } - } - return el; -} - -// DBG(): Debug routine activated by the debugWindow property -function DBG(n, str) -{ - // Initialise debug functionality, first time in or if DBG() is called - // with no arguments (as called from put_debugWindow). - if (typeof(n) == "undefined" || !DBG.fInitialised) { - var el = DBGGetWindow(public_description.debugWindow); - if (el) { - el.className = "debugWindow"; - el.innerHTML = '' - + '' - + '
SeqCallerDebug
'; - DBG.idTable = el.all("debug"); - } - DBG.fInitialised = true; - DBG.seq = 0; - } - - // If debug window supplied, then output debug message, assuming one was - // supplied. - if (typeof(str) != "undefined") { - var el = DBGGetWindow(DBG.idTable); - if (el) { - var row = el.insertRow(1); - var caller = DBG.caller.toString().substr(9); - var cell = row.insertCell(); - cell.innerText = DBG.seq++; - cell.nowrap = ''; - cell = row.insertCell(); - cell.innerText = caller.substr(0, caller.indexOf('\n')); - cell.nowrap = ''; - row.insertCell().innerText = str; - } else { - // If no debug window, but RichEdit.debug is true, then output - // debugs to status bar. - if (RichEditor.debug) { - window.status = str; - } - } - } -} diff --git a/lib/rte/rte_dunno.css b/lib/rte/rte_dunno.css deleted file mode 100644 index dc3a5de2cd..0000000000 --- a/lib/rte/rte_dunno.css +++ /dev/null @@ -1,54 +0,0 @@ - .text{ - font-family : Arial, Helvetica, sans-serif; - font-size : x-small; - color : black; - } - .red{ - font-family : Arial, Helvetica, sans-serif; - color : red; -} - .acomment{ - background-color : #E7E7E7; - color : Gray; - font-family : Arial, Helvetica, sans-serif; - font-size : x-small; -} - DIV.red{ - font-family : Arial, Helvetica, sans-serif; - color : red; - font-size : x-small; -} - LI.red{ - font-family : Arial, Helvetica, sans-serif; - color : red; - font-size : x-small; -} - H1{ - font-family : "Lucida Console"; - font-variant : small-caps; - font-size : larger; - color : ButtonHighlight; - font-style : italic; - font-weight : 300; - letter-spacing : 3px; - } - address{ - font-family : "Lucida Console"; - font-variant : small-caps; - font-size : smaller; - color : Gray; - font-style : normal; - font-weight : bolder; - letter-spacing : normal; - text-align : center; - } - H1.purple{ - font-family : "Lucida Console"; - font-variant : small-caps; - font-size : larger; - color : Violet; - font-style : italic; - font-weight : 300; - letter-spacing : 3px; - border : #9966FF; - } \ No newline at end of file diff --git a/lib/rte/rte_editmode.js b/lib/rte/rte_editmode.js deleted file mode 100644 index 3f34d5e686..0000000000 --- a/lib/rte/rte_editmode.js +++ /dev/null @@ -1,124 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Author(s): leonreinders@hetnet.nl LEON -// -// Austin.France@Ramesys.com OZ -// -// History: -// -// LEON 04-08-2001 -// Initial Implementation -// -// OZ Disable/enable post button during view source mode. -// -//////////////////////////////////////////////////////////////////////////////// - -// setEditMode(): switch between html and textview -function setEditMode() { - switchMode.blur(); // htmlview - if (switchMode.checked == true) { - ctlStyle.disabled = ctlFont.disabled = ctlSize.disabled = true; - doc.style.fontFamily = "Courier"; - doc.style.fontSize = "10px"; - RichEditor.txtView = false; - doc.innerText = codeSweeper(); - doc.innerHTML = ccParser(doc.innerHTML); - alert("Remember to uncheck this Source box again before saving your changes!!"); - } else { - ctlStyle.disabled = ctlFont.disabled = ctlSize.disabled = false; - doc.style.fontFamily = doc.style.fontSize = ""; - RichEditor.txtView = true; - doc.focus(); - doc.innerHTML = doc.innerText; - } -} - -// resetMode(); -function resetMode(){ - if (switchMode.checked == true) { - switchMode.click(); - } -} - -// ccParser(): colorcode-parser for html-editing view -function ccParser(html) { - - html = html.replace(/@/gi,"_AT_"); - html = html.replace(/#/gi,"_HASH_"); - - var htmltag = /(<[\w\/]+[ ]*[\w\=\"\'\.\/\;\: \)\(-]*>)/gi; - html = html.replace(htmltag,"$1"); - - var imgtag = /(<IMG[ ]*[\w\=\"\'\.\/\;\: \)\(-]*>)<\/span>/gi; - html = html.replace(imgtag,"$1"); - - var formtag = /(<[\/]*(form|input){1}[ ]*[\w\=\"\'\.\/\;\: \)\(-]*>)<\/span>/gi; - html = html.replace(formtag,"
$1"); - - var tabletag = /(<[\/]*(table|tbody|th|tr|td){1}([ ]*[\w\=\"\'\.\/\;\:\)\(-]*){0,}>)<\/span>/gi; - html = html.replace(tabletag,"$1"); - - //var Atag = /(<(\/a>|[\W _\w\=\"\'\.\/\;\:\)\(-]>){1})<\/span>/gi; - var Atag = /(<\/a>){1}<\/span>/gi; - html = html.replace(Atag,"$1"); - - var Atag = /(<a [\W _\w\=\"\'\.\/\;\:\)\(-]+>){1,}<\/span>/gi; - html = html.replace(Atag,"$1"); - - var parameter = /=("[ \w\'\.\/\;\:\)\(-]+"|'[ \w\"\.\/\;\:\)\(-]+')/gi; - html = html.replace(parameter,"=$1"); - - var entity = /&([\w]+);/gi; - html = html.replace(entity,"&$1;"); - - var comment = /(<\!--[\W _\w\=\"\'\.\/\;\:\)\(-]*-->)/gi; - html = html.replace(comment,"
$1"); - - html = html.replace(/_AT_/gi,"@"); - html = html.replace(/_HASH_/gi,"#"); - - return html; -} diff --git a/lib/rte/rte_history.js b/lib/rte/rte_history.js deleted file mode 100644 index 6a6dda095d..0000000000 --- a/lib/rte/rte_history.js +++ /dev/null @@ -1,125 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Author(s): leonreinders@hetnet.nl LEON -// -// History: -// -// LEON 04-08-2001 -// Initial Implementation -// -// OZ 30-08-2001 -// * Correct a problem where the last amendment could not be re-done. -// * Alter the way the buttons are disabled so that the background of -// the button is transparent and matches the user rebar background -// color - specifically - buttonface. -// -// OZ 22-01-2002 -// Only do any saving if the history option is enabled. This should -// speed up the editor in the default case. This is because the -// history option takes entire copies of the buffer being edited which -// can consume large amounts of memory. -// -//////////////////////////////////////////////////////////////////////////////// - -var history = new Object; -history.items = []; -history.cursor = -1; - -// saveHistory(): Saves a copy of the document in the history.items.items buffer -function saveHistory() { - if (!getOption("history")) return; - codeSweeper(); - history.items[history.items.length] = doc.innerHTML; - history.cursor = history.items.length; - // window.status = 'saveHistory() cursor=' + history.cursor + ', items = ' + history.items.length; - showHistory(); -} - -// goHistory(): Advance or retreat the history.items.items cursor and show the -// document as it was at that point in time. -function goHistory(value) { - - if (!RichEditor.txtView) return; - switch(value) { - case -1: - i = history.cursor - 1; - // when first start undoing, save final state at end of history buffer - // so it can be re-done. - if (history.cursor == history.items.length) { - saveHistory(); - } - history.cursor = i; - break; - case 1: - history.cursor ++; - break; - } - if (history.items[history.cursor]) { - doc.innerHTML = history.items[history.cursor]; - } - // window.status = 'goHistory(' + value + ') cursor=' + history.cursor + ', items = ' + history.items.length; - showHistory() -} - -// showHistory(): enable and disable the history.items buttons as appropriate -function showHistory() { - - if (history.cursor > 0) { - btnPrev.className = ""; - btnPrev.disabled = false; - } else { - btnPrev.className = "disabled"; - btnPrev.disabled = true; - } - - if (history.cursor < history.items.length - 1) { - btnNext.className = ""; - btnNext.disabled = false; - } else { - btnNext.className = "disabled"; - btnNext.disabled = true; - } -} diff --git a/lib/rte/rte_interface.js b/lib/rte/rte_interface.js deleted file mode 100644 index 086db51e7b..0000000000 --- a/lib/rte/rte_interface.js +++ /dev/null @@ -1,300 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Author(s): austin.france@ramesys.com OZ -// leonreinders@hetnet.nl LEON -// -// History: -// -// LEON 04-08-2001 -// Added styleData functionality for extending the style dropdown -// -// OZ 30-08-2001 -// Re-worked styleData to restore FormatBlock logic which works better -// for some styles, for example, heading styles - as these can be -// applied without having to select text. -// -// OZ 02-09-2001 -// Extended the richeditor interface to make the docHtml property read -// write. -// -// OZ 08-01-2002 -// Extended the richeditor interface to include an options property. -// This property can be set to enable/disable functionality in the -// editor. -// -// OZ 21-01-2002 -// After set editor options, apply them. In some circumstances the -// options property is set after the editor has initialised and so the -// options need to be re-applied. -// -// OZ 12-02-2002 -// Add new property debugWindow which should be a reference to an HTML -// element that can contain innerHTML. A table is inserted into this -// element and debug statements are output. -// -// OZ 12-06-2002 [ richtext-Bugs-567677 ] Cursor at bottom of document on load -// When initialising HTML throught the docHtml property, get a text range -// object before inserting HTML (this will reflect the cursor position for -// the empty document), insert the HTML (this moves the cursor position) -// and then collapse the resulting range which now covers the entire document -// to the beginning (i.e. move the insertion point to the start of the -// selection). All changes isolated to the put_docHtml() routine. -// -// OZ 18-06-2002 -// Add support for a docXHtml property to allow an XHMTL representation -// of the document to be extracted. See rte_xhtml.js for the -// implementation. -// -// OZ 01-07-2002 -// If the editor is slow at initialisation (for example if an alert box -// is placed inside initEditor() in rte.js) then it is possible for -// the docHtml property to be called before the editor is properly -// initialised. This is ok except that we can't put focus on the editor -// until it is visible. -// -//////////////////////////////////////////////////////////////////////////////// - -// object: RichEditor() -// description: This object provides the interface to the calling page. -function RichEditor() -{ - var selectedImage = null; // currently selected image - - this.put_docHtml = put_docHtml; - this.get_docHtml = get_docHtml; // OZ - this.get_docXHtml = get_docXHtml; // OZ - this.put_defaultFont = put_defaultFont; - this.put_defaultFontSize = put_defaultFontSize; - this.put_styleData = put_styleData; // LEON - this.put_options = put_options; - this.addField = addField; - this.getValue = getValue; - this.put_debugWindow = put_debugWindow; // OZ -} - -// property: docHtml -// access: read/write -// description: Set this property to define the initial HTML to be -// edited. -// author: austin.france@ramesys.com -function put_docHtml(passedValue) { - var r = document.selection.createRange(); - doc.innerHTML = passedValue; - r.collapse(true); - r.select(); - - // Only if editor initialisation has completed (and therfore visible) - if (editor.style.visibility == "visible") { - doc.focus(); - reset(); - } -} - -function get_docHtml() { - return doc.innerHTML; -} - -// property: docXHtml -// access: read only -// description: Return an XHTML representation of the document. -// author: austin.france@ramesys.com -function get_docXHtml() { // OZ - // Ignore any contenteditable attributes seen as these are - // inherited from the editor and not relevent to the document - // HTML. - return innerXHTML(doc, new RegExp("contenteditable")); -} - -// property: defaultFont -// access: write only -// description: Sets the default font for the editor. The default -// if this is not specified is whatever the microsoft -// html editing component decides (Times New Roman -// typically) -// author: austin.france@ramesys.com -function put_defaultFont(passedValue) { - doc.style.fontFamily = passedValue; -} - -// property: defaultFontSize -// access: write only -// description: Sets the default font size for the editor. -// author: austin.france@ramesys.com -function put_defaultFontSize(passedValue) { - switch(passedValue) { - case "1": passedValue = "xx-small"; break; - case "2": passedValue = "x-small"; break; - case "3": passedValue = "small"; break; - case "4": passedValue = "medium"; break; - case "5": passedValue = "large"; break; - case "6": passedValue = "x-large"; break; - case "7": passedValue = "xx-large"; break; - } - doc.style.fontSize = passedValue; -} - -// property: styleData -// access: writeOnly -// description: Defines extended style data for the style dropdown -// author: leonreinders@hetnet.nl -function put_styleData(passedValue) { - - var a,b; - - // Define the default style list - this.styleList = [ - // element description Active - [null, "Normal", 0], - [null, "Heading 1", 0], - [null, "Heading 2", 0], - [null, "Heading 3", 0], - [null, "Heading 4", 0], - [null, "Heading 5", 0], - [null, "Heading 6", 0], - [null, "Address", 0], - [null, "Formatted", 0], - ["BLOCKQUOTE", "Blockquote", 0], - ["CITE", "Citation", 0], - ["BDO", "Reversed", 0], - ["BIG", "Big", 0], - ["SMALL", "Small", 0], - ["DIV", "Div", 0], - ["SUP", "Superscript", 0], - ["SUB", "Subscript", 0] - ]; - - // Add the passed styles to the documents stylesheet - for (var i = 0; passedValue && i < passedValue.length; i++) - { - for (var j = 0; j < passedValue[i].rules.length; j++) - { - // Extract the rule and the rule definition from the passed style - // data. - a = passedValue[i].rules[j].selectorText.toString().toLowerCase(); - b = passedValue[i].rules[j].style.cssText.toLowerCase(); - - // Ignore non-style entries - if (!a || !b) continue; - - // Add this rule to our style sheet - document.styleSheets[0].addRule(a,b); - - // Id: These are added to the document style sheet but are not - // available in the style dropdown - if (a.indexOf("#") != -1) { - continue; - } - - // Class: Append a cless element to the style list - if (a.indexOf(".") == 0) { - this.styleList[this.styleList.length] = [a, "Class " + a, 1]; - } - - // SubClass: Append the sub-class to the style list - else if(a.indexOf(".") > 0) { - this.styleList[this.styleList.length] = [a, a, 1]; - } - - // Otherwise, assume it's a tag and select the existing tag entry - // in the style list. - else { - for (var k = 0; k < this.styleList.length; k++) { - if (this.styleList[k][0] == a) { - this.styleList[k][2] = 1; - break; - } - } - } - } - } - - // Initialise the style dropdown with the new style list - initStyleDropdown(this.styleList); -} - -function addField(name, label, maxlen, value, size) { - var row = rebarBottom.parentElement.insertRow(rebarBottom.rowIndex); - var cell = row.insertCell(); - cell.className = 'rebar'; - cell.width = '100%'; - cell.innerHTML = '' - + '' - + '' - + '' + label + ':' - + '  ' - + '' - + ''; -} - -function getValue(name) { - return document.all(name).value; -} - -// property: options -// access: writeOnly -// description: Sets options for the editor. Used by the editor to control -// certain features -// -// viewsource=;... -// -// author: austin.france@ramesys.com -function put_options(passedValue) { - this.options = passedValue; - applyOptions(this.options); -} - -// property: debugWindow -// access: writeOnly -// description: Tells the editor to emit debugs to the debug window. -// author: austin.france@ramesys.com -function put_debugWindow(passedValue) { - this.debugWindow = passedValue; - DBG(); -} diff --git a/lib/rte/rte_lang.js b/lib/rte/rte_lang.js deleted file mode 100644 index e6d96a1b92..0000000000 --- a/lib/rte/rte_lang.js +++ /dev/null @@ -1,954 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Authors & Contributers: -// -// OZ Austin David France [austin.france@ramesys.com] -// Primary Developer -// -// TE Torbjørn Engedal [torbjoen@stud.ntnu.no] -// Doc. Translator -// -// GE Herfurth, Gerrit [gerrit.herfurth@gs-druckfarben.de] -// -// BC Bill Chalmers [bill_paula@btinternet.com] -// -// History: -// -// OZ 16-02-2002 -// Initial Implementation -// -// TE 17-02-2002 -// Norwegian Translation -// -// GE 05-06-2002 -// German Translation -// -// OZ 01-07-2002 -// Extended EN translation to include table editing. Other languages -// to follow. -// -// BC 21-07-2002 -// Fixed bug no: 584424, trying to set lang equal to local[lang] caused error -// if the users local lang was not in the predefined locale array. -// -// BC 31-07-2002 -// Added french translation courtesy of Arnaud Vatel. -// -// OZ 27-08-2002 -// Added Russian Translation - submitted by Artem Orlov [art@ural.ru] -// -// OZ 27-08-2002 -// Added Turkish Translation - submitted by Fatih BOY -// -// OZ 27-08-2002 -// Fix bug where missing text in non-en/us language was not falling back -// to en/us text. -// -// OZ 27-08-2002 -// Added Italiano Translation - submitted by Angelo Del Mazza -// -// BC 04-09-2002 -// Added Dutch Translation - Courtesy of levOOware, Marja Ribbers-de Vroed -// -// BC 31-10-2002 -// Added Portugese (Brazilian) Translation - Courtesy of Ricardo Colombani de Sousa -// -// BC 31-10-2002 -// Added Danish Translation - Courtesy of Morten Flyger -// -// BC 31-10-2002 -// Added bold, underline and italic icons sources for en-us -//////////////////////////////////////////////////////////////////////////////// - -var locale = new Object; - -// locale.getLanguage(): Called to work out what language to use. -locale.getLanguage = function() -{ - return locale.language ? locale.language : navigator.userLanguage; -} - -// locale.getString(): Called to return the language variant of a @code string. -// this routin will fall back to en-us is no language variant is found. If no -// english version exists, the code is returned. -locale.getString = function(str, lang) -{ - // If not supplied, pick up the language to use - if (!lang) lang = locale.getLanguage(); - - // Get references to required languages - if (!locale[lang]) - { - enus = lang = locale["en-us"]; - } - else - { - lang = locale[lang]; - enus = locale["en-us"]; - } - - // Find the end of the text code - var i = str.indexOf('@{'); - while (i != -1) - { - // Find the closing } - var j = str.indexOf('}', i+1); - - // Extrace the language code - var code = str.substr(i+2,j-i-2); - - // Return the language version of the text - if (lang[code]) { - str = str.substr(0,i) + lang[code] + str.substr(i+j+1); - } else { - if (enus[code]) { - str = str.substr(0,i) + enus[code] + str.substr(i+j+1); - } - } - - // Find the next code if any - i = str.indexOf('@{', i+1); - } - - // Untranslated - return str; -} - -// locale.setLocale(): Called once the editor has loaded to replace all language -// codes in alt, title and innerText with thier language counterparts. -locale.setLocale = function() -{ - // Work out which language to apply - var lang = locale.getLanguage(); - - // Enumerate all elements within the document - for (var i = 0; i < document.all.length; i++) - { - // Get a reference to this element - var el = document.all(i); - - // Translate the alt attribute (alternate image text) if required - if (el.alt && el.alt.indexOf('@{') != -1) { - el.alt = locale.getString(el.alt, lang); - } - - // Translate the title attribute (tooltip) if required - if (el.title && el.title.indexOf('@{') != -1) { - el.title = locale.getString(el.title, lang); - } - - // Translate the src attribute (image/script source url) if required - if (el.src && el.src.indexOf('@{') != -1) { - el.src = locale.getString(el.src, lang); - } - - // Translate bottom level (leaf nodes) innerText if required. - if (!el.children.length && el.innerText && el.innerText.indexOf('@{') != -1) { - el.innerText = locale.getString(el.innerText, lang); - } - } -} - -// Arrange for translation to occur when the document has loaded -window.attachEvent("onload", locale.setLocale); - -//////////////////////////////////////////////////////////////////////////////// -// -// English (American & British) -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["en-us"] = locale["en-gb"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Post Topic"; - o["Cut"] = "Cut"; - o["Copy"] = "Copy"; - o["Paste"] = "Paste"; - o["SpellCheck"] = "Spell Check"; - o["SelectAll"] = "Select All"; - o["RemoveFormatting"] = "Remove Formatting"; - o["InsertLink"] = "Insert Link"; - o["RemoveLink"] = "Remove Link"; - o["InsertImage"] = "Insert Image"; - o["InsertTable"] = "Insert Table"; - o["EditTable"] = "Edit Table"; - o["InsertLine"] = "Insert Horizontal Line"; - o["InsertSmily"] = "Insert Smily 8-)"; - o["InsertCharacter"] = "Insert special character"; - o["About"] = "About Richtext Editor"; - o["Bold"] = "Bold"; - o["Italic"] = "Italic"; - o["Underline"] = "Underline"; - o["Strikethrough"] = "Strikethrough"; - o["AlignLeft"] = "Align Left"; - o["Center"] = "Center"; - o["AlignRight"] = "Align Right"; - o["AlignBlock"] = "Align Block"; - o["NumberedList"] = "Numbered List"; - o["BulettedList"] = "Buletted List"; - o["DecreaseIndent"] = "Decrease Indent"; - o["IncreaseIndent"] = "Increase Indent"; - o["HistoryBack"] = "History back"; - o["HistoryForward"] = "History forward"; - o["TextColor"] = "Text Color"; - o["BackgroundColor"] = "Background Color"; - - o["RemoveColspan"] = "Remove Colspan"; - o["RemoveRowspan"] = "Remove Rowspan"; - o["IncreaseColspan"] = "Increase Colspan"; - o["IncreaseRowspan"] = "Increase Rowspan"; - o["AddColumn"] = "Add Column"; - o["AddRow"] = "Add Row"; - o["RemoveColumn"] = "Remove Column"; - o["RemoveRow"] = "Remove Row"; - - // Label Text - o["Style"] = "Style"; - o["Font"] = "Font"; - o["Size"] = "Size"; - o["Source"] = "Source"; - - // Titles - o["SourceTitle"] = "Click here to toggle between WYSIWYG and Source mode."; - - // Image Sources - o["icon_post"] = "images/icon_post.gif"; - o["hdr_tables"] = "images/hdr_tables.gif"; - o["icon_bold"] = "images/icon_bold.gif"; - o["icon_underline"] = "images/icon_underline.gif"; - o["icon_italic"] = "images/icon_italic.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Norwegian Bokmål -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["no"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Send"; - o["Cut"] = "Klipp"; - o["Copy"] = "Kopier"; - o["Paste"] = "Lim"; - o["SpellCheck"] = "Stavekontroll"; - o["SelectAll"] = "Marker alt"; - o["RemoveFormatting"] = "Fjern formatering"; - o["InsertLink"] = "Sett inn link"; - o["RemoveLink"] = "Fjern link"; - o["InsertImage"] = "Sett inn bilde"; - o["InsertTable"] = "Sett inn tabell"; - o["EditTable"] = "Endre tabell"; - o["InsertLine"] = "Sett inn horisontal linje"; - o["InsertSmily"] = "Sett inn smily 8-)"; - o["InsertCharacter"] = "Sett inn spesialtegn"; - o["About"] = "Om Richtext Editor"; - o["Bold"] = "Fet"; - o["Italic"] = "Kursiv"; - o["Underline"] = "Understrekning"; - o["Strikethrough"] = "Gjennomstrekning"; - o["AlignLeft"] = "Venstrejustering"; - o["Center"] = "Sentrering"; - o["AlignRight"] = "Høyrejustering"; - o["AlignBlock"] = "Blokkjustering"; - o["NumberedList"] = "Nummerert liste"; - o["BulettedList"] = "Punktliste"; - o["DecreaseIndent"] = "Mink innrykksverdi"; - o["IncreaseIndent"] = "Øk innrykksverdi"; - o["HistoryBack"] = "Historie bakover"; - o["HistoryForward"] = "Historie forover"; - o["TextColor"] = "Tekstfarge"; - o["BackgroundColor"] = "Bakgrunnsfarge"; - - // Label Text - o["Style"] = "Stil"; - o["Font"] = "Type"; - o["Size"] = "Størrelse"; - o["Source"] = "Kilde"; - - // Titles - o["SourceTitle"] = "Klikk her for å bytte mellom WYSIWYG og kilde modus."; - - // Image Sources - o["icon_post"] = "images/lang/no.icon_post.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// German -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["de"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Speichern"; - o["Cut"] = "Ausschneiden"; - o["Copy"] = "Kopieren"; - o["Paste"] = "Einfügen"; - o["SpellCheck"] = "Rechschreibprüfung"; - o["SelectAll"] = "Alles markieren"; - o["RemoveFormatting"] = "Formatierung entfernen"; - o["InsertLink"] = "Link einfügen"; - o["RemoveLink"] = "Link entfernen"; - o["InsertImage"] = "Bild einfügen"; - o["InsertTable"] = "Tabelle einfügen"; - o["EditTable"] = "Tabelle bearbeiten"; - o["InsertLine"] = "Horizontale Linie einfügen"; - o["InsertSmily"] = "Smily 8-) einfügen"; - o["InsertCharacter"] = "Sonderzeichen einfügen"; - o["About"] = "Über Richtext Editor"; - o["Bold"] = "Fett"; - o["Italic"] = "Kursiv"; - o["Underline"] = "Unterstrichen"; - o["Strikethrough"] = "Durchgestrichen"; - o["AlignLeft"] = "Linksbündig"; - o["Center"] = "Zentriert"; - o["AlignRight"] = "Rechtsbündig"; - o["AlignBlock"] = "Blocksatz"; - o["NumberedList"] = "Nummerierung"; - o["BulettedList"] = "Aufzählungszeichen"; - o["DecreaseIndent"] = "Einzug verkleinern"; - o["IncreaseIndent"] = "Einzug vergrößern"; - o["HistoryBack"] = "Rückgängig"; - o["HistoryForward"] = "Wiederherstellen"; - o["TextColor"] = "Zeichenfarbe"; - o["BackgroundColor"] = "Hintergrundfarbe"; - - // Label Text - o["Style"] = "Absatzformat"; - o["Font"] = "Schriftart"; - o["Size"] = "Größe"; - o["Source"] = "Quelltext"; - - // Titles - o["SourceTitle"] = "Hier klicken, um zwischen WYSIWYG- und Quelltext-Modus umzuschalten."; - - // Image Sources - o["icon_post"] = "images/lang/de.icon_post.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Français -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["fr"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Poster le sujet"; - o["Cut"] = "Couper"; - o["Copy"] = "Copier"; - o["Paste"] = "Coller"; - o["Find Text"] = "Rechercher"; - o["SpellCheck"] = "Vérifier l'orthographe"; - o["SelectAll"] = "Sélectionner tout"; - o["RemoveFormatting"] = "Supprimer le formattage"; - o["InsertLink"] = "Insérer un lien"; - o["RemoveLink"] = "Supprimer un lien"; - o["InsertImage"] = "Insérer une image"; - o["InsertTable"] = "Insérer un tableau"; - o["EditTable"] = "Editer le tableau"; - o["InsertLine"] = "Insérer une ligne horizontale"; - o["InsertSmily"] = "Insérer un Smiley 8-)"; - o["InsertCharacter"] = "Insérer des caractères spéciaux"; - o["About"] = "A propos de Richtext Editor"; - o["Bold"] = "Gras"; - o["Italic"] = "Italique"; - o["Underline"] = "Souligné"; - o["Strikethrough"] = "Barré"; - o["AlignLeft"] = "Aligné à gauche"; - o["Center"] = "Centré"; - o["AlignRight"] = "Aligné à droite"; - o["AlignBlock"] = "Justifié"; - o["NumberedList"] = "Liste numérotée"; - o["BulettedList"] = "Liste à puces"; - o["DecreaseIndent"] = "Diminuer le retrait"; - o["IncreaseIndent"] = "Augmenter le retrait"; - o["HistoryBack"] = "Annuler"; - o["HistoryForward"] = "Rétablir"; - o["TextColor"] = "Couleur du texte"; - o["BackgroundColor"] = "Couleur de l'arrière plan"; - - o["RemoveColspan"] = "Fractionner la cellule"; - o["RemoveRowspan"] = "Fusionner la cellule"; - o["IncreaseColspan"] = "Augmenter l'étendue de la colonne"; - o["IncreaseRowspan"] = "Augmenter l'étendue de la ligne"; - o["AddColumn"] = "Ajouter une colonne"; - o["AddRow"] = "Ajouter une ligne"; - o["RemoveColumn"] = "Supprimer une colonne"; - o["RemoveRow"] = "Supprimer une ligne"; - - // Label Text - o["Style"] = "Style"; - o["Font"] = "Police"; - o["Size"] = "Taille"; - o["Source"] = "Code source"; - - // Titles - o["SourceTitle"] = "Cliquez ici pour basculer entre Aperçu et mode Source."; - - // Image Sources - o["icon_post"] = "images/icon_post.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Russian (Windows 1251) -// by Artem Orlov [art@ural.ru] -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["ru"] = locale["ru"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Ñîõðàíèòü"; - o["Cut"] = "Âûðåçàòü"; - o["Copy"] = "Êîïèðîâàòü"; - o["Paste"] = "Âñòàâèòü"; - o["SpellCheck"] = "Ïðîâåðèòü îðôîãðàôèþ"; - o["SelectAll"] = "Âûäåëèòü âñå"; - o["RemoveFormatting"] = "Óäàëèòü ôîðìàòèðîâàíèå"; - o["InsertLink"] = "Âñòàâèòü ññûëêó"; - o["RemoveLink"] = "Óáðàòü ññûëêó"; - o["InsertImage"] = "Âñòàâèòü êàðòèíêó"; - o["InsertTable"] = "Âñòàâèòü òàáëèöó"; - o["EditTable"] = "Èçìåíèòü òàáëèöó"; - o["InsertLine"] = "Âñòàâèòü ãîðèçîíòàëüíóþ ëèíèþ"; - o["InsertSmily"] = "Âñòàâèòü ñìàéëèê 8-)"; - o["InsertCharacter"] = "Âñòàâèòü ñïåöñèìâîë"; - o["About"] = "Î ðåäàêòîðå"; - o["Bold"] = "Æèðíûé"; - o["Italic"] = "Êóðñèâ"; - o["Underline"] = "Ïîä÷åðêíóòûé"; - o["Strikethrough"] = "Çà÷åðêíóòûé"; - o["AlignLeft"] = "Ïî ëåâîìó êðàþ"; - o["Center"] = "Ïî öåíòðó"; - o["AlignRight"] = "Ïî ïðàâîìó êðàþ"; - o["AlignBlock"] = "Ïî øèðèíå"; - o["NumberedList"] = "Íóìåðîâàííûé ñïèñîê"; - o["BulettedList"] = "Ìàðêèðîâàííûé ñèñîê"; - o["DecreaseIndent"] = "Óìåíüøèòü îòñòóï"; - o["IncreaseIndent"] = "Óâåëè÷èòü îòñòóï"; - o["HistoryBack"] = "Îòìåíèòü"; - o["HistoryForward"] = "Ïîâòîðèòü"; - o["TextColor"] = "Öâåò òåêñòà"; - o["BackgroundColor"] = "Öâåò ôîíà"; - - o["RemoveColspan"] = "Óáðàòü îáúåäèíåíèå ñòîëáöîâ"; - o["RemoveRowspan"] = "Óáðàòü îáúåäèíåíèå ñòðîê"; - o["IncreaseColspan"] = "Îáúåäèíèòü ñòîëáöû"; - o["IncreaseRowspan"] = "Îáúåäèíèòü ñòðîêè"; - o["AddColumn"] = "Äîáàâèòü Ñòîëáåö"; - o["AddRow"] = "Äîáàâèòü Ñòðîêó"; - o["RemoveColumn"] = "Óäàëèòü Ñòîëáåö"; - o["RemoveRow"] = "Óäàëèòü Ñòðîêó"; - - // Label Text - o["Style"] = "Ñòèëü"; - o["Font"] = "Øðèôò"; - o["Size"] = "Ðàçìåð"; - o["Source"] = " âèäå HTML"; - - // Titles - o["SourceTitle"] = "Ùåëêíèòå çäåñü äëÿ ïåðåêþ÷åíèÿ ìåæäó WYSIWYG and ïðîñìîòðîì â âèäå HTML."; - -//////////////////////////////////////////////////////////////////////////////// -// -// Türkçe -// Fatih BOY tarafindan Türkçeye çevirilmistir. -// -// Turkish -// Translated into Turkish by Fatih BOY -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["tr"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Konuyu Gönder"; - o["Cut"] = "Kes"; - o["Copy"] = "Kopyala"; - o["Paste"] = "Yapýþtýr"; - o["SpellCheck"] = "Dil Kontrolü"; - o["SelectAll"] = "Hepsini Seç"; - o["RemoveFormatting"] = "Biçimlemeyi Kaldýr"; - o["InsertLink"] = "Köprü Ekle"; - //o["InsertLink"] = "Link Ekle"; - o["RemoveLink"] = "Köprüyü Kaldýr"; - //o["RemoveLink"] = "Link'i Kaldýr"; - o["InsertImage"] = "Resim Ekle"; - o["InsertTable"] = "Tablo Ekle"; - o["EditTable"] = "Tabloyu Düzenle"; - o["InsertLine"] = "Yatay Çizgi Ekle"; - o["InsertSmily"] = "Gülümseme Ekle 8-)"; - o["InsertCharacter"] = "Özel Karakter Ekle"; - o["About"] = "Richtext Editörü Hakkýnda"; - o["Bold"] = "Kalýn"; - o["Italic"] = "Yatay"; - o["Underline"] = "Altý çizili"; - o["Strikethrough"] = "Çizili"; - o["AlignLeft"] = "Sola Daya"; - o["Center"] = "Ortala"; - o["AlignRight"] = "Saða Daya"; - o["AlignBlock"] = "Blokla"; - o["NumberedList"] = "Numaralý Liste"; - o["BulettedList"] = "Buletted Liste"; - o["DecreaseIndent"] = "Satýr aralýðýný Azalt"; - o["IncreaseIndent"] = "Satýr Aralýðýný Arttýr"; - o["HistoryBack"] = "Geçmiþ - Geri"; - o["HistoryForward"] = "Geçmiþ - Ýleri"; - o["TextColor"] = "Yazý Rengi"; - o["BackgroundColor"] = "Artalan Rengi"; - - o["RemoveColspan"] = "Colspan'ý Kaldýr"; - o["RemoveRowspan"] = "Rowspan'ý Kaldýr"; - o["IncreaseColspan"] = "Colspan'ý Arttýr"; - o["IncreaseRowspan"] = "Rowspan'ý Arttýr"; - o["AddColumn"] = "Sütunu Kaldýr"; - o["AddRow"] = "Satýr Ekle"; - o["RemoveColumn"] = "Sütun Ekle"; - o["RemoveRow"] = "Satýrý Kaldýr"; - - // Label Text - o["Style"] = "Stil"; - o["Font"] = "Font"; - o["Size"] = "Boyut"; - o["Source"] = "Kaynak"; - - // Titles - o["SourceTitle"] = "Editör ile kaynak modlarý arasýnda geçiþ için týklayýnýz."; - - // Image Sources - o["icon_post"] = "images/lang/tr.icon_post.gif"; - o["hdr_tables"] = "images/lang/tr.hdr_tables.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Italiano: delmazza@a99.it - Angelo Del Mazza - Area99 http://www.a99.it -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["it"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Invia Articolo"; - o["Cut"] = "Taglia"; - o["Copy"] = "Copia"; - o["Paste"] = "Incolla"; - o["SpellCheck"] = "Controlla Ortografia"; - o["SelectAll"] = "Seleziona Tutto"; - o["RemoveFormatting"] = "Rimuovi Formattazione"; - o["InsertLink"] = "Insrisci Link"; - o["RemoveLink"] = "Rimuovi Link"; - o["InsertImage"] = "Inserisci Immagine"; - o["InsertTable"] = "Inserisci Tabella"; - o["EditTable"] = "Modifica Tabella"; - o["InsertLine"] = "Inserisci Linea Orizzontale"; - o["InsertSmily"] = "Inserisci Smily 8-)"; - o["InsertCharacter"] = "Inserisci Carattere Speciale"; - o["About"] = "Info su Richtext Editor"; - o["Bold"] = "Grassetto"; - o["Italic"] = "Italico"; - o["Underline"] = "Sottolineato"; - o["Strikethrough"] = "Barrato"; - o["AlignLeft"] = "Allinea a Sinistra"; - o["Center"] = "Centrato"; - o["AlignRight"] = "Alline a Destra"; - o["AlignBlock"] = "Allinea Blocco"; - o["NumberedList"] = "Elenco Numerato"; - o["BulettedList"] = "Elenco Puntato"; - o["DecreaseIndent"] = "Diminuisci Rientro"; - o["IncreaseIndent"] = "Incrementa Rientro"; - o["HistoryBack"] = "Indietro"; - o["HistoryForward"] = "Avanti"; - o["TextColor"] = "Colore Testo"; - o["BackgroundColor"] = "Colore Sfondo"; - - o["RemoveColspan"] = "Rimuovi Colspan"; - o["RemoveRowspan"] = "Rimuovi Rowspan"; - o["IncreaseColspan"] = "Incrementa Colspan"; - o["IncreaseRowspan"] = "Incrementa Rowspan"; - o["AddColumn"] = "Aggiungi Colonna"; - o["AddRow"] = "Aggiungi Riga"; - o["RemoveColumn"] = "Rimuovi Colonna"; - o["RemoveRow"] = "Rimuovi Riga"; - - // Label Text - o["Style"] = "Stile"; - o["Font"] = "Carattere"; - o["Size"] = "Dimensione"; - o["Source"] = "Sorgente"; - - // Titles - o["SourceTitle"] = "Clicca per passare in modalità WYSIWYG o Sorgente"; - - // Image Sources - o["icon_post"] = "images/lang/it.icon_post.gif"; - o["hdr_tables"] = "images/hdr_tables.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Dutch Translation - Courtesy of FlevOOware, Marja Ribbers-de Vroed -// -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["nl"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Opslaan"; - o["Cut"] = "Knippen"; - o["Copy"] = "Kopieren"; - o["Paste"] = "Plakken"; - o["SpellCheck"] = "Controleer spelling"; - o["SelectAll"] = "Selecteer alles"; - o["RemoveFormatting"] = "Opmaak verwijderen"; - o["InsertLink"] = "Link invoegen"; - o["RemoveLink"] = "Link verwijderen"; - o["InsertImage"] = "Afbeelding invoegen"; - o["InsertTable"] = "Tabel invoegen"; - o["EditTable"] = "Tabel wijzigen"; - o["InsertLine"] = "Horizontale lijn invoegen"; - o["InsertSmily"] = "Smiley 8-) invoegen"; - o["InsertCharacter"] = "Karakter invoegen"; - o["About"] = "Over Richtext Editor"; - o["Bold"] = "Vet"; - o["Italic"] = "Cursief"; - o["Underline"] = "Onderstreept"; - o["Strikethrough"] = "Doorgehaald"; - o["AlignLeft"] = "Links uitlijnen"; - o["Center"] = "Centreren"; - o["AlignRight"] = "Rechts uitlijnen"; - o["AlignBlock"] = "Uitlijnen als blok"; - o["NumberedList"] = "Lijst met nummering"; - o["BulettedList"] = "Lijst met opsommingstekens"; - o["DecreaseIndent"] = "Inspringing verkleinen"; - o["IncreaseIndent"] = "Inspringing vergroten"; - o["HistoryBack"] = "Herstel"; - o["HistoryForward"] = "Opnieuw"; - o["TextColor"] = "Tekstkleur"; - o["BackgroundColor"] = "Achtergrondkleur"; - - o["RemoveColspan"] = "Verwijder Colspan"; - o["RemoveRowspan"] = "Verwijder Rowspan"; - o["IncreaseColspan"] = "Verhoog Colspan"; - o["IncreaseRowspan"] = "Verlaag Rowspan"; - o["AddColumn"] = "Voeg kolom toe"; - o["AddRow"] = "Voeg rij toe"; - o["RemoveColumn"] = "Verwijder kolom"; - o["RemoveRow"] = "Verwijder rij"; - - // Label Text - o["Style"] = "Stijl"; - o["Font"] = "Lettertype"; - o["Size"] = "Grootte"; - o["Source"] = "HTML-brontekst"; - - // Titles - o["SourceTitle"] = "Klik hier om te wisselen tussen WYSIWYG-en HTML-brontekst-modus."; - - // Image Sources - o["icon_post"] = "images/icon_post.gif"; - o["hdr_tables"] = "images/hdr_tables.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Portuguese (Brazilian) -// Courtesy of Ricardo Colombani de Sousa -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["pt-br"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Enviar"; - o["Cut"] = "Recortar"; - o["Copy"] = "Copiar"; - o["Paste"] = "Colar"; - o["SpellCheck"] = "Corretor Ortográfico"; - o["SelectAll"] = "Selecionar Tudo"; - o["RemoveFormatting"] = "Remover Formatação"; - o["InsertLink"] = "Inserir Link"; - o["RemoveLink"] = "Remover Link"; - o["InsertImage"] = "Inserir Imagem"; - o["InsertTable"] = "Inserir Tabela"; - o["EditTable"] = "Editar Tabela"; - o["InsertLine"] = "Inserir Linha Horizontal"; - o["InsertSmily"] = "Inserir Emoticon 8-)"; - o["InsertCharacter"] = "Inserir caráter Especial"; - o["About"] = "Sobre o Richtext Editor"; - o["Bold"] = "Negrito"; - o["Italic"] = "Itálico"; - o["Underline"] = "Sublinhado"; - o["Strikethrough"] = "Riscado"; - o["AlignLeft"] = "Alinhar à Esquerda"; - o["Center"] = "Centralizar"; - o["AlignRight"] = "Alinhar à Direita"; - o["AlignBlock"] = "Justificar"; - o["NumberedList"] = "Lista Numerada"; - o["BulettedList"] = "Lista com Marcadores"; - o["DecreaseIndent"] = "Diminuir Identação"; - o["IncreaseIndent"] = "Aumentar Identação"; - o["HistoryBack"] = "Desfazer"; - o["HistoryForward"] = "Refazer"; - o["TextColor"] = "Cor de Texto"; - o["BackgroundColor"] = "Cor de Fundo"; - - o["RemoveColspan"] = "Remover Colspan"; - o["RemoveRowspan"] = "Remover Rowspan"; - o["IncreaseColspan"] = "Aumentar Colspan"; - o["IncreaseRowspan"] = "Aumentar Rowspan"; - o["AddColumn"] = "Adicionar Coluna"; - o["AddRow"] = "Adicionar Linha"; - o["RemoveColumn"] = "Remover Coluna"; - o["RemoveRow"] = "Remover Linha"; - - // Label Text - o["Style"] = "Estilo"; - o["Font"] = "Fonte"; - o["Size"] = "Tamanho"; - o["Source"] = "Código fonte"; - - // Titles - o["SourceTitle"] = "Clique aqui para alternar entre modo de edição e modo código fonte."; - - // Image Sources - o["icon_post"] = "images/lang/br.icon_post.gif"; - o["hdr_tables"] = "images/lang/br.hdr_tables.gif"; - o["icon_bold"] = "images/lang/br.icon_bold.gif"; - o["icon_italic"] = "images/icon_italic.gif"; - o["icon_underline"] = "images/lang/br.icon_underline.gif"; - -//////////////////////////////////////////////////////////////////////////////// -// -// Danish - translated by Morten Flyger (flyger@email.dk) -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["da"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Gem"; - o["Cut"] = "Klip"; - o["Copy"] = "Kopiere"; - o["Paste"] = "Indsæt"; - o["SpellCheck"] = "Stavekontrol"; - o["SelectAll"] = "Markere alt"; - o["RemoveFormatting"] = "Fjern formatering"; - o["InsertLink"] = "Indsæt link"; - o["RemoveLink"] = "Fjern link"; - o["InsertImage"] = "Indsæt billede"; - o["InsertTable"] = "Indsæt tabel"; - o["EditTable"] = "Ændre tabel"; - o["InsertLine"] = "Indsæt horisontal linje"; - o["InsertSmily"] = "Indsæt smily 8-)"; - o["InsertCharacter"] = "Indsæt specialtegn"; - o["About"] = "Om Richtext Editor"; - o["Bold"] = "Fed"; - o["Italic"] = "Kursiv"; - o["Underline"] = "Understregning"; - o["Strikethrough"] = "Gennemstregning"; - o["AlignLeft"] = "Venstrejustering"; - o["Center"] = "Centrering"; - o["AlignRight"] = "Højrejustering"; - o["AlignBlock"] = "Blokjustering"; - o["NumberedList"] = "Nummereret liste"; - o["BulettedList"] = "Punktopstilling"; - o["DecreaseIndent"] = "Mindske indrykningsværdi"; - o["IncreaseIndent"] = "Øge indrykningsværdi"; - o["HistoryBack"] = "Historie tilbage"; - o["HistoryForward"] = "Historie frem"; - o["TextColor"] = "Tekstfarve"; - o["BackgroundColor"] = "Baggrundsfarve"; - - // Label Text - o["Style"] = "Stil"; - o["Font"] = "Type"; - o["Size"] = "Størrelse"; - o["Source"] = "Kilde"; - - // Titles - o["SourceTitle"] = "Klik her for at skifte imellem WYSIWYG og kilde fremtrædelsesform."; - - // Image Sources - o["icon_post"] = "images/lang/no.icon_post.gif"; - o["icon_bold"] = "images/lang/da_icon_bold.gif"; - o["icon_italic"] = "images/lang/da_icon_italic.gif"; - o["icon_underline"] = "images/lang/da_icon_underline.gif"; - - -//////////////////////////////////////////////////////////////////////////////// -// -// Español (es-mx) -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["es-mx"] = new Object; - - - // Icon Titles (alt="") - o["PostTopic"] = "Colcar"; - o["Cut"] = "Cortar"; - o["Copy"] = "Copiar"; - o["Paste"] = "Pegar"; - o["SpellCheck"] = "Checar orografía"; - o["SelectAll"] = "Seleccionar todo"; - o["RemoveFormatting"] = "Quitar formato"; - o["InsertLink"] = "Insertar liga"; - o["RemoveLink"] = "Quitar liga"; - o["InsertImage"] = "Insertar imagen"; - o["InsertTable"] = "Insertar tabla"; - o["EditTable"] = "Editar tabla"; - o["InsertLine"] = "Insertar línea horizontal"; - o["InsertSmily"] = "Insertar carita 8-)"; - o["InsertCharacter"] = "Insertar caracter especial"; - o["About"] = "Sobre el editor"; - o["Bold"] = "Negrita"; - o["Italic"] = "Cursiva"; - o["Underline"] = "Subrayado"; - o["Strikethrough"] = "Tachado"; - o["AlignLeft"] = "Alinear a la izquierda"; - o["Center"] = "Centrar"; - o["AlignRight"] = "Alinear a la derecha"; - o["AlignBlock"] = "Alinear justificado"; - o["NumberedList"] = "Lista numerada"; - o["BulettedList"] = "Lista no numerada"; - o["DecreaseIndent"] = "Sangría decreciente"; - o["IncreaseIndent"] = "Sangría creciente"; - o["HistoryBack"] = "Deshacer"; - o["HistoryForward"] = "Rehacer"; - o["TextColor"] = "Color de texto"; - o["BackgroundColor"] = "Color de fondo"; - - o["RemoveColspan"] = "Separar columnas"; - o["RemoveRowspan"] = "Separar filas"; - o["IncreaseColspan"] = "Juntar columnas"; - o["IncreaseRowspan"] = "Juntar filas"; - o["AddColumn"] = "Agregar columnas"; - o["AddRow"] = "Agregar fila"; - o["RemoveColumn"] = "Quitar columna"; - o["RemoveRow"] = "Quitar fila"; - - // Label Text - o["Style"] = "Est."; - o["Font"] = "Fte."; - o["Size"] = "Tam."; - o["Source"] = "Cód."; - - // Titles - o["SourceTitle"] = "Cambiar entre editor visual y de código fuente."; - - // Image Sources - o["icon_post"] = "images/icon_post.gif"; - o["hdr_tables"] = "images/hdr_tables.gif"; - - -//////////////////////////////////////////////////////////////////////////////// -// -// Español Alfabetización Internacional (es-es) Traducción de Emmanuelle //Gutiérrez (emmanuelle@sidar.org) -// -//////////////////////////////////////////////////////////////////////////////// - -var o = locale["es"] = locale["es-es"] = new Object; - - // Icon Titles (alt="") - o["PostTopic"] = "Responder"; - o["Cut"] = "Cortar"; - o["Copy"] = "Copiar"; - o["Paste"] = "Pegar"; - o["SpellCheck"] = "Revisión ortográfica"; - o["SelectAll"] = "Seleccionar todo"; - o["RemoveFormatting"] = "Eliminar formato"; - o["InsertLink"] = "Insertar enlace"; - o["RemoveLink"] = "Eliminar enlace"; - o["InsertImage"] = "Insertar Imagen"; - o["InsertTable"] = "Insertar Tabla"; - o["EditTable"] = "Editar Tabla"; - o["InsertLine"] = "Insertar línea horizontal"; - o["InsertSmily"] = "Insertar Emoticon 8-)"; - o["InsertCharacter"] = "Insertar carácter especial"; - o["About"] = "Acerca del Editor de texto enriquecido"; - o["Bold"] = "Negrita"; - o["Italic"] = "Itálica"; - o["Underline"] = "Subrayado"; - o["Strikethrough"] = "Tachado"; - o["AlignLeft"] = "Alinear a la izquierda"; - o["Center"] = "Centrado"; - o["AlignRight"] = "Alinear a la derecha"; - o["AlignBlock"] = "Alinear bloque"; - o["NumberedList"] = "Lista numerada"; - o["BulettedList"] = "Lista con viñetas"; - o["DecreaseIndent"] = "Disminuir sangrado"; - o["IncreaseIndent"] = "Incrementar sangrado"; - o["HistoryBack"] = "Deshacer"; - o["HistoryForward"] = "Rehacer"; - o["TextColor"] = "Color del Texto"; - o["BackgroundColor"] = "Color del Fondo"; - - o["RemoveColspan"] = "Separar Columnas"; - o["RemoveRowspan"] = "Separar Filas"; - o["IncreaseColspan"] = "Juntar Columnas"; - o["IncreaseRowspan"] = "Juntar Filas"; - o["AddColumn"] = "Añadir Columna"; - o["AddRow"] = "Añadir Fila"; - o["RemoveColumn"] = "Eliminar Columna"; - o["RemoveRow"] = "Eliminar Fila"; - - // Label Text - o["Style"] = "Estilo"; - o["Font"] = "Fuente"; - o["Size"] = "Tamaño"; - o["Source"] = "Código"; - - // Titles - o["SourceTitle"] = "Cambiar entre vista edición y código."; - - // Image Sources - o["icon_post"] = "images/icon_post.gif"; - o["hdr_tables"] = "images/hdr_tables.gif"; - -//////////////////////////////////////////////////////////////////////////// - diff --git a/lib/rte/rte_xhtml.js b/lib/rte/rte_xhtml.js deleted file mode 100644 index dbde1458e4..0000000000 --- a/lib/rte/rte_xhtml.js +++ /dev/null @@ -1,185 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// HTML Text Editing Component for hosting in Web Pages -// Copyright (C) 2001 Ramesys (Contracting Services) Limited -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU LesserGeneral Public License -// along with this program; if not a copy can be obtained from -// -// http://www.gnu.org/copyleft/lesser.html -// -// or by writing to: -// -// Free Software Foundation, Inc. -// 59 Temple Place - Suite 330, -// Boston, -// MA 02111-1307, -// USA. -// -// Original Developer: -// -// Austin David France -// Ramesys (Contracting Services) Limited -// Mentor House -// Ainsworth Street -// Blackburn -// Lancashire -// BB1 6AY -// United Kingdom -// email: Austin.France@Ramesys.com -// -// Home Page: http://richtext.sourceforge.net/ -// Support: http://richtext.sourceforge.net/ -// -//////////////////////////////////////////////////////////////////////////////// -// -// Author(s): austin.france@ramesys.com OZ -// -//////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////// -// -// Description: -// Escape XHTML text -// - -function escapeXHTML(str) -{ - return str.replace(/[&]/g, "&") - .replace(/[<]/g, "<") - .replace(/[>]/g, ">") - ; -} - -function escapeXHTMLAttribute(str) -{ - return str.replace(/[\"]/g, """); -} - -/////////////////////////////////////////////////////////////////////////// -// -// Description: -// Return the XHTML attribute list (space separated) for the given element -// -// Notes: -// The ignore list is a JavaScript Regular expression that matches those -// attribute that should not be output. -// - -function innerXHTMLAttributes(el, ignore) -{ - // Start with an empty attribute list - var str = ''; - - // Output attributes for the element - for (var i = 0; i < el.attributes.length; i++) - { - // Get this attribute - var attr = el.attributes[i]; - - // Only output if it has a value of type string - if (attr.nodeValue && typeof(attr.nodeValue) == "string") - { - // and it's not one we want to ignore - if (!ignore || attr.nodeName.toLowerCase().search(ignore) == -1) - { - // Output the attribute (space separated if necessary) - if (str.length) str += ' '; - str += attr.nodeName.toLowerCase(); - str += '="' + escapeXHTMLAttribute(attr.nodeValue) + '"'; - } - } - } - - // Return the resulting attribute string - return str; -} - -/////////////////////////////////////////////////////////////////////////// -// -// Description: -// Get the inner XHTML from the supplied element. -// -// Return Value: -// XHTML string -// -// Notes: -// The ignore list is a JavaScript Regular expression that matches those -// attribute that should not be output. -// - -function innerXHTML(el, ignore) -{ - // Default innerXTHML is empty - var str = ''; - - // Create a text range for the element we are converting to source - var r2; var r = document.body.createTextRange(); - r.moveToElementText(el); - - // Scan the child nodes of this element. - for (var i = 0; i < el.children.length; i++) - { - // Create a text range for this child node - r2 = document.body.createTextRange(); - r2.moveToElementText(el.children[i]); - - // Set the end of our range to the start of this child node. - // so that r.text contains all the text up to this element. - r.setEndPoint("EndToStart", r2); - str += escapeXHTML(r.text); - - // Emit the child node - str += outerXHTML(el.children[i], ignore); - - // Now, reset the text range for the main element and then move - // the start point of our range to the end of the element just - // output in preperation for the next chunk of text (or last chunk - // if this was the last child node) - r.moveToElementText(el); - r.setEndPoint("StartToEnd", r2); - } - - // Output the HTML (if any) plus the last chunk of text (again, if any). - // Note: if no child nodes existed, the r.text contains the entire text - // however, if child nodes did exist, then r.text contains just the - return str + escapeXHTML(r.text); -} - -/////////////////////////////////////////////////////////////////////////// -// -// Description: -// Get the outer XHTML from the supplied element. -// -// Return Value: -// XHTML string -// -// Notes: -// The ignore list is a JavaScript Regular expression that matches those -// attribute that should not be output. -// - -function outerXHTML(el, ignore) -{ - // First, get the attribute values - var attrs = innerXHTMLAttributes(el, ignore); - - // And any inner XHTML - var inner = innerXHTML(el, ignore); - - // Then build the tag. Note: We use the XML abbreviation if the element is empty - return '<' + el.nodeName.toLowerCase() - + (attrs.length ? ' ' + attrs : '') - + (inner.length ? '>' + inner + '' - : ' />'); -} diff --git a/lib/rte/syntax.css b/lib/rte/syntax.css deleted file mode 100644 index 94356c4fc5..0000000000 --- a/lib/rte/syntax.css +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* -** -** HTML Text Editing Component for hosting in Web Pages -** Copyright (C) 2001 Ramesys (Contracting Services) Limited -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU LesserGeneral Public License -** along with this program; if not a copy can be obtained from -** -** http://www.gnu.org/copyleft/lesser.html -** -** or by writing to: -** -** Free Software Foundation, Inc. -** 59 Temple Place - Suite 330, -** Boston, -** MA 02111-1307, -** USA. -** -** Original Developer: -** -** Austin David France -** Ramesys (Contracting Services) Limited -** Mentor House -** Ainsworth Street -** Blackburn -** Lancashire -** BB1 6AY -** United Kingdom -** email: Austin.France@Ramesys.com -** -** Home Page: http://richtext.sourceforge.net/ -** Support: http://richtext.sourceforge.net/ -** -*******************************************************************************/ - -.ccp_paramvalue { - color : #0000FF ; - font-family : "Courier New"; - font-size : 13px; -} -.ccp_htmlcomment { - color : #808080 ; - font-family : "Courier New"; - font-size : 12px; - font-style : italic; -} -.ccp_tag { - color : #000080; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_img { - color : #800080; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_A { - color : #008000; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_form { - color : #FF8000; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_table { - color : #008080; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_entity { - color : #000000; - font-family : "Courier New"; - font-size : 12px; - font-weight : bold; -} -.ccp_styletag { - color : #800080; - font-family : "Courier New"; - font-size : 12px; -} -.ccp_styleitem { - color : #800080; - font-family : "Courier New"; - font-size : 12px; -} diff --git a/lib/rte/tableEditor.js b/lib/rte/tableEditor.js deleted file mode 100644 index e40c668f70..0000000000 --- a/lib/rte/tableEditor.js +++ /dev/null @@ -1,743 +0,0 @@ -/////////////////////////////////////////////////////////////// -// Table Editing Class -// Author: Billy Cook (wcook@nuvox.net) -// Date: 2002-05-07 -// Purpose: Provide methods to edit a table. Only -// works in Internet Explorer version 5.5 -// and above for now. -// - -function tableEditor(docID, pntCell) { - - this.docID = docID; // ID of editable portion of document - this.pntCell = pntCell; // TD contentarea is contained in if any - this.tableCell = null; // cell currently selected - this.tableElem = null; // table currently selected - this.cellResizeObj = null; // object that user clicks on to resize cell - this.cellWidth = null; // selected cell's current width - this.cellHeight = null; // selected cell's current height - this.cellX = null; // x coord of selected cell's bottom right - this.cellY = null; // y coord of selected cell's bottom right - this.moveable = null; // moveable div - - // define methods only once - if (typeof(_tableEditor_prototype_called) == 'undefined') { - _tableEditor_prototype_called = true; - - // public methods - tableEditor.prototype.mergeDown = mergeDown; - tableEditor.prototype.unMergeDown = unMergeDown; - tableEditor.prototype.mergeRight = mergeRight; - tableEditor.prototype.splitCell = splitCell; - tableEditor.prototype.addCell = addCell; - tableEditor.prototype.removeCell = removeCell; - tableEditor.prototype.processRow = processRow; - tableEditor.prototype.processColumn = processColumn; - tableEditor.prototype.buildTable = buildTable; - tableEditor.prototype.setTableElements = setTableElements; - tableEditor.prototype.unSetTableElements = unSetTableElements; - tableEditor.prototype.setDrag = setDrag; - tableEditor.prototype.stopCellResize = stopCellResize; - tableEditor.prototype.markCellResize = markCellResize; - tableEditor.prototype.resizeCell = resizeCell; - tableEditor.prototype.changePos = changePos; - tableEditor.prototype.resizeColumn = resizeColumn; - tableEditor.prototype.resizeRow = resizeRow; - tableEditor.prototype.repositionArrows = repositionArrows; - tableEditor.prototype.explore = explore; - - // private methods - tableEditor.prototype.__addOrRemoveCols = __addOrRemoveCols; - tableEditor.prototype.__findParentTable = __findParentTable; - tableEditor.prototype.__hideArrows = __hideArrows; - tableEditor.prototype.__showArrows = __showArrows; - tableEditor.prototype.__resizeColumn = __resizeColumn; - } - - // create divs for editing cell width and height - document.body.innerHTML += ' '; - - - - //////////////////////////////////////////////////////////////// - // method: setTableElements - // args: none - // purpose: look to see if the cursor is inside a TD or TABLE and - // if so assign the TD to this.tableCell or the TABLE to - // this.tableElem - // - function setTableElements(){ - - // stop resizing cell if already resizing one - this.stopCellResize(true); - this.tableCell = null; - - cursorPos=document.selection.createRange(); - - if (document.selection.type == 'Text') { - var elt = cursorPos.parentElement(); - while (elt) { - if (elt.tagName == "TD") { - break; - } - elt = elt.parentElement; - } - - - if (elt) { - // don't select document area - if (elt.id == this.docID) - return; - - // don't select parent TD - if (this.pntCell) - if (this.pntCell == elt.id) - return; - - this.tableCell = elt; - - // set width and height as globals for - // resizing - this.cellWidth = this.tableCell.offsetWidth; - this.cellHeight = this.tableCell.offsetHeight; - this.__showArrows(); - } - } else { - if (cursorPos.length == 1) { - if (cursorPos.item(0).tagName == "TABLE") { - this.tableElem = cursorPos.item(0); - this.__hideArrows(); - this.tableCell = null; - } - } - } - } - - //////////////////////////////////////////////////////////////// - // method: unSetTableElements - // args: none - // purpose: unset references to currently selected cell or table - // - function unSetTableElements(){ - - this.tableCell = null; - this.tableElem = null; - return; - } - - //////////////////////////////////////////////////////////////// - // method: mergeDown - // args: none - // purpose: merge the currently selected cell with the one below it - // - function mergeDown() { - if (!this.tableCell) - return; - - if (!this.tableCell.parentNode.nextSibling) { - alert("There is not a cell below this one to merge with."); - return; - } - - var topRowIndex = this.tableCell.parentNode.rowIndex; - - // [ TD ] [ TR ] [ TBODY ] [ TR ] [ TD ] - var bottomCell = this.tableCell.parentNode.parentNode.childNodes[ topRowIndex + this.tableCell.rowSpan ].childNodes[ this.tableCell.cellIndex ]; - - if (!bottomCell) { - alert("There is not a cell below this one to merge with."); - return; - } - - // don't allow merging rows with different colspans - if (this.tableCell.colSpan != bottomCell.colSpan) { - alert("Can't merge cells with different colSpans."); - return; - } - - // do the merge - this.tableCell.innerHTML += bottomCell.innerHTML; - this.tableCell.rowSpan += bottomCell.rowSpan; - bottomCell.removeNode(true); - this.repositionArrows(); - } - - //////////////////////////////////////////////////////////////// - // method: unMergeDown - // args: none - // purpose: merge the currently selected cell with the one below it - // - function unMergeDown() { - if (!this.tableCell) - return; - - if (this.tableCell.rowSpan <= 1) { - alert("RowSpan is already set to 1."); - return; - } - - var topRowIndex = this.tableCell.parentNode.rowIndex; - - // add a cell to the beginning of the next row - this.tableCell.parentNode.parentNode.childNodes[ topRowIndex + this.tableCell.rowSpan - 1 ].appendChild( document.createElement("TD") ); - - this.tableCell.rowSpan -= 1; - - } - - //////////////////////////////////////////////////////////////// - // method: mergeRight - // args: none - // purpose: merge the currently selected cell with the one to - // the immediate right. Won't allow user to merge cells - // with different rowspans. - // - function mergeRight() { - if (!this.tableCell) - return; - if (!this.tableCell.nextSibling) - return; - - // don't allow user to merge rows with different rowspans - if (this.tableCell.rowSpan != this.tableCell.nextSibling.rowSpan) { - alert("Can't merge cells with different rowSpans."); - return; - } - - this.tableCell.innerHTML += this.tableCell.nextSibling.innerHTML; - this.tableCell.colSpan += this.tableCell.nextSibling.colSpan; - this.tableCell.nextSibling.removeNode(true); - - - this.repositionArrows(); - this.__hideArrows(); - this.tableCell = null; - } - - //////////////////////////////////////////////////////////////// - // method: splitCell - // args: none - // purpose: split the currently selected cell back into two cells - // it the cell has a colspan > 1. - // - function splitCell() { - if (!this.tableCell) - return; - if (this.tableCell.colSpan < 2) { - alert("Cell can't be divided. Add another cell instead"); - return; - } - - this.tableCell.colSpan = this.tableCell.colSpan - 1; - var newCell = this.tableCell.parentNode.insertBefore( document.createElement("TD"), this.tableCell); - newCell.rowSpan = this.tableCell.rowSpan; - this.repositionArrows(); - } - - //////////////////////////////////////////////////////////////// - // method: removeCell - // args: none - // purpose: remove the currently selected cell - // - function removeCell() { - if (!this.tableCell) - return; - - // can't remove all cells for a row - if (!this.tableCell.previousSibling && !this.tableCell.nextSibling) { - alert("You can't remove the only remaining cell in a row."); - return; - } - - this.tableCell.removeNode(false); - - this.repositionArrows(); - this.tableCell = null; - } - - //////////////////////////////////////////////////////////////// - // method: addCell - // args: none - // purpose: add a cell to the right of the selected cell - // - function addCell() { - if (!this.tableCell) - return; - - this.tableCell.parentElement.insertBefore(document.createElement("TD"), this.tableCell.nextSibling); - } - - //////////////////////////////////////////////////////////////// - // method: processRow - // args: (string)action = "add" or "remove" - // purpose: add a row above the row that - // contains the currently selected cell or - // remove the row containing the selected cell - // - function processRow(action) { - if (!this.tableCell) - return; - - // go back to TABLE def and keep track of cell index - var idx = 0; - var rowidx = -1; - var tr = this.tableCell.parentNode; - var numcells = tr.childNodes.length; - - - while (tr) { - if (tr.tagName == "TR") - rowidx++; - tr = tr.previousSibling; - } - // now we should have a row index indicating where the - // row should be added / removed - - var tbl = this.__findParentTable(this.tableCell); - - if (!tbl) { - alert("Could not " + action + " row."); - return; - } - - if (action == "add") { - var r = tbl.insertRow(rowidx); - for (var i = 0; i < numcells; i++) { - var c = r.appendChild( document.createElement("TD") ); - if (this.tableCell.parentNode.childNodes[i].colSpan) - c.colSpan = this.tableCell.parentNode.childNodes[i].colSpan; - } - } else { - tbl.deleteRow(rowidx); - this.stopCellResize(true); - this.tableCell = null; - } - } - - //////////////////////////////////////////////////////////////// - // method: processColumn - // args: (string)action = "add" or "remove" - // purpose: add a column to the right column containing - // the selected cell - // - function processColumn(action) { - if (!this.tableCell) - return; - - // store cell index in a var because the cell will be - // deleted when processing the first row - var cellidx = this.tableCell.cellIndex; - - var tbl = this.__findParentTable(this.tableCell); - - if (!tbl) { - alert("Could not " + action + " column."); - return; - } - - // now we have the table containing the cell - this.__addOrRemoveCols(tbl, cellidx, action); - - // clear out global this.tableCell value for remove - if (action == 'remove') { - this.stopCellResize(true); - this.tableCell = null; - } else { - this.repositionArrows(); - } - } - - //////////////////////////////////////////////////////////////// - // method: __addOrRemoveCols - // args: (table object)tbl, (int)cellidx, (string)action - // tbl = the table containing the selected cell - // cellidx = the index of the selected cell in its row - // action = "add" or "remove" the column - // - // purpose: add or remove the column at the cell index - // - function __addOrRemoveCols(tbl, cellidx, action) { - if (!tbl.childNodes.length) - return; - var i; - for (i = 0; i < tbl.childNodes.length; i++) { - if (tbl.childNodes[i].tagName == "TR") { - var cell = tbl.childNodes[i].childNodes[ cellidx ]; - if (!cell) - break; // can't add cell after cell that doesn't exist - if (action == "add") { - cell.insertAdjacentElement("AfterEnd", document.createElement("TD") ); - } else { - // don't delete too many cells because or a rowspan setting - - if (cell.rowSpan > 1) { - i += (cell.rowSpan - 1); - } - cell.removeNode(true); - } - } else { - // keep looking for a "TR" - this.__addOrRemoveCols(tbl.childNodes[i], cellidx, action); - } - } - } - - //////////////////////////////////////////////////////////////// - // method: __findParentTable - // args: (TD object)cell - // cell = the selected cell object - // - // purpose: locate the table object that contains the - // cell object passed in - // - function __findParentTable(cell) { - var tbl = cell.parentElement - while (tbl) { - if (tbl.tagName == "TABLE") { - return tbl; - } - tbl = tbl.parentElement; - } - return false; - } - - //////////////////////////////////////////////////////////////// - // method: exploreTree - // args: (obj)obj, (obj)pnt - // obj = object to explore - // pnt = object to append output to - // - // purpose: traverse the dom tree printing out all properties - // of the object, its children.....recursive. helpful - // when looking for object properties. - // - function exploreTree(obj, pnt) { - if (!obj.childNodes.length) - return; - var i; - var ul = pnt.appendChild( document.createElement("UL") ); - for (i = 0; i < obj.childNodes.length; i++) { - var li = document.createElement("LI"); - explore(obj.childNodes[i], li); - ul.appendChild(li); - exploreTree(obj.childNodes[i], li); - /* - var n = document.createTextNode(obj.childNodes[i].tagName); - li.appendChild(n); - */ - } - } - - //////////////////////////////////////////////////////////////// - // method: explore - // args: (obj)obj, (obj)pnt - // obj = object to explore - // pnt = object to append output to - // - // purpose: show all properties for the object "obj" - // - function explore(obj, pnt) { - var i; - for (i in obj) { - var n = document.createTextNode(i +"="+obj[i]); - pnt.appendChild(n); - pnt.appendChild( document.createElement("BR") ); - } - } - - //////////////////////////////////////////////////////////////// - // method: buildTable - // args: pnt = parent to append table to - // - // purpose: build a test table for debugging - // - function buildTable(pnt) { - var t = pnt.appendChild( document.createElement("TABLE") ); - t.border=1; - t.cellPadding=2; - t.cellSpacing=0; - var tb = t.appendChild( document.createElement("TBODY") ); - for(var r = 0; r < 10; r++) { - var tr = tb.appendChild( document.createElement("TR") ); - for(var c = 0; c < 10; c++) { - var cell = tr.appendChild( document.createElement("TD") ); - cell.appendChild( document.createTextNode(r+"-"+c) ); - } - } - } - - //////////////////////////////////////////////////////////////// - // method: setDrag - // args: obj = object (DIV) that is currently draggable - // - // purpose: set the object to be moved with the mouse - // - function setDrag(obj) { - if (this.moveable) - this.moveable = null; - else - this.moveable = obj; - } - - - //////////////////////////////////////////////////////////////// - // method: changePos - // args: none - // mouse pointer appear inside the object set by "setDrag" - // function above. - // - // purpose: move the object selected in the "setDrag" function defined - // above. - // - function changePos() { - if (!this.moveable) - return; - - this.moveable.style.posTop = event.clientY - 10; - this.moveable.style.posLeft = event.clientX - 25; - } - - - //////////////////////////////////////////////////////////////// - // method: markCellResize - // args: (object)obj = the square table div object that - // was clicked on by the user to resize a cell - // - // purpose: store the object in "this.cellResizeObj" to be referenced - // in the "resizeCell" function. - // - // - function markCellResize(obj) { - if (this.cellResizeObj) { - this.cellResizeObj = null; - } else { - this.cellResizeObj = obj; - } - } - - //////////////////////////////////////////////////////////////// - // method: stopCellResize - // args: (bool)hideArrows - // - // purpose: stop changing cell width and height - // - function stopCellResize(hidearrows) { - this.cellResizeObj = null; - if (hidearrows) - this.__hideArrows(); - } - - //////////////////////////////////////////////////////////////// - // method: __hideArrows() - // args: none - // - // purpose: hide editing tabs that are positioned in the selected - // cell - // - function __hideArrows() { - document.getElementById("rArrow").style.visibility = 'hidden'; - document.getElementById("dArrow").style.visibility = 'hidden'; - } - - //////////////////////////////////////////////////////////////// - // method: __showArrows() - // args: none - // - // purpose: position editing tabs in the middle or the right cell - // wall and middle of the bottom wall to be used to drag - // the cell's width and height dimensions - // - function __showArrows() { - if (!this.tableCell) - return; - - var cell_hgt = this.tableCell.offsetTop; - var cell_wdt = this.tableCell.offsetLeft; - var par = this.tableCell.offsetParent; - while (par) { - cell_hgt = cell_hgt + par.offsetTop; - cell_wdt = cell_wdt + par.offsetLeft; - current_obj = par; - par = current_obj.offsetParent; - } - this.cellX = cell_wdt + this.tableCell.offsetWidth; //bottom right X - this.cellY = cell_hgt + this.tableCell.offsetHeight; // bottom right Y - - var scrollTop = document.getElementById(this.docID).scrollTop; - var scrollLeft = document.getElementById(this.docID).scrollLeft; - - document.getElementById("rArrow").style.posLeft = cell_wdt + this.tableCell.offsetWidth - 6 - scrollLeft; - document.getElementById("rArrow").style.posTop = cell_hgt + (this.tableCell.offsetHeight / 2) - 2 - scrollTop; - - document.getElementById("dArrow").style.posLeft = cell_wdt + (this.tableCell.offsetWidth / 2) - 2 - scrollLeft; - document.getElementById("dArrow").style.posTop = cell_hgt + this.tableCell.offsetHeight - 6 - scrollTop; - - document.getElementById("rArrow").style.visibility = 'visible'; - document.getElementById("dArrow").style.visibility = 'visible'; - } - - //////////////////////////////////////////////////////////////// - // method: repositionArrows() - // args: none - // - // purpose: reposition editing tabs in the middle or the right cell - // wall and middle of the bottom wall to be used to drag - // the cell's width and height dimensions. this must be - // run while changing the cell's dimensions. - // - function repositionArrows() { - - if (!this.tableCell) - return; - - var cell_hgt = this.tableCell.offsetTop; - var cell_wdt = this.tableCell.offsetLeft; - var par = this.tableCell.offsetParent; - while (par) { - cell_hgt = cell_hgt + par.offsetTop; - cell_wdt = cell_wdt + par.offsetLeft; - current_obj = par; - par = current_obj.offsetParent; - } - - var scrollTop = document.getElementById(this.docID).scrollTop; - var scrollLeft = document.getElementById(this.docID).scrollLeft; - - document.getElementById("rArrow").style.posLeft = cell_wdt + this.tableCell.offsetWidth - 6 - scrollLeft; - document.getElementById("rArrow").style.posTop = cell_hgt + (this.tableCell.offsetHeight / 2) - 2 - scrollTop; - - document.getElementById("dArrow").style.posLeft = cell_wdt + (this.tableCell.offsetWidth / 2) - 2 - scrollLeft; - document.getElementById("dArrow").style.posTop = cell_hgt + this.tableCell.offsetHeight - 6 - scrollTop; - } - - //////////////////////////////////////////////////////////////// - // method: resizeCell() - // args: none - // - // purpose: resize the selected cell based on the direction of the mouse - // - function resizeCell() { - if (!this.cellResizeObj) - return; - - if (this.cellResizeObj.id == 'dArrow') { - var scrollTop = document.getElementById(this.docID).scrollTop; - var newHeight = (event.clientY - (this.cellY - scrollTop) ) + this.cellHeight; - - if (newHeight > 0) - // don't resize entire row if rowspan > 1 - if (this.tableCell.rowSpan > 1) - this.tableCell.style.height = newHeight; - else - this.resizeRow(newHeight); - - this.repositionArrows(); - - } else if (this.cellResizeObj.id == 'rArrow') { - var scrollLeft = document.getElementById(this.docID).scrollLeft; - var newWidth = (event.clientX - (this.cellX - scrollLeft) ) + this.cellWidth; - - if (newWidth > 0) - // don't resize entire column if colspan > 1 - if (this.tableCell.colSpan > 1) - this.tableCell.style.width = newWidth; - else - this.resizeColumn(newWidth); - - this.repositionArrows(); - - } else { - // do nothing - } - } - - //////////////////////////////////////////////////////////////// - // method: resizeRow - // args: (int)size - // purpose: set cell.style.height on all cells in a row that - // have rowspan = 1 - // - function resizeRow(size) { - if (!this.tableCell) - return; - - // go back to TABLE def and keep track of cell index - var idx = 0; - var rowidx = -1; - var tr = this.tableCell.parentNode; - var numcells = tr.childNodes.length; - - while (tr) { - if (tr.tagName == "TR") - rowidx++; - tr = tr.previousSibling; - } - // now we should have a row index indicating where the - // row should be added / removed - - var tbl = this.__findParentTable(this.tableCell); - - if (!tbl) { - return; - } - - // resize cells in the row - for (var j = 0; j < tbl.rows(rowidx).cells.length; j++) { - if (tbl.rows(rowidx).cells(j).rowSpan == 1) - tbl.rows(rowidx).cells(j).style.height = size; - } - } - - - //////////////////////////////////////////////////////////////// - // method: resizeColumn - // args: (int)size = size in pixels - // purpose: set column width - // - function resizeColumn(size) { - if (!this.tableCell) - return; - - // store cell index in a var because the cell will be - // deleted when processing the first row - var cellidx = this.tableCell.cellIndex; - - var tbl = this.__findParentTable(this.tableCell); - - if (!tbl) { - alert("Could not resize column."); - return; - } - - // now we have the table containing the cell - this.__resizeColumn(tbl, cellidx, size); - } - - //////////////////////////////////////////////////////////////// - // method: __resizeColumn - // args: (table object)tbl, (int)cellidx, (int)size - // tbl = the table containing the selected cell - // cellidx = the index of the selected cell in its row - // size = size in pixels - // - // purpose: resize all cells in the a column - // - function __resizeColumn(tbl, cellidx, size) { - if (!tbl.childNodes.length) - return; - var i; - for (i = 0; i < tbl.childNodes.length; i++) { - if (tbl.childNodes[i].tagName == "TR") { - var cell = tbl.childNodes[i].childNodes[ cellidx ]; - if (!cell) - break; // can't add cell after cell that doesn't exist - - if (cell.colSpan == 1) - cell.style.width = size; - } else { - // keep looking for a "TR" - this.__resizeColumn(tbl.childNodes[i], cellidx, size); - } - } - } -} diff --git a/lib/weblib.php b/lib/weblib.php index 1ee5786dbf..c6747a567d 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -799,6 +799,9 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta= } } + // Add a stylesheet for the HTML editor + $meta = "\n$meta\n"; + // Specify character set ... default is iso-8859-1 but some languages might need something else // Could be optimised by carrying the charset variable around in $USER if (current_language() == "en") { @@ -1268,10 +1271,11 @@ function make_table($table) { return $output; } -function print_textarea($richedit, $rows, $cols, $width, $height, $name, $value="", $courseid=0) { -/// Prints a richtext field or a normal textarea +function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $value="", $courseid=0) { +/// Prints a basic textarea field +/// $width and height are legacy fields and no longer used - global $CFG, $THEME, $course; + global $CFG, $course; if (empty($courseid)) { if (!empty($course->id)) { // search for it in global context @@ -1279,69 +1283,49 @@ function print_textarea($richedit, $rows, $cols, $width, $height, $name, $value= } } - if ($richedit) { - if (!empty($CFG->useneweditor)) { /// Use the new HTMLarea editor + if ($usehtmleditor) { + if (!empty($courseid) and isteacher($courseid)) { + echo "\n"; + } else { + echo "\n"; + } + echo "\n"; + echo "\n"; + echo "\n"; - if (!empty($courseid) and isteacher($courseid)) { - echo "\n"; - } else { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if ($rows < 20) { - $rows = 20; /// Minimum rows - } - if ($cols < 65) { - $cols = 65; /// Minimum columns - } - echo "\n"; - - } else { /// Use the old Richtext editor - $richediturl = "$CFG->wwwroot/lib/rte/richedit.html"; - if (!empty($courseid) and isteacher($courseid)) { - $richediturl = "$CFG->wwwroot/lib/rte/richedit.php?id=$courseid"; - } - - echo "\n"; - echo "\n"; + if ($rows < 20) { + $rows = 20; + } + if ($cols < 65) { + $cols = 65; } - } else { - echo "\n"; } + + echo "\n"; } function print_richedit_javascript($form, $name, $source="no") { - global $CFG; +/// Legacy function, provided for backward compatability + use_html_editor($name); +} + +function use_html_editor($name="") { +/// Sets up the HTML editor on textareas in the current page. +/// If a field name is provided, then it will only be +/// applied to that field - otherwise it will be used +/// on every textarea in the page. +/// +/// In most cases no arguments need to be supplied - if (!empty($CFG->useneweditor)) { /// Use the new HTMLarea editor - echo "\n"; - - } else { /// Use the old Richtext editor - echo ""; + echo ""; }