Changeset 9487
- Timestamp:
- 04/29/08 20:27:17 (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
r9480 r9487 13 13 dojo.require("dijit.layout.SplitContainer") 14 14 dojo.require('openils.acq.Picklist'); 15 // For decoding fund IDs into names 16 dojo.require("openils.acq.Fund"); 15 17 </script> 16 18 <script type='text/javascript'> 17 19 function getJUBTitle(rowIndex) { 18 data = pickListGrid.model.getRow(rowIndex);20 var data = pickListGrid.model.getRow(rowIndex); 19 21 if (!data) return ''; 20 22 return openils.acq.Picklist.find_attr(data.id, "title", "lineitem_marc_attr_definition") 21 23 } 22 24 function getJUBPrice(rowIndex) { 23 data = pickListGrid.model.getRow(rowIndex);25 var data = pickListGrid.model.getRow(rowIndex); 24 26 if (!data) return; 25 27 return openils.acq.Picklist.find_attr(data.id, "price", "lineitem_marc_attr_definition") 28 } 29 function getLIDFundName(rowIndex) { 30 var data = lineItemGrid.model.getRow(rowIndex); 31 if (!data) return; 32 try { 33 return openils.acq.Fund.retrieve(data.fund).name(); 34 } catch (evt) { 35 return data.fund; 36 } 26 37 } 27 38 </script> … … 58 69 59 70 var lineitemLayout = [{ cells: [[ 60 {name: 'ID', field:'id'},61 {name: 'Fund', field:'fund'},62 {name: 'Location', field:'location'} ]] }];71 {name:"ID", field:"id"}, 72 {name:"Fund", get:getLIDFundName}, 73 {name:"Location", field:"location"} ]] }]; 63 74 64 75 openils.acq.Picklist.createStore(${c.oils.acq.picklist.value.id()},
