mirror of https://github.com/OCA/web.git
commit
9638ae9ce3
|
@ -442,22 +442,24 @@ odoo.define('web_responsive', function (require) {
|
||||||
* The executed action
|
* The executed action
|
||||||
*/
|
*/
|
||||||
_hideMenusByAction: function (action) {
|
_hideMenusByAction: function (action) {
|
||||||
var uniq_sel = '[data-action-id='+action.id+']';
|
_.defer(function () {
|
||||||
// Need close AppDrawer?
|
var uniq_sel = '[data-action-id='+action.id+']';
|
||||||
var menu_apps_dropdown = document.querySelector(
|
// Need close AppDrawer?
|
||||||
'.o_menu_apps .dropdown');
|
var menu_apps_dropdown = document.querySelector(
|
||||||
$(menu_apps_dropdown).has('.dropdown-menu.show')
|
'.o_menu_apps .dropdown');
|
||||||
.has(uniq_sel).find('> a').dropdown('toggle');
|
$(menu_apps_dropdown).has('.dropdown-menu.show')
|
||||||
// Need close Sections Menu?
|
.has(uniq_sel).find('> a').dropdown('toggle');
|
||||||
// TODO: Change to 'hide' in modern Bootstrap >4.1
|
// Need close Sections Menu?
|
||||||
var menu_sections = document.querySelector(
|
// TODO: Change to 'hide' in modern Bootstrap >4.1
|
||||||
'.o_menu_sections li.show');
|
var menu_sections = document.querySelector(
|
||||||
$(menu_sections).has(uniq_sel).find('.dropdown-toggle')
|
'.o_menu_sections li.show');
|
||||||
.dropdown('toggle');
|
$(menu_sections).has(uniq_sel).find('.dropdown-toggle')
|
||||||
// Need close Mobile?
|
.dropdown('toggle');
|
||||||
var menu_sections_mobile = document.querySelector(
|
// Need close Mobile?
|
||||||
'.o_menu_sections.show');
|
var menu_sections_mobile = document.querySelector(
|
||||||
$(menu_sections_mobile).has(uniq_sel).collapse('hide');
|
'.o_menu_sections.show');
|
||||||
|
$(menu_sections_mobile).has(uniq_sel).collapse('hide');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleAction: function (action) {
|
_handleAction: function (action) {
|
||||||
|
|
Loading…
Reference in New Issue