Bug 11905 - when editing item, cursor is positioning in search box and not to item

cataloging-search.inc had embedded js to set focus into the search box.
This patch removes that js from the cataloging-search.inc and adds it into
addbooks.tt and merge.tt to set focus on those pages and allow focus to be set
to the edit items form on additem.tt

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Nick Clemens 2014-06-07 11:18:13 -04:00 committed by Tomas Cohen Arazi
parent c62e53bb97
commit 3ea58cbe49
3 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,3 @@
<script>$(document).ready(function(){
$("input[name=q]:eq(0)").focus();
});</script>
<div class="gradient">
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Cataloging Resident Search Box -->

View File

@ -6,6 +6,9 @@
//<![CDATA[
$(document).ready(function() {
//Set focus to cataloging search
$("input[name=q]:eq(0)").focus();
$("#z3950search").click(function(){
PopupZ3950("");
return false;
@ -32,6 +35,7 @@
[% END %]
return strQuery;
}
//]]>
</script>
</head>

View File

@ -25,6 +25,9 @@ $(document).ready(function(){
tagslib = [];
$.getJSON("/cgi-bin/koha/cataloguing/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
tagslib = json;
//Set focus to cataloging search
$("input[name=q]:eq(0)").focus();
});
// Creating tabs