Fix tag colors resetting on sorting - That workaround is not needed anymore. Colors are now always set on printing the tag list items

abf9f526c07a8ddb9d2d82f6a684782a18b4e59a

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +0 -19Showing whitespace changes
public/scripts/tags.js+0 -19
@@ -1367,27 +1367,8 @@ function makeTagListDraggable(tagContainer) {
13671367 const id = $(tagElement).attr('id');
13681368 const tag = tags.find(x => x.id === id);
13691369
1370- // Fix the defined colors, because if there is no color set, they seem to get automatically set to black
1371- // based on the color picker after drag&drop, even if there was no color chosen. We just set them back.
1372- const color = $(tagElement).find('.tagColorPickerHolder .tag-color').attr('color');
1373- const color2 = $(tagElement).find('.tagColorPicker2Holder .tag-color2').attr('color');
1374- if (color === '' || color === undefined) {
1375- tag.color = '';
1376- fixColor('background-color', tag.color);
1377- }
1378- if (color2 === '' || color2 === undefined) {
1379- tag.color2 = '';
1380- fixColor('color', tag.color2);
1381- }
1382-
13831370 // Update the sort order
13841371 tag.sort_order = i;
1385-
1386- function fixColor(property, color) {
1387- $(tagElement).find('.tag_view_name').css(property, color);
1388- $(`.tag[id="${id}"]`).css(property, color);
1389- $(`.bogus_folder_select[tagid="${id}"] .avatar`).css(property, color);
1390- }
13911372 });
13921373
13931374 // If tags were dragged manually, we have to disable auto sorting