From: erickson Date: Mon, 14 Jul 2008 15:08:35 +0000 (+0000) Subject: Displaying fund code instead of name in details grid X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e4fe3eceed66fd125100816a202201d7b1fc77fa;p=Evergreen.git Displaying fund code instead of name in details grid Displaying barcode, callnumber, and location columns in read-only view git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10026 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js index 4ae3e31b69..72b503638b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js +++ b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js @@ -69,6 +69,15 @@ var JUBGrid = { return data.fund; } }, + getLIDFundCode : function(rowIndex) { + var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex); + if (!data || !data.fund) return; + try { + return openils.acq.Fund.retrieve(data.fund).code(); + } catch (evt) { + return data.fund; + } + }, getLIDLibName : function(rowIndex) { var data = JUBGrid.jubDetailGrid.model.getRow(rowIndex); if (!data || !data.owning_lib) return; diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html index f989e3edf6..197fa51906 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html @@ -70,7 +70,7 @@ pointing to the JUB model (and store) that you have created. cells: [[ {name:"ID", field:"id"}, {name:"Fund", field:"fund", - get:JUBGrid.getLIDFundName, + get:JUBGrid.getLIDFundCode, editor: openils.editors.FundSelectEditor, }, {name:"Branch", field:"owning_lib", @@ -96,11 +96,15 @@ pointing to the JUB model (and store) that you have created. cells: [[ {name:"ID", field:"id"}, {name:"Fund", field:"fund", - get:JUBGrid.getLIDFundName, + get:JUBGrid.getLIDFundCode, }, {name:"Branch", field:"owning_lib", - get:JUBGrid.getLIDLibName, - }, + get:JUBGrid.getLIDLibName, + }, + {name:"Barcode", field:"barcode", width:'auto'}, + {name:"Call Number", field:"cn_label", width:'auto'}, + {name:"Shelving Location", field:"location", + width:'auto', get:JUBGrid.getCopyLocation}, ]] }];