details:   https://code.openbravo.com/erp/devel/pi/rev/4e3c9792779c
changeset: 21069:4e3c9792779c
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Wed Sep 04 12:26:15 2013 +0200
summary:   fixed bug 24686: grid config not saved if the only config is 
different sorting

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
 |  11 ++++++++-
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r df680df14807 -r 4e3c9792779c 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
     Wed Sep 04 11:43:03 2013 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
     Wed Sep 04 12:26:15 2013 +0200
@@ -1249,12 +1249,19 @@
       this.view.standardWindow.doActionAfterAutoSave(actionObject, true);
       return;
     }
-    var field = this.fields[fieldNum];
+    var field = this.fields[fieldNum],
+        res;
     if (this.isCheckboxField(field) && this.singleRecordSelection) {
       this.deselectAllRecords();
       this.singleRecordSelection = false;
     }
-    return this.Super('headerClick', arguments);
+    res = this.Super('headerClick', arguments);
+
+    if (field.canSort !== false) {
+      // saving grid configuration after sorting by new a field
+      this.view.standardWindow.storeViewState();
+    }
+    return res;
   },
 
   keyPress: function () {

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to