]> git.wh0rd.org - tt-rss.git/blame - lib/dijit/CheckedMenuItem.js.uncompressed.js
modify dojo rebuild script to remove uncompressed files
[tt-rss.git] / lib / dijit / CheckedMenuItem.js.uncompressed.js
CommitLineData
f0cfe83e
AD
1require({cache:{
2'url:dijit/templates/CheckedMenuItem.html':"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n"}});
3define("dijit/CheckedMenuItem", [
4 "dojo/_base/declare", // declare
5 "dojo/dom-class", // domClass.toggle
6 "./MenuItem",
7 "dojo/text!./templates/CheckedMenuItem.html",
8 "./hccss"
9], function(declare, domClass, MenuItem, template){
10
11 // module:
12 // dijit/CheckedMenuItem
13
14 return declare("dijit.CheckedMenuItem", MenuItem, {
15 // summary:
16 // A checkbox-like menu item for toggling on and off
17
18 templateString: template,
19
20 // checked: Boolean
21 // Our checked state
22 checked: false,
23 _setCheckedAttr: function(/*Boolean*/ checked){
24 // summary:
25 // Hook so attr('checked', bool) works.
26 // Sets the class and state for the check box.
27 domClass.toggle(this.domNode, "dijitCheckedMenuItemChecked", checked);
28 this.domNode.setAttribute("aria-checked", checked ? "true" : "false");
29 this._set("checked", checked);
30 },
31
32 iconClass: "", // override dijitNoIcon
33
34 onChange: function(/*Boolean*/ /*===== checked =====*/){
35 // summary:
36 // User defined function to handle check/uncheck events
37 // tags:
38 // callback
39 },
40
41 _onClick: function(evt){
42 // summary:
43 // Clicking this item just toggles its state
44 // tags:
45 // private
46 if(!this.disabled){
47 this.set("checked", !this.checked);
48 this.onChange(this.checked);
49 }
50 this.onClick(evt);
51 }
52 });
53});