details:   https://code.openbravo.com/erp/devel/pi/rev/19135e59b532
changeset: 13365:19135e59b532
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Mon Aug 01 16:57:41 2011 +0200
summary:   Fixes issue 18150: Destroy context menu when a listgrid is destroyed
Added explicit destroy of context menu when a grid is destroyed

diffstat:

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

diffs (21 lines):

diff -r 48ce4704f0dc -r 19135e59b532 
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
     Mon Aug 01 16:48:15 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
     Mon Aug 01 16:57:41 2011 +0200
@@ -291,6 +291,17 @@
     return ret;
   },
 
+  // destroy the context menu also
+  // see why this needs to be done in the 
+  // documentation of canvas.contextMenu in Canvas.js
+  destroy: function() {
+    if (this.contextMenu) {
+      this.contextMenu.destroy();
+      this.contextMenu = null;
+    }
+    this.Super('destroy', arguments);
+  },
+  
   setData: function(data) {
     data.grid = this;
     this.Super('setData', arguments);

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to