if ($scope.trim_list && checkinSvc.checkins.length > 20) {
//cut array short at 20 items
checkinSvc.checkins.length = 20;
- checkinGrid.prepend(20);
+ checkinGrid.prepend(true, 20);
} else {
- checkinGrid.prepend();
+ checkinGrid.prepend(true);
}
},
function() {
};
$scope.checkouts.unshift(row_item);
- $scope.gridDataProvider.prepend();
+ $scope.gridDataProvider.prepend(true);
egCore.hatch.setItem('circ.checkout.strict_barcode', $scope.strict_barcode);
var options = {check_barcode : $scope.strict_barcode};
grid.collect();
}
- controls.prepend = function(limit) {
- grid.prepend(limit);
+ controls.prepend = function(resetSort, limit) {
+ grid.prepend(resetSort, limit);
}
controls.setLimit = function(limit,forget) {
});
}
- grid.prepend = function(limit) {
+ grid.prepend = function(resetSort, limit) {
var ran_into_duplicate = false;
var sort = grid.dataProvider.sort;
if (sort && sort.length) {
// was most recently added nor that it
// belongs on top of the visible set of rows,
// so we default to a full collect()
+ if (resetSort) { // and offset
+ grid.dataProvider.sort = [];
+ grid.offset = 0;
+ }
grid.collect();
return;
}