From: Timo Tijhof Date: Wed, 11 Apr 2012 22:01:32 +0000 (+0200) Subject: Removing button-float-right rule from jquery.ui/vector theme X-Git-Tag: 1.31.0-rc.0~23861^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=024b27f638f3aa5091315cfb25a2ddede06aaf58;p=lhc%2Fweb%2Fwiklou.git Removing button-float-right rule from jquery.ui/vector theme - Fixes: * (bug 35046) [Regression] jquery.ui buttons order reversed in Vector The Vector css has this non-standard rule: > .ui-dialog .ui-dialog-buttonpane button { float: right; } That rule was causing the first button to be on the right, the second button to be on the left of that and so forth. Per jQuery UI documentation and all other scripts, plugins and skins ever written by and for jQuery UI, the order is wrong in Vector, and right in all other skins. See for example: http://jqueryui.com/demos/dialog/#modal-confirmation $( "
" ).dialog({ height: 140, buttons: { "Delete all items": function() { $( this ).dialog( "close" ); }, Cancel: function() { $( this ).dialog( "close" ); } } }); The "Delete all items" is the first button and "Cancel" to the right of that (as it should be). That is restored in Vector by removing said css rule from /resources/jquery.ui/themes/vector/jquery.ui.dialog.css and instead adding a float rule for the button container, copied from the default jQuery UI theme: /resources/jquery.ui/themes/default/jquery.ui.dialog.css : line 18 Other plugins/skins are not affected. Change-Id: I18752aa0fe21dd3c5bc5bd4a830faaa4c836f9cd --- diff --git a/resources/jquery.ui/themes/vector/jquery.ui.dialog.css b/resources/jquery.ui/themes/vector/jquery.ui.dialog.css index 2b19fcddfe..cd85f14e73 100644 --- a/resources/jquery.ui/themes/vector/jquery.ui.dialog.css +++ b/resources/jquery.ui/themes/vector/jquery.ui.dialog.css @@ -8,7 +8,7 @@ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { 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; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* Customizations */