//>>built
require({cache:{
'url:dijit/templates/CheckedMenuItem.html':"
\n\t\n\t\t\n\t\t\n\t | \n\t | \n\t | \n\t | \n
\n"}});
define("dijit/CheckedMenuItem", [
"dojo/_base/declare", // declare
"dojo/dom-class", // domClass.toggle
"./MenuItem",
"dojo/text!./templates/CheckedMenuItem.html",
"./hccss"
], function(declare, domClass, MenuItem, template){
/*=====
var MenuItem = dijit.MenuItem;
=====*/
// module:
// dijit/CheckedMenuItem
// summary:
// A checkbox-like menu item for toggling on and off
return declare("dijit.CheckedMenuItem", MenuItem, {
// summary:
// A checkbox-like menu item for toggling on and off
templateString: template,
// checked: Boolean
// Our checked state
checked: false,
_setCheckedAttr: function(/*Boolean*/ checked){
// summary:
// Hook so attr('checked', bool) works.
// Sets the class and state for the check box.
domClass.toggle(this.domNode, "dijitCheckedMenuItemChecked", checked);
this.domNode.setAttribute("aria-checked", checked);
this._set("checked", checked);
},
iconClass: "", // override dijitNoIcon
onChange: function(/*Boolean*/ /*===== checked =====*/){
// summary:
// User defined function to handle check/uncheck events
// tags:
// callback
},
_onClick: function(/*Event*/ e){
// summary:
// Clicking this item just toggles its state
// tags:
// private
if(!this.disabled){
this.set("checked", !this.checked);
this.onChange(this.checked);
}
this.inherited(arguments);
}
});
});