Skip to content
Snippets Groups Projects
Commit bfa94d98 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Unique class for more and less facet toggles. Center-aligned buttons.

parent 75f7ff53
No related merge requests found
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -326,6 +326,7 @@ h3 {
/* --- Sidebar --- */
/* Sidebar rounded corners */
.narrow-toggle { text-align: center; }
.sidebar {
label:not(.list-group-item) {margin-left: 20px;}
.list-group:not(.filters) .title {
......
......@@ -161,7 +161,7 @@ JS;
?>
<? $moreClass = 'narrowGroupHidden-'.$this->escapeHtmlAttr($title).' hidden'; ?>
<? if ($i == 6): ?>
<a id="more-narrowGroupHidden-<?=$this->escapeHtmlAttr($title)?>" class="list-group-item" href="javascript:moreFacets('narrowGroupHidden-<?=$title ?>')"><?=$this->transEsc('more')?> ...</a>
<a id="more-narrowGroupHidden-<?=$this->escapeHtmlAttr($title)?>" class="list-group-item narrow-toggle" href="javascript:moreFacets('narrowGroupHidden-<?=$title ?>')"><?=$this->transEsc('more')?> ...</a>
<? endif; ?>
<? if ($thisFacet['isApplied']): ?>
<a class="list-group-item active<? if ($i>5): ?><?=$moreClass ?><?endif ?><? if ($thisFacet['operator'] == 'OR'): ?> facetOR applied<? endif ?>" href="<?=$this->currentPath().$results->getUrlQuery()->removeFacet($title, $thisFacet['value'], true, $thisFacet['operator']) ?>">
......@@ -200,7 +200,7 @@ JS;
<? endif; ?>
<? endif; ?>
<? endforeach; ?>
<? if ($i > 5): ?><a class="list-group-item <?=$moreClass ?>" href="javascript:lessFacets('narrowGroupHidden-<?=$title ?>')"><?=$this->transEsc('less')?> ...</a><? endif; ?>
<? if ($i > 5): ?><a class="list-group-item narrow-toggle <?=$moreClass ?>" href="javascript:lessFacets('narrowGroupHidden-<?=$title ?>')"><?=$this->transEsc('less')?> ...</a><? endif; ?>
<? endif; ?>
<? if (in_array($title, $hierarchicalFacets)): ?>
</noscript>
......
......@@ -15,7 +15,7 @@
<? /* More link */ ?>
<? if ($iter == $corner+1): ?>
</div><div id="more-NarrowGroupHidden_<?=$this->escapeHtml($title)?>" class="row top-row">
<span class="col-sm-12"><a href="#" onclick="moreFacets('NarrowGroupHidden_<?=$this->escapeHtml($title)?>'); return false;"><?=$this->transEsc('more') ?> ...</a></span>
<span class="col-sm-12 narrow-toggle"><a href="#" onclick="moreFacets('NarrowGroupHidden_<?=$this->escapeHtml($title)?>'); return false;"><?=$this->transEsc('more') ?> ...</a></span>
</div><div class="row top-row <?=$moreClass ?>">
<? endif; ?>
<? /* Columns */ ?>
......@@ -41,7 +41,7 @@
<? if ($iter%$topFacetSettings['cols'] == 0 && $iter > 0): ?></div><div class="row top-row<? if(++$row > $topFacetSettings['rows']) echo $moreClass ?>"><? endif; ?>
<? /* Less link */ ?>
<? if (count($cluster['list']) > $corner && $iter == count($cluster['list'])): ?>
<a class="col-sm-12" href="#" onclick="lessFacets('NarrowGroupHidden_<?=$title ?>'); return false;"><?=$this->transEsc('less') ?> ...</a>
<a class="col-sm-12 narrow-toggle" href="#" onclick="lessFacets('NarrowGroupHidden_<?=$title ?>'); return false;"><?=$this->transEsc('less') ?> ...</a>
<? endif; ?>
<? $iter++; ?>
<? endforeach; ?>
......
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