mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-27 09:29:59 -04:00
74 lines
2.3 KiB
JavaScript
74 lines
2.3 KiB
JavaScript
![]() |
require(["jquery", "db", "common", "reference", "jquery.cookie", "jquery.ui"],
|
||
|
function($, db, common, ref) {
|
||
|
$(document).ready(function()
|
||
|
{
|
||
|
$("#searchform").submit(function()
|
||
|
{
|
||
|
common.Search($("#searchvalue").val());
|
||
|
return false;
|
||
|
});
|
||
|
$("#growfont").click(function()
|
||
|
{
|
||
|
common.Settings.IncreaseResultFontSize();
|
||
|
return false;
|
||
|
});
|
||
|
$("#shrinkfont").click(function()
|
||
|
{
|
||
|
common.Settings.DecreaseResultFontSize();
|
||
|
return false;
|
||
|
});
|
||
|
$("#switch-panes").click(function()
|
||
|
{
|
||
|
common.Settings.SwitchPanes();
|
||
|
return false;
|
||
|
});
|
||
|
$("#showhelp").click(function()
|
||
|
{
|
||
|
$("#help").dialog({
|
||
|
draggable:true,
|
||
|
width: 700,
|
||
|
height: 650,
|
||
|
resizable: true
|
||
|
});
|
||
|
});
|
||
|
$("#showhidesearch").click(function()
|
||
|
{
|
||
|
common.Settings.ShowHideSearch();
|
||
|
return false;
|
||
|
});
|
||
|
$("#changefont").change(function()
|
||
|
{
|
||
|
common.Settings.ChangeResultFont($("#changefont").val());
|
||
|
return false;
|
||
|
});
|
||
|
$(window).bind("resize", function()
|
||
|
{
|
||
|
$("#searchresults").css("height", window.innerHeight - 200);
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
$("#searchresults").css("height", window.innerHeight - 200);
|
||
|
|
||
|
$("#result").sortable({
|
||
|
handle: ".p-handle"
|
||
|
});
|
||
|
|
||
|
// load querystring
|
||
|
var ref = decodeURIComponent(common.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.
|
||
|
common.Settings.Load();
|
||
|
|
||
|
// now load the passage from the querystring.
|
||
|
common.Search(ref);
|
||
|
$("#searchvalue").val(ref);
|
||
|
} else {
|
||
|
common.Settings.Load();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
});
|