diff --git a/apps/common/main/lib/component/ThemeColorPalette.js b/apps/common/main/lib/component/ThemeColorPalette.js index 50ec83d49..33f3f8cbe 100644 --- a/apps/common/main/lib/component/ThemeColorPalette.js +++ b/apps/common/main/lib/component/ThemeColorPalette.js @@ -180,6 +180,7 @@ define([ if (color) { // custom color was selected color = color.toUpperCase(); selected.removeClass(this.selectedCls); + this.lastSelectedIdx = -1; } var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom'); @@ -198,7 +199,15 @@ define([ color = undefined; //select only first found color } } - + while (i < this.options.dynamiccolors) { + colorEl = el.find('.color-dynamic-'+ i); + colorEl.removeAttr('color'); + colorEl.addClass('dynamic-empty-color'); + colorEl.find('span').css({ + 'background-color': 'transparent' + }); + i++; + } el.find('.palette-color-dynamiccolors').toggleClass(this.emptyColorsClass, c===0); } },