details:   https://code.openbravo.com/erp/devel/pi/rev/a9605441d9c9
changeset: 19107:a9605441d9c9
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Wed Dec 26 12:46:11 2012 +0530
summary:   Related to Issue 22625 : Issue in auto save in grid view.

The earlier fix does not work for the case where the record is the first record 
of the grid. This is because rowNum is compared, but it fails if the rowNum 
value is 0. Modified the check constraint to ignore null values alone.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
 |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r faf2790df3d2 -r a9605441d9c9 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
      Wed Dec 26 10:35:08 2012 +0530
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
      Wed Dec 26 12:46:11 2012 +0530
@@ -61,8 +61,8 @@
         standardWindow = this.view.standardWindow,
         autosaveButton = this.autosave,
         param, allProperties, sessionProperties, callbackFunction, popupParams;
-
-    if (rowNum && !theView.viewGrid.getSelectedRecord()) {
+    //Modified check from 'rowNum to 'rowNum ! = null' to handle case where 
rowNum is 0.
+    if (rowNum !== null && !theView.viewGrid.getSelectedRecord()) {
       // Current selection was lost, restore it
       theView.viewGrid.selectRecord(rowNum);
     }

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to