Skip to content

Commit

Permalink
CheckBox: remove dijit-legacy-requires and ${nameAttrSetting}, refs #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Apr 30, 2013
1 parent a69f538 commit 1a2df78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions form/CheckBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,18 @@ define([
"dojo/dom-attr", // domAttr.set
"dojo/has", // has("dijit-legacy-requires")
"dojo/query", // query
"dojo/ready",
"./ToggleButton",
"./_CheckBoxMixin",
"../_FocusMixin",
"dojo/text!./templates/CheckBox.html",
"dojo/NodeList-dom", // NodeList.addClass/removeClass
"../a11yclick" // template uses ondijitclick
], function(require, declare, domAttr, has, query, ready, ToggleButton, _CheckBoxMixin, template){
], function(require, declare, domAttr, has, query, ToggleButton, _CheckBoxMixin, _FocusMixin, template){

// module:
// dijit/form/CheckBox

// Back compat w/1.6, remove for 2.0
if(has("dijit-legacy-requires")){
ready(0, function(){
var requires = ["dijit/form/RadioButton"];
require(requires); // use indirection so modules not rolled into a build
});
}

return declare("dijit.form.CheckBox", [ToggleButton, _CheckBoxMixin], {
return declare("dijit.form.CheckBox", [ToggleButton, _CheckBoxMixin, _FocusMixin], {
// summary:
// Same as an HTML checkbox, but with fancy styling.
//
Expand Down
2 changes: 1 addition & 1 deletion form/templates/CheckBox.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="dijit dijitReset dijitInline" role="presentation"
><input
${!nameAttrSetting} type="${type}" role="${type}" aria-checked="false" ${checkedAttrSetting}
type="${type}" role="${type}" aria-checked="false" ${checkedAttrSetting}
class="dijitReset dijitCheckBoxInput"
data-dojo-attach-point="focusNode"
data-dojo-attach-event="ondijitclick:_onClick"
Expand Down

0 comments on commit 1a2df78

Please sign in to comment.