Browse Source

publish muk_web_theme - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
77850bbae6
  1. 2
      muk_web_theme/__manifest__.py
  2. 1
      muk_web_theme/static/src/js/chrome/actions.js
  3. 16
      muk_web_theme/static/src/js/chrome/menu.js
  4. 2
      muk_web_theme/static/src/xml/navbar.xml

2
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",

1
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');
},
});

16
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);

2
muk_web_theme/static/src/xml/navbar.xml

@ -49,7 +49,7 @@
</li>
</t>
<t t-else="">
<li class="mk_menu_mobile_section">
<li class="mk_menu_mobile_section clearfix">
<a role="button" href="#" t-attf-class="dropdown-toggle o-no-caret o_menu_header_lvl_#{depth}"
t-att-data-menu-xmlid="menu.xmlid" data-toggle="dropdown" aria-expanded="false">
<span>

Loading…
Cancel
Save