mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-25 16:29:49 -04:00

* returned [] instead of null fixes issues * cleanup * added titles to strongs refs are properly saved to state * added terms excluded from search index
67 lines
2.1 KiB
JavaScript
67 lines
2.1 KiB
JavaScript
$(document).ready(function()
|
|
{
|
|
$("#searchvalue").keypress(function(event) {
|
|
if (event.which === 13) {
|
|
Search($("#searchvalue").val());
|
|
return false;
|
|
}
|
|
});
|
|
$("#searchbtn").click(function()
|
|
{
|
|
Search($("#searchvalue").val());
|
|
return false;
|
|
});
|
|
$("#growfont").click(function()
|
|
{
|
|
Settings.IncreaseResultFontSize();
|
|
return false;
|
|
});
|
|
$("#shrinkfont").click(function()
|
|
{
|
|
Settings.DecreaseResultFontSize();
|
|
return false;
|
|
});
|
|
$("#showhelp").click(function()
|
|
{
|
|
$("#help").dialog({
|
|
draggable: true,
|
|
width: 700,
|
|
height: 650,
|
|
resizable: true
|
|
});
|
|
});
|
|
$("#changefont").change(function()
|
|
{
|
|
Settings.ChangeResultFont($("#changefont").val());
|
|
return false;
|
|
});
|
|
// load querystring
|
|
var ref = decodeURIComponent(Util.GetUrlVars().r);
|
|
if (ref !== "undefined") {
|
|
// remember the settings, first, because if you have results, the load process would wipe out the passage you want to load.
|
|
Settings.Load();
|
|
// now load the passage from the querystring.
|
|
Search(ref);
|
|
$("#searchvalue").val(ref);
|
|
} else {
|
|
Settings.Load();
|
|
}
|
|
|
|
// you need to do this last, otherwise the settings load resets the window height.
|
|
$(window).bind("resize", function()
|
|
{
|
|
$(".my-breakpoint.ui-grid-c .ui-block-a").css("width", 55);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-b").css("width", window.innerWidth - 230);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-c").css("width", 100);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-d").css("width", 55);
|
|
$("#searchresults").css("height", window.innerHeight - 100);
|
|
return false;
|
|
});
|
|
$(".my-breakpoint.ui-grid-c .ui-block-a").css("width", 55);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-b").css("width", window.innerWidth - 235);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-c").css("width", 100);
|
|
$(".my-breakpoint.ui-grid-c .ui-block-d").css("width", 55);
|
|
$("#searchresults").css("height", window.innerHeight - 100);
|
|
|
|
});
|