From: erickson Date: Wed, 4 Feb 2009 22:50:23 +0000 (+0000) Subject: when using the popup dialog, overide the default focus handling. this is still exper... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1e1d91b669fe746f4ece1cd4c288879242fa09f1;p=evergreen%2Ftadl.git when using the popup dialog, overide the default focus handling. this is still experimental git-svn-id: svn://svn.open-ils.org/ILS/trunk@12070 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index 4d95cd4bc6..7f8f5d0c91 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -39,19 +39,24 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { /* capture keydown and launch edit dialog on enter */ _applyEditOnEnter : function() { this.onMouseOverRow = function(e) {}; - this.onMouseOut = function(e) {}; + this.onMouseOutRow = function(e) {}; + this.onCellFocus = function(cell, rowIndex) { + openils.Util.addCSSClass( + cell.getNode(rowIndex).parentNode, + 'oils-grid-row-selected'); + } dojo.connect(this, 'onKeyDown', function(e) { if(e.keyCode == dojo.keys.ENTER) { this.selection.deselectAll(); this.selection.select(this.focus.rowIndex); - this._drawEditDialog(this.selection.getFirstSelected()); + this._drawEditDialog(this.selection.getFirstSelected(), this.focus.rowIndex); } } ); }, - _drawEditDialog : function(storeItem) { + _drawEditDialog : function(storeItem, rowIndex) { var grid = this; var fmObject = new fieldmapper[this.fmClass]().fromStoreItem(storeItem); var idents = grid.store.getIdentityAttributes();