-<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.util.ClickRepeater"></div>/**
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <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.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.util.ClickRepeater"></div>/**
@class Ext.util.ClickRepeater
@extends Ext.util.Observable
enable: function(){
if(this.disabled){
this.el.on('mousedown', this.handleMouseDown, this);
+ if (Ext.isIE){
+ this.el.on('dblclick', this.handleDblClick, this);
+ }
if(this.preventDefault || this.stopDefault){
this.el.on('click', this.eventOptions, this);
}
}
this.disabled = false;
},
-
+
/**
* Disables the repeater and stops events from firing.
*/
}
this.disabled = true;
},
-
+
/**
* Convenience function for setting disabled/enabled by boolean.
* @param {Boolean} disabled
*/
setDisabled: function(disabled){
- this[disabled ? 'disable' : 'enable']();
+ this[disabled ? 'disable' : 'enable']();
},
-
+
eventOptions: function(e){
if(this.preventDefault){
e.preventDefault();
}
if(this.stopDefault){
e.stopEvent();
- }
+ }
},
-
+
// private
destroy : function() {
this.disable(true);
Ext.destroy(this.el);
this.purgeListeners();
},
-
+
+ handleDblClick : function(){
+ clearTimeout(this.timer);
+ this.el.blur();
+
+ this.fireEvent("mousedown", this);
+ this.fireEvent("click", this);
+ },
+
// private
handleMouseDown : function(){
clearTimeout(this.timer);
this.fireEvent("mousedown", this);
this.fireEvent("click", this);
-// Do not honor delay or interval if acceleration wanted.
+ // Do not honor delay or interval if acceleration wanted.
if (this.accelerate) {
this.delay = 400;
- }
+ }
this.timer = this.click.defer(this.delay || this.interval, this);
},
this.el.removeClass(this.pressClass);
this.fireEvent("mouseup", this);
}
-});</pre> \r
-</body>\r
+});</pre>
+</body>
</html>
\ No newline at end of file