Bug 10659: (follow-up) Ensure zero rating shows correctly

This patch makes a minor markup addition to ensure that a title with no
rating shows no stars.

Also changed: Minor addition to search results JS to prevent unwanted
scrolling if the user clicks a star in a star rating.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2019-02-11 13:35:12 +00:00 committed by Nick Clemens
parent ef248b82d7
commit b379bba255
2 changed files with 8 additions and 1 deletions

View File

@ -477,11 +477,14 @@
[% ELSE %]
<select id="star_rating" name="rating" data-rating-enabled="0" disabled="disabled" autocomplete="off">
[% END %]
[% IF ( rating_avg_int == 0 ) %]
<option value="" selected="selected"></option>
[% END %]
[% FOREACH i IN [ 1 2 3 4 5 ] %]
[% IF rating_avg_int == i %]
<option value="[% i | html %]" selected="selected">[% i | html %]</option>
[% ELSE %]
<option value"[% i | html %]">[% i | html %]</option>
<option value="[% i | html %]">[% i | html %]</option>
[% END %]
[% END %]
</select>

View File

@ -738,6 +738,10 @@ $(document).ready(function(){
});
enableCheckboxActions();
$(".br-readonly a").on("click", function(e){
e.preventDefault();
});
[% IF ( IDreamBooksResults ) %]
$('.idbresult').each(function() {
var isbn = $(this).children('a').text().replace(/\s*/,'');