diff --git a/manifest.json b/manifest.json index eb230d4..7df3259 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "j-Lawyer-Thunderbird-Extension", - "version": "0.9.9", + "version": "0.9.9.1", "description": "Sendet E-Mails an einen j-Lawyer-Server", "permissions": [ "activeTab", diff --git a/popup.js b/popup.js index 71ab46a..0c25a7c 100644 --- a/popup.js +++ b/popup.js @@ -474,7 +474,8 @@ async function fillTagsList() { } if (result.documentTags && result.documentTags.length > 0) { - result.documentTags.forEach(tag => { + const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung) + sortedTags.forEach(tag => { // Nur hinzufügen, wenn der Tag noch nicht in der Liste ist if (!isTagInList(tag)) { const option = document.createElement("option"); diff --git a/popup_compose.js b/popup_compose.js index f14fc63..dd2fbff 100644 --- a/popup_compose.js +++ b/popup_compose.js @@ -256,7 +256,7 @@ function getConsecutiveMatchCount(str, query) { return maxCount; } -/// Füllen der Tagsliste +// Füllen der Tagsliste async function fillTagsList() { try { const result = await browser.storage.local.get("documentTags"); @@ -273,7 +273,8 @@ async function fillTagsList() { } if (result.documentTags && result.documentTags.length > 0) { - result.documentTags.forEach(tag => { + const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung) + sortedTags.forEach(tag => { // Nur hinzufügen, wenn der Tag noch nicht in der Liste ist if (!isTagInList(tag)) { const option = document.createElement("option"); diff --git a/popup_menu_bundle_save.js b/popup_menu_bundle_save.js index ba976ce..1bfd588 100644 --- a/popup_menu_bundle_save.js +++ b/popup_menu_bundle_save.js @@ -311,7 +311,8 @@ async function fillTagsList() { } if (result.documentTags && result.documentTags.length > 0) { - result.documentTags.forEach(tag => { + const sortedTags = result.documentTags.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' })); // Tags alphabetisch sortieren (unabhängig von Groß- und Kleinschreibung) + sortedTags.forEach(tag => { // Nur hinzufügen, wenn der Tag noch nicht in der Liste ist if (!isTagInList(tag)) { const option = document.createElement("option");