Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Check style, fix get default color from settings

kristiyandd1be71b91b9fd
diff --cc data/electron/electron.api.js
index de587095f,de587095f..a896ced38
--- a/data/electron/electron.api.js
+++ b/data/electron/electron.api.js
@@@ -399,7 -399,7 +399,7 @@@ define(function(require, exports, modul
ipcRenderer.on("play-pause", function(event, arg) {
// Create the event.
-- var audioEvent = new CustomEvent('resume', { 'detail': arg });
++ var audioEvent = new CustomEvent('resume', {'detail': arg});
window.dispatchEvent(audioEvent);
});
}
diff --cc data/js/tags.ui.js
index 893d933ff,893d933ff..f3873f12a
--- a/data/js/tags.ui.js
+++ b/data/js/tags.ui.js
@@@ -381,8 -381,8 +381,7 @@@ define(function(require, exports, modul
var d;
if (tagData.type === 'smart') {
switch (tagData.functionality) {
-- case 'geoLocation':
-- {
++ case 'geoLocation': {
$('#viewContainers').on('drop dragend', function(event) {
if (TSCORE.selectedTag === 'geoTag') {
tagValue = TSCORE.showTagEditDialog();
@@@ -390,27 -390,27 +389,23 @@@
});
break;
}
-- case 'today':
-- {
++ case 'today': {
tagValue = TSCORE.TagUtils.formatDateTime4Tag(new Date(), false);
break;
}
-- case 'tomorrow':
-- {
++ case 'tomorrow': {
d = new Date();
d.setDate(d.getDate() + 1);
tagValue = TSCORE.TagUtils.formatDateTime4Tag(d, false);
break;
}
-- case 'yesterday':
-- {
++ case 'yesterday': {
d = new Date();
d.setDate(d.getDate() - 1);
tagValue = TSCORE.TagUtils.formatDateTime4Tag(d, false);
break;
}
-- case 'currentMonth':
-- {
++ case 'currentMonth': {
var cMonth = '' + (new Date().getMonth() + 1);
if (cMonth.length === 1) {
cMonth = '0' + cMonth;
@@@ -418,18 -418,18 +413,15 @@@
tagValue = '' + new Date().getFullYear() + cMonth;
break;
}
-- case 'currentYear':
-- {
++ case 'currentYear': {
tagValue = '' + new Date().getFullYear();
break;
}
-- case 'now':
-- {
++ case 'now': {
tagValue = TSCORE.TagUtils.formatDateTime4Tag(new Date(), true);
break;
}
-- default:
-- {
++ default: {
break;
}
}
@@@ -551,8 -551,8 +543,10 @@@
$editTagGroupBackgroundColorChooser.on('change', function() {
$editTagGroupBackgroundColor.val($editTagGroupBackgroundColorChooser.val());
});
--
++ console.log("-----------------------");
++ console.log(TSCORE.Config.getDefaultTagColor());
if (TSCORE.selectedTagData.color === undefined || TSCORE.selectedTagData.color.length < 1) {
++
$editTagGroupBackgroundColor.val(TSCORE.Config.getDefaultTagColor());
} else {
$editTagGroupBackgroundColor.val(TSCORE.selectedTagData.color);