Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dijit / CheckedMenuItem.js @ 12

History | View | Annotate | Download (1.59 KB)

1 9 andrej.cim
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6
7
8
if(!dojo._hasResource["dijit.CheckedMenuItem"]){
9
dojo._hasResource["dijit.CheckedMenuItem"]=true;
10
dojo.provide("dijit.CheckedMenuItem");
11
dojo.require("dijit.MenuItem");
12
dojo.declare("dijit.CheckedMenuItem",dijit.MenuItem,{templateString:dojo.cache("dijit","templates/CheckedMenuItem.html","<tr class=\"dijitReset dijitMenuItem\" dojoAttachPoint=\"focusNode\" waiRole=\"menuitemcheckbox\" tabIndex=\"-1\"\n\t\tdojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" waiRole=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" dojoAttachPoint=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" dojoAttachPoint=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" dojoAttachPoint=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" waiRole=\"presentation\">&nbsp;</td>\n</tr>\n"),checked:false,_setCheckedAttr:function(_1){
13
dojo.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",_1);
14
dijit.setWaiState(this.domNode,"checked",_1);
15
this.checked=_1;
16
},onChange:function(_2){
17
},_onClick:function(e){
18
if(!this.disabled){
19
this.set("checked",!this.checked);
20
this.onChange(this.checked);
21
}
22
this.inherited(arguments);
23
}});
24
}