]> source.dussan.org Git - jquery-ui.git/commitdiff
fixed: small follow-up for refresh functionality
authorFelix Nagel <info@felixnagel.com>
Mon, 20 Dec 2010 21:27:59 +0000 (22:27 +0100)
committerFelix Nagel <info@felixnagel.com>
Mon, 20 Dec 2010 21:27:59 +0000 (22:27 +0100)
fixed: cleaned background image demo
fixed: small follow-up to height of the widget to match jQuery UI button height

demos/selectmenu/background_image.html
themes/base/jquery.ui.selectmenu.css
ui/jquery.ui.selectmenu.js

index c34afc0cfbe102621fb19bd0b4388b653a9a9ada..d33e0884fa3d55d26f2a556e9761504d32c603ff 100644 (file)
@@ -40,6 +40,7 @@
        <script type="text/javascript"> 
                $(function(){
                        $('select#files').selectmenu({
+                               style:'popup', 
                                icons: [
                                        {find: '.script', icon: 'ui-icon-script'},
                                        {find: '.image', icon: 'ui-icon-image'}
@@ -47,6 +48,7 @@
                        });     
                        
                        $('select#filesB').selectmenu({
+                               style:'popup', 
                                icons: [
                                        {find: '.video'},
                                        {find: '.podcast'},
@@ -55,7 +57,6 @@
                        });                     
                        
                        $('select#peopleA').selectmenu({
-                               style:'dropdown',
                                icons: [
                                        {find: '.avatar'}
                                ],
@@ -65,7 +66,6 @@
                        });
 
                        $('select#peopleB').selectmenu({
-                               style:'dropdown',
                                icons: [
                                        {find: '.css-avatar'}
                                ],
index 6e1deaf08657c68008de16b0250c1654e3012efa..350aa9dbe06341a8910afb00e0d1a9fd15edfd66 100644 (file)
@@ -7,7 +7,7 @@
 .ui-selectmenu-menu-popup { margin-top: -1px; }
 .ui-selectmenu-menu-dropdown { }
 .ui-selectmenu-menu li { padding:0; margin:0; display: block; border-top: 1px dotted transparent; border-bottom: 1px dotted transparent; border-right-width: 0 !important; border-left-width: 0 !important; font-weight: normal !important; }
-.ui-selectmenu-menu li a,.ui-selectmenu-status { line-height: 1.4em; display: block; padding: .4em 1em; outline:none; text-decoration:none; }
+.ui-selectmenu-menu li a,.ui-selectmenu-status { line-height: 1.4em; display: block; padding: .405em 1em; outline:none; text-decoration:none; }
 .ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
 .ui-selectmenu-hasIcon .ui-selectmenu-status { padding-left: 20px; position: relative; margin-left: 5px; }
 .ui-selectmenu-menu li .ui-icon, .ui-selectmenu-status .ui-icon { position: absolute; top: 1em; margin-top: -8px; left: 0; }
@@ -20,5 +20,5 @@
 .ui-selectmenu-menu li .ui-selectmenu-item-footer { opacity: .8; }
 /*for optgroups*/
 .ui-selectmenu-menu .ui-selectmenu-group { font-size: 1em; }
-.ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.4em; display:block; padding:.6em .5em 0; font-weight: bold; }
+.ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.4em; display:block; padding: .6em .5em 0; font-weight: bold; }
 .ui-selectmenu-menu .ui-selectmenu-group ul { margin: 0; padding: 0; }
\ No newline at end of file
index e5eab3da92c0c99c85b3cfca4fc8bd3d0e974e44..5e6d78fefc11ae9a4c60a85c21e38b91f5bd04f1 100644 (file)
@@ -317,7 +317,7 @@ $.widget("ui.selectmenu", {
                // add corners to top and bottom menu items
                .find('li:first')
                        .toggleClass("ui-corner-top", !isDropDown)
-               .find('li:last')
+               .end().find('li:last')
                        .addClass("ui-corner-bottom");
                this.selectmenuIcon
                        .toggleClass('ui-icon-triangle-1-s', isDropDown)
@@ -431,7 +431,7 @@ $.widget("ui.selectmenu", {
                        this.list.addClass(self.widgetBaseClass + '-open')
                                .attr('aria-hidden', false)
                                .find('li:not(.'+ self.widgetBaseClass +'-group):eq('+ this._selectedIndex() +') a')[0].focus();        
-                       if(this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-all').addClass('ui-corner-top'); } 
+                       if (this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-all').addClass('ui-corner-top'); }        
                        this._refreshPosition();
                        this._trigger("open", event, this._uiHash());
                }
@@ -443,8 +443,8 @@ $.widget("ui.selectmenu", {
                        this.list
                                .attr('aria-hidden', true)
                                .removeClass(this.widgetBaseClass+'-open');
-                       if(this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); }
-                       if(retainFocus){this.newelement.focus();}       
+                       if (this.options.style == "dropdown"){ this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all'); }
+                       if (retainFocus){this.newelement.focus();}      
                        this._trigger("close", event, this._uiHash());
                }
        },