weekly release 1.9.13+
[moodle.git] / lib / speller / controls.html
blob6f2831af81ebc7478f4dec3a7c7596ff337a9df2
1 <html>
2 <head>
3 <link rel="stylesheet" type="text/css" href="spellerStyle.css"/>
5 <script src="controlWindow.js"></script>
7 <script type="text/javascript">
8 var spellerObject;
9 var controlWindowObj;
11 if( parent.opener ) {
12 spellerObject = parent.opener.speller;
15 function ignore_word() {
16 if( spellerObject ) {
17 spellerObject.ignoreWord();
21 function ignore_all() {
22 if( spellerObject ) {
23 spellerObject.ignoreAll();
27 function replace_word() {
28 if( spellerObject ) {
29 spellerObject.replaceWord();
33 function replace_all() {
34 if( spellerObject ) {
35 spellerObject.replaceAll();
39 function end_spell() {
40 if( spellerObject ) {
41 spellerObject.terminateSpell();
45 function undo() {
46 if( spellerObject ) {
47 spellerObject.undo();
51 function suggText() {
52 if( controlWindowObj ) {
53 controlWindowObj.setSuggestedText();
57 function init_spell() {
58 var controlForm = document.getElementById('spellcheck');
60 // create a new controlWindow object
61 controlWindowObj = new controlWindow( controlForm );
63 // call the init_spell() function in the parent frameset
64 if( parent.frames.length ) {
65 parent.init_spell( controlWindowObj );
66 } else {
67 alert( 'This page was loaded outside of a frameset. It might not display properly' );
71 </script>
73 </head>
75 <body class="controlWindowBody" onLoad="init_spell();">
77 <form id="spellcheck">
79 <table border="0" cellpadding="0" cellspacing="0" border="0">
80 <tr>
81 <td colspan="3" class="normalLabel">Not in dictionary:</td>
82 </tr>
83 <tr>
84 <td colspan="3"><input class="readonlyInput" type="text" name="misword" readonly /></td>
85 </tr>
86 <tr>
87 <td colspan="3" height="5"></td>
88 </tr>
89 <tr>
90 <td class="normalLabel">Change to:</td>
91 </tr>
92 <tr valign="top">
93 <td>
94 <table border="0" cellpadding="0" cellspacing="0" border="0">
95 <tr>
96 <td class="normalLabel">
97 <input class="textDefault" type="text" name="txtsugg" />
98 </td>
99 </tr>
100 <tr>
101 <td>
102 <select class="suggSlct" name="sugg" size="7" onChange="suggText();" onDblClick="replace_word();">
103 <option></option>
104 </select>
105 </td>
106 </tr>
107 </table>
108 </td>
109 <td>&nbsp;&nbsp;</td>
110 <td>
111 <table border="0" cellpadding="0" cellspacing="0" border="0">
112 <tr>
113 <td>
114 <input class="buttonDefault" type="button" value="Ignore" onClick="ignore_word();" />
115 </td>
116 <td>&nbsp;&nbsp;</td>
117 <td>
118 <input class="buttonDefault" type="button" value="Ignore All" onClick="ignore_all();" />
119 </td>
120 </tr>
121 <tr>
122 <td colspan="3" height="5"></td>
123 </tr>
124 <tr>
126 <td>
127 <input class="buttonDefault" type="button" value="Replace" onClick="replace_word();" />
128 </td>
129 <td>&nbsp;&nbsp;</td>
130 <td>
131 <input class="buttonDefault" type="button" value="Replace All" onClick="replace_all();" />
132 </td>
133 </tr>
134 <tr>
135 <td colspan="3" height="5"></td>
136 </tr>
137 <tr>
138 <td>
139 <input class="buttonDefault" type="button" name="btnUndo" value="Undo" onClick="undo();" disabled />
140 </td>
141 <td>&nbsp;&nbsp;</td>
142 <td>
143 <input class="buttonDefault" type="button" value="Close" onClick="end_spell();" />
144 </td>
145 </tr>
146 </table>
147 </td>
148 </tr>
149 </table>
151 </form>
152 </body>
153 </html>