Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Checkbox: Update visual test to current jQuery version; update impl t…

…o set version and options defaults, and to set aria-checked attribute to correct value.
  • Loading branch information...
commit c1d2eadcd901da07d84f0d3a72996099c4676fe6 1 parent b8d15a2
@jzaefferer jzaefferer authored
Showing with 8 additions and 8 deletions.
  1. +1 −1  tests/visual/checkbox/checkbox.html
  2. +7 −7 ui/jquery.ui.checkbox.js
View
2  tests/visual/checkbox/checkbox.html
@@ -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>
View
14 ui/jquery.ui.checkbox.js
@@ -18,7 +18,10 @@
var checkboxId = 0;
$.widget( "ui.checkbox", {
-
+ version: "@VERSION",
+ options: {
+ disabled : null
+ },
_create: function() {
var that = this;
@@ -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() {
@@ -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 ));
Please sign in to comment.
Something went wrong with that request. Please try again.