Revision: 6350
http://languagetool.svn.sourceforge.net/languagetool/?rev=6350&view=rev
Author: dnaber
Date: 2012-01-24 22:16:37 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
move check form to its own include; small layout improvements for <h2>
Modified Paths:
--------------
trunk/website/www/css/style.css
trunk/website/www/index.php
Added Paths:
-----------
trunk/website/include/checkform.php
Added: trunk/website/include/checkform.php
===================================================================
--- trunk/website/include/checkform.php (rev 0)
+++ trunk/website/include/checkform.php 2012-01-24 22:16:37 UTC (rev 6350)
@@ -0,0 +1,49 @@
+<?php
+function printLangOption($langCode, $lang) {
+ global $checkDefaultLang;
+ $checked = "";
+ if ($langCode == $checkDefaultLang) {
+ $checked = " selected='selected'";
+ }
+ print "<option value=\"$langCode\" $checked>$lang</option>\n";
+}
+?>
+
+<form name="checkform" action="http://community.languagetool.org"
method="post">
+ <textarea onfocus="javascript: if(document.checkform.text.value == '<?php
print $checkDefaultText ?>') { document.checkform.text.value='' } "
+ style="width:100%; max-width:800px;height:100px" name="text"><?php
print $checkDefaultText ?></textarea>
+ <div style="margin-top:4px">
+ <input type="submit" name="_action_checkText" value="<?php print
$checkSubmitButtonValue ?>"/>
+ <?php if ($showLanguageBox) { ?>
+ Language: <select name="lang" id="lang" >
+ <option value="auto">try to auto-detect</option>
+ <?php printLangOption("ast", "Asturian") ?>
+ <?php printLangOption("be", "Belarusian") ?>
+ <?php printLangOption("br", "Breton") ?>
+ <?php printLangOption("ca", "Catalan") ?>
+ <?php printLangOption("zh", "Chinese") ?>
+ <?php printLangOption("da", "Danish") ?>
+ <?php printLangOption("nl", "Dutch") ?>
+ <?php printLangOption("en", "English") ?>
+ <?php printLangOption("eo", "Esperanto") ?>
+ <?php printLangOption("fr", "French") ?>
+ <?php printLangOption("gl", "Galician") ?>
+ <?php printLangOption("de", "German") ?>
+ <?php printLangOption("is", "Icelandic") ?>
+ <?php printLangOption("it", "Italian") ?>
+ <?php printLangOption("km", "Khmer") ?>
+ <?php printLangOption("lt", "Lithuanian") ?>
+ <?php printLangOption("ml", "Malayalam") ?>
+ <?php printLangOption("pl", "Polish") ?>
+ <?php printLangOption("ro", "Romanian") ?>
+ <?php printLangOption("ru", "Russian") ?>
+ <?php printLangOption("sk", "Slovak") ?>
+ <?php printLangOption("sl", "Slovenian") ?>
+ <?php printLangOption("es", "Spanish") ?>
+ <?php printLangOption("sv", "Swedish") ?>
+ <?php printLangOption("tl", "Tagalog") ?>
+ <?php printLangOption("uk", "Ukrainian") ?>
+ </select>
+ <?php } ?>
+ </div>
+</form>
Modified: trunk/website/www/css/style.css
===================================================================
--- trunk/website/www/css/style.css 2012-01-24 22:11:15 UTC (rev 6349)
+++ trunk/website/www/css/style.css 2012-01-24 22:16:37 UTC (rev 6350)
@@ -35,6 +35,11 @@
color: #ef8701;
}
+h2 {
+ margin-top: 30px;
+ margin-bottom: 5px;
+}
+
.xmlcode {
font-family: monospace;
margin-left: 15px;
Modified: trunk/website/www/index.php
===================================================================
--- trunk/website/www/index.php 2012-01-24 22:11:15 UTC (rev 6349)
+++ trunk/website/www/index.php 2012-01-24 22:16:37 UTC (rev 6350)
@@ -17,55 +17,22 @@
<h2>Try it online</h2>
-<form name="checkform" action="http://community.languagetool.org"
method="post">
- <?php
- $demoText = "Paste your own text here... or check this text too see a few
of the problems that that LanguageTool can detect. Did you notice that their is
no spelcheckin included?";
- ?>
- <textarea onfocus="javascript: if(document.checkform.text.value == '<?php
print $demoText ?>') { document.checkform.text.value='' } "
- style="width:100%; max-width:800px;height:100px" name="text"><?php
print $demoText ?></textarea>
- <div style="margin-top:4px">
- <input type="submit" name="_action_checkText" value="Check Text"/>
- Language: <select name="lang" id="lang" >
-
- <option value="auto">try to auto-detect</option>
- <option value="ast" >Asturian</option>
- <option value="be" >Belarusian</option>
- <option value="br" >Breton</option>
- <option value="ca" >Catalan</option>
- <option value="zh" >Chinese</option>
- <option value="da" >Danish</option>
- <option value="nl" >Dutch</option>
- <option value="en" >English</option>
-
- <option value="eo" >Esperanto</option>
- <option value="fr" >French</option>
- <option value="gl" >Galician</option>
- <option value="de" >German</option>
- <option value="is" >Icelandic</option>
- <option value="it" >Italian</option>
- <option value="km" >Khmer</option>
- <option value="lt" >Lithuanian</option>
- <option value="ml" >Malayalam</option>
-
- <option value="pl" >Polish</option>
- <option value="ro" >Romanian</option>
- <option value="ru" >Russian</option>
- <option value="sk" >Slovak</option>
- <option value="sl" >Slovenian</option>
- <option value="es" >Spanish</option>
- <option value="sv" >Swedish</option>
- <option value="tl" >Tagalog</option>
- <option value="uk" >Ukrainian</option>
-
- </select>
- </div>
-</form>
+<?php
+$checkSubmitButtonValue = "Check Text";
+$showLanguageBox = 1;
+$checkDefaultLang = "auto";
+$checkDefaultText = "Paste your own text here... or check this text too see a
few of the problems that ".
+ "that LanguageTool can detect. Did you notice that their is no spelcheckin
included?";
+include("../include/checkform.php");
+?>
<h2>Download</h2>
<div class="downloadSection">
- <h2><?=show_link("Download LanguageTool 1.6 (29 MB)",
"download/LanguageTool-1.6.oxt", 0) ?></h2>
+ <div style="font-size: x-large; font-weight: bold">
+ <?=show_link("Download LanguageTool 1.6 (29 MB)",
"download/LanguageTool-1.6.oxt", 0) ?>
+ </div>
<ul>
<li>Requires <?=show_link("Java",
"http://www.java.com/en/download/manual.jsp", 1)?> 6.0
or later. You need to <strong>restart
OpenOffice.org/LibreOffice</strong> after installation of this extension.</li>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs