X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/source/ClickRepeater.html diff --git a/docs/source/ClickRepeater.html b/docs/source/ClickRepeater.html index c96196fd..1a46fc20 100644 --- a/docs/source/ClickRepeater.html +++ b/docs/source/ClickRepeater.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.util.ClickRepeater @extends Ext.util.Observable @@ -89,13 +95,16 @@ Ext.extend(Ext.util.ClickRepeater, 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. */ @@ -110,31 +119,39 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { } 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); @@ -150,10 +167,10 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { 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); }, @@ -199,6 +216,6 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { this.el.removeClass(this.pressClass); this.fireEvent("mouseup", this); } -});
- +});
+ \ No newline at end of file