This patch includes an addition to the OPAC's default js (identical to one in the staff client) which lets you add a "focus" class to an element on the page and have javascript move the focus to that element (input or link).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
$(".close").click(function(){
window.close();
});
+ $(".focus").focus();
// clear the basket when user logs out
$("#logout").click(function(){
var nameCookie = "bib_list";
<!-- TMPL_IF NAME="SENT" -->
<h3>Message Sent</h3>
<p>The cart was sent to: <!-- TMPL_VAR NAME="email_add" --></p>
- <p><a class="close" href="#">Close window</a></p>
+ <p><a class="focus close" href="#">Close window</a></p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="error" -->
<p>Problem sending the cart...</p>
<legend>Sending your cart</legend>
<ol> <li>
<label for="email_add">Email Address:</label>
- <input type="text" id="email_add" name="email_add" size="43" />
+ <input type="text" id="email_add" name="email_add" size="43" class="focus" />
</li>
<li>
<label for="comment">Comment:</label>
<!-- TMPL_IF NAME="SENT" -->
<h3>Message Sent</h3>
<p>The list was sent to: <!-- TMPL_VAR NAME="email" --></p>
- <p><a class="close" href="#">Close window</a></p>
+ <p><a class="close focus" href="#">Close window</a></p>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="error" -->
<p>Problem sending the list...</p>
<legend>Sending your list</legend>
<ol> <li>
<label for="email">Email Address:</label>
- <input type="text" id="email" name="email" size="43" />
+ <input type="text" id="email" name="email" size="43" class="focus" />
</li>
<li>
<label for="comment">Comment:</label>