Bug 23099: OPAC Search result sorting "go" button flashes on page load

There are a few places in the OPAC where we hide the submit button on a
sorting form because the form auto-submits when the selection changes.
These should be hidden using CSS instead of JS to prevent the temporary
appearance of the submit button while the page loads.

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).

Test OPAC search results and OPAC checkout history. On both pages you
should not see a "Go" button next to the <select> input for changing the
sort order.

Disable JavaScript in your browser and test those pages again. The "Go"
button should appear.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a89a203c1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2019-06-11 18:13:08 +00:00 committed by Fridolin Somers
parent c1d1a52cf2
commit a00b6b1556
4 changed files with 8 additions and 3 deletions

View File

@ -17,12 +17,20 @@ $footer-height: 45px;
.selections-toolbar {
display: none;
}
#sortsubmit {
display: inline;
}
}
.js {
.dateformat {
display: none;
}
#sortsubmit {
display: none;
}
}
.fa.fa-icon-black,

View File

@ -210,7 +210,6 @@
<script>
$(document).ready(function(){
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
$('#sortsubmit').hide();
$('#order').change(function() {
$('#sortform').submit();
});

View File

@ -297,7 +297,6 @@ $(document).ready(function(){
});
[% END %]
$('#sortsubmit').hide();
$('#sort_by').change(function() {
$('#bookbag_form').submit();
});

View File

@ -829,7 +829,6 @@ $(document).ready(function(){
param1 += "<\/select> <input type=\"submit\" class=\"btn btn-small\" value=\""+_("Save")+"\" />";
[% END %]
$('#sortsubmit').hide();
$('.resort').change(function() {
$('#bookbag_form').submit();
});