Skip to content
Permalink
Browse files

Don't use :radio selector.

  • Loading branch information...
scottgonzalez committed May 21, 2012
1 parent 1e586dc commit 9ac52deaa271d3162e3d24724faf03f0b92ba3df
Showing with 6 additions and 6 deletions.
  1. +3 −3 tests/unit/button/button_core.js
  2. +1 −1 tests/unit/button/button_tickets.js
  3. +2 −2 ui/jquery.ui.button.js
@@ -34,7 +34,7 @@ function assert(noForm, form1, form2) {
}

test("radio groups", function() {
$(":radio").button();
$("input[type=radio]").button();
assert(":eq(0)", ":eq(1)", ":eq(2)");

// click outside of forms
@@ -61,7 +61,7 @@ test("buttonset", function() {
var set = $("#radio1").buttonset();
ok( set.is(".ui-buttonset") );
deepEqual( set.children(".ui-button").length, 3 );
deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
ok( set.children("label:eq(0)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
@@ -76,7 +76,7 @@ test("buttonset (rtl)", function() {
set = $("#radio1").buttonset();
ok( set.is(".ui-buttonset") );
deepEqual( set.children(".ui-button").length, 3 );
deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
ok( set.children("label:eq(0)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
@@ -7,7 +7,7 @@ module( "button: tickets" );

test( "#5946 - buttonset should ignore buttons that are not :visible", function() {
$( "#radio01" ).next().andSelf().hide();
var set = $( "#radio0" ).buttonset({ items: ":radio:visible" });
var set = $( "#radio0" ).buttonset({ items: "input[type=radio]:visible" });
ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) );
ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
});
@@ -216,7 +216,7 @@ $.widget( "ui.button", {

if ( this.element.is(":checkbox") ) {
this.type = "checkbox";
} else if ( this.element.is(":radio") ) {
} else if ( this.element.is("[type=radio]") ) {
this.type = "radio";
} else if ( this.element.is("input") ) {
this.type = "input";
@@ -358,7 +358,7 @@ $.ui.button.version = "@VERSION";

$.widget( "ui.buttonset", {
options: {
items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
items: ":button, :submit, :reset, :checkbox, [type=radio], a, :data(button)"
},

_create: function() {

0 comments on commit 9ac52de

Please sign in to comment.
You can’t perform that action at this time.