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"
ng-if="items_out_display == 'noncat'"
idl-class="ancc"
id-field="id"
- features="clientsort"
+ features="clientsort,allowAll"
items-provider="gridDataProvider"
persist-key="circ.patron.items_out.noncat"
dateformat="{{$root.egDateAndTimeFormat}}">
{{t}}
</a>
</li>
+ <li ng-if="allowAll" ng-repeat="t in [500,1000]">
+ <a href ng-click='offset(0);limit(t);collect()'>
+ {{t}}
+ </a>
+ </li>
<li ng-if="allowAll" >
- <a href ng-click='offset(0);limit(10000);collect()'>[% l('All') %]</a>
+ <a href ng-click='confirmAllowAllAndCollect();'>[% l('All') %]</a>
</li>
</ul>
</div>
controller : [
'$scope','$q','egCore','egGridFlatDataProvider','$location',
'egGridColumnsProvider','$filter','$window','$sce','$timeout',
- 'egProgressDialog',
+ 'egProgressDialog', 'egConfirmDialog', 'egStrings',
function($scope, $q , egCore, egGridFlatDataProvider , $location,
egGridColumnsProvider , $filter , $window , $sce , $timeout,
- egProgressDialog) {
+ egProgressDialog, 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() {