git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 3.2.0 - Released 03/30/2010
[extjs.git]
/
src
/
util
/
ClickRepeater.js
diff --git
a/src/util/ClickRepeater.js
b/src/util/ClickRepeater.js
index
0905a79
..
07b4d8c
100644
(file)
--- a/
src/util/ClickRepeater.js
+++ b/
src/util/ClickRepeater.js
@@
-1,6
+1,6
@@
/*!
/*!
- * Ext JS Library 3.
1.1
- * Copyright(c) 2006-2010 Ext JS,
LLC
+ * Ext JS Library 3.
2.0
+ * Copyright(c) 2006-2010 Ext JS,
Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
* licensing@extjs.com
* http://www.extjs.com/license
*/
@@
-87,13
+87,16
@@
Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, {
enable: function(){
if(this.disabled){
this.el.on('mousedown', this.handleMouseDown, this);
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;
},
if(this.preventDefault || this.stopDefault){
this.el.on('click', this.eventOptions, this);
}
}
this.disabled = false;
},
-
+
/**
* Disables the repeater and stops events from firing.
*/
/**
* Disables the repeater and stops events from firing.
*/
@@
-108,31
+111,39
@@
Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, {
}
this.disabled = true;
},
}
this.disabled = true;
},
-
+
/**
* Convenience function for setting disabled/enabled by boolean.
* @param {Boolean} disabled
*/
setDisabled: function(disabled){
/**
* 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();
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();
},
// 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);
// private
handleMouseDown : function(){
clearTimeout(this.timer);
@@
-148,10
+159,10
@@
Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, {
this.fireEvent("mousedown", this);
this.fireEvent("click", this);
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;
if (this.accelerate) {
this.delay = 400;
-
}
+ }
this.timer = this.click.defer(this.delay || this.interval, this);
},
this.timer = this.click.defer(this.delay || this.interval, this);
},