mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-28 01:06:28 +08:00
Color palette: fix custom color after clearing local storage
This commit is contained in:
@ -171,6 +171,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');
|
||||
@ -189,6 +190,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++;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user