X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..f5240829880f87e0cf581c6a296e436fdef0ef80:/docs/source/CheckItem.html diff --git a/docs/source/CheckItem.html b/docs/source/CheckItem.html index c4026a87..1909cfd6 100644 --- a/docs/source/CheckItem.html +++ b/docs/source/CheckItem.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.menu.CheckItem * @extends Ext.menu.Item * Adds a menu item that contains a checkbox by default, but can also be part of a radio group. @@ -32,7 +38,7 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
/** * @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 last item in the group that is + * if this checkbox is part of a radio group (group = true) only the first item in the group that is * initialized with checked = true will be rendered as checked. */ checked: false, @@ -95,12 +101,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){ - 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(suppressEvent !== true){ + if(!suppress){ this.fireEvent("checkchange", this, state); } } @@ -114,6 +122,6 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, { Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); } }); -Ext.reg('menucheckitem', Ext.menu.CheckItem);
- +Ext.reg('menucheckitem', Ext.menu.CheckItem);
+ \ No newline at end of file