details:   /erp/devel/pi/rev/c3c657c3187e
changeset: 9316:c3c657c3187e
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Dec 23 10:04:53 2010 +0100
summary:   Moved convert criteria to be done as part of getCriteria method to 
work with exportData

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
 |  46 +++++----
 1 files changed, 24 insertions(+), 22 deletions(-)

diffs (80 lines):

diff -r 4864208c0ea3 -r c3c657c3187e 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Dec 23 09:37:44 2010 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Dec 23 10:04:53 2010 +0100
@@ -248,12 +248,11 @@
   },
   
   refreshContents: function(callback){
-    var criteria = this.getFilterEditorCriteria() || {};
     var context = {
       showPrompt: false,
       textMatchStyle: this.autoFetchTextMatchStyle
     };
-    this.filterData(criteria, callback, context);
+    this.filterData(this.getCriteria(), callback, context);
   },
   
   dataArrived: function(startRow, endRow){
@@ -320,10 +319,24 @@
     }
     requestProperties.showPrompt = false;
     
-    criteria = this.convertCriteria(criteria);
     var theView = this.view;
+    var newCallBack = function(){
+      theView.recordSelected();
+      if (callback) {
+        callback();
+      }
+    };
     
-    var newRequestProperties = 
OB.Utilities._getTabInfoRequestProperties(theView, requestProperties);
+    return this.Super('filterData', [criteria, newCallBack, 
requestProperties]);
+  },
+  
+  fetchData: function(criteria, callback, requestProperties){
+    if (!requestProperties) {
+      requestProperties = {};
+    }
+    requestProperties.showPrompt = false;
+    
+    var theView = this.view;    
     
     var newCallBack = function(){
       theView.recordSelected();
@@ -332,28 +345,17 @@
       }
     };
     
-    return this.Super('filterData', [criteria, newCallBack, 
newRequestProperties]);
+    return this.Super('fetchData', [criteria, newCallBack, requestProperties]);
   },
   
-  fetchData: function(criteria, callback, requestProperties){
-    if (!requestProperties) {
-      requestProperties = {};
+  getCriteria: function() {
+    var criteria = this.Super("getCriteria", arguments);
+    if (!criteria) {
+      criteria = {};
     }
-    requestProperties.showPrompt = false;
-    
     criteria = this.convertCriteria(criteria);
-    var theView = this.view;
-    
-    var newRequestProperties = 
OB.Utilities._getTabInfoRequestProperties(theView, requestProperties);
-    
-    var newCallBack = function(){
-      theView.recordSelected();
-      if (callback) {
-        callback();
-      }
-    };
-    
-    return this.Super('fetchData', [criteria, newCallBack, 
newRequestProperties]);
+    criteria = OB.Utilities._getTabInfoRequestProperties(this.view, criteria); 
   
+    return criteria;
   },
   
   // determine which field can be autoexpanded to use extra space  

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to