Skip to content

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

clean code

kristiyanddaa0b85db93d9
diff --git a/data/js/tags.ui.js b/data/js/tags.ui.js
index 49ed93869..21a2d0ab4 100644
--- a/data/js/tags.ui.js
+++ b/data/js/tags.ui.js
@@ -352,34 +352,29 @@ define(function(require, exports, module) {
var d;
if (tagData.type === 'smart') {
switch (tagData.functionality) {
- case 'geoLocation':
- {
+ case 'geoLocation': {
$('#viewContainers').on('drop dragend', function(event) {
- tagValue = TSCORE.TagUtils.formatGeoTag();
+ tagValue = TSCORE.TagUtils.formatGeoTag();
});
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;
@@ -387,18 +382,15 @@ define(function(require, exports, module) {
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;
}
}
diff --git a/data/js/tagutils.js b/data/js/tagutils.js
index db4d5ac80..fa37a0961 100644
--- a/data/js/tagutils.js
+++ b/data/js/tagutils.js
@@ -97,12 +97,12 @@ define(function(require, exports, module) {
var beginTagContainer = fileName.indexOf(BEGIN_TAG_CONTAINER);
var endTagContainer = fileName.lastIndexOf(END_TAG_CONTAINER);
/* cases like "", "t", "["
- if( fileName.length <= 1) {
- // cases like "asd ] asd ["
- else if (beginTagContainer > endTagContainer) {
- // case: [ not found in the filename
- else if ( beginTagContainer < 0 )
- else if ( endTagContainer < 0 ) */
+ if( fileName.length <= 1) {
+ // cases like "asd ] asd ["
+ else if (beginTagContainer > endTagContainer) {
+ // case: [ not found in the filename
+ else if ( beginTagContainer < 0 )
+ else if ( endTagContainer < 0 ) */
if (beginTagContainer >= 0 && beginTagContainer < endTagContainer) {
if (beginTagContainer === 0 && endTagContainer === fileName.trim().length) {
// case: "[tag1, tag2]"
@@ -232,7 +232,7 @@ define(function(require, exports, module) {
return cYear + '' + cMonth + '' + cDate + time + milliseconds;
}
- function formatGeoTag(){
+ function formatGeoTag() {
TSCORE.showTagEditDialog();
}
@@ -539,7 +539,7 @@ define(function(require, exports, module) {
}
//Collect recent tags in a custom tag-group
- function collectRecentTags (newTags) {
+ function collectRecentTags(newTags) {
var collectGroupKey = 'COL';
var collectGroup = TSCORE.Config.getTagGroupData(collectGroupKey);
if (!collectGroup) {