]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Wrap buttons in a div so we can float the div instead of the individual butto...
authorScott González <scott.gonzalez@gmail.com>
Fri, 30 Jul 2010 00:56:28 +0000 (20:56 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 30 Jul 2010 00:56:28 +0000 (20:56 -0400)
tests/unit/dialog/dialog_options.js
themes/base/jquery.ui.dialog.css
ui/jquery.ui.dialog.js

index cda16aadcdb5a31eb56f33ceb0be1a3c72071dc0..fb6a28e12f8d1c8b2c2f6ff4ae3a6a156bdadf41 100644 (file)
@@ -43,7 +43,7 @@ test("buttons", function() {
                i++;
        });
 
-       ok(btn.parent().hasClass('ui-dialog-buttonpane'), "buttons in container");
+       ok(btn.parent().hasClass('ui-dialog-buttonset'), "buttons in container");
        btn.trigger("click");
 
        var newButtons = {
index 0ad55e9cad5ffd570dacfb3a6f685d60ffc571a1..0354644473f81c7ae6f944b1c7e917409e180acb 100644 (file)
@@ -15,6 +15,7 @@
 .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
 .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
 .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
 .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
 .ui-draggable .ui-dialog-titlebar { cursor: move; }
index ae96b2d8b9a608d65b4b6c72307f214e257046bc..df11e2190a16f2bf28373f0cc1993d97b628bf99 100644 (file)
@@ -342,7 +342,10 @@ $.widget("ui.dialog", {
                                        'ui-dialog-buttonpane ' +
                                        'ui-widget-content ' +
                                        'ui-helper-clearfix'
-                               );
+                               ),
+                       uiButtonSet = $( "<div></div>" )
+                               .addClass( "ui-dialog-buttonset" )
+                               .appendTo( uiDialogButtonPane );
 
                // if we already have a button pane, remove it
                self.uiDialog.find('.ui-dialog-buttonpane').remove();
@@ -357,7 +360,7 @@ $.widget("ui.dialog", {
                                var button = $('<button type="button"></button>')
                                        .text(name)
                                        .click(function() { fn.apply(self.element[0], arguments); })
-                                       .appendTo(uiDialogButtonPane);
+                                       .appendTo(uiButtonSet);
                                if ($.fn.button) {
                                        button.button();
                                }