Direct link: open child tab without delay
authorMartin Taal <martin.taal@openbravo.com>
Sat, 15 Jan 2011 09:19:37 +0100
changeset 9833 e5808cac2981
parent 9832 2463349571b0
child 9834 907df7d3c340
Direct link: open child tab without delay
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	Sat Jan 15 09:15:54 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js	Sat Jan 15 09:19:37 2011 +0100
@@ -314,7 +314,7 @@
     return ret;
   },
   
-  // handle the target record when the body has been drawn
+  // with a delay to handle the target record when the body has been drawn
   delayedHandleTargetRecord: function(startRow, endRow){
     var rowTop, recordIndex, i, data = this.data, tmpTargetRecordId = this.targetRecordId;
     if (!this.targetRecordId) {
@@ -345,11 +345,8 @@
       this.doSelectSingleRecord(gridRecord);
       this.scrollRecordIntoView(recordIndex, true);
       
-      isc.Page.waitFor(this, 'delayedHandleTargetRecord', {
-        method: this.view.openDirectChildTab(),
-        args: [],
-        target: this.view
-      });
+      // go to the children
+      this.view.openDirectChildTab();
     } else {
       // wait a bit longer til the body is drawn
       this.delayCall('delayedHandleTargetRecord', [startRow, endRow], 200, this);