Removing button-float-right rule from jquery.ui/vector theme
authorTimo Tijhof <ttijhof@wikimedia.org>
Wed, 11 Apr 2012 22:01:32 +0000 (00:01 +0200)
committerTimo Tijhof <ttijhof@wikimedia.org>
Wed, 11 Apr 2012 22:01:32 +0000 (00:01 +0200)
commit024b27f638f3aa5091315cfb25a2ddede06aaf58
treeb359add2270ef0fee8828d6d3a6d7d7f07e7bba5
parentdd69dbe2517e96b6181419723159c8d2e7f3db1f
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

$( "<div>" ).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
resources/jquery.ui/themes/vector/jquery.ui.dialog.css