Skip to content

Commit

Permalink
Fix bug in showing keyboard in search range
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Nov 6, 2024
1 parent 27513dd commit eef20c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions step-web/src/main/webapp/js/search_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,8 @@ step.searchSelect = {
'<div id="nt_table"/>' +
'<h4 id="other_books_hdr"/>' +
'<div id="ob_table"/>';
if ((!onlyDisplaySpecifiedBooks) && (!step.touchDevice) && ($("#keyboardEntry").length == 1)) {
if ((!onlyDisplaySpecifiedBooks) && (!step.touchDevice) && ($("#keyboardEntry").length == 0))
$('.footer').prepend('<a id="keyboardEntry" class="advanced_search_elements" href="javascript:step.searchSelect._buildRangeKeyboard();"><img src="images/keyboard.jpg" alt="Keyboard entry"></a>');
}
return html;
},

Expand Down Expand Up @@ -1391,6 +1390,7 @@ step.searchSelect = {
str2Search = strings2Search.join(" ");
text2Display = str2Search;
}
$("td.search-type-column.select-text").html(__s.search_type_desc_text + ":");
if (strings2Search.length > 1) {
var defaultSearchString = "";
var defaultMouseOverTitle = "";
Expand All @@ -1412,7 +1412,6 @@ step.searchSelect = {
limitType, null, false, false, "", ""); //, hasHebrew, hasGreek);
text2Display = '"' + str2Search + '"';
str2Search = '%22' + str2Search + '%22';
$("td.search-type-column.select-text").html(__s.search_type_desc_text + ":");
}
else {
if ((str2Search.slice(-1) !== "*") && (!step.searchSelect.wordsWithNoInflection(str2Search))) {
Expand All @@ -1421,7 +1420,6 @@ step.searchSelect = {
limitType, null, false, false, "", ""); // , hasHebrew, hasGreek);
text2Display = str2Search + "* (" + __s.words_that_start_with + " " + str2Search + ")";
str2Search += "*";
$("td.search-type-column.select-text").html(__s.search_type_desc_text);
// Add search_type_desc_text2 to description, if user's language has a definition for it. English already has a definition for it.
if ((step.userLanguageCode === "en") || (__s.search_type_desc_text2.indexOf("+ words starting with") == -1))
$("td.search-type-column.select-text").html(__s.search_type_desc_text + __s.search_type_desc_text2 + ":");
Expand Down
5 changes: 2 additions & 3 deletions step-web/src/main/webapp/js/step.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -2844,9 +2844,8 @@ step.util = {
bookSummary += "<tr ><td><b>" + osisID + " " + curChapter + "-" + endOfHeader + "</b></td><td><b>" + summary[jsonName] + "</b></td></tr>";
}
jsonName = "chapter_" + curChapter + "_description";
if ((typeof summary[jsonName] === "string") && (summary[jsonName] !== "*") && (summary[jsonName] !== "")) {
bookSummary += '<tr><td><a href="javascript:step.util.showSummary(\'' + osisID + '.' + curChapter + '\', \'chapter\')">' + osisID + " " + curChapter + "</a></td><td>" + summary[jsonName] + "</td></tr>";
}
if ((typeof summary[jsonName] === "string") && (summary[jsonName] !== "*") && (summary[jsonName] !== ""))
bookSummary += '<tr><td><a href="javascript:step.util.showSummary(\'' + osisID + '.' + curChapter + '\')">' + osisID + " " + curChapter + "</a></td><td>" + summary[jsonName] + "</td></tr>";
}
bookSummary += "</tbody></table></div>";
}
Expand Down

0 comments on commit eef20c5

Please sign in to comment.