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.3.1 - Released 11/30/2010
[extjs.git]
/
src
/
widgets
/
ColorPalette.js
diff --git
a/src/widgets/ColorPalette.js
b/src/widgets/ColorPalette.js
index
0250e9d
..
9dcf681
100644
(file)
--- a/
src/widgets/ColorPalette.js
+++ b/
src/widgets/ColorPalette.js
@@
-1,8
+1,8
@@
/*!
/*!
- * Ext JS Library 3.
1.0
- * Copyright(c) 2006-20
09 Ext JS, LLC
- * licensing@
extjs
.com
- * http://www.
extjs
.com/license
+ * Ext JS Library 3.
3.1
+ * Copyright(c) 2006-20
10 Sencha Inc.
+ * licensing@
sencha
.com
+ * http://www.
sencha
.com/license
*/
/**
* @class Ext.ColorPalette
*/
/**
* @class Ext.ColorPalette
@@
-132,7
+132,7
@@
cp.colors = ['000000', '993300', '333300'];
if(this.value){
var s = this.value;
this.value = null;
if(this.value){
var s = this.value;
this.value = null;
- this.select(s);
+ this.select(s
, true
);
}
},
}
},
@@
-148,8
+148,9
@@
cp.colors = ['000000', '993300', '333300'];
/**
* Selects the specified color in the palette (fires the {@link #select} event)
* @param {String} color A valid 6-digit color hex code (# will be stripped if included)
/**
* Selects the specified color in the palette (fires the {@link #select} event)
* @param {String} color A valid 6-digit color hex code (# will be stripped if included)
+ * @param {Boolean} suppressEvent (optional) True to stop the select event from firing. Defaults to <tt>false</tt>.
*/
*/
- select : function(color){
+ select : function(color
, suppressEvent
){
color = color.replace('#', '');
if(color != this.value || this.allowReselect){
var el = this.el;
color = color.replace('#', '');
if(color != this.value || this.allowReselect){
var el = this.el;
@@
-158,7
+159,9
@@
cp.colors = ['000000', '993300', '333300'];
}
el.child('a.color-'+color).addClass('x-color-palette-sel');
this.value = color;
}
el.child('a.color-'+color).addClass('x-color-palette-sel');
this.value = color;
- this.fireEvent('select', this, color);
+ if(suppressEvent !== true){
+ this.fireEvent('select', this, color);
+ }
}
}
}
}
@@
-166,4
+169,4
@@
cp.colors = ['000000', '993300', '333300'];
* @cfg {String} autoEl @hide
*/
});
* @cfg {String} autoEl @hide
*/
});
-Ext.reg('colorpalette', Ext.ColorPalette);
+Ext.reg('colorpalette', Ext.ColorPalette);
\ No newline at end of file