Bugzilla – Attachment 40315 Details for
Bug 14409
additem.pl no longer focuses on Cataloging search when loaded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 14409 - additem.pl no longer focuses on Cataloging search when loaded
SIGNED-OFF-Bug-14409---additempl-no-longer-focuses.patch (text/plain), 3.35 KB, created by
Bernardo Gonzalez Kriegel
on 2015-06-18 15:32:29 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 14409 - additem.pl no longer focuses on Cataloging search when loaded
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-06-18 15:32:29 UTC
Size:
3.35 KB
patch
obsolete
>From 8635b2a0fa970cc22beb50d81b9317bbc1f04966 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 17 Jun 2015 19:04:59 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 14409 - additem.pl no longer focuses on > Cataloging search when loaded > >In Koha 3.16, additem.pl would focus on the cataloging search when the >page was loaded. It no longer does this. > >Test Plan: >1) Apply this patch >2) Go to the item editor >3) Note the cataloging search is now focused on when the page loads > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Focus on search box, no errors. >--- > .../prog/en/modules/cataloguing/additem.tt | 31 ++++++++++++-------- > 1 file changed, 19 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index ab9621b..76afa6f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -20,18 +20,25 @@ $(document).ready(function(){ > window.close(); > [% END %] > [% END %] >- $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); >- /* Inline edit/delete links */ >- var biblionumber = $("input[name='biblionumber']").attr("value"); >- $("tr.editable td").click(function(event){ >- var $tgt = $(event.target); >- if($tgt.is("a")||$tgt.is(":first-child")||$tgt.is(":nth-child(2)")){ return true; } else { >- var rowid = $(this).parent().attr("id"); >- num_rowid = rowid.replace("row",""); >- $(".linktools").remove(); >- $(this).append("<span class=\"linktools\"><a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"#edititem\">" + _("Edit item") + "</a> <a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=delitem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"\" onclick=\"confirm_deletion([% biblionumber %],"+num_rowid+"); return false;\">" + _("Delete item") + "</a></span>"); >- } >- }); >+ >+ //Set focus to cataloging search >+ $("input[name=q]:eq(0)").focus(); >+ >+ $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit"); >+ >+ /* Inline edit/delete links */ >+ var biblionumber = $("input[name='biblionumber']").attr("value"); >+ $("tr.editable td").click(function(event){ >+ var $tgt = $(event.target); >+ if ( $tgt.is("a") || $tgt.is(":first-child") || $tgt.is(":nth-child(2)") ) { >+ return true; >+ } else { >+ var rowid = $(this).parent().attr("id"); >+ num_rowid = rowid.replace("row",""); >+ $(".linktools").remove(); >+ $(this).append("<span class=\"linktools\"><a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"#edititem\">" + _("Edit item") + "</a> <a href=\"/cgi-bin/koha/cataloguing/additem.pl?op=delitem&frameworkcode=[% frameworkcode %]&biblionumber=[% biblionumber %]&itemnumber="+num_rowid+"\" onclick=\"confirm_deletion([% biblionumber %],"+num_rowid+"); return false;\">" + _("Delete item") + "</a></span>"); >+ } >+ }); > > var itemst = $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14409
:
40284
| 40315