[open-ils-commits] r12065 - trunk/Open-ILS/web/templates/default/conify/global/acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 4 13:41:47 EST 2009
Author: erickson
Date: 2009-02-04 13:41:44 -0500 (Wed, 04 Feb 2009)
New Revision: 12065
Modified:
trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2
Log:
use built-in edit dialog
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-04 16:48:49 UTC (rev 12064)
+++ trunk/Open-ILS/web/templates/default/conify/global/acq/exchange_rate.tt2 2009-02-04 18:41:44 UTC (rev 12065)
@@ -14,6 +14,7 @@
var cache = {};
function renderGrid() {
+ erGrid.storeItemObjectMapper = function(item) { return cache[item.id]; };
var pcrud = new openils.PermaCrud();
pcrud.retrieveAll('acqexr',
{ async : true,
@@ -30,34 +31,12 @@
);
}
openils.Util.addOnLoad(renderGrid);
-
- openils.Util.addOnLoad(function() {
- dojo.connect(erGrid, 'onKeyDown',
- function(e) {
- if(e.keyCode == dojo.keys.ENTER) {
- this.selection.deselectAll();
- this.selection.select(this.focus.rowIndex);
- var item = this.selection.getFirstSelected();
- var dialog = new openils.widget.EditDialog({
- fmObject:cache[item.id],
- onPostApply : function() {
- // update grid item object
- }
- });
- dialog.editPane.fieldOrder = erGrid.fieldOrder;
- dialog.startup();
- dialog.show();
- }
- }
- );
- });
-
</script>
<div dojoType="dijit.layout.ContentPane" layoutAlign="top" style='height:600px;'>
- <table jsId="erGrid" dojoType="openils.widget.AutoGrid"
+ <table jsId="erGrid" dojoType="openils.widget.AutoGrid" class='editable-auto-grid'
fieldOrder="['id', 'from_currency', 'to_currency', 'ratio']"
- query="{id: '*'}" rowSelector='20px' fmClass='acqexr'>
+ query="{id: '*'}" rowSelector='20px' fmClass='acqexr' editOnEnter='true'>
</table>
</div>
[% END %]
More information about the open-ils-commits
mailing list