diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index a2682b5c85b..c094c1adc6b 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -743,6 +743,9 @@ .openerp .oe_topbar .oe_topbar_avatar { vertical-align: top; } +.openerp .oe_topbar .oe_cropdown_toggle:after { + border-top: 4px solid white; +} .openerp .oe_topbar .oe_cropdown_menu { background: #333333; background: rgba(37, 37, 37, 0.9); @@ -830,9 +833,6 @@ list-style-type: none; float: left; } -.openerp .oe_user_menu.oe_cropdown_toggle:after, .openerp .oe_user_menu .oe_cropdown_toggle:after { - border-top: 4px solid white; -} .openerp .oe_user_menu .oe_cropdown_menu { right: -1px; } @@ -875,24 +875,6 @@ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; } -.openerp .oe_menu_more_container { - position: relative; -} -.openerp .oe_menu_more_container .oe_menu_more { - position: absolute; - padding: 0; - background-color: #646060; - z-index: 1; - border: 1px solid black; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} -.openerp .oe_menu_more_container .oe_menu_more li { - float: none; -} -.openerp .oe_menu_more_container .oe_menu_more li a { - white-space: nowrap; -} .openerp .oe_secondary_menu_section { font-weight: bold; margin-left: 8px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index bc15c9a840a..c8751a65e1e 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -603,6 +603,8 @@ $colour4: #8a89ba @include radius(3px) .oe_topbar_avatar vertical-align: top + .oe_cropdown_toggle:after + border-top: 4px solid white .oe_cropdown_menu background: #333 background: rgba(37,37,37,0.9) @@ -668,8 +670,6 @@ $colour4: #8a89ba li list-style-type: none float: left - &.oe_cropdown_toggle:after, .oe_cropdown_toggle:after - border-top: 4px solid white .oe_cropdown_menu right: -1px // }}} @@ -705,20 +705,6 @@ $colour4: #8a89ba font-weight: bold color: white @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset) - .oe_menu_more_container - position: relative - .oe_menu_more - position: absolute - padding: 0 - background-color: #646060 - z-index: 1 - border: 1px solid black - border-bottom-left-radius: 5px - border-bottom-right-radius: 5px - li - float: none - a - white-space: nowrap .oe_secondary_menu_section font-weight: bold margin-left: 8px diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 0e337bad750..62f81156326 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -582,10 +582,6 @@ instance.web.Menu = instance.web.Widget.extend({ this.renderElement(); this.limit_entries(); this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this })); - this.$element.on('click', 'a.oe_menu_more_link', function() { - self.$element.find('.oe_menu_more').toggle(); - return false; - }); this.$element.on('click', 'a[data-menu]', this.on_menu_click); this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click); // Hide second level submenus @@ -606,16 +602,12 @@ instance.web.Menu = instance.web.Widget.extend({ $index.after($more); $more.find('.oe_menu_more').append($index.next().nextAll()); } - this.do_hide_more(); }, auto_limit_entries: function() { // TODO: auto detect overflow and bind window on resize var width = $(window).width(); return Math.floor(width / 125); }, - do_hide_more: function() { - this.$element.find('.oe_menu_more').hide(); - }, /** * Opens a given menu by id, as if a user had browsed to that menu by hand * except does not trigger any event on the way @@ -676,7 +668,6 @@ instance.web.Menu = instance.web.Widget.extend({ */ menu_click: function(id) { if (id) { - this.do_hide_more(); // find back the menuitem in dom to get the action var $item = this.$element.find('a[data-menu=' + id + ']'); if (!$item.length) { @@ -708,9 +699,8 @@ instance.web.Menu = instance.web.Widget.extend({ * @param {Event} ev the jquery event */ on_menu_click: function(ev) { + ev.preventDefault(); this.menu_click($(ev.currentTarget).data('menu')); - ev.stopPropagation(); - return false; }, }); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index d8588835ad1..07131a70e00 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -273,8 +273,10 @@
  • - More -