minified js files, added show/hide for crossrefs and rmac, fixed search results resize issue, various UI tweaks and css cleanup.

This commit is contained in:
jwall@VAPPRCSN015.vap.local 2011-11-04 12:36:22 -04:00
parent 84e801f547
commit 99dec3f4a6
5 changed files with 96 additions and 23 deletions

View File

@ -17,31 +17,39 @@ a:hover {
em {font-style: normal;} em {font-style: normal;}
#query { #query {
background: #ddd; background: #eee;
color: #666; color: #444;
padding: 9px; padding: 12px;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
border: 2px solid #999; border: 2px solid #999;
} }
#query #searchvalue
#searchvalue
{ {
color: #777; color: #333;
width: 100%; width: 100%;
height: 60px; height: 50px;
line-height: 50px;
padding: 3px;
margin-left: 6px; margin-left: 6px;
font-size: 18px; font-size: 18px;
font-family: georgia; font-family: georgia;
} }
#searchbtn
{
height: 52px;
width: 90px;
}
h1 { h1 {
color: navy; color: navy;
font: 36px georgia; font: 36px georgia;
font-weight: normal; font-weight: normal;
background: white; background: white;
margin: 10px 0 0 0; margin: 0 10px 0 0;
padding: 10px 10px; padding: 10px;
text-align: center; text-align: center;
} }
h1 span { h1 span {
@ -62,6 +70,7 @@ h3 {
width: 30%; width: 30%;
float: left; float: left;
} }
#searchresultswrap h3 { #searchresultswrap h3 {
margin: 0; margin: 0;
background: #eee; background: #eee;
@ -69,13 +78,14 @@ h3 {
border-top: 2px solid #999; border-top: 2px solid #999;
border-left: 2px solid #999; border-left: 2px solid #999;
margin-right: 16px; margin-right: 16px;
text-align:center;
} }
#searchresults { #searchresults {
xmargin-right: 10px; xmargin-right: 10px;
padding: 0 10px 10px 10px; padding: 0 10px 10px 10px;
overflow:scroll; overflow:scroll;
height: 800px; height: 600px;
border-right: 2px solid #999; border-right: 2px solid #999;
border-bottom: 2px solid #999; border-bottom: 2px solid #999;
border-left: 2px solid #999; border-left: 2px solid #999;
@ -101,7 +111,7 @@ h3 {
background-color: #ddd; background-color: #ddd;
padding: 3px; padding: 3px;
text-align:center; text-align:center;
font-size: 21px; font-size: 18px;
font-family: Georgia, Serif; font-family: Georgia, Serif;
text-decoration: none; text-decoration: none;
border: 0px; border: 0px;
@ -131,6 +141,10 @@ h3 {
padding: 0 12px 0 0; padding: 0 12px 0 0;
line-height: 200%; line-height: 200%;
} }
.rmac .contents, .scr .contents
{
display: none;
}
.result .result
{ {

View File

@ -10,10 +10,12 @@
<meta name="keywords" content="AJAX, KJV, King James Version, Strong's Dictionary, Strongs" /> <meta name="keywords" content="AJAX, KJV, King James Version, Strong's Dictionary, Strongs" />
<meta name="blogchalk" content="United States, Missouri, Saint Louis, English, Jason, Male, 21-25, photography, poetry" /> <meta name="blogchalk" content="United States, Missouri, Saint Louis, English, Jason, Male, 21-25, photography, poetry" />
<meta name="copyright" content="All content copyrighted to Jason Wall, and available by permission of the owner." /> <meta name="copyright" content="All content copyrighted to Jason Wall, and available by permission of the owner." />
<title>The Bible with Strong's Numbers and Cross References Walljm.com</title> <title>The Bible with Strong's Numbers and Cross References</title>
<script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bible_ref_parsing.js"></script> <!--<script type="text/javascript" src="js/bible_ref_parsing.js"></script>-->
<script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/bible_ref_parsing.min.js"></script>
<!--<script type="text/javascript" src="js/common.js"></script>-->
<script type="text/javascript" src="js/common.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() $(document).ready(function()
{ {
@ -37,11 +39,23 @@
Settings.SwitchPanes(); Settings.SwitchPanes();
return false; return false;
}); });
$("#showhidesearch").click(function()
{
Settings.ShowHideSearch();
return false;
});
$("#changefont").change(function() $("#changefont").change(function()
{ {
Settings.ChangeResultFont($("#changefont").val()); Settings.ChangeResultFont($("#changefont").val());
return false; return false;
}); });
$(window).bind("resize", function()
{
$("#searchresults").css("height", window.innerHeight - 200);
return false;
});
$("#searchresults").css("height", window.innerHeight - 200);
}); });
</script> </script>
<style>@import "css/bible.css";</style> <style>@import "css/bible.css";</style>
@ -52,17 +66,18 @@
<body> <body>
<table style="width: 100%; padding: 12px;"> <table style="width: 100%; padding: 12px;">
<tr> <tr>
<td style="width: 400px;"><h1>King James Bible <span>with Strong's Numbers and Cross References</span></h1></td> <td style="width: 320px;"><h1>King James Bible <span>with Strong's Numbers and Cross References</span></h1></td>
<td id="query" align="center"> <td id="query" align="center">
<table style="width: 100%;"> <table style="width: 100%;">
<tr><form id="searchform"> <tr><form id="searchform">
<td><input id="searchvalue" type="search" results="10" onfocus="if (this.value=='Reference or search words') {this.value='';this.style.color='black';}" xonblur="if(this.value=='') {this.value='Reference or search words';this.style.color='darkgray';}" value="Reference or search words" /></td> <td><input id="searchvalue" type="search" results="10" /></td>
<td style="width: 100px;"><input value="Search" type="submit" style="height: 62px; width: 90px;" id="searchbtn" /></td> <td style="width: 100px;"><input value="Search" type="submit" id="searchbtn" /></td>
</form></tr> </form></tr>
</table> </table>
</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;">
<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:
<select id="changefont"><option value="georgia" selected="selected">Georgia</option><option value="verdana">Verdana</option><option value="courier">Courier</option><option value="serif">Serif</option><option value="sans-serif">Sans Serif</option></select> | <select id="changefont"><option value="georgia" selected="selected">Georgia</option><option value="verdana">Verdana</option><option value="courier">Courier</option><option value="serif">Serif</option><option value="sans-serif">Sans Serif</option></select> |
<span style="letter-spacing:2px;"><a href="javascript:void();" id="shrinkfont">A<span style="font-size:12px;">A</span></a> | <a href="javascript:void();" id="growfont"><span style="font-size:12px;">A</span>A</a></span></td></tr> <span style="letter-spacing:2px;"><a href="javascript:void();" id="shrinkfont">A<span style="font-size:12px;">A</span></a> | <a href="javascript:void();" id="growfont"><span style="font-size:12px;">A</span>A</a></span></td></tr>
@ -70,9 +85,10 @@
<div id="resultwrap"> <div id="resultwrap">
<div id="result"></div> <div id="result"></div>
</div> </div>
<div id="searchresultswrap" class="rounded"> <div id="searchresultswrap">
<h3>Search Results: <span id="searchTotal"></span></h3> <h3>Search Results: <span id="searchTotal"></span></h3>
<div id="searchresults"></div> <div id="searchresults"></div>
</div> </div>
<br clear="all" />
</body> </body>
</html> </html>

