Bugzilla – Attachment 103881 Details for
Bug 25271
Add floating toolbar to OPAC cart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25271: Add floating toolbar to OPAC cart
Bug-25271-Add-floating-toolbar-to-OPAC-cart.patch (text/plain), 11.13 KB, created by
Katrin Fischer
on 2020-04-28 19:35:29 UTC
(
hide
)
Description:
Bug 25271: Add floating toolbar to OPAC cart
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-28 19:35:29 UTC
Size:
11.13 KB
patch
obsolete
>From 49f97221f6a5d9f4c59cc074d491c53938109c1c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 24 Apr 2020 00:51:35 +0000 >Subject: [PATCH] Bug 25271: Add floating toolbar to OPAC cart >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds JavaScript to the OPAC cart view so that the toolbar at >the top of the display "floats" as you scroll down. > >The patch also makes a minor correction to the OPAC SCSS affecting the >display of the buttons in the cart toolbar. > >To test, apply the patch and rebuild the OPAC CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > > - Add some items to a cart in the OPAC. > - Open the cart and confirm that the toolbar sticks to the top of the > window as you scroll down. > - Confirm that it works in the "More details" view. > - Confirm that other JavaScript-based operations are not affected: > table sorting and all the various toolbar buttons. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../opac-tmpl/bootstrap/css/src/_responsive.scss | 2 +- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 5 -- > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 99 ++++++++++++---------- > 3 files changed, 55 insertions(+), 51 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >index 6a718ce3d8..1dec8de4fb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss >@@ -558,4 +558,4 @@ > .userlabel { > display: none; > } >-} >\ No newline at end of file >+} >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 2fec169b94..d78fd167a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -112,11 +112,6 @@ a { > vertical-align: middle; > } > >- &.brief { >- >- padding-left: 27px; >- } >- > &.addtocart { > padding-right: 0; > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index 415ed112fe..a53000b55c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -17,51 +17,53 @@ > <div class="span12"> > <div id="userbasket"> > <h2>Your cart</h2> >- <div id="toolbar" class="toolbar noprint"> >- [% IF ( verbose ) %] >- <a href="opac-basket.pl" class="btn btn-link brief"><i class="fa fa-fw fa-search-minus"></i> Brief display</a> >- [% ELSE %] >- <a href="opac-basket.pl" class="btn btn-link detail"><i class="fa fa-fw fa-search-plus"></i> More details</a> >- [% END %] >- [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] >- <a class="btn btn-link send" href="opac-basket.pl"><i class="fa fa-fw fa-envelope"></i> Send</a> >- [% END %] >- <a class="btn btn-link download" href="opac-basket.pl"><i class="fa fa-fw fa-download"></i> Download</a> >- <a class="btn btn-link remove empty" href="opac-basket.pl"><i class="fa fa-fw fa-trash"></i> Empty and close</a> >- <a class="btn btn-link close" href="opac-basket.pl"><i class="fa fa-fw fa-times-circle"></i> Hide window</a> >- [% IF ( verbose ) %] >- <a class="btn btn-link print-large" href="#"><i class="fa fa-fw fa-print"></i> Print</a> >- [% END %] >- </div> >- >- <div id="selections-toolbar" class="toolbar noprint"> >- <a id="CheckAll" href="#">Select all</a> >- <a id="CheckNone" href="#">Clear all</a> >- <span class="sep">|</span> >- <span class="links" id="tag_hides"> >- <span id="selections">Select titles to: </span> >- <a href="#" class="btn btn-link remove deleteshelf disabled"><i class="fa fa-remove"></i> Remove</a> >- [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] >- [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] >- <a href="#" class="btn btn-link newshelf disabled"><i class="fa fa-fw fa-list"></i> Add to a list</a> >- [% END %] >- [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %] >- <a href="#" class="btn btn-link hold disabled"><i class="fa fa-fw fa-bookmark"></i> Place hold</a> >- [% END %] >- [% IF ( TagsInputEnabled && loggedinusername ) %] >- <a href="#" id="tagsel_tag" class="btn btn-link disabled"><i class="fa fa-fw fa-tag"></i> Tag</a> >- [% END %] >- [% END # / IF opacuserlogin %] >- </span> >- [% IF ( TagsInputEnabled && loggedinusername ) %] >- <span id="tagsel_form" style="display:none"> >- <label for="tagsel_new">New tag:</label> >- <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" /> >- <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add"> >- <a href="#" id="tagsel_cancel">Cancel</a> >- </span> >- [% END %] >- </div> >+ <div id="floating"> >+ <div id="toolbar" class="toolbar noprint"> >+ [% IF ( verbose ) %] >+ <a href="opac-basket.pl" class="btn btn-link brief"><i class="fa fa-fw fa-search-minus"></i> Brief display</a> >+ [% ELSE %] >+ <a href="opac-basket.pl" class="btn btn-link detail"><i class="fa fa-fw fa-search-plus"></i> More details</a> >+ [% END %] >+ [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] >+ <a class="btn btn-link send" href="opac-basket.pl"><i class="fa fa-fw fa-envelope"></i> Send</a> >+ [% END %] >+ <a class="btn btn-link download" href="opac-basket.pl"><i class="fa fa-fw fa-download"></i> Download</a> >+ <a class="btn btn-link remove empty" href="opac-basket.pl"><i class="fa fa-fw fa-trash"></i> Empty and close</a> >+ <a class="btn btn-link close" href="opac-basket.pl"><i class="fa fa-fw fa-times-circle"></i> Hide window</a> >+ [% IF ( verbose ) %] >+ <a class="btn btn-link print-large" href="#"><i class="fa fa-fw fa-print"></i> Print</a> >+ [% END %] >+ </div> >+ >+ <div id="selections-toolbar" class="toolbar noprint"> >+ <a id="CheckAll" href="#">Select all</a> >+ <a id="CheckNone" href="#">Clear all</a> >+ <span class="sep">|</span> >+ <span class="links" id="tag_hides"> >+ <span id="selections">Select titles to: </span> >+ <a href="#" class="btn btn-link remove deleteshelf disabled"><i class="fa fa-remove"></i> Remove</a> >+ [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %] >+ [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] >+ <a href="#" class="btn btn-link newshelf disabled"><i class="fa fa-fw fa-list"></i> Add to a list</a> >+ [% END %] >+ [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %] >+ <a href="#" class="btn btn-link hold disabled"><i class="fa fa-fw fa-bookmark"></i> Place hold</a> >+ [% END %] >+ [% IF ( TagsInputEnabled && loggedinusername ) %] >+ <a href="#" id="tagsel_tag" class="btn btn-link disabled"><i class="fa fa-fw fa-tag"></i> Tag</a> >+ [% END %] >+ [% END # / IF opacuserlogin %] >+ </span> >+ [% IF ( TagsInputEnabled && loggedinusername ) %] >+ <span id="tagsel_form" style="display:none"> >+ <label for="tagsel_new">New tag:</label> >+ <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" /> >+ <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add"> >+ <a href="#" id="tagsel_cancel">Cancel</a> >+ </span> >+ [% END %] >+ </div> >+ </div> <!-- /#floating --> > > [% IF ( verbose ) %] > <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed"> >@@ -304,6 +306,7 @@ > > [% BLOCK jsinclude %] > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] >+ [% Asset.js("lib/hc-sticky.js") | $raw %] > [% INCLUDE 'datatables.inc' %] > <script> > [% IF ( TagsInputEnabled && loggedinusername ) %] >@@ -456,6 +459,12 @@ > return false; > }); > enableCheckboxActions(); >+ >+ Sticky = $("#floating"); >+ Sticky.hcSticky({ >+ stickTo: "#userbasket", >+ stickyClass: "floating" >+ }); > }); > > function enableCheckboxActions(){ >-- >2.11.0
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 25271
:
103670
|
103777
|
103881
|
103970