Browse Source

publish muk_web_theme - 12.0

pull/115/head
MuK IT GmbH 6 years ago
parent
commit
fee61ee886
  1. 2
      muk_web_theme/__manifest__.py
  2. 13
      muk_web_theme/static/src/js/chrome/menu.js

2
muk_web_theme/__manifest__.py

@ -19,7 +19,7 @@
{ {
"name": "MuK Backend Theme", "name": "MuK Backend Theme",
"summary": "Odoo Community Backend Theme", "summary": "Odoo Community Backend Theme",
"version": "12.0.1.5.12",
"version": "12.0.1.5.13",
"category": "Themes/Backend", "category": "Themes/Backend",
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

13
muk_web_theme/static/src/js/chrome/menu.js

@ -31,6 +31,7 @@ var QWeb = core.qweb;
Menu.include({ Menu.include({
events: _.extend({}, Menu.prototype.events, { events: _.extend({}, Menu.prototype.events, {
"click .o_menu_apps a[data-toggle=dropdown]": "_onAppsMenuClick",
"click .mk_menu_mobile_section": "_onMobileSectionClick", "click .mk_menu_mobile_section": "_onMobileSectionClick",
"click .o_menu_sections [role=menuitem]": "_hideMobileSubmenus", "click .o_menu_sections [role=menuitem]": "_hideMobileSubmenus",
"show.bs.dropdown .o_menu_systray, .o_menu_apps": "_hideMobileSubmenus", "show.bs.dropdown .o_menu_systray, .o_menu_apps": "_hideMobileSubmenus",
@ -60,6 +61,18 @@ Menu.include({
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
} }
}, },
_onAppsMenuClick: function(event, checkedCanBeRemoved) {
var action_manager = this.getParent().action_manager;
var controller = action_manager.getCurrentController();
if (controller && !checkedCanBeRemoved) {
controller.widget.canBeRemoved().done(function () {
$(event.currentTarget).trigger('click', [true]);
$(event.currentTarget).off('.bs.dropdown');
});
event.stopPropagation();
event.preventDefault();
}
},
_onMobileSectionClick: function (event) { _onMobileSectionClick: function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();

Loading…
Cancel
Save