git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 3.3.0 - Released 10/06/2010
[extjs.git]
/
src
/
widgets
/
menu
/
CheckItem.js
diff --git
a/src/widgets/menu/CheckItem.js
b/src/widgets/menu/CheckItem.js
index
2c24fe2
..
c862ab8
100644
(file)
--- a/
src/widgets/menu/CheckItem.js
+++ b/
src/widgets/menu/CheckItem.js
@@
-1,6
+1,6
@@
/*!
/*!
- * Ext JS Library 3.
1
.0
- * Copyright(c) 2006-20
09 Ext JS, LLC
+ * Ext JS Library 3.
3
.0
+ * Copyright(c) 2006-20
10 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
* licensing@extjs.com
* http://www.extjs.com/license
*/
@@
-30,7
+30,7
@@
Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
/**
* @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false). Note that
/**
* @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false). Note that
- * if this checkbox is part of a radio group (group = true) only the
la
st item in the group that is
+ * if this checkbox is part of a radio group (group = true) only the
fir
st item in the group that is
* initialized with checked = true will be rendered as checked.
*/
checked: false,
* initialized with checked = true will be rendered as checked.
*/
checked: false,
@@
-93,12
+93,14
@@
Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
* @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false)
*/
setChecked : function(state, suppressEvent){
* @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false)
*/
setChecked : function(state, suppressEvent){
- if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){
+ var suppress = suppressEvent === true;
+ if(this.checked != state && (suppress || this.fireEvent("beforecheckchange", this, state) !== false)){
+ Ext.menu.MenuMgr.onCheckChange(this, state);
if(this.container){
this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked");
}
this.checked = state;
if(this.container){
this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked");
}
this.checked = state;
- if(
suppressEvent !== true
){
+ if(
!suppress
){
this.fireEvent("checkchange", this, state);
}
}
this.fireEvent("checkchange", this, state);
}
}