From 9949b23fcfc290ec1e43552fbf668467910f29ca 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 Signed-off-by: Henri-Damien LAURENT --- koha-tmpl/opac-tmpl/prog/en/js/script.js | 1 + .../opac-tmpl/prog/en/modules/opac-sendbasketform.tmpl | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl | 6 +++--- 3 files changed, 6 insertions(+), 5 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 0b73b3e57a..b55856a47e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelfform.tmpl @@ -6,8 +6,8 @@

    Message Sent

    -

    The shelf was sent to:

    -

    Close window

    +

    The list was sent to:

    +

    Close window

    Problem sending the shelf...

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