| Paste number 59000: | grid structure |
| Pasted by: | berick |
| When: | 1 year, 2 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+19IW |
| Channel: | #openils-evergreen |
| 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.