Changeset 9488
- Timestamp:
- 04/29/08 21:19:37 (2 weeks ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
r9487 r9488 15 15 // For decoding fund IDs into names 16 16 dojo.require("openils.acq.Fund"); 17 // For decoding Library IDs into names 18 dojo.require("fieldmapper.OrgUtils"); 17 19 </script> 18 20 <script type='text/javascript'> … … 29 31 function getLIDFundName(rowIndex) { 30 32 var data = lineItemGrid.model.getRow(rowIndex); 31 if (!data ) return;33 if (!data || !data.fund) return; 32 34 try { 33 35 return openils.acq.Fund.retrieve(data.fund).name(); 34 36 } catch (evt) { 35 37 return data.fund; 38 } 39 } 40 function getLIDLibName(rowIndex) { 41 var data = lineItemGrid.model.getRow(rowIndex); 42 if (!data || !data.owning_lib) return; 43 try { 44 return fieldmapper.aou.findOrgUnit(data.owning_lib, true).name(); 45 } catch (evt) { 46 return data.owning_lib; 36 47 } 37 48 } … … 71 82 {name:"ID", field:"id"}, 72 83 {name:"Fund", get:getLIDFundName}, 73 {name:"Location", field:"location"} ]] }];84 {name:"Location", get:getLIDLibName} ]] }]; 74 85 75 86 openils.acq.Picklist.createStore(${c.oils.acq.picklist.value.id()},
