1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #2982: Correct CSS class assignment on color picker

This commit is contained in:
Jeremy Stretch
2019-03-11 13:31:48 -04:00
parent 7e70bfaacc
commit e05871b467
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,10 @@ $(document).ready(function() {
// Assign color picker selection classes
function colorPickerClassCopy(data, container) {
if (data.element) {
// Remove any existing color-selection classes
$(container).attr('class', function(i, c) {
return c.replace(/(^|\s)color-selection-\S+/g, '');
});
$(container).addClass($(data.element).attr("class"));
}
return data.text;