<button type="button" class="btn btn-default"
ng-show="showPagination"
ng-class="{disabled : !hasNextPage()}"
+ ng-disabled="!hasNextPage()"
ng-click="incrementPage()"
title="[% l('Next Page') %]">
<span class="glyphicon glyphicon-forward"></span>
egCore.auth.token(), $scope.patron_id
).then(function(hold_ids) {
- if (!hold_ids.length || hold_ids.length < offset + 1) { deferred.resolve(); return; }
+
+ if (!hold_ids.length || hold_ids.length < offset + 1)
+ {
+ deferred.resolve();
+ return;
+ }
+
+ $scope.gridDataProvider.grid.totalCount = hold_ids.length;
patronSvc.hold_ids = hold_ids;
fetchHolds(offset, count)
get_circ_ids().then(function() {
id_list = $scope[$scope.items_out_display + '_list'];
-
+ $scope.gridDataProvider.grid.totalCount = id_list.length;
// relay the notified circs back to the grid through our promise
fetch_circs(id_list, offset, count).then(
deferred.resolve, null, deferred.notify);
delete $scope.idField;
grid.dataProvider = $scope.itemsProvider;
+ // make grid ref available in get() to set totalCount, if known.
+ // this allows us disable the 'next' paging button correctly
+ grid.dataProvider.grid = grid;
if (!grid.indexField && grid.idlClass)
grid.indexField = egCore.idl.classes[grid.idlClass].pkey;