Commit bc4a12d9 authored by Naomi Guyer's avatar Naomi Guyer Committed by Robert Lyon

Pagination & plugin alert (BUG: 1465107)

Change-Id: I184d496708151d4db9656664bfd75bb72e49ce37
parent e4902c53
......@@ -125,7 +125,7 @@ $string['first'] = 'First';
$string['firstpage'] = 'First page';
$string['last'] = 'Last';
$string['lastpage'] = 'Last page';
$string['maxitemsperpage'] = 'Maximum items per page:';
$string['maxitemsperpage1'] = 'Results per page:';
$string['accept'] = 'Accept';
$string['memberofinstitutions'] = 'Member of %s';
......
......@@ -3800,7 +3800,7 @@ function build_pagination($params) {
$params['limit'] = 10;
}
if (!isset($params['limittext'])) {
$params['limittext'] = get_string('maxitemsperpage');
$params['limittext'] = get_string('maxitemsperpage1');
}
}
else {
......@@ -4016,11 +4016,11 @@ function build_pagination($params) {
}
}
$output .= '</ul></nav>';
$output .= '<form class="form-pagination js-pagination form-inline" action="' . hsc($params['url']) . '" method="POST">
$output .= '<form class="form-pagination js-pagination form-inline pagination-page-limit dropdown" action="' . hsc($params['url']) . '" method="POST">
<label for="setlimitselect" class="set-limit"> ' . $params['limittext'] . ' </label>' .
'<select id="setlimitselect" class="js-pagination input-xs" name="limit"> '.
'<span class="picker input-sm"><select id="setlimitselect" class="js-pagination input-sm select form-control" name="limit"> '.
join(' ', $strlimitoptions) .
'</select>
'</select></span>
<input class="currentoffset" type="hidden" name="' . $params['offsetname'] . '" value="' . $params['offset'] . '"/>
<input class="pagination js-hidden hidden" type="submit" name="submit" value="' . get_string('change') . '"/>
</form>';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -82,7 +82,7 @@ jQuery(function($) {
requestdata[checked[i].name] = 1;
}
requestdata['list'] = $(self).find('a[data-table]').attr('data-table');
requestdata['list'] = $(self).find('a[data-list]').attr('data-list');
requestdata['readone'] = $(self).find('a[data-id]').attr('data-id');
if (paginatorData) {
......
......@@ -64,7 +64,7 @@
</form>
{$deleteall|safe}
<div class="pull-right">
<div class="fullwidth">
{$activitylist['pagination']|safe}
</div>
</div>
......
......@@ -61,7 +61,7 @@
</form>
{$deleteall|safe}
<div class="pull-right">
<div class="fullwidth">
{$activitylist['pagination']|safe}
</div>
</div>
......
......@@ -21,6 +21,14 @@
}
}
.pagination-page-limit {
clear: both;
float: right;
label {
display: inline-block;
}
}
// Small
.pagination-xs {
@include pagination-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $border-radius-small);
......
......@@ -20,7 +20,7 @@
>thead>tr>th {
color: inherit;
vertical-align: bottom;
border-bottom: 1px solid $alert-info-border;
border-bottom: 1px solid rgba(#666, 0.05);
}
>thead>tr>th,
>thead>tr>td,
......
......@@ -48,6 +48,10 @@
}
.input-sm {
&.picker {
padding: 0;
}
&.picker,
.picker {
&:before {
margin-top: 6px;
......@@ -63,6 +67,7 @@
&:before {
margin-top: 12px;
}
&.picker select.form-control,
.picker select.form-control {
padding-top: 5px;
padding-bottom: 5px;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -37,7 +37,7 @@
And I click on "Select all"
And I select "title" from "sort"
And I press "search_submit"
And I should see "Maximum items per page:"
And I should see "Results per page:"
And I select "1" from "limit"
And I wait until the page is ready
And I should see "1"
......
......@@ -79,7 +79,7 @@ As an admin
And I click on "Select all"
And I select "title" from "sort"
And I press "search_submit"
Then I should see "Maximum items per page:"
Then I should see "Results per page:"
And I select "1" from "limit"
And I wait until the page is ready
And I should see "A's Page 01"
......
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