X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..530ef4b6c5b943cfa68b779d11cf7de29aa878bf:/docs/source/CheckItem.html diff --git a/docs/source/CheckItem.html b/docs/source/CheckItem.html index c4026a87..78905abb 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.2.1
+ * 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. @@ -95,12 +101,13 @@ 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)){ 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 +121,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