Commit 95d0bdf2 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Pagination & plugin alert (BUG: 1465107)"

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