From: Drew F. <bla...@us...> - 2004-07-31 00:46:50
|
Update of /cvsroot/collective/CMFSpellCheck/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29231/www Modified Files: manageSpeller.zpt manageWordlist.zpt Log Message: Implement Wordlist feature and move to v0.5 Index: manageWordlist.zpt =================================================================== RCS file: /cvsroot/collective/CMFSpellCheck/www/manageWordlist.zpt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- manageWordlist.zpt 30 Jul 2004 21:58:37 -0000 1.2 +++ manageWordlist.zpt 31 Jul 2004 00:46:36 -0000 1.3 @@ -2,63 +2,200 @@ <tal:header replace="structure here/manage_page_header" /> - <body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099"> + <body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099" + tal:define="global spell here/portal_speller"> <tal:tabs replace="structure here/manage_tabs" /> <style type="text/css"> div.row { - clear: both; - padding-top: 10px; + padding-top: 2px; } - div.row span.cell { - float: left; - text-align: right; + .cell { + margin-right:1em; + width: 33%; } - div.row span.label { + .content_type { + border: 1px solid black; + margin: 4px; + } + .wlerrors { + color: Red; + } + td { + vertical-align: top; + } + td.main { + text-align: right; font-weight: bold; } + td.help { + text-align: left; + } </style> - <form action="manageWordlist" - method="post" - tal:define="wordlist here/portal_speller/wordlist | nothing"> + <form action="manageWordlist" method="post"> - <p> - This is the special list of words which will be added to your selected - spellers own dictionary. Use it to add local spellings or common proper - names to your site dictionary. Each word should be added on its own line - </p> - <div class="form-label"> - Wordlist - </div> + <table> + <thead> + <tr> + <th>Word List</th> + <th>Word List Controls</th> + </tr> + </thead> - <textarea name="wordlist" - cols=80 + <tbody> + + <tr> + <td> + <textarea name="wordlist" + cols=20 rows=20 - tal:content="wordlist"></textarea> + tal:content="spell/getSpellWordlist"></textarea> + </td> - <div class="form-element"> + <td> + <p> + This is the special list of words which will be added to your + selected spellers own dictionary. Use it to add local spellings + or common proper names to your site dictionary. Each word should + be added on its own line. Normally words should be <b>lower-case</b>; + if you <b>C</b>apitalise the first letter (or other letters), most + spellers will treat such words as Proper Names and try to correct + the case. For example: + </p> + <p> + if your word list contains <kbd>Plone</kbd>, then <tt>Plone</tt> will + pass the spell check while <tt>plone</tt> will fail. + </p> + <p> + Spellers do not provide a mechanism for removing words from your + personal wordlist; this can only be done by editing the file directly. + </p> - <input class="form-element" - type="submit" - name="ACTION" - value="Save Wordlist" - /> - </div> + <table> + <tr> + <td class="main">Switch</td> + <td> + <input type="text" + name="wordlistsw" + value="" + size="4" + tal:attributes="value spell/wordlistsw | nothing" + /> + </td> + <td class="help"> + The switch for <i tal:content="spell/speller">speller</i> + that allows a personal wordlist to be specified. + </td> + </tr> - <hr /> + <tr> + <td class="main">Filename</td> + <td> + <input type="text" + id="wordlistfile" + name="wordlistfile" + value="" + tal:attributes="value spell/wordlistfile | nothing" + /> + </td> + <td class="help"> + The <b>full</b> path and file name of your personal word list. + The path <b>must</b> be <i>writebable</i> by the user running Zope. + A possible location might be <tt>/path/to/your/ZOPE_INSTANCE/var/.wordlist</tt> + Do not use the same file for different spellers; spellers often + format the file is special ways + </td> + </tr> - Use this section to either upload or download the wordlist to or from a file. + <tr> + <td> + </td> + <td> + <input type="submit" name="action" value="Save" /> + </td> + <td> + </td> + </tr> - <input type="text" name="filename"/> - <input class="form-element" type="submit" name="action" value="Import"/> - <input class="form-element" type="submit" name="action" value="Export"/> + <tr> + <td colspan="3"> + <hr> + </td> + </tr> + + <tr tal:condition="spell/canreload"> + <td class="main"> + <input class="form-element" type="submit" name="action" value="Reload"/> + </td> + <td class="help" colspan="2"> + Use this button to load the wordlist from the file specified above. + Useful if you decide to edit the file directly outside of Zope. + </td> + </tr> + + <tr> + <td class="main"> + <input class="form-element" type="submit" name="action" value="Import"/> + </td> + <td> + <input type="text" name="filename"/> + </td> + <td class="help"> + Use this dialogue to import a wordlist from a file on your work-station. + </td> + </tr> + + <tr> + <td class="main"> + <input class="form-element" type="submit" name="action" value="Export"/> + </td> + <td class="help" colspan="2"> + Use this dialogue to export the wordlist to a file on your work-station. + </td> + </tr> + </table> + + </td> + + </tr> + <tr> + <td> + <div class="form-element"> + <input class="form-element" + type="reset" + name="action" + value="Reset" + /> + <input class="form-element" + type="submit" + name="action" + value="Save Wordlist" + /> + </div> + </td> + <td> + <hr> + <!-- error reporting --> + <tal:gotsomeerrors tal:define="wlerrors spell/getWLErrors" + tal:condition="wlerrors"> + Errors reported when Saving the Wordlist + <ul class="wlerrors"> + <tal:eloop tal:repeat="err wlerrors"> + <li tal:content="err">Error message</li> + </tal:eloop> + </ul> + </tal:gotsomeerrors> + </td> + </tr> + </tbody> + </table> </form> - <tal:footer replace="structure here/manage_page_footer" /> + <tal:footer replace="structure here/manage_page_footer" /> </body> Index: manageSpeller.zpt =================================================================== RCS file: /cvsroot/collective/CMFSpellCheck/www/manageSpeller.zpt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- manageSpeller.zpt 30 Jul 2004 21:58:37 -0000 1.2 +++ manageSpeller.zpt 31 Jul 2004 00:46:36 -0000 1.3 @@ -7,7 +7,7 @@ <tal:tabs replace="structure here/manage_tabs" /> - <style> + <style type="text/css"> div.row { padding-top: 2px; } @@ -19,6 +19,9 @@ border: 1px solid black; margin: 4px; } + td { + vertical-align: top; + } td.main { text-align: right; font-weight: bold; @@ -148,36 +151,36 @@ </tr> <tr> - <td class="main">Switches</td> + <td class="main">Pipe Switch</td> <td> <input type="text" - name="switches" + name="pipesw" value="" - tal:attributes="value spell/switches | nothing" + tal:attributes="value spell/pipesw | nothing" /> </td> <td class="help"> - Additional switches to be applied to the spell checker. - These will <b>not</b> over-ride the built-in switches for - dictionary, language, encoding and wordlist options (if - supported) - they will be added automatically to the - switches specified here. Please refer to the - <i tal:content="spell/speller">speller</i> documentation. + The switch setting <i tal:content="spell/speller">speller</i> + into <tt>pipe</tt> mode. </td> </tr> <tr> - <td class="main">Wordlist Switch</td> + <td class="main">Switches</td> <td> <input type="text" - name="wordlistsw" + name="switches" value="" - tal:attributes="value spell/wordlistsw | nothing" + tal:attributes="value spell/switches | nothing" /> </td> <td class="help"> - The switch for <i tal:content="spell/speller">speller</i> - that allows the loading of a special wordlist. + Additional switches to be applied to the spell checker. + These will <b>not</b> over-ride the built-in switches for + dictionary, language, encoding and wordlist options (if + supported) - they will be added automatically to the + switches specified here. Please refer to the + <i tal:content="spell/speller">speller</i> documentation. </td> </tr> |