-<html>\r
-<head>\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.Button"></div>/**
+<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.Button"></div>/**
* @class Ext.Button
* @extends Ext.BoxComponent
* Simple Button class
* @type Boolean
*/
pressed : false,
- /**
- * The Button's owner {@link Ext.Panel} (defaults to undefined, and is set automatically when
- * the Button is added to a container). Read-only.
- * @type Ext.Panel
- * @property ownerCt
- */
/**
* @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined)
/**
* @cfg {String} clickEvent
- * The type of event to map to the button's event handler (defaults to 'click')
+ * The DOM event that will fire the handler of the button. This can be any valid event name (dblclick, contextmenu).
+ * Defaults to <tt>'click'</tt>.
*/
clickEvent : 'click',
this.el = btn;
if(this.id){
- this.el.dom.id = this.el.id = this.id;
+ var d = this.el.dom,
+ c = Ext.Element.cache;
+
+ delete c[d.id];
+ d.id = this.el.id = this.id;
+ c[d.id] = this.el;
}
if(this.icon){
btnEl.setStyle('background-image', 'url(' +this.icon +')');
var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {});
this.mon(repeater, 'click', this.onClick, this);
}
-
this.mon(btn, this.clickEvent, this.onClick, this);
},
return null;
}
};
-}();</pre> \r
-</body>\r
+}();</pre>
+</body>
</html>
\ No newline at end of file