summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2012-02-21 16:55:16 +0100
committerniv-openerp <nicolas.vanhoren@openerp.com>2012-02-21 16:55:16 +0100
commit7fcfcbaddbea0da9c17eed388ef5d7af21b9e100 (patch)
treedead197ff6565446a44f8bcf932bcf42152c1e99 /addons/web/static/src/js
parentbe66f62357f7cf0658a7c04b8cc41c15e38c55c8 (diff)
[imp] changed is_stopped
bzr revid: nicolas.vanhoren@openerp.com-20120221155516-7eczor9bobky9dxq
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/core.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index d31d27b8fa4..9e9e01428ba 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -1022,8 +1022,6 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
parent.__parented_children = [];
parent.getChildren().push(this);
}
- // useful to know if the widget was destroyed and should not be used anymore
- this.widget_is_stopped = false;
},
getParent: function() {
return this.__parented_parent;
@@ -1031,6 +1029,9 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
getChildren: function() {
return this.__parented_children || [];
},
+ isStopped: function() {
+ return this.__parented_stopped;
+ },
/**
* Renders the current widget and appends it to the given jQuery object or Widget.
*
@@ -1132,7 +1133,7 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
this.$element.remove();
}
this.setParent(undefined);
- this.widget_is_stopped = true;
+ this.__parented_stopped = true;
},
/**
* Informs the action manager to do an action. This supposes that
@@ -1162,10 +1163,10 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
var def = $.Deferred().then(success, error);
var self = this;
openerp.connection.rpc(url, data). then(function() {
- if (!self.widget_is_stopped)
+ if (!self.isStopped())
def.resolve.apply(def, arguments);
}, function() {
- if (!self.widget_is_stopped)
+ if (!self.isStopped())
def.reject.apply(def, arguments);
});
return def.promise();