From e71d7c77e1db37ec2c04c1ac0677a99b06828545 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 9 Sep 2010 20:35:44 +0000 Subject: [PATCH] Styling tweaks to brief bib summary bar. More tooltips, and expose record id and bib call number (from the first available defined in the appropriate asset.call_number_class entry) git-svn-id: svn://svn.open-ils.org/ILS/trunk@17549 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 11 +++++- .../staff_client/server/cat/bib_brief_overlay.js | 27 ++++++++++++- .../staff_client/server/cat/bib_brief_overlay.xul | 44 +++++++++++++--------- .../server/circ/alternate_copy_summary.xul | 12 ++++-- Open-ILS/xul/staff_client/server/circ/util.js | 10 +++++ .../server/locale/en-US/circ.properties | 1 + Open-ILS/xul/staff_client/server/skin/global.css | 1 + 7 files changed, 83 insertions(+), 23 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index d98840dda..b30d250fe 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2316,11 +2316,17 @@ - + + + + + + + @@ -3321,7 +3327,8 @@ - + + diff --git a/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.js b/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.js index d1fc5b221..7a547325e 100644 --- a/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.js +++ b/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.js @@ -71,7 +71,8 @@ function bib_brief_overlay(params) { //dump('value = ' + value + '\n'); var n = set(c.id, value ? value : ''); if (c.id == 'tcn_source') set_tooltip('tcn',value); - if (c.id == 'doc_id') set_tooltip('title',value); + if (c.id == 'title') set_tooltip('title',value); + if (c.id == 'author') set_tooltip('author',value); //dump('set text on ' + n + ' elements\n'); } else { //dump('render is not a function\n'); @@ -81,6 +82,30 @@ function bib_brief_overlay(params) { } } + // Let's fetch a bib call number + JSAN.use('OpenILS.data'); + var data = new OpenILS.data(); + var label_class = data.hash.aous['cat.default_classification_scheme']; + if (!label_class) { + label_class = { "value": 1 }; + } + var cn_blob_array = net.simple_request('BLOB_MARC_CALLNUMBERS_RETRIEVE',[params.mvr_id, label_class.value]); + if (! cn_blob_array) { cn_blob_array = []; } + var tooltip_text = ''; + for (var i = 0; i < cn_blob_array.length; i++) { + var cn_blob_obj = cn_blob_array[i]; + for (var j in cn_blob_obj) { + tooltip_text += j + ' : ' + cn_blob_obj[j] + '\n'; + } + } + if (tooltip_text) { + var cn_blob_obj = cn_blob_array[0]; + for (var j in cn_blob_obj) { + set('bib_call_number',cn_blob_obj[j]); + } + set_tooltip('bib_call_number',tooltip_text); + } + } catch(E) { alert(location.href + '\nError in bib_brief_overlay(' + js2JSON(params) + '): ' + E); return; diff --git a/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.xul b/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.xul index b8c9d33a7..93b654d67 100644 --- a/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.xul +++ b/Open-ILS/xul/staff_client/server/cat/bib_brief_overlay.xul @@ -10,7 +10,7 @@ - + @@ -20,24 +20,34 @@ - - + + diff --git a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul index f85b53c10..b80ce3cf3 100644 --- a/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul +++ b/Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul @@ -42,9 +42,15 @@ - - diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 03a2b136c..1f378599f 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1237,6 +1237,16 @@ circ.util.columns = function(modify,params) { { 'persist' : 'hidden width ordinal', 'fm_class' : 'bre', + 'id' : 'owner', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.owner'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return my.bre ? (typeof my.bre.owner() == 'object' ? my.bre.owner().shortname() : data.hash.aou[my.bre.owner()].shortname() ) : ''; } + }, + { + 'persist' : 'hidden width ordinal', + 'fm_class' : 'bre', 'id' : 'creator', 'label' : document.getElementById('circStrings').getString('staff.circ.utils.creator'), 'flex' : 1, diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index e350141b2..005e06258 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -276,6 +276,7 @@ staff.circ.utils.isbn=ISBN staff.circ.utils.pubdate=Publication Date staff.circ.utils.publisher=Publisher staff.circ.utils.creator=Created By +staff.circ.utils.owner=Owned By staff.circ.utils.editor=Edited By # TCN is an acronym for Title Control Number staff.circ.utils.tcn=TCN diff --git a/Open-ILS/xul/staff_client/server/skin/global.css b/Open-ILS/xul/staff_client/server/skin/global.css index 88361debf..48a2f9e54 100644 --- a/Open-ILS/xul/staff_client/server/skin/global.css +++ b/Open-ILS/xul/staff_client/server/skin/global.css @@ -100,6 +100,7 @@ iframe { background: #CDCED3 url("chrome://browser/skin/icons/box-background.png .header { font-weight: bold; } .header1 { font-weight: bold; font-size: large; } +.emphasis { font-weight: bold; } .tan { background-color: #D2B48C; } .sandy_brown { background-color: #F4A460; } -- 2.11.0