cleaned up to match latest autogrid
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / acq / exchange_rate.tt2
1 [% WRAPPER default/base.tt2 %]
2 <!--
3 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/billing_type.js'> </script>
4 -->
5 <h1>Exchange Rates</h1><br/>
6
7 <script>
8     dojo.require('openils.widget.AutoGrid');
9     dojo.require('openils.PermaCrud');
10     dojo.require('openils.Util');
11     function renderGrid() {
12         var pcrud = new openils.PermaCrud();
13         pcrud.retrieveAll('acqexr', 
14             {   async : true,
15                 streaming : true,
16                 onresponse : function(r) {
17                     var item = openils.Util.readResponse(r);
18                     erGrid.store.newItem(item.toStoreItem());
19                     erGrid.update();
20                }     
21             }
22         );
23     }
24     openils.Util.addOnLoad(renderGrid);
25 </script>
26 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
27     <table jsId="erGrid" dojoType="openils.widget.AutoGrid" 
28             fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']" 
29             query="{id: '*'}" rowSelector='20px' fmClass='acqexr' editOnEnter='true'>
30     </table>
31 </div>
32 [% END %]
33
34