Commit 728abce9 authored by Robert Lyon's avatar Robert Lyon

Bug 1825599: Adding the pagination link styles via PHP

We used to add them via js but some pagination instances do not use
json update and so were not getting styled

behatnotneeded

Change-Id: Ibc225c34a730c8b14ea35a529ad4d350aa33fd56
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 66a6ede8)
parent 60025a05
......@@ -67,10 +67,6 @@ return function(id, list, heading, script, extradata) {
this.rewritePaginatorLinks = function() {
$('#' + self.id + ' li').each(function() {
// Add links so bootstrap knows this is a pagination item
$(this).addClass("page-item");
$(this).find("> *").addClass("page-link");
var a = $(this).find('a')[0];
// If there is a link
......
......@@ -4491,18 +4491,18 @@ function build_pagination_pagelink($class, $text, $title, $disabled=false, $url=
}
$result = "<li class='$class'>";
$result = "<li class='page-item $class'>";
if (!empty($title)) {
$text .= '<span class="sr-only">' . $title . '</span>';
}
if ($disabled) {
$result .= '<span>';
$result .= '<span class="page-link">';
$result .= $text;
$result .= '</span>';
} else {
$result .= '<a href="' . hsc($url) . '" title="' . $title . '">';
$result .= '<a class="page-link" href="' . hsc($url) . '" title="' . $title . '">';
$result .= $text;
$result .= '</a>';
}
......
......@@ -71,7 +71,7 @@
</table>
{if $regulartopics}
<div>
<div class="fullwidth forumselectwrap">
{$pagination|safe}
</div>
{/if}
......
......@@ -840,5 +840,5 @@ div.form-group .form-control-label {
// Forum select wrap too close to text
.forumselectwrap {
margin-left: 10px;
margin: 0 0 10px 10px;
}
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