From f76e7498e71fb41d54daab7e028cff48809528d4 Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Mon, 28 Feb 2011 22:49:49 +0100 Subject: [PATCH] Menubar: Remove dependency on button and simplify CSS accordingly. --- tests/visual/menu/menubar.html | 1 - tests/visual/menu/menubar.js | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/visual/menu/menubar.html b/tests/visual/menu/menubar.html index 180084edd..101a8edfb 100644 --- a/tests/visual/menu/menubar.html +++ b/tests/visual/menu/menubar.html @@ -53,7 +53,6 @@ /* menubar styles */ .ui-menubar .ui-button { float: left; font-weight: normal; border-top-width: 0 !important; border-bottom-width: 0 !important; margin: 0; } - .ui-menubar .ui-button.ui-corner-all { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; } .ui-menubar .ui-menubar-link { border-right: 1px dashed transparent; border-left: 1px dashed transparent; } diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js index cb7c87e0b..57d9ee5de 100644 --- a/tests/visual/menu/menubar.js +++ b/tests/visual/menu/menubar.js @@ -57,15 +57,18 @@ $.widget("ui.menubar", { event.preventDefault(); event.stopPropagation(); }) - .button({ - icons: { - secondary: o.menuIcon ? (menu.length ? 'ui-icon-triangle-1-s' : '') : '' - } - }); + .addClass("ui-button ui-widget ui-button-text-only ui-menubar-link") + .wrapInner(""); + self._hoverable(input) + + if (o.menuIcon) { + input.addClass("ui-state-default").append(""); + input.removeClass("ui-button-text-only").addClass("ui-button-text-icon-secondary"); + } - if (!o.buttons) { - input.addClass('ui-menubar-link').removeClass('ui-state-default'); - }; + if (!o.buttons) { + input.addClass('ui-menubar-link').removeClass('ui-state-default'); + }; }); $(document).click(function(event) { -- 2.39.5