TagSpaces is an offline, open source, document manager with tagging support
add flag useWatchingCurrentDirectory in options -- issue TS288
miroope0676f6e6df8
diff --git a/data/js/options.ui.js b/data/js/options.ui.jsindex a840b4327..b8f8b726a 100644--- a/data/js/options.ui.js+++ b/data/js/options.ui.js@@ -146,6 +146,7 @@ define(function(require, exports, module) {$('#loadLocationMetaData').attr('checked', TSCORE.Config.getLoadLocationMeta());$('#useSearchInSubfolders').attr('checked', TSCORE.Config.getUseSearchInSubfolders());$('#maxSearchResultCount').val(TSCORE.Config.getMaxSearchResultCount());+ $('#useWatchingCurrentDirectory').attr('checked', TSCORE.Config.getUseWatchingCurrentDirectory());$('#tagsDelimiterInput').val(TSCORE.Config.getTagDelimiter());$('#prefixTagContainerInput').val(TSCORE.Config.getPrefixTagContainer());$('#nextDocumentKeyBinding').val(TSCORE.Config.getNextDocumentKeyBinding());@@ -225,6 +226,7 @@ define(function(require, exports, module) {TSCORE.Config.setLoadLocationMeta($('#loadLocationMetaData').is(':checked'));TSCORE.Config.setUseSearchInSubfolders($('#useSearchInSubfolders').is(':checked'));TSCORE.Config.setMaxSearchResultCount($('#maxSearchResultCount').val());+ TSCORE.Config.setUseWatchingCurrentDirectory($('#useWatchingCurrentDirectory').is(':checked'));TSCORE.Config.setNextDocumentKeyBinding(parseKeyBinding($('#nextDocumentKeyBinding').val()));TSCORE.Config.setPrevDocumentKeyBinding(parseKeyBinding($('#prevDocumentKeyBinding').val()));TSCORE.Config.setCloseViewerKeyBinding(parseKeyBinding($('#closeDocumentKeyBinding').val()));diff --git a/data/js/settings.api.js b/data/js/settings.api.jsindex f0aede0af..c9f31dd2a 100644--- a/data/js/settings.api.js+++ b/data/js/settings.api.js@@ -721,7 +721,17 @@ define(function(require, exports, module) {}exports.Settings.maxSearchResultCount = value;}-++ function getUseWatchingCurrentDirectory() {+ if (exports.Settings.useWatchingCurrentDirectory === undefined) {+ exports.Settings.useWatchingCurrentDirectory = exports.DefaultSettings.useWatchingCurrentDirectory;+ }+ return exports.Settings.useWatchingCurrentDirectory;+ }+ function setUseWatchingCurrentDirectory(value) {+ exports.Settings.useWatchingCurrentDirectory = value;+ }+function getEnableMetaData() {if (exports.Settings.enableMetaData === undefined) {exports.Settings.enableMetaData = exports.DefaultSettings.enableMetaData;@@ -1264,7 +1274,9 @@ define(function(require, exports, module) {exports.getUseSearchInSubfolders = getUseSearchInSubfolders;exports.setUseSearchInSubfolders = setUseSearchInSubfolders;exports.getMaxSearchResultCount = getMaxSearchResultCount;- exports.setMaxSearchResultCount = setMaxSearchResultCount;+ exports.setMaxSearchResultCount = setMaxSearchResultCount;+ exports.getUseWatchingCurrentDirectory = getUseWatchingCurrentDirectory;+ exports.setUseWatchingCurrentDirectory = setUseWatchingCurrentDirectory;exports.setEnableMetaData = setEnableMetaData;exports.getEnableMetaData = getEnableMetaData;exports.getIsWindowMaximized = getIsWindowMaximized;diff --git a/data/js/settings.default.js b/data/js/settings.default.jsindex 84b037a66..3d607c152 100644--- a/data/js/settings.default.js+++ b/data/js/settings.default.js@@ -44,6 +44,7 @@ define(function (require, exports, module) {"useOCR": false,"useTextExtraction": false,"useGenerateThumbnails": false,+ "useWatchingCurrentDirectory": false,"supportedLanguages": [{ "iso": "en_US", "title": "English" },{ "iso": "de_DE", "title": "Deutsch (German)" },diff --git a/data/locales/en_US/ns.dialogs.json b/data/locales/en_US/ns.dialogs.jsonindex adceb0ad1..54ac0671f 100644--- a/data/locales/en_US/ns.dialogs.json+++ b/data/locales/en_US/ns.dialogs.json@@ -165,5 +165,6 @@"loadLocationMetaDataHelp": "Location metadata file 'tsm.json' should be placed in the '.ts' subfolder of the current location. The file format should be the same as the exported tag groups file from the tab 'general'.","useSearchInSubfolders": "Search in sub-folders by default","maxSearchResultCount": "Limit files found to",+ "useWatchingCurrentDirectory": "Watching current directory","-": "-"}diff --git a/data/templates/OptionsDialog.html b/data/templates/OptionsDialog.htmlindex 2210127b6..cf44045c1 100644--- a/data/templates/OptionsDialog.html+++ b/data/templates/OptionsDialog.html@@ -84,6 +84,14 @@</label></div></div>+ <div class="form-group">+ <div class="col-sm-12 checkbox">+ <label for="useWatchingCurrentDirectory">+ <input type="checkbox" id="useWatchingCurrentDirectory"/>+ <span data-i18n="ns.dialogs:useWatchingCurrentDirectory"></span>+ </label>+ </div>+ </div><div class='form-group'><button class="btn btn-default" id="exportTagGroupsButton" aria-hidden="true"><i class="fa fa-upload"></i>