details:   https://code.openbravo.com/erp/devel/pi/rev/8a1e5002624f
changeset: 13766:8a1e5002624f
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Sep 13 12:45:45 2011 +0200
summary:   Removed unneeded/test code

details:   https://code.openbravo.com/erp/devel/pi/rev/c6ad9f63b560
changeset: 13767:c6ad9f63b560
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Tue Sep 13 12:48:47 2011 +0200
summary:   Fixes issue 18521: Filter value is not shown when re-applying a view 
on a newly opened window
Make sure that the filter values are stored in the underlying grid 
implementation of the filter editor

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
       |  14 ++++++++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
 |   4 --
 2 files changed, 12 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 532db4b48a35 -r c6ad9f63b560 
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
     Tue Sep 13 12:19:56 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
     Tue Sep 13 12:48:47 2011 +0200
@@ -428,8 +428,9 @@
     return '(' + isc.Comm.serialize(state,false) + ')';
   },
   
-  setViewState : function (state) {
-    var localState = this.evalViewState(state, 'viewState');
+  setViewState: function (state) {
+    var i, length, 
+      localState = this.evalViewState(state, 'viewState');
     
     // strange case, sometimes need to call twice
     if (isc.isA.String(localState)) {
@@ -446,6 +447,15 @@
     }      
     if (localState.filter) {
       this.setCriteria(localState.filter);
+      if (this.filterEditor) {
+        // update the internal value also, this means that it
+        // get retained when showing the grid for the first
+        // time
+        length = this.filterEditor.getFields().length;
+        for (i = 0; i < length; i++) {
+          this.filterEditor.storeUpdatedEditorValue(false, i);
+        }
+      }
     }
     
     this.Super('setViewState', arguments);
diff -r 532db4b48a35 -r c6ad9f63b560 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
       Tue Sep 13 12:19:56 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
       Tue Sep 13 12:48:47 2011 +0200
@@ -639,9 +639,5 @@
       }
     }
     OB.PropertyStore.set('OBUIAPP_GridConfiguration', result, this.windowId);
-  },
-  
-  applyViewDefinition: function(viewDefinition) {
-    alert('Applying view definition ' + viewDefinition);
   }
 });

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to