[Color palette] Hide recent color by default
This commit is contained in:
parent
5b2a65d2cb
commit
ac5a4a1018
|
@ -55,13 +55,15 @@ define([
|
||||||
|
|
||||||
getPicker: function(color, colors) {
|
getPicker: function(color, colors) {
|
||||||
if (!this.colorPicker) {
|
if (!this.colorPicker) {
|
||||||
this.colorPicker = new Common.UI.ThemeColorPalette({
|
var config = {
|
||||||
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
|
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
|
||||||
transparent: this.options.transparent,
|
|
||||||
hideEmptyColors: this.options.hideEmptyColors,
|
|
||||||
value: color,
|
value: color,
|
||||||
colors: colors
|
colors: colors
|
||||||
});
|
};
|
||||||
|
(this.options.transparent!==undefined) && (config['transparent'] = this.options.transparent);
|
||||||
|
(this.options.hideEmptyColors!==undefined) && (config['hideEmptyColors'] = this.options.hideEmptyColors);
|
||||||
|
|
||||||
|
this.colorPicker = new Common.UI.ThemeColorPalette(config);
|
||||||
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
|
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
|
||||||
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
|
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
|
||||||
if (this.options.auto) {
|
if (this.options.auto) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ define([
|
||||||
themecolors: 10,
|
themecolors: 10,
|
||||||
columns: 10,
|
columns: 10,
|
||||||
effects: 5,
|
effects: 5,
|
||||||
hideEmptyColors: false,
|
hideEmptyColors: true,
|
||||||
allowReselect: true,
|
allowReselect: true,
|
||||||
transparent: false,
|
transparent: false,
|
||||||
value: '000000',
|
value: '000000',
|
||||||
|
|
|
@ -377,7 +377,6 @@ define([
|
||||||
split: true,
|
split: true,
|
||||||
menu: true,
|
menu: true,
|
||||||
auto: true,
|
auto: true,
|
||||||
hideEmptyColors: true,
|
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
dataHintDirection: 'bottom',
|
dataHintDirection: 'bottom',
|
||||||
dataHintOffset: '0, -16'
|
dataHintOffset: '0, -16'
|
||||||
|
|
Loading…
Reference in a new issue