details:   https://code.openbravo.com/erp/devel/pi/rev/e8f606ccb519
changeset: 33963:e8f606ccb519
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Wed May 16 08:54:42 2018 +0200
summary:   fixes issue 38555: JS Error after opening a window under some 
circumstances

  When opening a window having the lazy filtering enabled, the funnel icon is 
hidden automatically. But when opening a window with some particular 
configuration it is possible to reach the code that hides the funnel icon 
without having it initialized yet. In this case a JS error was thrown avoiding 
the correct loading of the window.

  To fix the problem we just check whether the funnel icon has been initialized 
before trying to hide it.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
 |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 3470c011cf77 -r e8f606ccb519 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
  Tue May 15 18:32:09 2018 +0000
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
  Wed May 16 08:54:42 2018 +0200
@@ -832,7 +832,9 @@
       if (this.sorter) {
         this.filterHasChanged = true;
         this.sorter.enable();
-        this.filterImage.hide();
+        if (this.filterImage) {
+          this.filterImage.hide();
+        }
       }
     }
     if (!keepFilterClause) {

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to