From 6ae2cb8ee2dc4e5b143487a80f94c17b1dcbdb4b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 25 Jul 2011 13:24:53 -0400 Subject: [PATCH] Show LI summary in copies display page Using the new, self-contained Lineitem.fetchAndRender, show a full LI summary along the top of the LI copies edit page. Includes some minor layout smoothing Signed-off-by: Bill Erickson --- Open-ILS/web/css/skin/default/acq.css | 7 ++++++- Open-ILS/web/js/ui/default/acq/common/li_table.js | 6 ++++++ Open-ILS/web/templates/default/acq/common/li_table.tt2 | 8 +++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css index 7844e173bd..91fceb416e 100644 --- a/Open-ILS/web/css/skin/default/acq.css +++ b/Open-ILS/web/css/skin/default/acq.css @@ -146,7 +146,7 @@ label[for="attr_search_type_scalar"] { vertical-align: top; } .acq-lit-po-heading td span a[attr="name"] { font-weight: bold; } #acq-lit-info-tbody td {padding:5px;} #acq-lit-info-related { margin-top: 10px; } -#acq-lit-li-details-table {margin-top:20px;} +#acq-lit-li-details-table {margin-top:5px;} #acq-lit-li-details-table td {padding:0px 3px 1px 3px;} #acq-lit-li-details-table th {padding:0px 3px 1px 3px; font-weight:bold;} #acq-lit-li-details-table .dijit {width:130px;} @@ -252,3 +252,8 @@ span[name="bib_origin"] img { vertical-align: middle; } #acq-litpager-controls[disabled="true"] { color: #ccc; } .acq-po-info th { text-align: right; } +#acq-lit-copies-li-summary { + border: 1px #666 dashed; + margin-bottom: 15px; + padding: 4px; +} 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 4068294535..d3dad875fb 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 @@ -921,6 +921,12 @@ function AcqLiTable() { if (typeof force_fetch == "undefined") force_fetch = false; + openils.acq.Lineitem.fetchAndRender(liId, {}, + function(li, html) { + dojo.byId('acq-lit-copies-li-summary').innerHTML = html; + } + ); + this.show('copies'); var self = this; this.copyCache = {}; diff --git a/Open-ILS/web/templates/default/acq/common/li_table.tt2 b/Open-ILS/web/templates/default/acq/common/li_table.tt2 index 645a0aeb97..6f4606c85e 100644 --- a/Open-ILS/web/templates/default/acq/common/li_table.tt2 +++ b/Open-ILS/web/templates/default/acq/common/li_table.tt2 @@ -144,7 +144,11 @@