mirror of https://github.com/OCA/web.git
[FIX] web_responsive: Close Menu on Discard
parent
4aa9a2f330
commit
e222219635
|
@ -3,3 +3,4 @@
|
||||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||||
* Sergio Teruel <sergio.teruel@tecnativa.com>
|
* Sergio Teruel <sergio.teruel@tecnativa.com>
|
||||||
* Alexandre Díaz <dev@redneboa.es>
|
* Alexandre Díaz <dev@redneboa.es>
|
||||||
|
* Mathias Markl <mathias.markl@mukit.at>
|
||||||
|
|
|
@ -114,6 +114,8 @@ odoo.define('web_responsive', function (require) {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Prevent the menu from being opened twice
|
||||||
|
*
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
_onAppsMenuItemClicked: function (ev) {
|
_onAppsMenuItemClicked: function (ev) {
|
||||||
|
@ -288,11 +290,14 @@ odoo.define('web_responsive', function (require) {
|
||||||
BasicController.include({
|
BasicController.include({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Close the AppDrawer if the data set is dirty and a discard dialog is opened
|
||||||
|
*
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
canBeDiscarded: function (recordID) {
|
canBeDiscarded: function (recordID) {
|
||||||
if (this.model.isDirty(recordID || this.handle)) {
|
if (this.model.isDirty(recordID || this.handle)) {
|
||||||
$('.o_menu_apps .dropdown:has(.dropdown-menu.show) > a').dropdown('toggle');
|
$('.o_menu_apps .dropdown:has(.dropdown-menu.show) > a').dropdown('toggle');
|
||||||
|
$('.o_menu_sections li.show .dropdown-toggle').dropdown('toggle');
|
||||||
}
|
}
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue