details:   /erp/devel/pi/rev/64ca5cc8ca5f
changeset: 10497:64ca5cc8ca5f
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Feb 10 02:16:20 2011 +0100
summary:   Message in child view now gets updated when undoing new edit row

diffstat:

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

diffs (62 lines):

diff -r bbb89ed3377e -r 64ca5cc8ca5f 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
      Thu Feb 10 02:03:56 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
      Thu Feb 10 02:16:20 2011 +0100
@@ -633,6 +633,13 @@
     // if not visible or the parent also needs to be refreshed
     // enable the following code if we don't automatically select the first
     // record
+    this.refreshChildViews();
+
+    // set this at false at the end
+    this.refreshContents = false;
+  },
+  
+  refreshChildViews: function() {
     if (this.childTabSet) {
       for (var i = 0; i < this.childTabSet.tabs.length; i++) {
         tabViewPane = this.childTabSet.tabs[i].pane;
@@ -641,8 +648,6 @@
         tabViewPane.doRefreshContents(true);
       }
     }
-    // set this at false at the end
-    this.refreshContents = false;
   },
   
   shouldOpenDefaultEditMode: function(){
@@ -1203,6 +1208,7 @@
             view.viewGrid.data.handleUpdate('remove', recordInfos);
           }
           view.viewGrid.updateRowCountDisplay();
+          view.refreshChildViews();
         } else {
           // get the error message from the dataObject 
           if (resp.dataObject && resp.dataObject.response && 
resp.dataObject.response.error && resp.dataObject.response.error.message) {
diff -r bbb89ed3377e -r 64ca5cc8ca5f 
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 Feb 10 02:03:56 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
  Thu Feb 10 02:16:20 2011 +0100
@@ -1112,6 +1112,8 @@
         this.setRecordErrorMessage(rowNum, null);
       }
     }
+    this.deselectAllRecords();
+    this.view.refreshChildViews();
     if (toRemove.length > 0) {
       this.data.handleUpdate('remove', toRemove);
       this.updateRowCountDisplay();
@@ -1119,7 +1121,6 @@
     this.view.standardWindow.cleanUpAutoSaveProperties();
     this.view.updateTabTitle();
     this.view.toolBar.updateButtonState();
-    this.deselectAllRecords();
   },
   
   discardEdits: function(rowNum, colNum, dontHideEditor, editCompletionEvent){
@@ -1138,6 +1139,7 @@
               id: record.id
             }]);
             me.updateRowCountDisplay();
+            me.view.refreshChildViews();
           } else {
             // remove the error style/msg    
             me.setRecordErrorMessage(rowNum, null);

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to