details: https://code.openbravo.com/erp/devel/pi/rev/ecb8f9e371a5
changeset: 13639:ecb8f9e371a5
user: Martin Taal <martin.taal <at> openbravo.com>
date: Wed Aug 31 23:13:41 2011 +0200
summary: Related to issue 18227: Closing a tab doesn't release all objects
Workaround for not cleaning date range item content
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
| 30 +++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diffs (47 lines):
diff -r 8608083895a6 -r ecb8f9e371a5
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
Wed Aug 31 20:54:22 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
Wed Aug 31 23:13:41 2011 +0200
@@ -149,7 +149,13 @@
rangeDialogDefaults: {
_constructor: 'DateRangeDialog',
autoDraw: false,
- destroyOnClose: false
+ destroyOnClose: false,
+ clear: function() {
+ if (this.destroying) {
+ return;
+ }
+ this.Super('clear', arguments);
+ }
},
fromDateOnlyPrefix: OB.I18N.getLabel('OBUIAPP_fromDateOnlyPrefix'),
toDateOnlyPrefix: OB.I18N.getLabel('OBUIAPP_toDateOnlyPrefix'),
@@ -438,5 +444,27 @@
formatDate: function(dt) {
return OB.Utilities.Date.JSToOB(dt, OB.Format.date);
+ },
+
+ // TODO: the destroy and clear can be removed
+ // after upgrading to a SC release after mid-august 2011
+ destroy: function() {
+ this.destroying = true;
+ if (this.rangeDialog) {
+ this.rangeDialog.rangeForm.destroy();
+ this.rangeDialog.mainLayout.destroy();
+ this.rangeDialog.destroying = true;
+ this.rangeDialog.destroy();
+ this.rangeDialog.destroying = false;
+ }
+ this.Super('destroy', arguments);
+ this.destroying = false;
+ },
+
+ clear: function() {
+ if (this.destroying) {
+ return;
+ }
+ this.Super('clear', arguments);
}
});
\ No newline at end of file
------------------------------------------------------------------------------
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