From 0a39190b44f3acef75be826f60c432594a3a358c Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Thu, 23 May 2019 21:47:02 +0000 Subject: [PATCH] lp1775286 Color Indication of Overdue on Items Out - Overdue items are highlighted in red in the Items Out UI. - Ensure overdue-row and lost-row classes handle visited links Signed-off-by: Kyle Huckins Signed-off-by: Jennifer Pringle Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 | 5 +++-- Open-ILS/src/templates/staff/css/style.css.tt2 | 2 +- .../web/js/ui/default/staff/circ/patron/items_out.js | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 index b7857aa151..37235ed5c0 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_items_out.tt2 @@ -49,7 +49,8 @@ features="clientsort,allowAll" items-provider="gridDataProvider" persist-key="circ.patron.items_out" - dateformat="{{$root.egDateAndTimeFormat}}"> + dateformat="{{$root.egDateAndTimeFormat}}" + row-class="colorizeItemsOutList"> @@ -84,7 +85,7 @@ {{item.target_copy().barcode()}} - + diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2 index 5db43ef5d2..684cf3d843 100644 --- a/Open-ILS/src/templates/staff/css/style.css.tt2 +++ b/Open-ILS/src/templates/staff/css/style.css.tt2 @@ -353,7 +353,7 @@ table.list tr.selected td { /* deprecated? */ color: #FFF; background-color: #EB0000 !important; } -.overdue-row a:link, .lost-row a:link { +.overdue-row a:link, .overdue-row a:visited, .lost-row a:link, .lost-row a:visited { color: #B8ECFF; } diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index b17702f889..522a08de50 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -89,6 +89,15 @@ function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc , // noncat_list always involves instantiating a new grid. } + $scope.colorizeItemsOutList = { + apply: function(item) { + var duedate = item.due_date(); + if (duedate && duedate < new Date().toISOString()) { + return 'overdue-row'; + } + } + } + // Reload the user to pick up changes in items out, fines, etc. // Reload circs since the contents of the main vs. alt list may // have changed. -- 2.43.2