Permalink
Browse files

Version 1.5.14 PUBLISHED

  • Loading branch information...
1 parent 507cb36 commit 0eb8fc49e7f6079f4f52944db588a3ffacd89dff @lwt-project committed Aug 5, 2013
Showing with 54 additions and 36 deletions.
  1. +0 −6 css/styles.css
  2. +2 −2 display_impr_text_text.php
  3. +6 −1 info.htm
  4. +2 −2 print_impr_text.php
  5. +15 −14 print_text.php
  6. +29 −11 utilities.inc.php
View
6 css/styles.css
@@ -319,37 +319,31 @@ dt {
color: #999999;
font-size: 60%;
font-style: italic;
- word-break: normal;
}
.annromruby {
color: #000000;
font-size: 100%;
font-style: italic;
- word-break: normal;
}
.annromrubysolo {
color: #000000;
font-size: 100%;
font-style: normal;
- word-break: normal;
}
.anntrans {
color: #0099CC;
font-size: 60%;
font-style: normal;
- word-break: normal;
}
.anntransruby {
color: #0099CC;
font-size: 100%;
font-style: normal;
- word-break: normal;
}
.anntransruby2 {
color: #006699;
font-size: 125%;
font-style: normal;
- word-break: normal;
}
#footer {
bottom: 0;
View
4 display_impr_text_text.php
@@ -105,7 +105,7 @@ function click_text() {
echo "<div id=\"print\"" . ($rtlScript ? ' dir="rtl"' : '') . ">";
-echo '<p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">';
+echo '<p style="font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">';
$items = preg_split('/[\n]/u', $ann);
@@ -126,7 +126,7 @@ function click_text() {
} else {
echo str_replace(
"",
- '</p><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
+ '</p><p style="font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
" " . tohtml($vals[1]));
}
}
View
7 info.htm
@@ -223,7 +223,7 @@
<dd>
<ul>
- <li>The current version is <b>1.5.13 (July 22 2013)</b>.
+ <li>The current version is <b>1.5.14 (August 05 2013)</b>.
</li>
<li>
@@ -2463,6 +2463,11 @@
<dd>
<ul>
+ <li>1.5.14 (August 05 2013):</br />
+ Wrong text display in Print Screen corrected. Special handling of word breaks (if "Remove spaces" = Yes) removed.<br />
+ </br />
+ </li>
+
<li>1.5.13 (July 22 2013):</br />
Removed an erroneous extra space in "wp_logincheck.inc.php". Thanks to a poster in the help forum for pointing this out!<br />
Minor bug fixes.<br />
View
4 print_impr_text.php
@@ -152,7 +152,7 @@
echo "<div id=\"print\"" . ($rtlScript ? ' dir="rtl"' : '') . ">";
- echo '<p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />';
+ echo '<p style="font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />';
$items = preg_split('/[\n]/u', $ann);
@@ -166,7 +166,7 @@
} else {
echo str_replace(
"",
- '</p><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
+ '</p><p style="font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
" " . tohtml($vals[1]) . " ");
}
}
View
29 print_text.php
@@ -109,10 +109,9 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
$show_trans = $ann & 1;
$show_tags = $ann & 4;
-$status = getreq('status');
-if($status == '') $status = getSetting('currentprintstatus');
-if($status == '') $status = 14;
-$whstatus = ' and (' . makeStatusCondition('WoStatus', $status) . ') ';
+$statusrange = getreq('status');
+if($statusrange == '') $statusrange = getSetting('currentprintstatus');
+if($statusrange == '') $statusrange = 14;
$annplcmnt = getreq('annplcmnt');
if($annplcmnt == '') $annplcmnt = getSetting('currentprintannotationplacement');
@@ -136,7 +135,7 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
saveSetting('currenttext',$textid);
saveSetting('currentprintannotation',$ann);
-saveSetting('currentprintstatus',$status);
+saveSetting('currentprintstatus',$statusrange);
saveSetting('currentprintannotationplacement',$annplcmnt);
pagestart_nobody('Print');
@@ -154,7 +153,7 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
echo '</h4><h3>PRINT&nbsp;▶ ' . tohtml($title) . (isset($sourceURI) ? ' <a href="' . $sourceURI . '" target="_blank"><img src="icn/chain.png" title="Text Source" alt="Text Source" /></a>' : '') . '</h3>';
echo "<p id=\"printoptions\">Terms with <b>status(es)</b> <select id=\"status\" onchange=\"{val=document.getElementById('status').options[document.getElementById('status').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&amp;status=' + val;}\">";
-echo get_wordstatus_selectoptions($status, true, true, false);
+echo get_wordstatus_selectoptions($statusrange, true, true, false);
echo "</select> ...<br />will be <b>annotated</b> with ";
echo "<select id=\"ann\" onchange=\"{val=document.getElementById('ann').options[document.getElementById('ann').selectedIndex].value;location.href='print_text.php?text=" . $textid . "&amp;ann=' + val;}\">";
echo "<option value=\"0\"" . get_selected(0,$ann) . ">Nothing</option>";
@@ -176,9 +175,9 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
}
echo "</p></div> <!-- noprint -->";
echo "<div id=\"print\"" . ($rtlScript ? ' dir="rtl"' : '') . ">";
-echo '<p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />';
+echo '<p style="font-size:' . $textsize . '%;line-height: 1.35; margin-bottom: 10px; ">' . tohtml($title) . '<br /><br />';
-$sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID, WoTranslation, WoRomanization from (' . $tbpref . 'textitems left join ' . $tbpref . 'words on (TiTextLC = WoTextLC) and (TiLgID = WoLgID) ' . $whstatus . ') where TiTxID = ' . $textid . ' and (not (TiWordCount > 1 and WoID is null)) order by TiOrder asc, TiWordCount desc';
+$sql = 'select TiWordCount as Code, TiText, TiOrder, TiIsNotWord, WoID, WoTranslation, WoRomanization, WoStatus from (' . $tbpref . 'textitems left join ' . $tbpref . 'words on (TiTextLC = WoTextLC) and (TiLgID = WoLgID)) where TiTxID = ' . $textid . ' and (not (TiWordCount > 1 and WoID is null)) order by TiOrder asc, TiWordCount desc';
$saveterm = '';
$savetrans = '';
@@ -208,21 +207,23 @@ function output_text($saveterm,$saverom,$savetrans,$savetags,
if ($record['TiIsNotWord'] != 0) {
echo str_replace(
"",
- '</p><p style="' . ($removeSpaces ? 'word-break:break-all;' : '') . 'font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
+ '</p><p style="font-size:' . $textsize . '%;line-height: 1.3; margin-bottom: 10px;">',
tohtml($record['TiText']));
}
else {
$until = $order + 2 * ($actcode-1);
$saveterm = $record['TiText'];
$savetrans = '';
$savetags = '';
+ $saverom = '';
if(isset($record['WoID'])) {
- $savetrans = $record['WoTranslation'];
- $savetags = getWordTagList($record['WoID'],'',1,0);
- if ($savetrans == '*') $savetrans = '';
+ if (checkStatusRange($record['WoStatus']+0, $statusrange)) {
+ $savetrans = $record['WoTranslation'];
+ $savetags = getWordTagList($record['WoID'],'',1,0);
+ if ($savetrans == '*') $savetrans = '';
+ $saverom = trim($record['WoRomanization']);
+ }
}
- $saverom = trim(isset($record['WoRomanization']) ?
- $record['WoRomanization'] : "");
}
} // while
mysql_free_result($res);
View
40 utilities.inc.php
@@ -39,7 +39,7 @@
function get_version() {
global $debug;
- return '1.5.13 (July 22 2013)' .
+ return '1.5.14 (August 05 2013)' .
($debug ? ' <span class="red">DEBUG</span>' : '');
}
@@ -1652,19 +1652,37 @@ function makePager ($currentpage, $pages, $script, $formname) {
// -------------------------------------------------------------
-function makeStatusCondition($fieldname, $status) {
- if ($status >= 12 && $status <= 15) {
- return '(' . $fieldname . ' between 1 and ' . ($status % 10) . ')';
- } elseif ($status >= 23 && $status <= 25) {
- return '(' . $fieldname . ' between 2 and ' . ($status % 10) . ')';
- } elseif ($status >= 34 && $status <= 35) {
- return '(' . $fieldname . ' between 3 and ' . ($status % 10) . ')';
- } elseif ($status == 45) {
+function makeStatusCondition($fieldname, $statusrange) {
+ if ($statusrange >= 12 && $statusrange <= 15) {
+ return '(' . $fieldname . ' between 1 and ' . ($statusrange % 10) . ')';
+ } elseif ($statusrange >= 23 && $statusrange <= 25) {
+ return '(' . $fieldname . ' between 2 and ' . ($statusrange % 10) . ')';
+ } elseif ($statusrange >= 34 && $statusrange <= 35) {
+ return '(' . $fieldname . ' between 3 and ' . ($statusrange % 10) . ')';
+ } elseif ($statusrange == 45) {
return '(' . $fieldname . ' between 4 and 5)';
- } elseif ($status == 599) {
+ } elseif ($statusrange == 599) {
return $fieldname . ' in (5,99)';
} else {
- return $fieldname . ' = ' . $status;
+ return $fieldname . ' = ' . $statusrange;
+ }
+}
+
+// -------------------------------------------------------------
+
+function checkStatusRange($currstatus, $statusrange) {
+ if ($statusrange >= 12 && $statusrange <= 15) {
+ return ($currstatus >= 1 && $currstatus <= ($statusrange % 10));
+ } elseif ($statusrange >= 23 && $statusrange <= 25) {
+ return ($currstatus >= 2 && $currstatus <= ($statusrange % 10));
+ } elseif ($statusrange >= 34 && $statusrange <= 35) {
+ return ($currstatus >= 3 && $currstatus <= ($statusrange % 10));
+ } elseif ($statusrange == 45) {
+ return ($currstatus == 4 || $currstatus == 5);
+ } elseif ($statusrange == 599) {
+ return ($currstatus == 5 || $currstatus == 99);
+ } else {
+ return ($currstatus == $statusrange);
}
}

0 comments on commit 0eb8fc4

Please sign in to comment.