minor cleanup, bug fixes, option to put strongs refs in a dialog

This commit is contained in:
walljm@walljm-vae-lt 2012-10-26 18:57:22 -04:00
parent 6fe0054d71
commit 645e79e2ff
3 changed files with 46 additions and 11 deletions

View File

@ -136,9 +136,6 @@ h3 {
font-weight: bold; font-weight: bold;
padding: 0 10px; padding: 0 10px;
} }
#result li {
background-color: #fff;
}
#result { #result {
margin: 0 0 12px 12px; margin: 0 0 12px 12px;

View File

@ -41,7 +41,7 @@
}); });
$("#showhelp").click(function() $("#showhelp").click(function()
{ {
$("#help").dialog({draggable:true, width: 700, height: 500, resizable: false}); $("#help").dialog({draggable:true, width: 700, height: 650, resizable: true});
}); });
$("#showhidesearch").click(function() $("#showhidesearch").click(function()
{ {
@ -85,6 +85,7 @@
</td> </td>
</tr> </tr>
<tr><td colspan="3" id="settings" style="padding-top: 6px; text-align:right;"> <tr><td colspan="3" id="settings" style="padding-top: 6px; text-align:right;">
Display Strongs in Dialog <input type="checkbox" id="display-strongs-as-dialog" /> |
<a href="javascript:void();" id="showhelp">Help</a> | <a href="javascript:void();" id="showhelp">Help</a> |
<a href="javascript:void();" id="showhidesearch">Hide Search</a> | <a href="javascript:void();" id="showhidesearch">Hide Search</a> |
<a href="javascript:void();" id="switch-panes">Switch Panes</a> | Select Font: <a href="javascript:void();" id="switch-panes">Switch Panes</a> | Select Font:
@ -112,10 +113,12 @@
<b>G1234</b> (displays the strongs definition for the Greek # 1234)<br /> <b>G1234</b> (displays the strongs definition for the Greek # 1234)<br />
<b>Jesus</b> (searches for "Jesus". all search terms assume boolean AND, i.e. "Jesus Christ" assumes "Jesus AND Christ". an word without a number is interpreted as search).<br /> <b>Jesus</b> (searches for "Jesus". all search terms assume boolean AND, i.e. "Jesus Christ" assumes "Jesus AND Christ". an word without a number is interpreted as search).<br />
<br /> <br />
<b>Notes:</b> multiple lookups can be made useing a semicolon as a seperator, i.e. "Ruth 1; g1234; jesus"). <br /> <h3>Notes:</h3>
<br />multiple lookups can be made useing a semicolon as a seperator, i.e. "Ruth 1; g1234; jesus"). <br />
<br />The list of results in the main window are sortable, just click and drag to reorder them.<br /><br />
<br />All greek/hebrew cross references translations are taken from the 1933 Websters version and often are not the same as the KJV translation. <br /> <br />All greek/hebrew cross references translations are taken from the 1933 Websters version and often are not the same as the KJV translation. <br />
<br />All source materials was taken from the <a href="http://sourceforge.net/projects/zefania-sharp/">Zefania XML Bible Project</a> on SourceForge. <br /> <br />All source materials were taken from the <a href="http://sourceforge.net/projects/zefania-sharp/">Zefania XML Bible Project</a> on SourceForge. <br />
<br />Any Errors and Omission you find would be appreciated. Please contact me via <a href='http://www.jasonwall.org/'>www.jasonwall.org</a>.<br /><br /> <br />Any Errors and Omission you find would be appreciated. Please contact me via <a href='http://www.jasonwall.org/'>www.jasonwall.org</a>.<br />
<a href='biblerefparsingtests.html'>Reference Parsing Tests</a> <a href='biblerefparsingtests.html'>Reference Parsing Tests</a>

View File

@ -100,7 +100,15 @@ function Search(sv)
var results = Strongs.GetStrongs(q, dict); var results = Strongs.GetStrongs(q, dict);
// display results. // display results.
Strongs.DisplayStrongs(results); if ($("#display-strongs-as-dialog")[0].checked)
{
Strongs.DisplayStrongsDialog(results);
}
else
{
Strongs.DisplayStrongs(results);
}
} }
@ -291,7 +299,7 @@ var Bible = {
r += "<br />"; r += "<br />";
} }
} }
var t = $("<li><div class='passage result'><a href='javascript:void();' class='removeresult' style='border: 0;'><img style='border: 0px;' src='images/delete.png' width='48' height='48' /></a><span class='resultbody'>" + "<h2>" + bookName(b) + " " + sch + ":" + sv + "-" + ech + ":" + ev + "</h2>" + r + "</span><br clear='all' /></div></li>"); var t = $("<div class='passage result'><a href='javascript:void();' class='removeresult' style='border: 0;'><img style='border: 0px;' src='images/delete.png' width='48' height='48' /></a><span class='resultbody'>" + "<h2>" + bookName(b) + " " + sch + ":" + sv + "-" + ech + ":" + ev + "</h2>" + r + "</span><br clear='all' /></div>");
t.find(".hiddenlink").click(function(e) t.find(".hiddenlink").click(function(e)
{ {
@ -482,8 +490,7 @@ var Strongs = {
Util.HandleError(err); Util.HandleError(err);
} }
}, },
BuildStrongs: function(r)
DisplayStrongs: function(r)
{ {
try try
{ {
@ -548,6 +555,19 @@ var Strongs = {
Strongs.ShowHide(e); Strongs.ShowHide(e);
}); });
return t;
}
catch (err)
{
Util.HandleError(err);
}
},
DisplayStrongs: function(r)
{
try
{
var t = Strongs.BuildStrongs(r);
$("#result").prepend(t); $("#result").prepend(t);
return false; return false;
} }
@ -556,6 +576,21 @@ var Strongs = {
Util.HandleError(err); Util.HandleError(err);
} }
}, },
DisplayStrongsDialog: function(r)
{
try
{
var t = Strongs.BuildStrongs(r);
var d = $("<div></div>").append(t);
d.dialog({draggable:true, width: 700, height: 500, resizable: true});
return false;
}
catch (err)
{
Util.HandleError(err);
}
},
ShowHide: function(e) ShowHide: function(e)
{ {
var o = $(e.target); var o = $(e.target);