details:   https://code.openbravo.com/erp/devel/pi/rev/b21bbf743e3f
changeset: 13645:b21bbf743e3f
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Sep 01 12:32:58 2011 +0200
summary:   Related to issue 18227: Closing a tab doesn't release all objects
Destroy of removed tab pane was already implemented in super, making use of its 
implementation

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
               |   7 ++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
 |  16 ----------
 2 files changed, 4 insertions(+), 19 deletions(-)

diffs (57 lines):

diff -r ddf08e2b22d9 -r b21bbf743e3f 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
   Thu Sep 01 12:00:38 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js
   Thu Sep 01 12:32:58 2011 +0200
@@ -287,14 +287,15 @@
   },
 
   updateTab: function (tab, pane) {
-    var previousPane = tab && pane && tab.pane;
+    var previousPane = tab && this.getTabObject(tab).pane;
+    
+    this.Super('updateTab', arguments);
+
     // Note: updateTab doesn't remove the previous loading tab
     // 
http://www.smartclient.com/docs/8.1/a/b/c/go.html#method..TabSet.updateTab
     if(previousPane) {
       previousPane.destroy();
-      previousPane = null;
     }
-    this.Super('updateTab', arguments);
   }
 });
 
diff -r ddf08e2b22d9 -r b21bbf743e3f 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
     Thu Sep 01 12:00:38 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
     Thu Sep 01 12:32:58 2011 +0200
@@ -286,15 +286,7 @@
               // is used to prevent history updating
               loadingPane.isLoadingTab = true;
 
-              // refresh the existing tab
-              // explicitly destroy as the old tab is not destroyed
-              if (tabSet.getTabObject(viewTabId)) {
-                currentPane = tabSet.getTabObject(viewTabId).pane;  
-              }
               tabSet.updateTab(viewTabId, loadingPane);
-              if (currentPane) {
-                currentPane.destroy();
-              }
               
               // and show it
               tabSet.selectTab(viewTabId);
@@ -344,15 +336,7 @@
 
             // refresh the view
 
-            // refresh the existing tab
-            // explicitly destroy as the old tab is not destroyed
-            if (tabSet.getTabObject(viewTabId)) {
-              currentPane = tabSet.getTabObject(viewTabId).pane;  
-            }
             tabSet.updateTab(viewTabId, viewInstance);
-            if (currentPane) {
-              currentPane.destroy();
-            }
 
             // and show it
             tabSet.selectTab(viewTabId);

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to