62 lines
2.8 KiB
JavaScript
Raw Normal View History

///* Accepts a ';' dilimeted list of search queries and displays the results */
//function Search(sv: string): void {
// try {
// // split the search value into an array of queries using ';'
// var qs = sv.split(";");
// for (var x in qs) {
// var q = qs[x].trim();
// if (q != "") {
// // its a search term.
// if (q.search(/[0-9]/i) == -1) {
// // get new results.
// Words.FindReferences(q);
// $("#searchpanel").panel("open");
// } else if (q.search(/(H|G)[0-9]/i) != -1) {
// var original_q = q;
// // its a strongs lookup
// var dict = q.substring(0, 1);
// var store = true;
// if (dict.search(/h/i) != -1) {
// dict = "heb";
// if (parseInt(q.substring(1)) > 8674) store = false;
// } else {
// dict = "grk";
// if (parseInt(q.substring(1)) > 5624) store = false;
// }
// q = q.substring(1, q.length);
// var Ss = q.split(' ');
// var results = [];
// for (var s in Ss) {
// results.push(Strongs.GetStrongs(Ss[s], dict));
// }
// for (var result in results) {
// // display results.
// //if ($("#display-strongs-as-dialog")[0].checked) {
// // Strongs.DisplayStrongsDialog(results[result]);
// //} else {
// Strongs.DisplayStrongs(results[result]);
// //}
// }
// if (store) CurrentReferences[original_q.toString().toLowerCase()] = true;
// } else {
// // its a verse reference.
// if (q.trim() != "") {
// var myref = new Reference(q.trim());
// var r = Bible.GetPassage(myref.Section.start.book, myref.Section.start.chapter, myref.Section.end.chapter, myref.Section.start.verse, myref.Section.end.verse);
// Bible.DisplayPassage(r.cs, myref, r.testament);
// CurrentReferences[myref.toString().toLowerCase()] = true;
// }
// }
// }
// }
// $("#result").sortable({
// axis: "x",
// handle: ".handle"
// });
// Settings.SaveResults();
// }
// catch (err) {
// Util.HandleError(err);
// }
//};
//# sourceMappingURL=Search.js.map