1
js/bible_ref_parsing.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -127,6 +127,26 @@ function Search(sv)
var Settings = { var Settings = {
ShowHideSearch: function()
{
var o = $("#showhidesearch");
var s = $("#searchresultswrap");
var r = $("#resultwrap");
if (s.css("display") != "none")
{
s.css("display", "none");
o.html("Show Search");
r.css("width", "100%");
}
else
{
s.css("display", "block");
o.html("Hide Search");
r.css("width", "70%");
}
},
SwitchPanes: function() SwitchPanes: function()
{ {
var s = $("#searchresultswrap"); var s = $("#searchresultswrap");
@ -371,9 +391,8 @@ var Strongs = {
// now deal with cross references. // now deal with cross references.
var cr = $(r.crossrefs).find("i#" + r.prefix + r.sn).find("rs"); var cr = $(r.crossrefs).find("i#" + r.prefix + r.sn).find("rs");
var crtxt = "<b>Cross References:</b> ";
crtxt += "<div class='scr'>"; var crtxt = "<div class='scr'><b>Cross References:</b> <a href='javascript:void()' class='showhide'>Show</a><br /><span class='contents'>";
cr.each(function(i) cr.each(function(i)
{ {
@ -387,18 +406,18 @@ var Strongs = {
crtxt = crtxt.substr(0, crtxt.length - 2); crtxt = crtxt.substr(0, crtxt.length - 2);
crtxt += "<br />"; crtxt += "<br />";
}); });
crtxt += "</div>"; crtxt += "</span></div>";
// ...processing statements go here... // ...processing statements go here...
var rtxt = ""; var rtxt = "";
if (r.prefix == "G") if (r.prefix == "G")
{ {
rtxt += "<b>Robinsons Morphological Analysis Code: " + r.rmaccode + "</b><br />"; ; rtxt += "<div class='rmac'><b>Robinsons Morphological Analysis Code: " + r.rmaccode + "</b> <a href='javascript:void()' class='showhide'>Show</a><br /><span class='contents'>"; ;
$(r.rmac).find('i[id="' + r.rmaccode.toUpperCase() + '"]').find("d").each(function() $(r.rmac).find('i[id="' + r.rmaccode.toUpperCase() + '"]').find("d").each(function()
{ {
rtxt += $(this).text() + "<br />"; rtxt += $(this).text() + "<br />";
}); });
rtxt += "</span></div>";
} }
// put together the display. // put together the display.
@ -413,6 +432,12 @@ var Strongs = {
{ {
Util.RemoveResult(e); Util.RemoveResult(e);
}); });
t.find(".showhide").click(function(e)
{
Strongs.ShowHide(e);
});
$("#result").prepend(t); $("#result").prepend(t);
return false; return false;
} }
@ -420,6 +445,22 @@ var Strongs = {
{ {
Util.HandleError(err); Util.HandleError(err);
} }
},
ShowHide: function(e)
{
var o = $(e.target);
var c = o.parent().find(".contents");
if (c.css("display") != "none")
{
c.css("display", "none");
o.html("Show");
}
else
{
c.css("display", "inline");
o.html("Hide");
}
} }
} }

1
js/common.min.js vendored Normal file

File diff suppressed because one or more lines are too long