added google books branding to extra search box on empty search results page
parent
d7ee5dec9e
commit
a4d609c76f
|
@ -24,7 +24,7 @@
|
|||
<div class="js-maincol-inner">
|
||||
<div class="content-block">
|
||||
<div class="content-block-heading">
|
||||
<h2 class="content-heading">Search Results</span></h2>
|
||||
<h2 class="content-heading">Google Books search results</span></h2>
|
||||
<ul class="book-list-view">
|
||||
<li>View As:</li>
|
||||
<li class="view-list">
|
||||
|
@ -51,7 +51,7 @@
|
|||
<div class="js-search">
|
||||
<div class="js-search-inner">
|
||||
<form action="{% url search %}" method="get">
|
||||
<input type="text" placeholder="Search for a book..." size="25" class="inputbox" name="q">
|
||||
<input type="text" id="watermarkempty" size="25" onfocus="imgfocusempty()" onblur="imgblurempty(15)" class="inputbox" name="q" value="{{ q }}">
|
||||
<input type="button" onclick="this.form.searchword.focus();" class="button" value="Search">
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -7,3 +7,14 @@ function imgblur(pos){
|
|||
function imgfocus(){
|
||||
document.getElementById('watermark').style.background="";
|
||||
}
|
||||
|
||||
// special case for search box which is repeated on empty search results page
|
||||
function imgblurempty(pos){
|
||||
if (document.getElementById('watermarkempty').value == "") {
|
||||
document.getElementById('watermarkempty').style.background="white url('/static/images/google_watermark.gif') no-repeat "+pos+"px center";
|
||||
}
|
||||
}
|
||||
|
||||
function imgfocusempty(){
|
||||
document.getElementById('watermarkempty').style.background="";
|
||||
}
|
||||
|
|
|
@ -3,4 +3,8 @@ $j(document).ready(function() {
|
|||
if (!$j('#watermark').val()) {
|
||||
$j('#watermark').css({"background": "white url('/static/images/google_watermark.gif') no-repeat left center"});
|
||||
}
|
||||
// special case for search box which is repeated on empty search results page
|
||||
if (!$j('#watermarkempty').val()) {
|
||||
$j('#watermarkempty').css({"background": "white url('/static/images/google_watermark.gif') no-repeat left center"});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue