summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-11-23 13:58:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2007-11-23 13:58:40 +0100
commitae112d8c54bbccff31a9c9bd59ef9b3db8a70582 (patch)
tree06bd4f197702bf3d557898059299a70c691baf4d /lib
parentffb3531a64367fc1ea179fddab045672312a3072 (diff)
downloadrpg-ae112d8c54bbccff31a9c9bd59ef9b3db8a70582.tar.gz
rpg-ae112d8c54bbccff31a9c9bd59ef9b3db8a70582.tar.bz2
Spellchecker removed
With spell checkers available in all modern browsers, having a spell checker in DokuWiki's core code is no longer necessary. This patch removes the spell checking feature. It will be made available as optional plugin. darcs-hash:20071123125840-7ad00-faf7aa4673421dbb3fad904ba5b46b4927a5176d.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/js.php14
-rw-r--r--lib/exe/spellcheck.php302
-rw-r--r--lib/images/toolbar/spellcheck.pngbin558 -> 0 bytes
-rw-r--r--lib/images/toolbar/spellnoerr.pngbin593 -> 0 bytes
-rw-r--r--lib/images/toolbar/spellstop.pngbin576 -> 0 bytes
-rw-r--r--lib/images/toolbar/spellwait.gifbin3035 -> 0 bytes
-rw-r--r--lib/plugins/config/lang/bg/lang.php1
-rw-r--r--lib/plugins/config/lang/ca/lang.php1
-rw-r--r--lib/plugins/config/lang/cs/lang.php1
-rw-r--r--lib/plugins/config/lang/da/lang.php1
-rw-r--r--lib/plugins/config/lang/de/lang.php1
-rw-r--r--lib/plugins/config/lang/el/lang.php1
-rw-r--r--lib/plugins/config/lang/en/lang.php1
-rw-r--r--lib/plugins/config/lang/eo/lang.php1
-rw-r--r--lib/plugins/config/lang/es/lang.php1
-rw-r--r--lib/plugins/config/lang/fr/lang.php1
-rw-r--r--lib/plugins/config/lang/gl/lang.php1
-rw-r--r--lib/plugins/config/lang/he/lang.php1
-rw-r--r--lib/plugins/config/lang/it/lang.php1
-rw-r--r--lib/plugins/config/lang/ja/lang.php1
-rw-r--r--lib/plugins/config/lang/ko/lang.php1
-rw-r--r--lib/plugins/config/lang/nl/lang.php1
-rw-r--r--lib/plugins/config/lang/no/lang.php1
-rw-r--r--lib/plugins/config/lang/pl/lang.php1
-rw-r--r--lib/plugins/config/lang/pt-br/lang.php1
-rw-r--r--lib/plugins/config/lang/ru/lang.php1
-rw-r--r--lib/plugins/config/lang/sv/lang.php1
-rw-r--r--lib/plugins/config/lang/uk/lang.php1
-rw-r--r--lib/plugins/config/lang/zh/lang.php1
-rw-r--r--lib/plugins/config/settings/config.metadata.php1
-rw-r--r--lib/scripts/spellcheck.js456
-rw-r--r--lib/styles/spellcheck.css21
-rw-r--r--lib/tpl/default/design.css32
33 files changed, 0 insertions, 849 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php
index c4fd81616..ad166da8d 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -50,9 +50,6 @@ function js_out(){
if($edit){
if($write){
$files[] = DOKU_INC.'lib/scripts/edit.js';
- if($conf['spellchecker']){
- $files[] = DOKU_INC.'lib/scripts/spellcheck.js';
- }
}
$files[] = DOKU_INC.'lib/scripts/media.js';
}
@@ -118,17 +115,6 @@ function js_out(){
// add lock timer
js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")");
-
- // load spell checker
- if($conf['spellchecker']){
- js_runonstart("ajax_spell.init('".
- js_escape($lang['spell_start'])."','".
- js_escape($lang['spell_stop'])."','".
- js_escape($lang['spell_wait'])."','".
- js_escape($lang['spell_noerr'])."','".
- js_escape($lang['spell_nosug'])."','".
- js_escape($lang['spell_change'])."')");
- }
}
}
diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php
deleted file mode 100644
index 01c70832e..000000000
--- a/lib/exe/spellcheck.php
+++ /dev/null
@@ -1,302 +0,0 @@
-<?php
-/**
- * DokuWiki Spellcheck AJAX backend
- *
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-
-/**
- * Licence info: This spellchecker is inspired by code by Garrison Locke available
- * at http://www.broken-notebook.com/spell_checker/index.php (licensed under the Terms
- * of an BSD license). The code in this file was nearly completly rewritten for DokuWiki
- * and is licensed under GPL version 2 (See COPYING for details).
- *
- * Original Copyright notice follows:
- *
- * Copyright (c) 2005, Garrison Locke
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the http://www.broken-notebook.com nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- */
-
-//fix for Opera XMLHttpRequests
-if(!count($_POST) && $HTTP_RAW_POST_DATA){
- parse_str($HTTP_RAW_POST_DATA, $_POST);
-}
-
-if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
-require_once (DOKU_INC.'inc/init.php');
-session_write_close();
-require_once (DOKU_INC.'inc/utf8.php');
-require_once (DOKU_INC.'inc/aspell.php');
-require_once (DOKU_INC.'inc/common.php');
-
-header('Content-Type: text/plain; charset=utf-8');
-
-//create spell object
-$spell = new Aspell($conf['lang'],null,'utf-8');
-$spell->setMode(PSPELL_FAST);
-
-//add personal dictionary
-if(@file_exists(DOKU_INC.'conf/words.aspell')){
- $spell->personal = DOKU_INC.'conf/words.aspell';
-}
-
-//call the requested function
-$call = 'spell_'.$_POST['call'];
-if(function_exists($call)){
- $call();
-}else{
- print "The called function does not exist!";
-}
-
-/**
- * replaces a link with blanks of same length
- * The first string is the complete link and
- * and the second optional string might be the
- * alternative text that would become part of
- * the result string and will be checked for
- * spelling errors again.
- *
- * callback for preg_replace_callback
- *
- * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function spaceslink($matches){
- $string = unslash($matches[1]);
- $check = unslash($matches[2]);
- $result = ' '; //opening [[
- $result .= str_pad('',utf8_strlen($string),' ');
- $result .= $check;
- $result .= ' '; //closing ]]
-
- return $result;
-}
-
-/**
- * Spellchecker. Called by an AJAX request
- *
- * Runs the given Text through Aspell and prints XHTML with
- * markup. The first char represents the error code:
- *
- * 0 - No spelling mistakes
- * 1 - Spelling mistakes found
- * 2 - An error occurred error message follows
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function spell_check() {
- global $spell;
- $string = $_POST['data'];
- $misspell = false;
-
- // for streamlined line endings
- $string = preg_replace("/(\015\012)|(\015)/","\012",$string);
- $string = htmlspecialchars($string);
-
- // make sure multiple spaces and leading are kept
- $string = preg_replace('/^ /m','&nbsp;',$string);
- $string = preg_replace('/ /','&nbsp; ',$string);
-
- // we need the text as array later
- $data = explode("\n",$string);
-
- // don't check links and medialinks for spelling errors
- $string = preg_replace_callback('/\{\{(.*?)(\|(.*?))?(\}\})/','spaceslink',$string);
- $string = preg_replace_callback('/\[\[(.*?)(\|(.*?))?(\]\])/','spaceslink',$string);
-
- // run aspell in terse sgml mode, ignore nbsp as correct word
- if(!$spell->runAspell($string,$out,$err,array('!','+html','@nbsp'))){
- print '2'; //to indicate an error
- print "An error occurred while trying to run the spellchecker:\n";
- print $err;
- return;
- }
-
- #use this to debug raw aspell output
- #print "1$out"; return;
-
- // go through the result
- $lines = split("\n",$out);
- $rcnt = count($lines)-1; // aspell result count
- $lcnt = count($data)+1; // original line counter
-
-
- for($i=$rcnt; $i>=0; $i--){
- $line = trim($lines[$i]);
- if($line[0] == '@') continue; // comment
- if($line[0] == '*') continue; // no mistake in this word
- if($line[0] == '+') continue; // root of word was found
- if($line[0] == '?') continue; // word was guessed
- if(empty($line)){
- // empty line -> new source line
- $lcnt--;
- continue;
- }
- // now get the misspelled words
- if(preg_match('/^& ([^ ]+) (\d+) (\d+): (.*)/',$line,$match)){
- // match with suggestions
- $word = $match[1];
- $off = $match[3]-1;
- $sug = split(', ',$match[4]);
- }elseif(preg_match('/^# ([^ ]+) (\d+)/',$line,$match)){
- // match without suggestions
- $word = $match[1];
- $off = $match[2]-1;
- $sug = null;
- }else{
- // couldn't parse output
- print '2';
- print "The spellchecker output couldn't be parsed.\n";
- print "Line $i:".$line;
- return;
- }
-
- $misspell = true;
- //aspell < 0.60 returns singlebyte offsets
- if($spell->version >= 600){
- $len = utf8_strlen($word);
- $data[$lcnt] = utf8_substr_replace($data[$lcnt],spell_formatword($word,$sug),$off, $len);
- }else{
- $len = strlen($word);
- $data[$lcnt] = substr_replace($data[$lcnt],spell_formatword($word,$sug),$off, $len);
- }
-
- }//end of output parsing
-
- // the first char returns the spell info
- if($misspell){
- $string = '1'.join('<br />',$data);
- }else{
- $string = '0'.join('<br />',$data);
- }
-
- if(!$_POST['utf8']){
- // encode multibyte chars as entities for broken Konqueror
- $string = utf8_tohtml($string);
- }
-
- //output
- print $string;
-}
-
-/**
- * Formats a word with needed markup for the Suggestion Popup
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function spell_formatword($word,$suggestions=null){
- static $i = 1;
-
- if(is_array($suggestions)){
- //restrict to maximum of 7 elements
- $suggestions = array_slice($suggestions,0,7);
- $suggestions = array_map('htmlspecialchars',$suggestions);
-
- if(!$_POST['utf8']){
- //konqueror's broken UTF-8 handling needs this
- $suggestions = array_map('utf8_tohtml',$suggestions);
- }
-
- $suggestions = array_map('addslashes',$suggestions);
-
- $sug = ",'".join("','",$suggestions)."'"; // build javascript args
- }else{
- $sug = '';
- }
-
- $link = '<a href="javascript:ajax_spell.suggest('.$i.$sug.')" '.
- 'class="spell_error" id="spell__error'.$i.'">'.htmlspecialchars($word).'</a>';
- $i++;
- return $link;
-}
-
-/**
- * Rewrite markuped XHTML back to plain Text. AJAX callback
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function spell_resume(){
- $text = $_POST['data'];
-
- //some browsers insert newlines instead of spaces
- $text = preg_replace("/(\r\n|\n|\r)/", ' ', $text);
- $text = preg_replace("=<br */?>=i", "\n", $text);
-
- // remove HTML tags
- $text = strip_tags($text);
-
- // restore spaces
- $text = preg_replace('/&nbsp;/',' ',$text);
- $text = preg_replace('/\xC2\xA0/',' ',$text);
-
- // restore quoted special chars
- $text = unhtmlspecialchars($text);
-
- // check if UTF-8 is accepted
- if(!$_POST['utf8']){
- // protect '&' (gets removed in JS later)
- $text = str_replace('&','&amp;',$text);
- // encode multibyte chars as entities for broken Konqueror
- $text = utf8_tohtml($text);
- }
-
- // output
- print $text;
-}
-
-/**
- * Just send data back as received for UTF-8 testing
- */
-function spell_utf8test(){
- // we need to return the raw value - substr protects against XSS
- print substr($_POST['data'],0,3);
-}
-
-/**
- * Reverse htmlspecialchars
- *
- * @author <donwilson at gmail dot com>
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function unhtmlspecialchars($string, $quotstyle=ENT_COMPAT){
- $string = str_replace ( '&amp;', '&', $string );
- $string = str_replace ( '&lt;', '<', $string );
- $string = str_replace ( '&gt;', '>', $string );
-
- if($quotstyle != ENT_NOQUOTES){
- $string = str_replace ( '&quot;', '\"', $string );
- }
- if($quotstyle == ENT_QUOTES){
- $string = str_replace ( '&#39;', '\'', $string );
- $string = str_replace ( '&#039;', '\'', $string );
- }
-
- return $string;
-}
-
-//Setup VIM: ex: et ts=2 enc=utf-8 :
-?>
diff --git a/lib/images/toolbar/spellcheck.png b/lib/images/toolbar/spellcheck.png
deleted file mode 100644
index 8be69f115..000000000
--- a/lib/images/toolbar/spellcheck.png
+++ /dev/null
Binary files differ
diff --git a/lib/images/toolbar/spellnoerr.png b/lib/images/toolbar/spellnoerr.png
deleted file mode 100644
index 9dd7db976..000000000
--- a/lib/images/toolbar/spellnoerr.png
+++ /dev/null
Binary files differ
diff --git a/lib/images/toolbar/spellstop.png b/lib/images/toolbar/spellstop.png
deleted file mode 100644
index 234083e28..000000000
--- a/lib/images/toolbar/spellstop.png
+++ /dev/null
Binary files differ
diff --git a/lib/images/toolbar/spellwait.gif b/lib/images/toolbar/spellwait.gif
deleted file mode 100644
index ac2e96f05..000000000
--- a/lib/images/toolbar/spellwait.gif
+++ /dev/null
Binary files differ
diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php
index d25a23493..da5b83685 100644
--- a/lib/plugins/config/lang/bg/lang.php
+++ b/lib/plugins/config/lang/bg/lang.php
@@ -96,7 +96,6 @@ $lang['gzip_output'] = 'Използване gzip Кодиране
$lang['gdlib'] = 'Версия на GD Lib';
$lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick';
$lang['jpg_quality'] = 'Kачество на JPG компресията (0-100)';
-$lang['spellchecker'] = 'Проверка за правопис ';
$lang['subscribers'] = 'Поддръжка за абониране към страница';
$lang['compress'] = 'Компактен CSS и javascript изход';
$lang['hidepages'] = 'Скриване на съвпадащи имена на страници(regular expressions)';
diff --git a/lib/plugins/config/lang/ca/lang.php b/lib/plugins/config/lang/ca/lang.php
index 158c9d125..186026fa6 100644
--- a/lib/plugins/config/lang/ca/lang.php
+++ b/lib/plugins/config/lang/ca/lang.php
@@ -94,7 +94,6 @@ $lang['gzip_output'] = 'Codifica contingut xhtml com a gzip';
$lang['gdlib'] = 'Versió GD Lib';
$lang['im_convert'] = 'Camí de la utilitat convert d\'ImageMagick';
$lang['jpg_quality'] = 'Qualitat de compressió JPEG (0-100)';
-$lang['spellchecker'] = 'Habilita la verificació de l\'ortografia';
$lang['subscribers'] = 'Habilita la subscripció a pàgines';
$lang['compress'] = 'Sortida CSS i Javascript compacta';
$lang['hidepages'] = 'Oculta pàgines coincidents (expressions regulars)';
diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php
index c6c9ac6d2..4f02249f8 100644
--- a/lib/plugins/config/lang/cs/lang.php
+++ b/lib/plugins/config/lang/cs/lang.php
@@ -103,7 +103,6 @@ $lang['gzip_output'] = 'Používat pro xhtml Content-Encoding gzip';
$lang['gdlib'] = 'Verze GD knihovny';
$lang['im_convert'] = 'Cesta k nástroji convert z balíku ImageMagick';
$lang['jpg_quality'] = 'Kvalita komprese JPEG (0-100)';
-$lang['spellchecker'] = 'Zapnout kontrolu pravopisu';
$lang['subscribers'] = 'Možnost přihlásit se k odběru novinek stránky';
$lang['compress'] = 'Zahustit CSS a JavaScript výstup';
$lang['hidepages'] = 'Skrýt stránky odpovídající vzoru (regulární výrazy)';
diff --git a/lib/plugins/config/lang/da/lang.php b/lib/plugins/config/lang/da/lang.php
index 74c2fa6a3..1580ccc74 100644
--- a/lib/plugins/config/lang/da/lang.php
+++ b/lib/plugins/config/lang/da/lang.php
@@ -117,7 +117,6 @@ $lang['gzip_output'] = 'Benyt gzip Content-Encoding til XHTML';
$lang['gdlib'] = 'GD Lib version';
$lang['im_convert'] = 'Sti til ImageMagick\'s convert værktøj';
$lang['jpg_quality'] = 'JPG komprimeringskvalitet (0-100)';
-$lang['spellchecker']= 'Slå stavekontrol til';
$lang['subscribers'] = 'Slå understøttelse af abonnement på sider til';
$lang['compress'] = 'Komprimer CSS og Javascript filer';
$lang['hidepages'] = 'Skjul matchende sider (regulære udtryk)';
diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php
index ef2fc296a..7cf190f10 100644
--- a/lib/plugins/config/lang/de/lang.php
+++ b/lib/plugins/config/lang/de/lang.php
@@ -97,7 +97,6 @@ $lang['gzip_output'] = 'Seiten mit gzip komprimiert ausliefern';
$lang['gdlib'] = 'GD Lib Version';
$lang['im_convert'] = 'Pfad zu ImageMagicks Konvertierwerkzeug';
$lang['jpg_quality'] = 'JPEG Kompressionsqualität (0-100)';
-$lang['spellchecker'] = 'Rechtschreibprüfung aktivieren';
$lang['subscribers'] = 'E-Mail-Abos zulassen';
$lang['compress'] = 'JavaScript und Stylesheets komprimieren';
$lang['hidepages'] = 'Seiten verstecken (Regulärer Ausdruck)';
diff --git a/lib/plugins/config/lang/el/lang.php b/lib/plugins/config/lang/el/lang.php
index 7d3352ab8..957e53f57 100644
--- a/lib/plugins/config/lang/el/lang.php
+++ b/lib/plugins/config/lang/el/lang.php
@@ -102,7 +102,6 @@ $lang['gzip_output'] = 'Χρήση gzip Content-Encoding για την
$lang['gdlib'] = 'Έκδοση βιβλιοθήκης GD';
$lang['im_convert'] = 'Διαδρομή προς το εργαλείο μετατροπής εικόνων του ImageMagick';
$lang['jpg_quality'] = 'Ποιότητα συμπίεσης JPG (0-100)';
-$lang['spellchecker'] = 'Ενεργοποίηση ελέγχου ορθογραφίας';
$lang['subscribers'] = 'Να επιτρέπεται η εγγραφή στην ενημέρωση αλλαγών σελίδας';
$lang['compress'] = 'Συμπίεση αρχείων CSS και javascript';
$lang['hidepages'] = 'Φίλτρο απόκρυψης σελίδων (regular expressions)';
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index 639c138f3..d385086ca 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -118,7 +118,6 @@ $lang['gzip_output'] = 'Use gzip Content-Encoding for xhtml';
$lang['gdlib'] = 'GD Lib version';
$lang['im_convert'] = 'Path to ImageMagick\'s convert tool';
$lang['jpg_quality'] = 'JPG compression quality (0-100)';
-$lang['spellchecker']= 'Enable spellchecker';
$lang['subscribers'] = 'Enable page subscription support';
$lang['compress'] = 'Compact CSS and javascript output';
$lang['hidepages'] = 'Hide matching pages (regular expressions)';
diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php
index 1605333d9..8c2c23e70 100644
--- a/lib/plugins/config/lang/eo/lang.php
+++ b/lib/plugins/config/lang/eo/lang.php
@@ -96,7 +96,6 @@ $lang['gzip_output'] = 'Uzi gzip-a Enhav-Enkodigo por XHTML';
$lang['gdlib'] = 'Versio e GD Lib';
$lang['im_convert'] = 'Pado al la konvertilo de ImageMagick';
$lang['jpg_quality'] = 'Kompaktiga kvalito de JPG (0-100)';
-$lang['spellchecker'] = 'Ebligi literumilon';
$lang['subscribers'] = 'Ebligi subtenon de avizoj pri ŝanĝoj sur paĝoj';
$lang['compress'] = 'Kompaktigi CSS-ajn kaj ĵavaskriptajn elmetojn';
$lang['hidepages'] = 'Kaŝi kongruantajn paĝojn (al regulaj esprimoj)';
diff --git a/lib/plugins/config/lang/es/lang.php b/lib/plugins/config/lang/es/lang.php
index ed1d87ccc..4f0336044 100644
--- a/lib/plugins/config/lang/es/lang.php
+++ b/lib/plugins/config/lang/es/lang.php
@@ -95,7 +95,6 @@ $lang['gzip_output'] = 'Usar gzip Content-Encoding para xhtml';
$lang['gdlib'] = 'Versión de GD Lib';
$lang['im_convert'] = 'Ruta a la herramienta de conversión de ImageMagick';
$lang['jpg_quality'] = 'Calidad de compresión de JPG (0-100)';
-$lang['spellchecker'] = 'Habilitar corrector ortográfico';
$lang['subscribers'] = 'Habilitar soporte para subscripción a páginas';
$lang['compress'] = 'Compactar la salida de CSS y javascript';
$lang['hidepages'] = 'Ocultar páginas con coincidencias (expresiones regulares)';
diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php
index 0f80501ff..7eda18d4e 100644
--- a/lib/plugins/config/lang/fr/lang.php
+++ b/lib/plugins/config/lang/fr/lang.php
@@ -97,7 +97,6 @@ $lang['gzip_output'] = 'Utiliser Content-Encoding gzip pour xhtml';
$lang['gdlib'] = 'Version GD Lib';
$lang['im_convert'] = 'Chemin vers l\'outil de conversion d\'ImageMagick';
$lang['jpg_quality'] = 'Qualité de compression JPG (0-100)';
-$lang['spellchecker'] = 'Activer la correction d\'orthographe';
$lang['subscribers'] = 'Activer l\'abonnement aux pages';
$lang['compress'] = 'Compresser CSS & javascript';
$lang['hidepages'] = 'Cacher pages correspondant à (expression régulière)';
diff --git a/lib/plugins/config/lang/gl/lang.php b/lib/plugins/config/lang/gl/lang.php
index c4ab0c1b7..e937df621 100644
--- a/lib/plugins/config/lang/gl/lang.php
+++ b/lib/plugins/config/lang/gl/lang.php
@@ -95,7 +95,6 @@ $lang['gzip_output'] = 'Utilizar Contido-Codificación gzip para o xht
$lang['gdlib'] = 'Versión da Libraría GD';
$lang['im_convert'] = 'Ruta deica a ferramenta de conversión ImageMagick';
$lang['jpg_quality'] = 'Calidade de compresión dos JPG (0-100)';
-$lang['spellchecker'] = 'Activar corrector ortográfico';
$lang['subscribers'] = 'Activar posibilidade de subscrición de páxina';
$lang['compress'] = 'Saída compacta de CSS e javascript';
$lang['hidepages'] = 'Agochar páxinas que coincidan (expresións regulares)';
diff --git a/lib/plugins/config/lang/he/lang.php b/lib/plugins/config/lang/he/lang.php
index d55685a09..6a5627e49 100644
--- a/lib/plugins/config/lang/he/lang.php
+++ b/lib/plugins/config/lang/he/lang.php
@@ -115,7 +115,6 @@ $lang['gzip_output'] = 'השתמש בקידוד תוכן של gzip עבור xhtm
$lang['gdlib'] = 'גרסת ספרית ה-GD';
$lang['im_convert'] = 'נתיב לכלי ה-convert של ImageMagick';
$lang['jpg_quality'] = 'איכות הדחיסה של JPG (0-100)';
-$lang['spellchecker']= 'השתמש בבודק איות';
$lang['subscribers'] = 'התר תמיכה ברישום לדפים';
$lang['compress'] = 'פלט קומפקטי של CSS ו-javascript';
$lang['hidepages'] = 'הסתר דפים תואמים (ביטויים רגולריים)';
diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php
index 0d8f181d0..755d361d7 100644
--- a/lib/plugins/config/lang/it/lang.php
+++ b/lib/plugins/config/lang/it/lang.php
@@ -116,7 +116,6 @@ $lang['gzip_output'] = 'Usa il Content-Encoding gzip per xhtml';
$lang['gdlib'] = 'Versione GD Lib ';
$lang['im_convert'] = 'Percorso per il convertitore di ImageMagick';
$lang['jpg_quality'] = 'Qualità di compressione JPG (0-100)';
-$lang['spellchecker']= 'Abilita il controllo ortografico';
$lang['subscribers'] = 'Abilita la sottoscrizione alle pagine';
$lang['compress'] = 'Comprimi i file CSS e javascript';
$lang['hidepages'] = 'Nascondi le pagine che soddisfano la condizione (inserire un\'espressione regolare)';
diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php
index 20d8a1ecb..f6a5ef56f 100644
--- a/lib/plugins/config/lang/ja/lang.php
+++ b/lib/plugins/config/lang/ja/lang.php
@@ -97,7 +97,6 @@ $lang['gzip_output'] = 'xhtmlに対するコンテンツ圧縮(gzi
$lang['gdlib'] = 'GDlibバージョン';
$lang['im_convert'] = 'ImageMagick変換ツールへのパス';
$lang['jpg_quality'] = 'JPG圧縮品質(0-100)';
-$lang['spellchecker'] = 'スペルチェック';
$lang['subscribers'] = '更新通知機能';
$lang['compress'] = 'CSSとJavaScriptを圧縮';
$lang['hidepages'] = '非公開ページ(Regex)';
diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php
index 9ab158a6c..761acdfea 100644
--- a/lib/plugins/config/lang/ko/lang.php
+++ b/lib/plugins/config/lang/ko/lang.php
@@ -116,7 +116,6 @@ $lang['gzip_output'] = 'xhml내용 gzip압출 여부';
$lang['gdlib'] = 'GD 라이브러리 버전';
$lang['im_convert'] = 'ImageMagick 위치';
$lang['jpg_quality'] = 'JPG 압축 품질 (0-100)';
-$lang['spellchecker']= '맞춤법 검사기 사용';
$lang['subscribers'] = '페이지 갱신 알람 기능';
$lang['compress'] = '최적화된 CSS, javascript 출력';
$lang['hidepages'] = '매칭된 페이지 숨기기(정규식 매칭)';
diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php
index afdfa26e9..62a14906a 100644
--- a/lib/plugins/config/lang/nl/lang.php
+++ b/lib/plugins/config/lang/nl/lang.php
@@ -95,7 +95,6 @@ $lang['gzip_output'] = 'Gebruik gzip Content-Encoding voor xhtml';
$lang['gdlib'] = 'GD Lib versie';
$lang['im_convert'] = 'Path naar ImageMagick\'s convert tool';
$lang['jpg_quality'] = 'JPG compressie kwaliteit (0-100)';
-$lang['spellchecker'] = 'Spellingscontrole aanzetten';
$lang['subscribers'] = 'Page subscription ondersteuning aanzetten';
$lang['compress'] = 'Compacte CSS en javascript output';
$lang['hidepages'] = 'Verberg deze pagina\'s (regular expressions)';
diff --git a/lib/plugins/config/lang/no/lang.php b/lib/plugins/config/lang/no/lang.php
index c2c6410db..b43e807c1 100644
--- a/lib/plugins/config/lang/no/lang.php
+++ b/lib/plugins/config/lang/no/lang.php
@@ -96,7 +96,6 @@ $lang['gzip_output'] = 'Bruk gzip Content-Encoding for XHTML';
$lang['gdlib'] = 'Versjon av libGD';
$lang['im_convert'] = 'Sti til ImageMagicks konverteringsverktøy';
$lang['jpg_quality'] = 'JPEG-kvalitet (0-100)';
-$lang['spellchecker'] = 'Bruk stavekontroll';
$lang['subscribers'] = 'Åpne for abonnement på endringer av en side';
$lang['compress'] = 'Kompakt CSS og JavaScript';
$lang['hidepages'] = 'Skjul sider fra automatiske lister (regulære uttrykk)';
diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php
index 90449ed0a..5da22571b 100644
--- a/lib/plugins/config/lang/pl/lang.php
+++ b/lib/plugins/config/lang/pl/lang.php
@@ -94,7 +94,6 @@ $lang['gzip_output'] = 'Używaj GZIP dla XHTML';
$lang['gdlib'] = 'Wersja biblioteki GDLib';
$lang['im_convert'] = 'Ścieżka do programu imagemagick';
$lang['jpg_quality'] = 'Jakość kompresji JPG (0-100)';
-$lang['spellchecker'] = 'Sprawdzanie pisowni';
$lang['subscribers'] = 'Subskrypcja';
$lang['compress'] = 'Kompresja arkuszy CSS i plików JavaScript';
$lang['hidepages'] = 'Ukrywanie stron pasujących do wzorca (wyrażenie regularne)';
diff --git a/lib/plugins/config/lang/pt-br/lang.php b/lib/plugins/config/lang/pt-br/lang.php
index 3f5ce964e..4cd06a54c 100644
--- a/lib/plugins/config/lang/pt-br/lang.php
+++ b/lib/plugins/config/lang/pt-br/lang.php
@@ -94,7 +94,6 @@ $lang['gzip_output'] = 'Usar Content-Encoding gzip para o xhtml';
$lang['gdlib'] = 'Versão da GD Lib';
$lang['im_convert'] = 'Caminho para a ferramenta de conversão ImageMagick';
$lang['jpg_quality'] = 'Qualidade de compressão do JPG (0-100)';
-$lang['spellchecker'] = 'Habilitar verificação ortográfica';
$lang['subscribers'] = 'Habilitar o suporte a monitoramento de páginas';
$lang['compress'] = 'Compactar as saídas de CSS e JavaScript';
$lang['hidepages'] = 'Esconder páginas correspondentes (expressão regular)';
diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php
index 9f2ebd4ea..0c6eac0c9 100644
--- a/lib/plugins/config/lang/ru/lang.php
+++ b/lib/plugins/config/lang/ru/lang.php
@@ -97,7 +97,6 @@ $lang['gzip_output'] = 'Использовать gzip Content-Encoding
$lang['gdlib'] = 'Версия GD Lib';
$lang['im_convert'] = 'Путь к imagemagick';
$lang['jpg_quality'] = 'Качество сжатия JPG (0-100)';
-$lang['spellchecker'] = 'Включить проверку орфографии';
$lang['subscribers'] = 'Разрешить подписку на изменения';
$lang['compress'] = 'Сжимать файлы CSS и javascript';
$lang['hidepages'] = 'Скрыть страницы (рег. выражение)';
diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php
index 1ad397784..a0844e855 100644
--- a/lib/plugins/config/lang/sv/lang.php
+++ b/lib/plugins/config/lang/sv/lang.php
@@ -117,7 +117,6 @@ $lang['gzip_output'] = 'Använd gzip Content-Encoding för xhtml';
$lang['gdlib'] = 'Version av GD-biblioteket';
$lang['im_convert'] = 'Sökväg till ImageMagicks konverteringsverktyg';
$lang['jpg_quality'] = 'Kvalitet för JPG-komprimering (0-100)';
-$lang['spellchecker']= 'Aktivera stavningskontroll';
$lang['subscribers'] = 'Aktivera stöd för prenumeration på ändringar';
$lang['compress'] = 'Komprimera CSS och javascript';
$lang['hidepages'] = 'Dölj matchande sidor (reguljära uttryck)';
diff --git a/lib/plugins/config/lang/uk/lang.php b/lib/plugins/config/lang/uk/lang.php
index 43241a458..de122915f 100644
--- a/lib/plugins/config/lang/uk/lang.php
+++ b/lib/plugins/config/lang/uk/lang.php
@@ -116,7 +116,6 @@ $lang['gdlib'] = 'Версія GD Lib';
$lang['gzip_output'] = 'Використовувати gzip, як Content-Encoding для xhtml';
$lang['im_convert'] = 'Шлях до ImageMagick';
$lang['jpg_quality'] = 'Якість компресії JPG (0-100)';
-$lang['spellchecker']= 'Дозволити перевірку орфографії';
$lang['subscribers'] = 'Підписка на зміни';
$lang['compress'] = 'Стискати файли CSS та javascript';
$lang['hidepages'] = 'Ховати сторінки (regular expressions)';
diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php
index d099cbd02..accd85d47 100644
--- a/lib/plugins/config/lang/zh/lang.php
+++ b/lib/plugins/config/lang/zh/lang.php
@@ -118,7 +118,6 @@ $lang['gzip_output'] = '对 xhtml 使用 gzip 内容编码';
$lang['gdlib'] = 'GD 库版本';
$lang['im_convert'] = 'ImageMagick 转换工具的路径';
$lang['jpg_quality'] = 'JPG 压缩质量(0-100)';
-$lang['spellchecker']= '启用拼写检查';
$lang['subscribers'] = '启用页面订阅支持';
$lang['compress'] = '使 CSS 和 javascript 输出更紧密';
$lang['hidepages'] = '隐藏匹配的界面(正则表达式)';
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index 1f886737d..099848b94 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -130,7 +130,6 @@ $meta['iexssprotect']= array('onoff');
$meta['_editing'] = array('fieldset');
$meta['usedraft'] = array('onoff');
-$meta['spellchecker']= array('onoff');
$meta['htmlok'] = array('onoff');
$meta['phpok'] = array('onoff');
$meta['notify'] = array('email');
diff --git a/lib/scripts/spellcheck.js b/lib/scripts/spellcheck.js
deleted file mode 100644
index 73b392f5b..000000000
--- a/lib/scripts/spellcheck.js
+++ /dev/null
@@ -1,456 +0,0 @@
-/**
- * DokuWiki Spellcheck AJAX clientside script
- *
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-
-/**
- * Licence info: This spellchecker is inspired by code by Garrison Locke available
- * at http://www.broken-notebook.com/spell_checker/index.php (licensed under the Terms
- * of an BSD license). The code in this file was nearly completly rewritten for DokuWiki
- * and is licensed under GPL version 2 (See COPYING for details).
- *
- * Original Copyright notice follows:
- *
- * Copyright (c) 2005, Garrison Locke
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the http://www.broken-notebook.com nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- */
-
-/*
- * Uses some general functions defined elsewhere. Here is a list:
- *
- * Defined in script.js:
- *
- * findPosX()
- * findPosY()
- *
- * Defined in events.js:
- *
- * addEvent()
- *
- * Defined in edit.js:
- *
- * createToolButton()
- */
-
-/**
- * quotes single quotes
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function qquote(str){
- return str.split('\'').join('\\\'');
-}
-
-/**
- * AJAX Spellchecker Class
- *
- * Note to some function use a hardcoded instance named ajax_spell to make
- * references to object members. Used Object-IDs are hardcoded in the init()
- * method.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Garrison Locke <http://www.broken-notebook.com>
- */
-function ajax_spell_class(){
- this.inited = false;
- this.utf8ok = 1;
- this.handler = DOKU_BASE+'lib/exe/spellcheck.php';
- // to hold the page objects (initialized with init())
- this.textboxObj = null;
- this.showboxObj = null;
- this.suggestObj = null;
- this.editbarObj = null;
- this.buttonObj = null;
- this.imageObj = null;
-
- // hold translations
- this.txtStart = 'Check Spelling';
- this.txtStop = 'Resume Editing';
- this.txtRun = 'Checking...';
- this.txtNoErr = 'No Mistakes';
- this.txtNoSug = 'No Suggestions';
- this.txtChange= 'Change';
-
- this.timer = null;
-
- /**
- * Initializes everything
- *
- * Call after the page was setup. Hardcoded element IDs here.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.init = function(txtStart,txtStop,txtRun,txtNoErr,txtNoSug,txtChange){
- // don't run twice
- if (this.inited){ return; }
- this.inited = true;
-
- // check for AJAX availability
- var ajax = new sack(this.handler);
- if(ajax.failed){ return; }
-
- // get Elements
- this.textboxObj = document.getElementById('wiki__text');
- this.editbarObj = document.getElementById('wiki__editbar');
- this.showboxObj = document.getElementById('spell__result');
- this.suggestObj = document.getElementById('spell__suggest');
-
-
- // set wordwrap style with browser propritary attributes
- if(is_gecko){
- this.showboxObj.style.whiteSpace = '-moz-pre-wrap'; // Mozilla, since 1999
- }else if(is_opera_preseven){
- this.showboxObj.style.whiteSpace = '-pre-wrap'; // Opera 4-6
- }else if(is_opera_seven){
- this.showboxObj.style.whiteSpace = '-o-pre-wrap'; // Opera 7
- }else{
- this.showboxObj.style['word-wrap'] = 'break-word'; //Internet Explorer 5.5+
- }
- // Which browser supports this?
- // this.showboxObj.style.whiteSpace = 'pre-wrap'; // css-3
-
-
- // set Translation Strings
- this.txtStart = txtStart;
- this.txtStop = txtStop;
- this.txtRun = txtRun;
- this.txtNoErr = txtNoErr;
- this.txtNoSug = txtNoSug;
- this.txtChange= txtChange;
-
- // create ToolBar Button with ID and add it to the toolbar with null action
- var toolbarObj = document.getElementById('tool__bar');
- this.buttonObj = createToolButton('spellcheck.png',txtStart,'k','spell__check');
- this.buttonObj.onclick = function(){return false;};
- toolbarObj.appendChild(this.buttonObj);
- this.imageObj = document.getElementById('spell__check_ico');
-
- // start UTF-8 compliance test - send an UTF-8 char and see what comes back
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- ajax.onCompletion = this.initReady;
- ajax.runAJAX('call=utf8test&data='+encodeURIComponent('ü'));
-
- // second part of initialisation is in initReady() function
- };
-
- /**
- * Eventhandler for click objects anywhere on the document
- *
- * Disables the suggestion box
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Garrison Locke <http://www.broken-notebook.com>
- */
- this.docClick = function(e){
- // what was clicked?
- try{
- target = window.event.srcElement;
- }catch(ex){
- target = e.target;
- }
-
- if (target.id != ajax_spell.suggestObj.id){
- ajax_spell.suggestObj.style.display = "none";
- }
- };
-
- /**
- * Changes the Spellchecker link according to the given mode
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.setState = function(state){
- switch (state){
- case 'stop':
- ajax_spell.buttonObj.onclick = function(){ ajax_spell.resume(); return false; };
- ajax_spell.buttonObj.title = ajax_spell.txtStop;
- ajax_spell.buttonObj.accessKey = '';
- ajax_spell.imageObj.src = DOKU_BASE+'lib/images/toolbar/spellstop.png';
- break;
- case 'noerr':
- ajax_spell.buttonObj.onclick = function(){ajax_spell.setState('start'); return false; };
- ajax_spell.buttonObj.title = ajax_spell.txtNoErr;
- ajax_spell.buttonObj.accessKey = '';
- ajax_spell.imageObj.src = DOKU_BASE+'lib/images/toolbar/spellnoerr.png';
- break;
- case 'run':
- ajax_spell.buttonObj.onclick = function(){return false;};
- ajax_spell.buttonObj.title = ajax_spell.txtRun;
- ajax_spell.buttonObj.accessKey = '';
- ajax_spell.imageObj.src = DOKU_BASE+'lib/images/toolbar/spellwait.gif';
- break;
- default:
- ajax_spell.buttonObj.onclick = function(){ ajax_spell.run(); return false; };
- ajax_spell.buttonObj.title = ajax_spell.txtStart+' [ALT-K]';
- ajax_spell.buttonObj.accessKey = 'k';
- ajax_spell.imageObj.src = DOKU_BASE+'lib/images/toolbar/spellcheck.png';
- break;
- }
- };
-
- /**
- * Replaces a word identified by id with its correction given in word
- *
- * @author Garrison Locke <http://www.broken-notebook.com>
- */
- this.correct = function (id, word){
- var obj = document.getElementById('spell__error'+id);
- obj.innerHTML = decodeURIComponent(word);
- obj.style.color = "#005500";
- this.suggestObj.style.display = "none";
- };
-
- /**
- * Opens a prompt to let the user change the word her self
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.ask = function(id){
- var word = document.getElementById('spell__error'+id).innerHTML;
- word = prompt(this.txtChange,word);
- if(word){
- this.correct(id,encodeURIComponent(word));
- }
- };
-
- /**
- * Displays the suggestions for a misspelled word
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Garrison Locke <http://www.broken-notebook.com>
- */
- this.suggest = function(){
- var args = this.suggest.arguments;
- if(!args[0]){ return; }
- var id = args[0];
-
- // set position of the popup
- this.suggestObj.style.display = "none";
- var x = findPosX('spell__error'+id);
- var y = findPosY('spell__error'+id);
-
- // handle scrolling
- var scrollPos;
- if(is_opera){
- scrollPos = 0; //FIXME how to do this without browser sniffing?
- }else{
- scrollPos = this.showboxObj.scrollTop;
- }
-
- this.suggestObj.style.left = x+'px';
- this.suggestObj.style.top = (y+16-scrollPos)+'px';
-
- // handle suggestions
- var text = '';
- if(args.length == 1){
- text += this.txtNoSug+'<br />';
- }else{
- for(var i=1; i<args.length; i++){
- text += '<a href="javascript:ajax_spell.correct('+id+',\''+
- qquote(args[i])+'\')">';
- text += args[i];
- text += '</a><br />';
- }
- }
- // add option for manual edit
- text += '<a href="javascript:ajax_spell.ask('+id+')">';
- text += '['+this.txtChange+']';
- text += '</a><br />';
-
- this.suggestObj.innerHTML = text;
- this.suggestObj.style.display = "block";
- };
-
- // --- Callbacks ---
-
- /**
- * Callback. Called after the object was initialized and UTF-8 tested
- * Inside the callback 'this' is the SACK object!!
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.initReady = function(){
- var data = this.response;
-
- //test for UTF-8 compliance (will fail for konqueror)
- if(data != 'ü'){
- ajax_spell.utf8ok = 0;
- }
-
- // register click event
- addEvent(document,'click',ajax_spell.docClick);
-
- // register focus event
- addEvent(ajax_spell.textboxObj,'focus',ajax_spell.setState);
-
- // get started
- ajax_spell.setState('start');
- };
-
- /**
- * Callback. Called after finishing spellcheck.
- * Inside the callback 'this' is the SACK object!!
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.start = function(){
- if(ajax_spell.timer !== null){
- window.clearTimeout(ajax_spell.timer);
- ajax_spell.timer = null;
- }else{
- // there is no timer set, we timed out already
- return;
- }
-
- var data = this.response;
- var error = data.charAt(0);
- data = data.substring(1);
- if(error == '1'){
- ajax_spell.setState('stop');
-
- // convert numeric entities back to UTF-8 if needed
- if(!ajax_spell.utf8ok){
- data = data.replace(/&#(\d+);/g,
- function(whole,match1) {
- return String.fromCharCode(+match1);
- });
- }
-
- // replace textbox through div
- ajax_spell.showboxObj.innerHTML = data;
- ajax_spell.showboxObj.style.width = ajax_spell.textboxObj.style.width;
- ajax_spell.showboxObj.style.height = ajax_spell.textboxObj.style.height;
- ajax_spell.textboxObj.style.display = 'none';
- ajax_spell.showboxObj.style.display = 'block';
- }else{
- if(error == '2'){
- alert(data);
- }
- ajax_spell.textboxObj.disabled = false;
- ajax_spell.editbarObj.style.visibility = 'visible';
- ajax_spell.setState('noerr');
- }
- };
-
- /**
- * Callback. Gets called by resume() - switches back to edit mode
- * Inside the callback 'this' is the SACK object!!
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.stop = function(){
- var data = this.response;
-
- // convert numeric entities back to UTF-8 if needed
- if(!ajax_spell.utf8ok){
- data = data.replace(/&#(\d+);/g,
- function(whole,match1) {
- return String.fromCharCode(+match1);
- });
- // now remove &amp; protection
- data = data.replace(/&amp;/g,'&');
- }
-
- // replace div with textbox again
- ajax_spell.textboxObj.value = data;
- ajax_spell.textboxObj.disabled = false;
- ajax_spell.showboxObj.style.display = 'none';
- ajax_spell.textboxObj.style.display = 'block';
- ajax_spell.editbarObj.style.visibility = 'visible';
- ajax_spell.showboxObj.innerHTML = '';
- ajax_spell.setState('start');
- };
-
- /**
- * Calback for the timeout handling
- *
- * Will be called when the aspell backend didn't return
- */
- this.timedOut = function(){
- if(ajax_spell.timer !== null){
- window.clearTimeout(ajax_spell.timer);
- ajax_spell.timer = null;
-
- ajax_spell.textboxObj.disabled = false;
- ajax_spell.showboxObj.style.display = 'none';
- ajax_spell.textboxObj.style.display = 'block';
- ajax_spell.editbarObj.style.visibility = 'visible';
- ajax_spell.showboxObj.innerHTML = '';
- ajax_spell.setState('start');
-
- window.alert('Error: The spell checker did not respond');
- }
- };
-
- // --- Callers ---
-
- /**
- * Starts the spellchecking by sending an AJAX request
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.run = function(){
- ajax_spell.setState('run');
- ajax_spell.textboxObj.disabled = true;
- ajax_spell.editbarObj.style.visibility = 'hidden';
- var ajax = new sack(ajax_spell.handler);
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- ajax.onCompletion = this.start;
- ajax.runAJAX('call=check&utf8='+ajax_spell.utf8ok+
- '&data='+encodeURIComponent(ajax_spell.textboxObj.value));
-
- // abort after 13 seconds
- this.timer = window.setTimeout(ajax_spell.timedOut,13000);
- };
-
- /**
- * Rewrites the HTML back to text again using an AJAX request
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- this.resume = function(){
- ajax_spell.setState('run');
- var text = ajax_spell.showboxObj.innerHTML;
- if(text !== ''){
- var ajax = new sack(ajax_spell.handler);
- ajax.AjaxFailedAlert = '';
- ajax.encodeURIString = false;
- ajax.onCompletion = ajax_spell.stop;
- ajax.runAJAX('call=resume&utf8='+ajax_spell.utf8ok+
- '&data='+encodeURIComponent(text));
- }
- };
-
-}
-
-// create the global object
-ajax_spell = new ajax_spell_class();
-
-//Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/lib/styles/spellcheck.css b/lib/styles/spellcheck.css
deleted file mode 100644
index 51106f95a..000000000
--- a/lib/styles/spellcheck.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Basic styles for the spellchecker. Only included when the spellcheck option
- * is enabled. These styles are the absolute minimum to make the spellchecker
- * work. Templates should add addional styles for making it look nice.
- */
-
-div.dokuwiki div#spell__suggest {
- position: absolute;
- left: 0;
- top: 0;
- display: none;
- z-index: 2;
-}
-
-div.dokuwiki div#spell__result {
- display:none;
- font-family:monospace;
- overflow: auto;
- z-index: 1;
-}
-
diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css
index c407de815..0b4e29634 100644
--- a/lib/tpl/default/design.css
+++ b/lib/tpl/default/design.css
@@ -745,38 +745,6 @@ button.pickerbutton {
cursor: pointer;
}
-/* ---------- Spellchecking ------------- */
-
-div.dokuwiki a.spell_error {
- color: #f00;
- text-decoration: underline;
-}
-
-div.dokuwiki div#spell__suggest {
- background-color: __background__;
- padding: 2px;
- border: 1px solid __text__;
- font-size: 80%;
- display: none;
-}
-
-div.dokuwiki div#spell__result {
- border: 1px solid __border__;
- color: __text__;
- font-size: 14px;
- padding: 3px;
- background-color: __background_other__;
- display: none;
-}
-
-div.dokuwiki span.spell_noerr {
- color: #093;
-}
-
-div.dokuwiki span.spell_wait {
- color: #06c;
-}
-
/* --------------- Image Details ----------------- */
div.dokuwiki div.img_big {