]> source.dussan.org Git - jquery-ui.git/commitdiff
Menubar: Remove dependency on button and simplify CSS accordingly.
authorjzaefferer <joern.zaefferer@gmail.com>
Mon, 28 Feb 2011 21:49:49 +0000 (22:49 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Mon, 28 Feb 2011 21:49:49 +0000 (22:49 +0100)
tests/visual/menu/menubar.html
tests/visual/menu/menubar.js

index 180084edd2d4fab4a9f4ab2552f30bc09c957b0c..101a8edfb6b7aac13874689aacef2c52dc3151bf 100644 (file)
@@ -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; }
                
                
index cb7c87e0b3757d127637865a6140a4d9acfe7d1e..57d9ee5de155571324f63981c122495881204185 100644 (file)
@@ -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("<span class='ui-button-text'></span>");
+                       self._hoverable(input)
+                       
+                       if (o.menuIcon) {
+                               input.addClass("ui-state-default").append("<span class='ui-button-icon-secondary ui-icon ui-icon-triangle-1-s'></span>");
+                               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) {