Start of a new trasnlation dropdown, commit so maybe dave can help :)

This commit is contained in:
james 2009-09-10 21:31:51 +00:00
parent 074d39171f
commit 174d658f2d
2 changed files with 42 additions and 1 deletions

View File

@ -102,7 +102,7 @@
echo "<input type=\"hidden\" name=\"id\" value=\"".$_GET['edit']."\">\n";
echo "<table class=\"tableedit\">\n";
echo "<tr><th>".i18n("Organization Name")."</th><td><input type=\"text\" id=\"organization\" name=\"organization\" value=\"".htmlspecialchars($r->organization)."\" size=\"60\" maxlength=\"128\" /><script type=\"text/javascript\">translateButton('organization');</script></td></tr>\n";
echo "<tr><th>".i18n("Organization Name")."</th><td><input class=\"translatable\" type=\"text\" id=\"organization\" name=\"organization\" value=\"".htmlspecialchars($r->organization)."\" size=\"60\" maxlength=\"128\" /></td></tr>\n";
echo "<tr><th>".i18n("Address")."</th><td><input type=\"text\" name=\"address\" value=\"".htmlspecialchars($r->address)."\" size=\"60\" maxlength=\"64\" /></td></tr>\n";
echo "<tr><th>".i18n("City")."</th><td><input type=\"text\" name=\"city\" value=\"".htmlspecialchars($r->city)."\" size=\"32\" maxlength=\"32\" /></td></tr>\n";
echo "<tr><th>".i18n($config['provincestate'])."</th><td>";

View File

@ -0,0 +1,41 @@
<?
/*
This file is part of the 'Science Fair In A Box' project
SFIAB Website: http://www.sfiab.ca
Copyright (C) 2009 James Grant <james@lightbox.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
?>
<script type="text/javascript">
$(document).ready(function() {
$(".translatable").each( function(i) {
$(this).after("<a href=\"#translate#"+this.id+"\"><?=i18n("translation")?></a>");
});
$("[href*=#translate#]").click(function() {
$("#translationdialog").dialog();
});
});
//this is here only to catch any missing translateButton()'s
function translateButton(o) {
// alert('tell james there is a translateButton he missed');
}
</script>
<div style="display: none" id="translationdialog">This is the translation dialog</div>