mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: Add links to all menu items to be in line with what menu expects and remove the extra space added to disabled items
This commit is contained in:
parent
e38feeacb6
commit
4a9e26c68e
1
themes/base/jquery.ui.selectmenu.css
vendored
1
themes/base/jquery.ui.selectmenu.css
vendored
@ -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; }
|
||||
|
5
ui/jquery.ui.selectmenu.js
vendored
5
ui/jquery.ui.selectmenu.js
vendored
@ -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.addClass( 'ui-state-disabled' );
|
||||
}
|
||||
li.append( $( "<a />", {
|
||||
html: item.label,
|
||||
href: '#'
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return li.appendTo( ul );
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user