From 77850bbae67dc7e5397cd38186e34a3782ab7385 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Tue, 25 Jun 2019 09:47:22 +0000 Subject: [PATCH] publish muk_web_theme - 12.0 --- muk_web_theme/__manifest__.py | 2 +- muk_web_theme/static/src/js/chrome/actions.js | 1 - muk_web_theme/static/src/js/chrome/menu.js | 16 +++++++++++----- muk_web_theme/static/src/xml/navbar.xml | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/muk_web_theme/__manifest__.py b/muk_web_theme/__manifest__.py index c113a89..d16f783 100644 --- a/muk_web_theme/__manifest__.py +++ b/muk_web_theme/__manifest__.py @@ -19,7 +19,7 @@ { "name": "MuK Backend Theme", "summary": "Odoo Community Backend Theme", - "version": "12.0.1.5.13", + "version": "12.0.1.5.15", "category": "Themes/Backend", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_theme/static/src/js/chrome/actions.js b/muk_web_theme/static/src/js/chrome/actions.js index b9f0609..ef60201 100644 --- a/muk_web_theme/static/src/js/chrome/actions.js +++ b/muk_web_theme/static/src/js/chrome/actions.js @@ -35,7 +35,6 @@ ActionManager.include({ _hideMenusByAction: function (action) { var unique_selection = '[data-action-id=' + action.id + ']'; $(_.str.sprintf('.o_menu_apps .dropdown:has(.dropdown-menu.show:has(%s)) > a', unique_selection)).dropdown('toggle'); - $(_.str.sprintf('.o_menu_sections li.show:has(%s) .dropdown-toggle', unique_selection)).dropdown('toggle'); $(_.str.sprintf('.o_menu_sections.show:has(%s)', unique_selection)).collapse('hide'); }, }); diff --git a/muk_web_theme/static/src/js/chrome/menu.js b/muk_web_theme/static/src/js/chrome/menu.js index f378440..8f451e0 100644 --- a/muk_web_theme/static/src/js/chrome/menu.js +++ b/muk_web_theme/static/src/js/chrome/menu.js @@ -35,17 +35,26 @@ Menu.include({ "click .mk_menu_mobile_section": "_onMobileSectionClick", "click .o_menu_sections [role=menuitem]": "_hideMobileSubmenus", "show.bs.dropdown .o_menu_systray, .o_menu_apps": "_hideMobileSubmenus", - "hide.bs.dropdown .o_menu_sections": "_hideMenuSection", }), menusTemplate: config.device.isMobile ? 'muk_web_theme.MobileMenu.sections' : Menu.prototype.menusTemplate, start: function () { + var res = this._super.apply(this, arguments); this.$menu_toggle = this.$(".mk_menu_sections_toggle"); this.$menu_apps_sidebar = this.$('.mk_apps_sidebar_panel'); this._appsBar = new AppsBar(this, this.menu_data); this._appsBar.appendTo(this.$menu_apps_sidebar); this.$menu_apps_sidebar.renderScrollBar(); - return this._super.apply(this, arguments); + if (config.device.isMobile) { + var menu_ids = _.keys(this.$menu_sections); + for (var i = 0; i < menu_ids.length; i++) { + var $section = this.$menu_sections[menu_ids[i]]; + $section.on('click', 'a[data-menu]', this, function(ev) { + ev.stopPropagation(); + }); + } + } + return res; }, _hideMobileSubmenus: function () { if (this.$menu_toggle.is(":visible") && $('.oe_wait').length === 0 && @@ -53,9 +62,6 @@ Menu.include({ this.$section_placeholder.collapse("hide"); } }, - _hideMenuSection: function () { - return $('.oe_wait').length === 0; - }, _updateMenuBrand: function () { if (!config.device.isMobile) { return this._super.apply(this, arguments); diff --git a/muk_web_theme/static/src/xml/navbar.xml b/muk_web_theme/static/src/xml/navbar.xml index 297b05e..ed67cc8 100644 --- a/muk_web_theme/static/src/xml/navbar.xml +++ b/muk_web_theme/static/src/xml/navbar.xml @@ -49,7 +49,7 @@ -
  • +