[freeside-commits] freeside/httemplate/elements/fckeditor/editor/dialog/fck_spellerpages/spellerpages blank.html, NONE, 1.1.2.2 controlWindow.js, NONE, 1.1.2.2 controls.html, NONE, 1.1.2.2 spellChecker.js, NONE, 1.1.2.2 spellchecker.html, NONE, 1.1.2.2 spellerStyle.css, NONE, 1.1.2.2 wordWindow.js, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Mon Jun 16 20:57:54 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/dialog/fck_spellerpages/spellerpages
In directory wavetail.420.am:/tmp/cvs-serv697/fckeditor/editor/dialog/fck_spellerpages/spellerpages
Added Files:
Tag: FREESIDE_1_7_BRANCH
blank.html controlWindow.js controls.html spellChecker.js
spellchecker.html spellerStyle.css wordWindow.js
Log Message:
adding fckeditor on _17_BRANCH, for customer notices
--- NEW FILE: spellChecker.js ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: controls.html ---
<html>
<head>
<link rel="stylesheet" type="text/css" href="spellerStyle.css" />
<script type="text/javascript" src="controlWindow.js"></script>
<script type="text/javascript">
var spellerObject;
var controlWindowObj;
if( parent.opener ) {
spellerObject = parent.opener.speller;
}
function ignore_word() {
if( spellerObject ) {
spellerObject.ignoreWord();
}
}
function ignore_all() {
if( spellerObject ) {
spellerObject.ignoreAll();
}
}
function replace_word() {
if( spellerObject ) {
spellerObject.replaceWord();
}
}
function replace_all() {
if( spellerObject ) {
spellerObject.replaceAll();
}
}
function end_spell() {
if( spellerObject ) {
spellerObject.terminateSpell();
}
}
function undo() {
if( spellerObject ) {
spellerObject.undo();
}
}
function suggText() {
if( controlWindowObj ) {
controlWindowObj.setSuggestedText();
}
}
var FCKLang = window.parent.parent.FCKLang ; // by FredCK
function init_spell() {
// By FredCK (fckLang attributes have been added to the HTML source of this page)
window.parent.parent.OnSpellerControlsLoad( this ) ;
var controlForm = document.spellcheck;
// create a new controlWindow object
controlWindowObj = new controlWindow( controlForm );
// call the init_spell() function in the parent frameset
if( parent.frames.length ) {
parent.init_spell( controlWindowObj );
} else {
alert( 'This page was loaded outside of a frameset. It might not display properly' );
}
}
</script>
</head>
<body class="controlWindowBody" onLoad="init_spell();" style="OVERFLOW: hidden" scroll="no"> <!-- by FredCK -->
<form name="spellcheck">
<table border="0" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td colspan="3" class="normalLabel"><span fckLang="DlgSpellNotInDic">Not in dictionary:</span></td>
</tr>
<tr>
<td colspan="3"><input class="readonlyInput" type="text" name="misword" readonly /></td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td class="normalLabel"><span fckLang="DlgSpellChangeTo">Change to:</span></td>
</tr>
<tr valign="top">
<td>
<table border="0" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="normalLabel">
<input class="textDefault" type="text" name="txtsugg" />
</td>
</tr>
<tr>
<td>
<select class="suggSlct" name="sugg" size="7" onChange="suggText();" onDblClick="replace_word();">
<option></option>
</select>
</td>
</tr>
</table>
</td>
<td> </td>
<td>
<table border="0" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnore" value="Ignore" onClick="ignore_word();">
</td>
<td> </td>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnIgnoreAll" value="Ignore All" onClick="ignore_all();">
</td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplace" value="Replace" onClick="replace_word();">
</td>
<td> </td>
<td>
<input class="buttonDefault" type="button" fckLang="DlgSpellBtnReplaceAll" value="Replace All" onClick="replace_all();">
</td>
</tr>
<tr>
<td colspan="3" height="5"></td>
</tr>
<tr>
<td>
<input class="buttonDefault" type="button" name="btnUndo" fckLang="DlgSpellBtnUndo" value="Undo" onClick="undo();"
disabled>
</td>
<td> </td>
<td>
<!-- by FredCK
<input class="buttonDefault" type="button" value="Close" onClick="end_spell();">
-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
--- NEW FILE: wordWindow.js ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: spellerStyle.css ---
.blend {
font-family: courier new;
font-size: 10pt;
border: 0;
margin-bottom:-1;
}
.normalLabel {
font-size:8pt;
}
.normalText {
font-family:arial, helvetica, sans-serif;
font-size:10pt;
color:000000;
background-color:FFFFFF;
}
.plainText {
font-family: courier new, courier, monospace;
font-size: 10pt;
color:000000;
background-color:FFFFFF;
}
.controlWindowBody {
font-family:arial, helvetica, sans-serif;
font-size:8pt;
padding: 7px ; /* by FredCK */
margin: 0px ; /* by FredCK */
/* color:000000; by FredCK */
/* background-color:DADADA; by FredCK */
}
.readonlyInput {
background-color:DADADA;
color:000000;
font-size:8pt;
width:392px;
}
.textDefault {
font-size:8pt;
width: 200px;
}
.buttonDefault {
width:90px;
height:22px;
font-size:8pt;
}
.suggSlct {
width:200px;
margin-top:2;
font-size:8pt;
}
--- NEW FILE: spellchecker.html ---
<script>
var wordWindow = null;
var controlWindow = null;
function init_spell( spellerWindow ) {
if( spellerWindow ) {
if( spellerWindow.windowType == "wordWindow" ) {
wordWindow = spellerWindow;
} else if ( spellerWindow.windowType == "controlWindow" ) {
controlWindow = spellerWindow;
}
}
if( controlWindow && wordWindow ) {
// populate the speller object and start it off!
var speller = opener.speller;
wordWindow.speller = speller;
speller.startCheck( wordWindow, controlWindow );
}
}
// encodeForPost
function encodeForPost( str ) {
var s = new String( str );
s = encodeURIComponent( s );
// additionally encode single quotes to evade any PHP
// magic_quotes_gpc setting (it inserts escape characters and
// therefore skews the btye positions of misspelled words)
return s.replace( /\'/g, '%27' );
}
// post the text area data to the script that populates the speller
function postWords() {
var bodyDoc = window.frames[0].document;
bodyDoc.open();
bodyDoc.write('<html>');
bodyDoc.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
bodyDoc.write('<link rel="stylesheet" type="text/css" href="spellerStyle.css"/>');
if (opener) {
var speller = opener.speller;
bodyDoc.write('<body class="normalText" onLoad="document.forms[0].submit();">');
bodyDoc.write('<p>' + window.parent.FCKLang.DlgSpellProgress + '<\/p>'); // by FredCK
bodyDoc.write('<form action="'+speller.spellCheckScript+'" method="post">');
for( var i = 0; i < speller.textInputs.length; i++ ) {
bodyDoc.write('<input type="hidden" name="textinputs[]" value="'+encodeForPost(speller.textInputs[i].value)+'">');
}
bodyDoc.write('<\/form>');
bodyDoc.write('<\/body>');
} else {
bodyDoc.write('<body class="normalText">');
bodyDoc.write('<p><b>This page cannot be displayed<\/b><\/p><p>The window was not opened from another window.<\/p>');
bodyDoc.write('<\/body>');
}
bodyDoc.write('<\/html>');
bodyDoc.close();
}
</script>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<title>Speller Pages</title>
</head>
<frameset rows="*,201" onLoad="postWords();">
<frame src="blank.html">
<frame src="controls.html">
</frameset>
</html>
--- NEW FILE: controlWindow.js ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: blank.html ---
More information about the freeside-commits
mailing list