mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE: Input box for going to a page in gridfield
This commit is contained in:
parent
38db2c1744
commit
4ad7e8ef8d
@ -247,4 +247,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
$(".ss-gridfield .pagination-page-number input").entwine({
|
||||
onkeydown: function(event) {
|
||||
if(event.keyCode == 13) {
|
||||
var newpage = parseInt($(this).val(), 10);
|
||||
|
||||
var gridfield = $(this).getGridField();
|
||||
gridfield.setState('GridFieldPaginator', {currentPage: newpage});
|
||||
gridfield.reload();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
@ -1,7 +1,7 @@
|
||||
<tr>
|
||||
<td class="bottom-all" colspan="$Colspan">
|
||||
<div class="datagrid-pagination">
|
||||
$FirstPage $PreviousPage <span class="pagination-page-number">Page $CurrentPageNum of $NumPages</span> $NextPage $LastPage
|
||||
$FirstPage $PreviousPage <span class="pagination-page-number">Page <input value="$CurrentPageNum"/> of $NumPages</span> $NextPage $LastPage
|
||||
</div>
|
||||
|
||||
<span class="pagination-records-number">View $FirstShownRecord - $LastShownRecord of $NumRecords</span>
|
||||
|
Loading…
Reference in New Issue
Block a user