Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Selectmenu: code cleanup

  • Loading branch information...
commit 2ed360c380541857c392117c300b8f900377a855 1 parent 404f4c1
@fnagel fnagel authored
View
3  demos/selectmenu/default.html
@@ -17,6 +17,7 @@
$('select#speed').selectmenu({
dropdown: false
});
+
var withOverflow = $('select#number').selectmenu({
dropdown: false
});
@@ -31,7 +32,7 @@
fieldset { border: 0; }
label { display: block; }
select { width: 200px; }
- .overflow ul { height: 200px; overflow: auto; }
+ .overflow ul { height: 200px; overflow: auto; overflow-y: auto; overflow-x: hidden;}
</style>
</head>
<body>
View
5 themes/base/jquery.ui.selectmenu.css
@@ -9,11 +9,12 @@
*/
.ui-selectmenu-menu { padding: 0; margin: 0; position:absolute; top: 0; display: none; }
-.ui-selectmenu-menu .ui-menu .ui-menu-item { width: auto; }
.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 span.ui-icon { right: 0.5em; left: auto; }
-.ui-selectmenu-button span.ui-button-text { text-align: left; padding: 0.4em 2.1em 0.4em 1em }
+.ui-selectmenu-button span.ui-button-text { text-align: left; padding: 0.4em 2.1em 0.4em 1em }
+
+.ui-selectmenu-menu .ui-menu .ui-menu-item { width: auto; } /* IE7 fix */
View
8 ui/jquery.ui.selectmenu.js
@@ -251,6 +251,10 @@ $.widget( "ui.selectmenu", {
}
},
+ widget: function() {
+ return this.buttonWrap.add( this.menuWrap );
+ },
+
_renderMenu: function( ul, items ) {
var that = this,
currentOptgroup = "";
@@ -379,10 +383,6 @@ $.widget( "ui.selectmenu", {
this.menu.attr( "aria-disabled", value );
}
},
-
- widget: function() {
- return this.buttonWrap.add( this.menuWrap );
- },
_readOptions: function() {
var data = [];
Please sign in to comment.
Something went wrong with that request. Please try again.