[TASK] Sort tags in „View Upgrade Documentation“ by name 13/56113/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 12 Mar 2018 15:13:21 +0000 (16:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 12 Mar 2018 21:36:29 +0000 (22:36 +0100)
Resolves: #84217
Releases: master
Change-Id: Icd5e917f0b3d8fcd3f0a9ab5f9f763f87189f3a9
Reviewed-on: https://review.typo3.org/56113
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Resources/Public/JavaScript/Modules/UpgradeDocs.js

index cef5580..15a664e 100644 (file)
@@ -101,7 +101,10 @@ define([
       $(this.selectorRestFileItem).each(function() {
         tagString += $(this).data('item-tags') + ',';
       });
-      var tagArray = this.trimExplodeAndUnique(',', tagString);
+      var tagArray = this.trimExplodeAndUnique(',', tagString).sort(function(a, b) {
+        // Sort case-insensitive by name
+        return a.toLowerCase().localeCompare(b.toLowerCase());
+      });
       $.each(tagArray, function(i, tag) {
         self.chosenField.append('<option>' + tag + '</option>');
       });