Skip to content

Commit

Permalink
Update the summary page to David's suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Nov 1, 2024
1 parent 7014fe2 commit c6d33df
Show file tree
Hide file tree
Showing 2 changed files with 307 additions and 250 deletions.
138 changes: 69 additions & 69 deletions step-web/src/main/webapp/js/search_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,73 +18,74 @@ step.searchSelect = {
rangeWasUpdated: false,
andOrNotUpdated: false,
timer: undefined,
// idx2osisCHapterJsword has to stay here because when this is running inside the html files for iFrames, step.util is no reachable.
idx2osisChapterJsword: {
"Gen": 0,
"Exo": 1, "Exod": 1,
"Lev": 2,
"Num": 3,
"Deu": 4, "Deut": 4,
"Jos": 5, "Josh": 5,
"Judg": 6,
"Rut": 7, "Ruth": 7,
"1Sa": 8, "1Sam": 8,
"2Sa": 9, "2Sam": 9,
"1Ki": 10, "1Kgs": 10,
"2Ki": 11, "2Kgs": 11,
"1Ch": 12, "1Chr": 12,
"2Ch": 13, "2Chr": 13,
"Ezr": 14, "Ezra": 14,
"Neh": 15,
"Est": 16, "Esth": 16,
"Job": 17,
"Psa": 18, "Ps": 18,
"Pro": 19, "Prov": 19,
"Ecc": 20, "Eccl": 20,
"Song": 21,
"Isa": 22,
"Jer": 23,
"Lam": 24,
"Eze": 25, "Ezek": 25,
"Dan": 26,
"Hos": 27,
"Joe": 28, "Joel": 28,
"Amo": 29, "Amos": 29,
"Obd": 30, "Obad": 30,
"Jon": 31, "Jonah": 31,
"Mic": 32,
"Nah": 33,
"Hab": 34,
"Zep": 35, "Zeph": 35,
"Hag": 36,
"Zec": 37, "Zech": 37,
"Mal": 38,
"Mat": 39, "Matt": 39,
"Mar": 40, "Mark": 40,
"Luk": 41, "Luke": 41,
"Joh": 42, "John": 42,
"Act": 43, "Acts": 43,
"Rom": 44,
"1Cor": 45,
"2Cor": 46,
"Gal": 47,
"Eph": 48,
"Phili": 49, "Phil": 49,
"Col": 50,
"1Th": 51, "1Thess": 51,
"2Th": 52, "2Thess": 52,
"1Ti": 53, "1Tim": 53,
"2Ti": 54, "2Tim": 54,
"Tit": 55, "Titus": 55,
"Phile": 56, "Phlm": 56,
"Heb": 57,
"Jam": 58, "Jas": 58,
"1Pe": 59, "1Pet": 59,
"2Pe": 60, "2Pet": 60,
"1Jo": 61, "1John": 61,
"2Jo": 62, "2John": 62,
"3Jo": 63, "3John": 63,
"Jude": 64,
"Rev": 65
"gen": 0,
"exo": 1, "exod": 1,
"lev": 2,
"num": 3,
"deu": 4, "deut": 4,
"jos": 5, "josh": 5,
"judg": 6,
"rut": 7, "ruth": 7,
"1sa": 8, "1sam": 8,
"2sa": 9, "2sam": 9,
"1ki": 10, "1kgs": 10,
"2ki": 11, "2kgs": 11,
"1ch": 12, "1chr": 12,
"2ch": 13, "2chr": 13,
"ezr": 14, "ezra": 14,
"neh": 15,
"est": 16, "esth": 16,
"job": 17,
"psa": 18, "ps": 18,
"pro": 19, "prov": 19,
"ecc": 20, "eccl": 20,
"song": 21,
"isa": 22,
"jer": 23,
"lam": 24,
"eze": 25, "ezek": 25,
"dan": 26,
"hos": 27,
"joe": 28, "joel": 28,
"amo": 29, "amos": 29,
"obd": 30, "obad": 30,
"jon": 31, "jonah": 31,
"mic": 32,
"nah": 33,
"hab": 34,
"zep": 35, "zeph": 35,
"hag": 36,
"zec": 37, "zech": 37,
"mal": 38,
"mat": 39, "matt": 39,
"mar": 40, "mark": 40,
"luk": 41, "luke": 41,
"joh": 42, "john": 42,
"act": 43, "acts": 43,
"rom": 44,
"1cor": 45,
"2cor": 46,
"gal": 47,
"eph": 48,
"phili": 49, "phil": 49,
"col": 50,
"1th": 51, "1thess": 51,
"2th": 52, "2thess": 52,
"1ti": 53, "1tim": 53,
"2ti": 54, "2tim": 54,
"tit": 55, "titus": 55,
"phile": 56, "phlm": 56,
"heb": 57,
"jam": 58, "jas": 58,
"1pe": 59, "1pet": 59,
"2pe": 60, "2pet": 60,
"1jo": 61, "1john": 61,
"2jo": 62, "2john": 62,
"3jo": 63, "3john": 63,
"jude": 64,
"rev": 65
},
groupsOT: [
{groupName: __s.book_of_moses, show: false, books: [0, 1, 2, 3, 4], bookOrderPos: [-1, -1, -1, -1, -1]},
Expand Down Expand Up @@ -600,7 +601,7 @@ step.searchSelect = {
if (pos > -1) separatorChar = copyOfRange.substr(pos, 1);
else pos = copyOfRange.length;
var currentOsisID = copyOfRange.substr(0, pos);
var posOfBook = this.idx2osisChapterJsword[currentOsisID];
var posOfBook = this.idx2osisChapterJsword[currentOsisID.toLowerCase()];
if ((posOfBook > -1) &&
(typeof arrayOfTyplicalBooksAndChapters !== "undefined") &&
(arrayOfTyplicalBooksAndChapters[posOfBook].length === 2)) {
Expand Down Expand Up @@ -997,8 +998,7 @@ step.searchSelect = {
shortNameToDisplay = (this.userLang.toLowerCase().indexOf("en") == 0) ? currentOsisID : data[i].suggestion.shortName.replace(/ /g, "").substr(0, 6);
}
var longID = currentOsisID;
//var posOfBook = step.util.bookOrderInBible(currentOsisID); // when this is running inside the html files for iFrames, this is no reachable.
var posOfBook = this.idx2osisChapterJsword[currentOsisID];
var posOfBook = this.idx2osisChapterJsword[currentOsisID.toLowerCase()];
if (posOfBook > -1) {
if (typeof step.passageSelect.osisChapterJsword[posOfBook][3] !== "undefined") longID = step.passageSelect.osisChapterJsword[posOfBook][3];
if (typeof arrayOfTyplicalBooksAndChapters !== "undefined") {
Expand Down
Loading

0 comments on commit c6d33df

Please sign in to comment.