From: Bill Erickson Date: Mon, 12 May 2014 19:29:43 +0000 (-0400) Subject: grid row selectors (clicking on index) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=64066f780afd5d1c11ac8a5d3e598f6c7896bc5d;p=working%2FEvergreen.git grid row selectors (clicking on index) It's a start, anyway. we may want a more obvious means of selecting a row. Easy enough to change. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 4e037ade91..ccfc46ee68 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -159,11 +159,12 @@
-
[% l('#') %]
+
[% l('#') %]
- +
- {{$index + offset() + 1}} + ng-click="handleRowClick($event, item)" title="[% l('Row Index') %]"> + + {{$index + offset() + 1}} + +
{{$index + offset() + 1}}
-
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 360ac91efe..e1cfd2be7f 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -65,7 +65,12 @@ angular.module('egGridMod', // called on each item retrieved in collect() with the item // as the argument. Useful for modiying objects before they // are absorbed by the grid. - onItemRetrieved : '=' + onItemRetrieved : '=', + + // function; if set, row index values will be hyperlinked and + // the onclick for an item will call activateItem with the item + // as the argument. + activateItem : '=' }, // TODO: avoid hard-coded url