From: Bill Erickson Date: Tue, 29 Apr 2014 21:07:22 +0000 (-0400) Subject: grid cleanup / docs cont. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ca3ca0f680987d79a0844f086955393689da32c3;p=working%2FEvergreen.git grid cleanup / docs cont. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 9100accff3..8351407148 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -26,12 +26,13 @@ function($scope, $q, $modal, $routeParams, egNet, egAuth, egUser, provider.itemFieldValue = function(item, column) { return provider.nestedItemFieldValue(item, column); }; - $scope.gridDataProvider = provider; function addCheckout(co) { $scope.checkouts.push(co); - $scope.gridDataProvider.increment(); + provider.increment(); } + + $scope.gridDataProvider = provider; // ----------------------------- $scope.selectedNcType = function() { diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 6203b7b739..0d86cdbed5 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -29,6 +29,21 @@ angular.module('egGridMod', idField : '@', // Reference to externally provided egGridDataProvider + // BEWARE: the grid removes everything from its scope that + // is not needed within the template. "=" sets up a two-way + // binding between the grid and the calling scope. After + // grid initiation, the itemsProvider attribute within the + // shared scope space will be set to undefined. + // + // In other words: + // + // template => items-provider="myProvider" + // + // controller => $scope.myProvider === undefined + // + // Storing the provider in the local scope just hogs + // resources, anyway. + // itemsProvider : '=', // comma-separated list of supported or disabled grid features