From: Bill Erickson Date: Tue, 11 Dec 2012 15:26:30 +0000 (-0500) Subject: Improve styling for 'delayed' lineitems in PO UI X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=203c122803bcdab667c413ec624d3b12320c9d03;p=evergreen%2Fmasslnc.git Improve styling for 'delayed' lineitems in PO UI When a lineitem is cancelled, but "keep_debits" is true, the lineitem is in effect delayed instead of truly cancelled. Make it more obvious in the UI the difference between delayed and truly cancelled lineitems by applying a row styling for delayed items (similar to other status row styling) and always show the cancel reason (label) in the lineitem display in the PO, next to the non-title attributes. Signed-off-by: Bill Erickson Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/acq/common/li_table.tt2 b/Open-ILS/src/templates/acq/common/li_table.tt2 index c6f29083db..d6a478ea3f 100644 --- a/Open-ILS/src/templates/acq/common/li_table.tt2 +++ b/Open-ILS/src/templates/acq/common/li_table.tt2 @@ -155,6 +155,7 @@ + diff --git a/Open-ILS/web/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css index 7da2a78dff..1beff279df 100644 --- a/Open-ILS/web/css/skin/default/acq.css +++ b/Open-ILS/web/css/skin/default/acq.css @@ -278,3 +278,4 @@ span[name="bib_origin"] img { vertical-align: middle; } border: 1px solid #464; } +span[name="cancel_reason"] { text-decoration: underline; font-weight: bold; } diff --git a/Open-ILS/web/css/theme/default/acq.css b/Open-ILS/web/css/theme/default/acq.css index d59e28e709..bc73c72873 100644 --- a/Open-ILS/web/css/theme/default/acq.css +++ b/Open-ILS/web/css/theme/default/acq.css @@ -35,6 +35,7 @@ .oils-acq-li-state-pending-order td { background-color: #EEEEDD; } .oils-acq-li-state-on-order td { background-color: #EEDDDD; } .oils-acq-li-state-received td { background-color: #DDDDDD; } +.oils-acq-li-state-delayed td { background-color: #99CCFF; } /* po display */ #oils-acq-po-table thead tr { border: 1px solid #A1A1A1; } diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 16665c4d7d..068f3518fd 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -626,6 +626,11 @@ function AcqLiTable() { dojo.forEach(tds, function(td) {self.setRowAttr(td, liWrapper, td.getAttribute('attr'), td.getAttribute('attr_type'));}); dojo.query('[name=source_label]', row)[0].appendChild(document.createTextNode(li.source_label())); + if (li.cancel_reason() && typeof li.cancel_reason() == 'object') { + dojo.query('[name=cancel_reason]', row)[0].appendChild( + document.createTextNode(li.cancel_reason().label())); + } + // so we can scroll to it later dojo.query('[name=bib-info-cell]', row)[0].id = 'li-title-ref-' + li.id(); @@ -1162,6 +1167,11 @@ function AcqLiTable() { "connectId": [holds_state] }, dojo.create("span", null, state_cell, "last") ); + + if (li.cancel_reason().keep_debits() == 't') { + openils.Util.removeCSSClass(row, /^oils-acq-li-state-/); + openils.Util.addCSSClass(row, "oils-acq-li-state-delayed"); + } } return; // all done