Bugzilla – Attachment 146747 Details for
Bug 32341
Some OPAC tables are not displayed well in mobile mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32341: (follow-up) Add responsivity to Curbside pickups table and changing button style for finestables
Bug-32341-follow-up-Add-responsivity-to-Curbside-p.patch (text/plain), 9.24 KB, created by
Hammat wele
on 2023-02-16 18:07:35 UTC
(
hide
)
Description:
Bug 32341: (follow-up) Add responsivity to Curbside pickups table and changing button style for finestables
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2023-02-16 18:07:35 UTC
Size:
9.24 KB
patch
obsolete
>From ef3dd7b0c70f07500e2e4c10631caf7acd8a6bd1 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Thu, 16 Feb 2023 18:06:56 +0000 >Subject: [PATCH] Bug 32341: (follow-up) Add responsivity to Curbside pickups > table and changing button style for finestables > >To activate Curbside pickups > 1- Enable the CurbsidePickup system preference > 1.1 Go to Administration > Global system preferences > 1.2 Search for CurbsidePickup > 1.3 Change the value for 'Enable' > 1.4 Click on 'Save all circulation preferences' > 2- Configure time slots for at least one library > 2.1 Go to Administration > Curbside pickup > 2.2 Fill out the form for Centerville (or another library) > Enable: Check > Pickup interval: 10 (or other) > Maximum boss per interval: 3 (or other) > Patron-scheduled pickup: Check > Enable for waiting holds only: DO NOT check > 2.3 Add a time slot > In 'New slot', enter > Monday > From: 10:00 > To: 12:00 > Click on 'Add' > 3- Make an appointment from the OPAC > 3.1 Go to OPAC > 3.2 Open mobile mode > 3.3 Connect with a user > 3.4 Click on 'Curbside pickups' > 3.5 Choose the library in 'Pick a library' > 3.6 Choose a date in 'Pickup date' > 3.7 Choose a time range in 'Select a time' > 3.8 Click on 'Schedule pickup' > => Notice The table is not responsive > 4- Apply the patch > 5- Execute 'yarn build --view opac' > 6- Clean your cache or open your navigator on private mode (to load updated css files) > 7- Perform step 3.1, 3.2, 3.3, 3.4, > 8- click on 'Your pickups' > => Confirm that the CurbsidePickup table are now displayed correctly and is now responsive. > 9- Click on 'Charges' > => Confirm that the Charges table are now displayed correctly and is now responsive. >--- > .../bootstrap/css/src/_responsive.scss | 8 ------ > .../bootstrap/en/includes/account-table.inc | 6 ++++ > .../bootstrap/en/modules/opac-account.tt | 28 +++++++++++++++++-- > .../en/modules/opac-curbside-pickups.tt | 15 ++++++++++ > 4 files changed, 47 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >index 1d0f3fb0eb..58c80143af 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >@@ -276,14 +276,6 @@ > #checkouts_filter { > display: block; > } >- >- table.finestable tfoot tr { >- display: flex !important; >- width: max-content; >- } >- table.finestable tfoot td, table.finestable tfoot th { >- display: flex !important; >- } > } > > @media only screen and ( max-width: 700px ) { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >index f0d85e087a..dcd0b0f1bb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc >@@ -12,6 +12,7 @@ > <th>Description</th> > <th>Amount</th> > <th>Amount outstanding</th> >+ <th></th> > </tr> > </thead> > >@@ -39,6 +40,7 @@ > </td> > [% IF ( ACCOUNT_LINE.is_credit ) %]<td class="credit">[% ACCOUNT_LINE.amount * -1 | $Price %][% ELSE %]<td class="debit">[% ACCOUNT_LINE.amount | $Price %][% END %]</td> > [% IF ( ACCOUNT_LINE.is_credit ) %]<td class="credit">[% ACCOUNT_LINE.amountoutstanding * -1 | $Price %][% ELSE %]<td class="debit">[% ACCOUNT_LINE.amountoutstanding | $Price %][% END %]</td> >+ <td></td> > </tr> > [% END %] > </tbody> >@@ -52,6 +54,7 @@ > [%- END -%] > <th class="sum" colspan="[% COLSPAN | html %]">Total due</th> > <td class="sum">[% total | $Price %]</td> >+ <th></th> > </tr> > [% IF outstanding_credits.total_outstanding < 0 %] > [% FOREACH outstanding_credit IN outstanding_credits %] >@@ -97,6 +100,7 @@ > <th>Description</th> > <th>Fine amount</th> > <th>Amount outstanding</th> >+ <th></th> > </tr> > </thead> > >@@ -124,6 +128,7 @@ > </td> > [% IF ( a.amount < 0 ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% a.amount | $Price %]</td> > [% IF ( a.amountoutstanding < 0 ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% a.amountoutstanding | $Price %]</td> >+ <td></td> > </tr> > [% END %] > </tbody> >@@ -132,6 +137,7 @@ > <tr> > <th class="sum" colspan="4">Total due</th> > <td class="sum">[% account_sum | $Price %]</td> >+ <th></th> > </tr> > </tfoot> > </table> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index 10143c6be5..de5a1c4a9d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -96,13 +96,37 @@ $( document ).ready(function() { > [% END %] > "dom": '<"#filter_p">', > "autoWidth": false, >- "responsive": true, >+ "responsive": { >+ "details": { "type": 'column',"target": -1 } >+ }, >+ "columnDefs": [ >+ { "className": 'dtr-control', "orderable": false, "targets": -1 } >+ ], >+ 'fnDrawCallback': function() { >+ show_hiddentfoot('#finestable'); >+ } > } )); > > $('table[id^="finestable-"]').dataTable($.extend(true, {}, dataTablesDefaults, { >- "responsive": true >+ "autoWidth": false, >+ "responsive": { >+ "details": { "type": 'column',"target": -1 } >+ }, >+ "columnDefs": [ >+ { "className": 'dtr-control', "orderable": false, "targets": -1 } >+ ], >+ 'fnDrawCallback': function() { >+ show_hiddentfoot('table[id^="finestable-"]'); >+ } > } )); > >+ function show_hiddentfoot(selector) { >+ $('.finestable tfoot .sum').show(); >+ if ($(".finestable tfoot td.dtr-hidden").length > 0) { >+ $(selector+" tfoot th").removeAttr( "colspan" ); >+ $(".finestable tfoot .dtr-control").hide(); >+ } >+ } > $("#filter_p").html('<p><a href="#" id="filter_paid"><i class="fa fa-filter" aria-hidden="true"></i> '+txtActivefilter+'</a>'); > $('#filter_paid').click(function(e) { > e.preventDefault(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >index c24d1255ba..b4779c7a83 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >@@ -179,6 +179,7 @@ > <th>Schedule</th> > <th>Notes</th> > <th>Actions</th> >+ <th></th> > </tr> > </thead> > <tbody> >@@ -211,6 +212,7 @@ > <i class="fa fa-ban" aria-hidden="true"></i> Cancel this pickup</button> > </form> > </td> >+ <td></td> > </tr> > [% END %] > </tbody> >@@ -280,6 +282,7 @@ > <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> > <script>dayjs.extend(window.dayjs_plugin_customParseFormat)</script> > [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] > <script> > [% SET pickup_exists_in = [] %] > [% FOR p IN patron_curbside_pickups %] >@@ -324,6 +327,18 @@ > }); > > $(document).ready(function() { >+ $('#pickups-table').dataTable($.extend(true, {}, dataTablesDefaults, { >+ "searching": false, >+ "paging": false, >+ "info": false, >+ "autoWidth": false, >+ "responsive": { >+ "details": { "type": 'column',"target": -1 } >+ }, >+ "columnDefs": [ >+ { "className": 'dtr-control', "orderable": false, "targets": -1 } >+ ], >+ })); > $("#pickup-branch option").each(function(){ > if ( $(this).val() != "" && !policies[$(this).val()].enabled ) { > $(this).prop("disabled", "disabled"); >-- >2.34.1
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 32341
:
144221
|
144546
|
144768
|
144808
|
145159
|
146294
|
146746
|
146747
|
149986
|
150321
|
150707
|
150708
|
150709
|
150710
|
150711
|
150712
|
152023
|
152024
|
152025
|
152026
|
152027
|
152028
|
152164
|
152165
|
152166
|
152167
|
152168
|
152169