annotate wiki/htdocs/applets/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellchecker.html @ 3949:645324d706e2

update current fckeditor(v2.0) to recent version of it(v2.6)
author Byeongweon [tasyblue@gmail.com]
date Thu, 29 May 2008 16:22:22 +0900
parents 77665d8e2254
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3949
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
1
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
2 <script>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
3
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
4 var wordWindow = null;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
5 var controlWindow = null;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
6
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
7 function init_spell( spellerWindow ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
8
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
9 if( spellerWindow ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
10 if( spellerWindow.windowType == "wordWindow" ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
11 wordWindow = spellerWindow;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
12 } else if ( spellerWindow.windowType == "controlWindow" ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
13 controlWindow = spellerWindow;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
14 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
15 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
16
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
17 if( controlWindow && wordWindow ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
18 // populate the speller object and start it off!
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
19 var speller = opener.speller;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
20 wordWindow.speller = speller;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
21 speller.startCheck( wordWindow, controlWindow );
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
22 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
23 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
24
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
25 // encodeForPost
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
26 function encodeForPost( str ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
27 var s = new String( str );
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
28 s = encodeURIComponent( s );
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
29 // additionally encode single quotes to evade any PHP
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
30 // magic_quotes_gpc setting (it inserts escape characters and
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
31 // therefore skews the btye positions of misspelled words)
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
32 return s.replace( /\'/g, '%27' );
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
33 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
34
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
35 // post the text area data to the script that populates the speller
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
36 function postWords() {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
37 var bodyDoc = window.frames[0].document;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
38 bodyDoc.open();
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
39 bodyDoc.write('<html>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
40 bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
41 bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
42 if (opener) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
43 var speller = opener.speller;
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
44 bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
45 bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '<\/p>'); // by FredCK
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
46 bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
47 for( var i = 0; i < speller.textInputs.length; i++ ) {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
48 bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
49 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
50 bodyDoc.write('<\/form>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
51 bodyDoc.write('<\/body>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
52 } else {
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
53 bodyDoc.write('<body class="normalText">');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
54 bodyDoc.write('<p><b>This page cannot be displayed<\/b><\/p><p>The window was not opened from another window.<\/p>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
55 bodyDoc.write('<\/body>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
56 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
57 bodyDoc.write('<\/html>');
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
58 bodyDoc.close();
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
59 }
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
60 </script>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
61
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
62 <html>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
63 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
64 <head>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
65 <title>Speller Pages</title>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
66 </head>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
67 <frameset rows="*,201" onLoad="postWords();">
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
68 <frame src="blank.html">
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
69 <frame src="controls.html">
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
70 </frameset>
645324d706e2 update current fckeditor(v2.0) to recent version of it(v2.6)
Byeongweon [tasyblue@gmail.com]
parents: 0
diff changeset
71 </html>