Permalink
Browse files

Selectmenu: Add links to all menu items to be in line with what menu …

…expects and remove the extra space added to disabled items
  • Loading branch information...
kborchers committed Mar 19, 2012
1 parent e38feea commit 4a9e26c68e3443253174f927f4f741d706402032
Showing with 6 additions and 8 deletions.
  1. +0 −1 themes/base/jquery.ui.selectmenu.css
  2. +6 −7 ui/jquery.ui.selectmenu.js
@@ -11,7 +11,6 @@
.ui-selectmenu-menu { padding: 0; margin: 0; position:absolute; top: 0; display: none; }
.ui-selectmenu-menu ul.ui-menu { overflow: auto; overflow-y: auto ; overflow-x: hidden; }
.ui-selectmenu-menu .ui-menu .ui-menu-item a { padding: 0.3em 1em 0.3em 1em; }
-.ui-selectmenu-menu .ui-menu li.ui-state-disabled { padding: 0.3em 1em 0.3em 1em; }
.ui-selectmenu-menu .ui-menu li.ui-selectmenu-optgroup { font-weight: bold; line-height: 1.5; padding: 2px 0.4em; margin: 0.5em 0 0 0; }
.ui-selectmenu-open { display: block; }
.ui-selectmenu-button a.ui-button { display: inline-block; overflow: hidden; position: relative; text-decoration: none; }
View
@@ -258,14 +258,13 @@ $.widget( "ui.selectmenu", {
_renderItem: function( ul, item) {
var li = $( "<li />" ).data( "item.selectmenu", item );
if ( item.disabled ) {
- li.addClass( 'ui-state-disabled' ).html( item.label );
- } else {
- li.append( $( "<a />", {
- html: item.label,
- href: '#'
- })
- );
+ li.addClass( 'ui-state-disabled' );
}
+ li.append( $( "<a />", {
+ html: item.label,
+ href: '#'
+ })
+ );
return li.appendTo( ul );
},

0 comments on commit 4a9e26c

Please sign in to comment.