TagSpaces is an offline, open source, document manager with tagging support
correcting generateTagStyle function
Ilian Sapundshiev645d7ee8562a
diff --git a/data/js/tags.ui.js b/data/js/tags.ui.jsindex 4ea2c75bf..e9e2bf9e5 100644--- a/data/js/tags.ui.js+++ b/data/js/tags.ui.js@@ -484,15 +484,17 @@ define(function(require, exports, module) {// Get the color for a tagfunction generateTagStyle(tagObject) {- var tagStyle = '';- if (tagObject.color !== undefined) {- var textColor = tagObject.textcolor;- if (textColor === undefined) {- textColor = 'white';- }- tagStyle = 'color: ' + textColor + ' !important; background-color: ' + tagObject.color + ' !important;';+ var tagTextColor = TSCORE.Config.getDefaultTagTextColor();+ var tagColor = TSCORE.Config.getDefaultTagColor();++ if (tagObject.textcolor) {+ tagTextColor = tagObject.textcolor;}- return tagStyle;+ if (tagObject.color) {+ tagColor = tagObject.color;+ }++ return 'color: ' + tagTextColor + ' !important; background-color: ' + tagColor + ' !important;';}function showDialogTagCreate() {