From 475fcc1f51be3ba8b10020ee6db73b9c1deac828 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sat, 18 Apr 2009 16:45:22 -0500 Subject: [PATCH] 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 --- koha-tmpl/opac-tmpl/prog/en/js/script.js | 1 + koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/js/script.js b/koha-tmpl/opac-tmpl/prog/en/js/script.js index b3e3a1672f..76a6c9196c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/js/script.js +++ b/koha-tmpl/opac-tmpl/prog/en/js/script.js @@ -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"; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl index c162a9dd23..9caef3c3de 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl @@ -7,7 +7,7 @@

Message Sent

The cart was sent to:

-

Close window

+

Close window

Problem sending the cart...

@@ -21,7 +21,7 @@ Sending your cart
  1. - +
  2. diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl index c4c33f9d07..41f7d32b36 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl @@ -7,7 +7,7 @@

    Message Sent

    The list was sent to:

    -

    Close window

    +

    Close window

    Problem sending the list...

    @@ -21,7 +21,7 @@ Sending your list
    1. - +
    2. -- 2.39.5