Setting focus on form fields
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> Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
This commit is contained in:
parent
190394a5d9
commit
9949b23fcf
|
|
@ -11,6 +11,7 @@ $(document).ready(function(){
|
|||
$(".close").click(function(){
|
||||
window.close();
|
||||
});
|
||||
$(".focus").focus();
|
||||
// clear the basket when user logs out
|
||||
$("#logout").click(function(){
|
||||
var nameCookie = "bib_list";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<!-- 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>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
<!-- TMPL_IF NAME="SENT" -->
|
||||
<h3>Message Sent</h3>
|
||||
<p>The shelf was sent to: <!-- TMPL_VAR NAME="email" --></p>
|
||||
<p><a class="close" href="#">Close window</a></p>
|
||||
<p>The list was sent to: <!-- TMPL_VAR NAME="email" --></p>
|
||||
<p><a class="close focus" href="#">Close window</a></p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="error" -->
|
||||
<p>Problem sending the shelf...</p>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<legend>Sending your shelf</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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue