mirror of https://github.com/OCA/web.git
fixup! [MIG] Migrate web_drop_target to 12.0
parent
6ddd71552e
commit
9fff39221e
|
@ -90,16 +90,13 @@ odoo.define('web_drop_target', function(require) {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
// try to find a sidebar and update it if we found one
|
// find the chatter among the children, there should be only
|
||||||
var p = self;
|
// one
|
||||||
while(p && !p.sidebar) {
|
var res = _.filter(self.getChildren(), 'chatter')
|
||||||
p = p.getParent ? p.getParent() : null;
|
if (res.length) {
|
||||||
}
|
res[0].chatter._reloadAttachmentBox();
|
||||||
if (p) {
|
res[0].chatter.trigger_up('reload');
|
||||||
var sidebar = p.sidebar;
|
res[0].chatter.$('.o_chatter_button_attachment').click();
|
||||||
if (sidebar && _.isFunction(sidebar._onFileUploaded)) {
|
|
||||||
sidebar._onFileUploaded();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue