-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.CycleButton"></div>/**\r
+<html>\r
+<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js"><div id="cls-Ext.CycleButton"></div>/**\r
* @class Ext.CycleButton\r
* @extends Ext.SplitButton\r
* A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically\r
}\r
this.activeItem = item;\r
if(!item.checked){\r
- item.setChecked(true, true);\r
+ item.setChecked(true, false);\r
}\r
if(this.forceIcon){\r
this.setIconClass(this.forceIcon);\r
this.itemCount = this.items.length;\r
\r
this.menu = {cls:'x-cycle-menu', items:[]};\r
- var checked;\r
+ var checked = 0;\r
Ext.each(this.items, function(item, i){\r
Ext.apply(item, {\r
group: item.group || this.id,\r
});\r
this.menu.items.push(item);\r
if(item.checked){\r
- checked = item;\r
+ checked = i;\r
}\r
}, this);\r
- this.setActiveItem(checked, true);\r
Ext.CycleButton.superclass.initComponent.call(this);\r
-\r
this.on('click', this.toggleSelected, this);\r
+ this.setActiveItem(checked, true);\r
},\r
\r
// private\r
}\r
}\r
});\r
-Ext.reg('cycle', Ext.CycleButton);</pre>
-</body>
+Ext.reg('cycle', Ext.CycleButton);</pre> \r
+</body>\r
</html>
\ No newline at end of file