s.CONFIRM_IN_HOUSE_NUM_USES_COUNT_TITLE = "[% l('Are you sure you want to record {{num_uses}} uses for this?') %]";
s.PAGE_TITLE_DEFAULT = "[% l('Evergreen Staff Client') %]";
s.PAGE_TITLE_DYNAMIC_AND_CONTEXT = "[% l('[_1] - [_2]', '{{dynamic}}', '{{context}}') %]";
+ s.CONFIRM_LONG_RUNNING_ACTION_MSG = "[% l('This action might take a while to complete. Continue?') %]";
+ s.CONFIRM_LONG_RUNNING_ACTION_ALL_ROWS_TITLE = "[% l('Are you sure you want to load ALL items?') %]";
}]);
</script>
<eg-grid
id-field="index"
idl-class="acp"
- features="-display,clientsort"
+ features="-display,clientsort,allowAll"
main-label="[% l('Item Status') %]"
items-provider="gridDataProvider"
grid-controls="gridControls"
controller : [
'$scope','$q','egCore','egGridFlatDataProvider','$location',
'egGridColumnsProvider','$filter','$window','$sce','$timeout',
- 'egProgressDialog','$uibModal',
+ 'egProgressDialog','$uibModal','egConfirmDialog','egStrings',
function($scope, $q , egCore, egGridFlatDataProvider , $location,
egGridColumnsProvider , $filter , $window , $sce , $timeout,
- egProgressDialog , $uibModal) {
+ egProgressDialog, $uibModal , egConfirmDialog , egStrings) {
var grid = this;
$scope.collect = function() { grid.collect() }
+
+ $scope.confirmAllowAllAndCollect = function(){
+ egConfirmDialog.open(egStrings.CONFIRM_LONG_RUNNING_ACTION_ALL_ROWS_TITLE,
+ egStrings.CONFIRM_LONG_RUNNING_ACTION_MSG)
+ .result
+ .then(function(){
+ $scope.offset(0);
+ $scope.limit(10000);
+ grid.collect();
+ });
+ }
+
// asks the dataProvider for a page of data
grid.collect = function() {