Skip to content

Commit ca98935

Browse files
author
LWT Project
committed
Version 1.5.0 (05-Apr-2013 14:19)
1 parent 9baf631 commit ca98935

7 files changed

Lines changed: 35 additions & 13 deletions

File tree

‎css/styles.css‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ th.clickable {
150150
cursor: pointer;
151151
color: #C00000;
152152
}
153+
.clickedit {
154+
cursor: pointer;
155+
}
153156
.hide {
154157
display: none;
155158
}

‎edit_texts.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@
554554
echo '<td nowrap="nowrap" class="td1 center">&nbsp;<a href="do_text.php?start=' . $record['TxID'] . '"><img src="icn/book-open-bookmark.png" title="Read" alt="Read" /></a>&nbsp; <a href="do_test.php?text=' . $record['TxID'] . '"><img src="icn/question-balloon.png" title="Test" alt="Test" /></a>&nbsp;</td>';
555555
echo '<td nowrap="nowrap" class="td1 center">&nbsp;<a href="print_text.php?text=' . $record['TxID'] . '"><img src="icn/printer.png" title="Print" alt="Print" /></a>&nbsp; <a href="' . $_SERVER['PHP_SELF'] . '?arch=' . $record['TxID'] . '"><img src="icn/inbox-download.png" title="Archive" alt="Archive" /></a>&nbsp; <a href="' . $_SERVER['PHP_SELF'] . '?chg=' . $record['TxID'] . '"><img src="icn/document--pencil.png" title="Edit" alt="Edit" /></a>&nbsp; <span class="click" onclick="if (confirm (\'Are you sure?\')) location.href=\'' . $_SERVER['PHP_SELF'] . '?del=' . $record['TxID'] . '\';"><img src="icn/minus-button.png" title="Delete" alt="Delete" /></span>&nbsp;</td>';
556556
if ($currentlang == '') echo '<td class="td1 center">' . tohtml($record['LgName']) . '</td>';
557-
echo '<td class="td1 center">' . tohtml($record['TxTitle']) . ' <span class="smallgray2">' . tohtml($record['taglist']) . '</span> &nbsp;' . (($audio != '') ? '<img src="icn/speaker-volume.png" title="With Audio" alt="With Audio" />' : '') . ($record['annotlen'] ? ' <img src="icn/tick.png" title="With Annotation" alt="With Annotation" />' : '') . '</td>';
557+
echo '<td class="td1 center">' . tohtml($record['TxTitle']) . ' <span class="smallgray2">' . tohtml($record['taglist']) . '</span> &nbsp;' . (($audio != '') ? '<img src="icn/speaker-volume.png" title="With Audio" alt="With Audio" />' : '') . ($record['annotlen'] ? ' <a href="print_impr_text.php?text=' . $record['TxID'] . '"><img src="icn/tick.png" title="Improved Annotation" alt="Improved Annotation" /></a>' : '') . '</td>';
558558
if ($showCounts) {
559559
echo '<td class="td1 center"><span title="Total">&nbsp;' . $txttotalwords . '&nbsp;</span></td>';
560560
echo '<td class="td1 center"><span title="Saved" class="status4">&nbsp;' . ($txtworkedall > 0 ? '<a href="edit_words.php?page=1&amp;query=&amp;status=&amp;tag12=0&amp;tag2=&amp;tag1=&amp;text=' . $record['TxID'] . '">' . $txtworkedwords . '+' . $txtworkedexpr . '</a>' : '0' ) . '&nbsp;</span></td>';

‎edit_words.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,8 @@
612612
echo '<td class="td1 center"><a name="rec' . $record['WoID'] . '"><input name="marked[]" type="checkbox" class="markcheck" value="' . $record['WoID'] . '" ' . checkTest($record['WoID'], 'marked') . ' /></a></td>';
613613
echo '<td class="td1 center" nowrap="nowrap">&nbsp;<a href="' . $_SERVER['PHP_SELF'] . '?chg=' . $record['WoID'] . '"><img src="icn/sticky-note--pencil.png" title="Edit" alt="Edit" /></a>&nbsp; <a href="' . $_SERVER['PHP_SELF'] . '?del=' . $record['WoID'] . '"><img src="icn/minus-button.png" title="Delete" alt="Delete" /></a>&nbsp;</td>';
614614
if ($currentlang == '') echo '<td class="td1 center">' . tohtml($record['LgName']) . '</td>';
615-
echo '<td class="td1 "><span' . ($record['LgRightToLeft'] ? ' dir="rtl" ' : '') . '>' . tohtml($record['WoText']) . '</span>' . tohtml($record['WoRomanization']!='' ? (' / ' . $record['WoRomanization']) : '') . '</td>';
616-
echo '<td class="td1"><span id="trans' . $record['WoID'] . '" class="edit_area">' . tohtml(repl_tab_nl($record['WoTranslation'])) . '</span> <span class="smallgray2">' . tohtml($record['taglist']) . '</span></td>';
615+
echo '<td class="td1 "><span' . ($record['LgRightToLeft'] ? ' dir="rtl" ' : '') . '>' . tohtml($record['WoText']) . '</span>' . ($record['WoRomanization']!='' ? (' / <span id="roman' . $record['WoID'] . '" class="edit_area clickedit">' . tohtml(repl_tab_nl($record['WoRomanization'])) . '</span>') : '') . '</td>';
616+
echo '<td class="td1"><span id="trans' . $record['WoID'] . '" class="edit_area clickedit">' . tohtml(repl_tab_nl($record['WoTranslation'])) . '</span> <span class="smallgray2">' . tohtml($record['taglist']) . '</span></td>';
617617
echo '<td class="td1 center"><b>' . ($record['SentOK']!=0 ? '<img src="icn/status.png" title="' . tohtml($record['WoSentence']) . '" alt="Yes" />' : '<img src="icn/status-busy.png" title="(No valid sentence)" alt="No" />') . '</b></td>';
618618
echo '<td class="td1 center" title="' . tohtml(get_status_name($record['WoStatus'])) . '">' . tohtml(get_status_abbr($record['WoStatus'])) . ($record['WoStatus'] < 98 ? '/' . $days : '') . '</td>';
619619
echo '<td class="td1 center" nowrap="nowrap">' . $score . '</td>';

‎info.htm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ <h4>
22232223

22242224
<li>1.5.0 (April ?? 2013):
22252225
From the Print Screen, you are now able to create a "better" interlinear annotated text. The data inputted for this feature will NOT influence or change your terms and their translations in any way. It's only the starting point. The translations of the terms will be split according to the "List of characters that delimit different translations" in the Settings (default: |/;). You select one of these translations, or you input your own. With this information, a better interlinear annotated text will be created. Important: If you change the text, the special annotation will be deleted. Later changes in your terms are not recognized. The best time to do the creation of a better annotated text is after finishing the creation of all terms of the text. It's also important to create the terms with some discipline and delimit different translations with "/" or "|" or ";" (you may change this).<br />
2226-
In place editing of translations in term table.
2226+
In place editing of translations and romanizations now possible in term table.
22272227
<br /><br />
22282228
</li>
22292229

‎inline_edit.php‎

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,29 @@
1919
include "settings.inc.php";
2020
include "utilities.inc.php";
2121

22-
$value = (isset($_REQUEST['value'])) ? $_REQUEST['value'] : "";
23-
$id = (isset($_REQUEST['id'])) ? $_REQUEST['id'] : "";
22+
$value = (isset($_POST['value'])) ? $_POST['value'] : "";
23+
$id = (isset($_POST['id'])) ? $_POST['id'] : "";
2424

25-
echo $id . "/" . $value;
25+
if (substr($id, 0, 5) == "trans") {
26+
// usleep(200000);
27+
$id = substr($id, 5);
28+
$message = runsql('update words set WoTranslation = ' .
29+
convert_string_to_sqlsyntax(repl_tab_nl($value)) . ' where WoID = ' . $id,
30+
"");
31+
echo get_first_value("select WoTranslation as value from words where WoID = " . $id);
32+
exit;
33+
}
34+
35+
if (substr($id, 0, 5) == "roman") {
36+
// usleep(100000);
37+
$id = substr($id, 5);
38+
$message = runsql('update words set WoRomanization = ' .
39+
convert_string_to_sqlsyntax(repl_tab_nl($value)) . ' where WoID = ' . $id,
40+
"");
41+
echo get_first_value("select WoRomanization as value from words where WoID = " . $id);
42+
exit;
43+
}
44+
45+
echo "ERROR - please refresh page!";
2646

2747
?>

‎js/jq_pgm.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ $(document).ready( function() {
401401
submit : 'Save',
402402
cancel : 'Cancel',
403403
rows : 3,
404-
cols : 30
404+
cols : 35
405405
});
406406
$('input.othertext').change(changeOtherText);
407407
$('form.validate').submit(check);

‎utilities.inc.php‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,11 +1746,10 @@ function tsv_export($sql) {
17461746
// -------------------------------------------------------------
17471747

17481748
function repl_tab_nl($s) {
1749-
return str_replace("\r",' ',
1750-
str_replace("\n",' ',
1751-
str_replace("\r\n",' ',
1752-
str_replace("\t",' ',$s)
1753-
)));
1749+
$s = str_replace(array("\r\n", "\r", "\n", "\t"), ' ', $s);
1750+
$s = preg_replace('/\s/u', ' ', $s);
1751+
$s = preg_replace('/\s{2,}/u', ' ', $s);
1752+
return trim($s);
17541753
}
17551754

17561755
// -------------------------------------------------------------

0 commit comments

Comments
 (0)