Bugzilla – Attachment 30082 Details for
Bug 9667
Inventory scrolling to top with every click
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9667 - Inventory scrolling to top with every click
Bug-9667---Inventory-scrolling-to-top-with-every-c.patch (text/plain), 3.79 KB, created by
Jonathan Druart
on 2014-07-25 11:04:00 UTC
(
hide
)
Description:
Bug 9667 - Inventory scrolling to top with every click
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-07-25 11:04:00 UTC
Size:
3.79 KB
patch
obsolete
>From aa9f610d9d9f497463fd147cc8e9660ce2e3501e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 14 Jul 2014 09:05:05 -0400 >Subject: [PATCH] Bug 9667 - Inventory scrolling to top with every click > >An "onclick" attribute on inventory results links causes the page to >scroll to the top each time. This patch updates the click handling to >use a progressive-enhancement method. > >Unrelated changes: I added use of the Branches T:T plugin to output >library name instead of branchcode, and put a check around call number >to prevent output of empty [] in results. > >To test, use the inventory tool to check a batch of items. On the >results page: > >- Confirm that branch name is shown instead of code. >- Confirm that no [] shows for items without call numbers >- Confirm that clicking a title opens a pop-up window showing details > for that title. >- Confirm that clicking a title opens a pop-up window whether you're on > the first page of results or any subsequent page. > >Signed-off-by: Ian Beardslee <ian@catalyst.net.nz> > >Tested in Firefox and Chromium. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/tools/inventory.tt | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index c2d9a8c..c6832fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -1,4 +1,5 @@ > [% USE KohaDates %] >+[% USE Branches %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Inventory</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -32,10 +33,17 @@ $(document).ready(function(){ > inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { > 'sPaginationType': 'full_numbers', > [% IF compareinv2barcd %] >- "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1 ] } ] >+ "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1 ] } ], > [% ELSE %] >- "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ] >+ "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], > [% END %] >+ 'fnDrawCallback': function() { >+ //bind the click handler script to the newly created elements held in the table >+ $('.openWin').bind('click',function(e){ >+ e.preventDefault(); >+ openWindow(this.href,'marcview',800,600); >+ }); >+ } > } )); > > >@@ -78,7 +86,7 @@ $(document).ready(function(){ > $(".checkboxed").unCheckCheckboxes(); > return false; > }); >- }); >+}); > //]]> > </script> > </head> >@@ -249,10 +257,11 @@ $(document).ready(function(){ > [% result.barcode | html %] > </td> > <td> >- [% result.homebranch | html %] [% result.location | html %] [[% result.itemcallnumber | html %]] >+ [% Branches.GetName( result.homebranch ) %] >+ [% result.location | html %] [% IF ( result.itemcallnumber ) %][[% result.itemcallnumber | html %]][% ELSE %][% END %] > </td> > <td> >- <p><a href="#" onclick="window.open('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]','marcview','width=800,height=600,toolbar=0,scrollbars=1');">[% result.title | html %]</a></p><p>[% result.author | html %]</p> >+ <p><a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]" class="openWin">[% result.title | html %]</a></p><p>[% result.author | html %]</p> > </td> > <td> > [% result.notforloan | html %] >-- >2.0.0.rc2
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 9667
:
29676
|
30052
| 30082