TagSpaces is an offline, open source, document manager with tagging support
override css style button of tag
kristiyandd09f5742094c5
diff --git a/data/assets/core.css b/data/assets/core.cssindex 16d02f30e..db8f6bb07 100644--- a/data/assets/core.css+++ b/data/assets/core.css@@ -293,8 +293,8 @@.tagButton {padding: 2px 4px 2px 4px !important;- background: #008000 !important;- color: white !important;+ background: #008000;+ color: white;margin: 1px;border: 0;z-index: 9999;diff --git a/data/js/core.api.js b/data/js/core.api.jsindex 1b65a201a..78bf1a862 100644--- a/data/js/core.api.js+++ b/data/js/core.api.js@@ -170,30 +170,17 @@ define(function(require, exports, module) {window.addEventListener('orientationchange', reLayout);$(window).on('resize', reLayout);--- getStyleSheet('core.css');+changeElement();}function changeElement(e) {- $('.tagButton').css({'background':TSCORE.Config.getDefaultTagColor(),'color':TSCORE.Config.getDefaultTagTextColor()});- }-- function getStyleSheet(title) {- document.querySelector('.tagButton').style.color = TSCORE.Config.getDefaultTagTextColor();- document.querySelector('.tagButton').style.background = TSCORE.Config.getDefaultTagColor();-- for(var i=0; i<document.styleSheets.length; i++) {- var sheet = document.styleSheets[i];- console.debug(sheet);- if(sheet.title === title) {- return sheet;- }- }+ var sheet = document.createElement('style');+ sheet.innerHTML = ".tagButton {color: "+ TSCORE.Config.getDefaultTagTextColor()+ +"; background: "+ TSCORE.Config.getDefaultTagColor()+";}";+ document.body.appendChild(sheet);}-function switchInterfaceLanguage(language) {exports.currentLanguage = language;return new Promise(function(resolve, reject) {