Commit da91e3e7 authored by dragos-dumi's avatar dragos-dumi Committed by StryKaizer

Issue #2801383 by dragos.dumitrescu: Show less not working for auth users

parent 33a3ed1f
......@@ -33,13 +33,14 @@
facetsList.once().filter(function () {
return $(this).find('li').length > limit;
}).each(function () {
var facet = $(this);
$('<a href="#" class="facets-soft-limit-link"></a>').text(Drupal.t('Show more')).click(function () {
if ($(this).siblings().find('li:hidden').length > 0) {
$(this).siblings().find('li:gt(' + zero_based_limit + ')').slideDown();
if (facet.find('li:hidden').length > 0) {
facet.find('li:gt(' + zero_based_limit + ')').slideDown();
$(this).addClass('open').text(Drupal.t('Show less'));
}
else {
$(this).siblings().find('li:gt(' + zero_based_limit + ')').slideUp();
facet.find('li:gt(' + zero_based_limit + ')').slideUp();
$(this).removeClass('open').text(Drupal.t('Show more'));
}
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment