[imp] refactoring of ParentedMixin

bzr revid: nicolas.vanhoren@openerp.com-20120221164536-zajw6gixwu4n4xgh
This commit is contained in:
niv-openerp
2012-02-21 17:45:36 +01:00
parent fdf7f93594
commit 2ecdb960d0
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -142,8 +142,8 @@ openerp.edi.EdiImport = openerp.web.OldWidget.extend({
},
destroy_content: function() {
_.each(_.clone(this.widget_children), function(el) {
el.stop();
_.each(_.clone(this.getChildren()), function(el) {
el.destroy();
});
this.$element.children().remove();
},
+2 -2
View File
@@ -1117,7 +1117,7 @@ openerp.point_of_sale = function(db) {
this.order = options.order;
this.shop = options.shop;
this.order.bind('destroy', _.bind( function() {
return this.stop();
this.destroy();
}, this));
this.shop.bind('change:selectedOrder', _.bind( function(shop) {
var selectedOrder;
@@ -1384,7 +1384,7 @@ openerp.point_of_sale = function(db) {
}, this));
}, this));
},
stop: function() {
destroy: function() {
$('.oe_footer').show();
$('.oe_toggle_secondary_menu').show();
pos = undefined;
+2 -2
View File
@@ -2,7 +2,7 @@
openerp.share = function(session) {
function launch_wizard(self, view, user_type) {
var action = view.widget_parent.action;
var action = view.getParent().action;
var Share = new session.web.DataSet(self, 'share.wizard', view.dataset.get_context());
var domain = new session.web.CompoundDomain(view.dataset.domain);
if (view.fields_view.type == 'form') {
@@ -57,7 +57,7 @@ session.web.Sidebar = session.web.Sidebar.extend({
});
},
on_sidebar_click_share: function(item) {
var view = this.widget_parent
var view = this.getParent()
launch_wizard(this, view);
},
});
@@ -89,7 +89,7 @@ openerp.web.Header.include({
this._super();
this.update_promise.then(function() {
if (self.livechat) {
self.livechat.stop();
self.livechat.destroy();
}
self.livechat = new openerp.web_livechat.Livechat(self);
self.livechat.prependTo(self.$element.find('div.header_corner'));
@@ -71,7 +71,7 @@ instance.web.Header.include({
this._super();
this.update_promise.then(function() {
if (self.uservoice) {
self.uservoice.stop();
self.uservoice.destroy();
}
self.uservoice = new instance.web_uservoice.UserVoice(self);
self.uservoice.prependTo(self.$element.find('div.header_corner'));