| Paste number 59000: | grid structure |
| Pasted by: | berick |
| 7 months, 2 weeks ago | |
| #openils-evergreen | Context in IRC logs | |
| Paste contents: |
| HTML:------------------------ <div dojoType="dijit.layout.ContentPane" class='oils-acq-detail-content-pane' title="${_('Credits')}"> <script type='dojo/connect' event='onShow'>loadCreditGrid();</script> <script> /** Define the columns for the funding source credits grid ----- */ var fsCreditGridLayout = [{ cells : [[ {name: '${_("ID")}', field: 'id'}, {name: '${_("Amount")}', field: "amount"}, {name: '${_("Note")}', field: "note", width:'auto'}, ]] }]; </script> <div jsId='fsCreditGrid' dojoType="dojox.Grid" structure='fsCreditGridLayout'> </div> </div> JS:------------------------------------ function loadCreditGrid() { if(fsCreditGrid.isLoaded) return; var data = acqfscred.toStoreData(fundingSource.credits()); /* for(var i in data.items) data.items[i].name='blah'; */ var store = new dojo.data.ItemFileReadStore({data:data}); var model = new dojox.grid.data.DojoData(null, store, {rowsPerPage: 20, clientSort: true}); fsCreditGrid.setModel(model); fsCreditGrid.update(); fsCreditGrid.isLoaded = true; } |
This paste has no annotations.