make mobile-friendly paginator for reviews (bug 764078)
This commit is contained in:
Родитель
21b2b38339
Коммит
81f3eb7733
|
@ -75,6 +75,7 @@
|
|||
}
|
||||
|
||||
@media (max-width: @4col) {
|
||||
/*
|
||||
.reviews .paginator {
|
||||
display: none;
|
||||
}
|
||||
|
@ -82,6 +83,7 @@
|
|||
.fat-button;
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
*/
|
||||
.paginator {
|
||||
.pos, .num, .rel {
|
||||
float: none;
|
||||
|
@ -92,7 +94,7 @@
|
|||
.rel {
|
||||
margin: 0 auto 2px;
|
||||
a {
|
||||
margin: 0;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ header.product {
|
|||
display: none;
|
||||
}
|
||||
#reviews #review-list {
|
||||
margin: 0 -10px;
|
||||
margin: 0 -10px -5px;
|
||||
.review {
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(function() {
|
||||
z.page.on('postfragmentloaded', function() {
|
||||
|
||||
z.page.on('postfragmentloaded', function() {
|
||||
flagOverlay = makeOrGetOverlay('flag-review');
|
||||
|
||||
// Hijack <select> with stars.
|
||||
|
@ -11,23 +11,6 @@
|
|||
if (!z.capabilities.mobile) {
|
||||
initCharCount();
|
||||
}
|
||||
|
||||
// "More reviews" button.
|
||||
var $more = $('.load-more');
|
||||
$more.on('click', _pd(function() {
|
||||
var $new = $('#review-list .review:visible:last ~ .review:lt(5)');
|
||||
$new.show();
|
||||
if ($new.attr('id')) {
|
||||
// Jump to top of new reviews.
|
||||
window.location = '#' + $new.attr('id');
|
||||
}
|
||||
// If all the reviews are visible, fetch more.
|
||||
if (!$('#review-list .review:hidden').length) {
|
||||
// TODO: Pull in more reviews.
|
||||
//$.get($more.attr('href'), function(data) {
|
||||
//});
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
function getBody($body) {
|
||||
|
|
|
@ -47,9 +47,6 @@
|
|||
{% endwith %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if ratings.object_list|length > 5 %}
|
||||
<a href="{{ ratings.next_page_number() if ratings.has_next() else '#' }}" class="load-more post">{{ _('More reviews') }}</a>
|
||||
{% endif %}
|
||||
{{ ratings|impala_paginator }}
|
||||
{% elif not reply %}
|
||||
{% if product.can_review(amo_user) %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче