Skip to content

Commit

Permalink
Checkbox: Update visual test to current jQuery version; update impl t…
Browse files Browse the repository at this point in the history
…o set version and options defaults, and to set aria-checked attribute to correct value.
  • Loading branch information
jzaefferer committed Jul 10, 2011
1 parent b8d15a2 commit c1d2ead
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/visual/checkbox/checkbox.html
Expand Up @@ -5,7 +5,7 @@
<title>Checkbox Visual Test : Default</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css" />
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.checkbox.js"></script>
Expand Down
14 changes: 7 additions & 7 deletions ui/jquery.ui.checkbox.js
Expand Up @@ -18,7 +18,10 @@
var checkboxId = 0;

$.widget( "ui.checkbox", {

version: "@VERSION",
options: {
disabled : null
},
_create: function() {

var that = this;
Expand Down Expand Up @@ -101,7 +104,8 @@ $.widget( "ui.checkbox", {
},

_refresh: function() {
this.iconElement.toggleClass( "ui-icon ui-icon-check", this.element.is(":checked") );
var checked = this.element.is(":checked");
this.iconElement.toggleClass( "ui-icon ui-icon-check", checked ).attr( "aria-checked", checked );
},

widget: function() {
Expand All @@ -126,14 +130,10 @@ $.widget( "ui.checkbox", {
this.checkboxElement
[ value ? "addClass" : "removeClass" ]( "ui-checkbox-disabled" );
}

$.Widget.prototype._setOption.apply( this, arguments );
},

});

$.extend( $.ui.checkbox, {
version: "@VERSION"
});

}( jQuery ));

0 comments on commit c1d2ead

Please sign in to comment.