From 64066f780afd5d1c11ac8a5d3e598f6c7896bc5d Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 12 May 2014 15:29:43 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/staff/share/t_autogrid.tt2 | 14 +++++++++----- Open-ILS/web/js/ui/default/staff/services/grid.js | 7 ++++++- 2 files changed, 15 insertions(+), 6 deletions(-) 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 -- 2.11.0