[open-ils-commits] r12110 - trunk/Open-ILS/web/templates/default/conify/global/acq (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 8 11:06:38 EST 2009
Author: erickson
Date: 2009-02-08 11:06:36 -0500 (Sun, 08 Feb 2009)
New Revision: 12110
Modified:
trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
Log:
use new built-in autogrid fetch & load
Modified: trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 2009-02-08 16:05:20 UTC (rev 12109)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 2009-02-08 16:06:36 UTC (rev 12110)
@@ -1,31 +1,16 @@
[% WRAPPER default/base.tt2 %]
-<!--
-<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/billing_type.js'> </script>
--->
-
<script>
dojo.require('openils.widget.AutoGrid');
- dojo.require('openils.PermaCrud');
- dojo.require('openils.Util');
- function renderGrid() {
- var pcrud = new openils.PermaCrud();
- pcrud.retrieveAll('acqexr',
- { async : true,
- streaming : true,
- onresponse : function(r) {
- var item = openils.Util.readResponse(r);
- erGrid.store.newItem(item.toStoreItem());
- }
- }
- );
- }
- openils.Util.addOnLoad(renderGrid);
+ openils.Util.addOnLoad(
+ function() {
+ erGrid.loadAll({order_by:{acqpro : 'name'}});
+ }
+ );
</script>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
<div>Exchange Rates</div>
<div><button dojoType='dijit.form.Button' onClick='erGrid.showCreateDialog()'>New</button></div>
</div>
-
<div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
<table jsId="erGrid" dojoType="openils.widget.AutoGrid"
fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']" defaultCellWidth='12'
More information about the open-ils-commits
mailing list