From 99910708e38f3644fbd40c91678fd1c81361bf25 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 5 Jun 2019 17:39:37 +0200 Subject: [PATCH] list of available annotators is sorted alphabetically --- CHANGELOG | 1 + .../src/main/js/gui/admin/ChooseAnnotatorsDialog.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ad83b4e59f..4ade19782a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ minerva (12.3.1~beta.1) unstable; urgency=low * Bug fix: plugin tab header wasn't properly resized after adding plugins that introduced second line for tab selection (#758) * Bug fix: invisible layer shouldn't be shown in the on th map (#813) + * Bug fix: list of availbale annotators is sorted alphabetically (#815) minerva (13.1.0~beta.0) unstable; urgency=low * Feature: annotators are more flexible - you can define set of input and diff --git a/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js b/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js index 570935cda2..9f5d579569 100644 --- a/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js +++ b/frontend-js/src/main/js/gui/admin/ChooseAnnotatorsDialog.js @@ -197,6 +197,15 @@ ChooseAnnotatorsDialog.prototype.setElementType = function (elementType) { } entries.push(entry); } + entries.sort(function (entryA, entryB) { + if (entryA.name < entryB.name) { + return -1; + } + if (entryA.name > entryB.name) { + return 1; + } + return 0; + }); var checkboxList = new MultiCheckboxList(selectElement, { entries: entries, listTitle: "Available annotators", -- GitLab