Skip to content

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

sortingg file types in the options alphabetically

Ilian1a7860e1d305
diff --git a/data/js/options.ui.js b/data/js/options.ui.js
index cf3ad74c1..cc87ecf05 100644
--- a/data/js/options.ui.js
+++ b/data/js/options.ui.js
@@ -126,7 +126,13 @@
.append($("<span style=' border: 0; width: 170px' class='fteditor form-control' data-i18n='ns.dialogs:fileEditor'></span>"))
).i18n();
- TSCORE.Config.getSupportedFileTypes().forEach(function (value) {
+ TSCORE.Config.getSupportedFileTypes().sort(function(a, b){
+ if (a.type > b.type)
+ return 1;
+ if (a.type < b.type)
+ return -1;
+ return 0;
+ }).forEach(function (value) {
addFileType($('#fileTypesList'), value.type, value.viewer, value.editor);
});