Bugzilla – Attachment 132977 Details for
Bug 30456
Convert checkout history tabs to Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30456: Convert checkout history tabs to Bootstrap
Bug-30456-Convert-checkout-history-tabs-to-Bootstr.patch (text/plain), 3.83 KB, created by
Séverine Queune
on 2022-04-05 14:04:52 UTC
(
hide
)
Description:
Bug 30456: Convert checkout history tabs to Bootstrap
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2022-04-05 14:04:52 UTC
Size:
3.83 KB
patch
obsolete
>From d5beae0b0813303fb379d9344d9b123343737773 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 5 Apr 2022 12:02:20 +0000 >Subject: [PATCH] Bug 30456: Convert checkout history tabs to Bootstrap >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch updates the circulation history page to replace jQueryUI tabs >with Bootstrap tabs. A minor JavaScript change is required to work >with the new HTML structure. > >To test you'll view the staff interface circulation history page with >the OnSiteCheckouts system preference on and off. > >- With OnSiteCheckouts off, locate a patron who has current and/or > past checkouts. >- View the "Circulation history" page for that patron. >- The table of checkouts should display with no tabbed interface. > >- With OnSiteCheckouts on, the page should show three tabs: All, > Checkouts, and On-site checkouts. >- Confirm that clicking on each tab correctly filters the table, e.g. > the On-site checkouts tab should show only on-site checkouts. > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > .../prog/en/modules/members/readingrec.tt | 34 +++++++++++-------- > 1 file changed, 19 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index 827e1588c9..3acc84e067 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -53,13 +53,16 @@ > > <div id="tabs" class="toptabs"> > [% IF Koha.Preference('OnSiteCheckouts') %] >- <ul> >- <li><a href="#readingrec" id="tab_all">All</a></li> >- <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li> >- <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkouts</a></li> >+ <ul class="nav nav-tabs" role="tablist"> >+ <li role="presentation" class="active"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="all" id="tab_all">All</a></li> >+ <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" data-tabname="checkouts" id="tab_checkout">Checkouts</a></li> >+ <li role="presentation"><a href="#readingrec" aria-controls="readingrec" role="tab" data-toggle="tab" id="tab_onsite_checkout" data-tabname="onsite">On-site checkouts</a></li> > </ul> >+ <div class="tab-content"> >+ <div id="readingrec" role="tabpanel" class="tab-pane active"> >+ [% ELSE %] >+ <div id="readingrec"> > [% END %] >- <div id="readingrec"> > <table id="table_readingrec"> > <thead> > <tr> >@@ -130,6 +133,9 @@ > </tbody> > </table> > </div> >+ [% IF Koha.Preference('OnSiteCheckouts') %] >+ </div> <!-- /.tab-content --> >+ [% END %] > </div> > [% END %] > >@@ -156,16 +162,14 @@ > "aaSorting": [[10, 'desc']] > }, columns_settings); > >- var tabs = $("#tabs").tabs({ >- activate: function(e, ui) { >- var active = tabs.tabs("option", "active" ); >- if ( active == 1 ) { >- table.fnFilter("standard_checkout", 0); >- } else if ( active == 2 ) { >- table.fnFilter("onsite_checkout", 0); >- } else { // all >- table.fnFilter('', 0); >- } >+ $("#tabs a[data-toggle='tab']").on("shown.bs.tab", function (e) { >+ active_tab = $(this).data("tabname"); >+ if( active_tab == "checkouts" ){ >+ table.fnFilter("standard_checkout", 0); >+ } else if( active_tab == "onsite" ){ >+ table.fnFilter("onsite_checkout", 0); >+ } else { >+ table.fnFilter('', 0); > } > }); > }); >-- >2.30.2
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 30456
:
132967
|
132968
|
132977
|
132986