Swatches for the color picker. Improves discoverability of colors especially when the picker is opened with a grayscale color. props mattwiebe. FIXES #21206.
git-svn-id: https://develop.svn.wordpress.org/trunk@22457 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6b78173371
commit
0b66789582
@ -12,7 +12,8 @@
|
||||
defaultColor: false,
|
||||
change: false,
|
||||
clear: false,
|
||||
hide: true
|
||||
hide: true,
|
||||
palettes: true
|
||||
},
|
||||
_create: function() {
|
||||
// bail early for IE < 8
|
||||
@ -43,6 +44,7 @@
|
||||
hide: true,
|
||||
width: 255,
|
||||
mode: 'hsv',
|
||||
palettes: self.options.palettes,
|
||||
change: function( event, ui ) {
|
||||
self.toggler.css( { backgroundColor: ui.color.toString() } );
|
||||
// check for a custom cb
|
||||
@ -115,9 +117,9 @@
|
||||
|
||||
this.element.iris( "option", "color", newColor );
|
||||
},
|
||||
//$("#input").wpColorPicker('default_color') returns the current default color
|
||||
//$("#input").wpColorPicker('default_color', newDefaultColor) to set
|
||||
default_color: function( newDefaultColor ) {
|
||||
//$("#input").wpColorPicker('defaultColor') returns the current default color
|
||||
//$("#input").wpColorPicker('defaultColor', newDefaultColor) to set
|
||||
defaultColor: function( newDefaultColor ) {
|
||||
if ( newDefaultColor === undef )
|
||||
return this.options.defaultColor;
|
||||
|
||||
|
4
wp-admin/js/iris.min.js
vendored
4
wp-admin/js/iris.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user